@divami-artefacts/ai-design-system 1.0.26 → 1.0.27

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/index.js CHANGED
@@ -504,7 +504,13 @@ var L = 680, R = 42, oe = 10, se = 24, ce = 24, le = 8, ue = [
504
504
  u.amber,
505
505
  u.red
506
506
  ];
507
- function de({ items: e = [], "data-testid": t }) {
507
+ function de(e, t, n) {
508
+ if (e.measureText(t).width <= n) return t;
509
+ let r = t;
510
+ for (; r.length > 0 && e.measureText(r + "…").width > n;) r = r.slice(0, -1);
511
+ return r + "…";
512
+ }
513
+ function fe({ items: e = [], "data-testid": t }) {
508
514
  let r = a(null), l = a(0), d = a(/* @__PURE__ */ new Map()), [m, g] = o(!1), _ = i(() => e.filter((e) => typeof e == "object" && !!e), [e]), S = i(() => [..._].sort((e, t) => (t.percentage ?? 0) - (e.percentage ?? 0)), [_]), E = i(() => m ? S : S.slice(0, le), [S, m]), O = E.length, k = se + ce + O * R + Math.max(0, O - 1) * oe, { hoveredRef: A, tooltip: j, hitZonesRef: M } = w(r, {
509
515
  width: L,
510
516
  height: k
@@ -535,7 +541,7 @@ function de({ items: e = [], "data-testid": t }) {
535
541
  sublabel: `Base: ${r.baseLabel ?? String(r.base ?? 0)} · Variations: ${r.variationLabel ?? String(r.variation ?? 0)}`,
536
542
  color: o
537
543
  };
538
- T(M.current, r.id, u, c + R / 2, 14, m), t.font = p.font, t.fillStyle = h(o, .9 + s * .1), t.textAlign = "left", t.textBaseline = "middle", t.fillText(`${r.percentage ?? 0}%`, u + 10, c + R / 2), t.font = `${s > 0 ? "bold " : ""}` + f.font, t.fillStyle = s > 0 ? o : f.color, t.textAlign = "right", t.fillText(r.abbreviation ?? r.name?.slice(0, 6) ?? "", n - 8, c + R / 2);
544
+ T(M.current, r.id, u, c + R / 2, 14, m), t.font = p.font, t.fillStyle = h(o, .9 + s * .1), t.textAlign = "left", t.textBaseline = "middle", t.fillText(`${r.percentage ?? 0}%`, u + 10, c + R / 2), t.font = `${s > 0 ? "bold " : ""}` + f.font, t.fillStyle = s > 0 ? o : f.color, t.textAlign = "right", t.fillText(de(t, r.abbreviation ?? r.name ?? "", n - 16), n - 8, c + R / 2);
539
545
  }), t.strokeStyle = h(u.t3, .3), t.lineWidth = 1, t.setLineDash([]), t.beginPath(), t.moveTo(n + a, se), t.lineTo(n + a, se + (O - 1) * (R + oe) + R), t.stroke(), x(t, L, k, e, .015), o = requestAnimationFrame(s);
540
546
  };
541
547
  return s(), () => cancelAnimationFrame(o);
@@ -574,18 +580,18 @@ function de({ items: e = [], "data-testid": t }) {
574
580
  }
575
581
  //#endregion
576
582
  //#region src/components/semiCircularGaugeChart/SemiCircularGaugeChart.tsx
577
- var fe = 480, pe = 340;
578
- function me({ value: e, confirmed: t, total: r, "data-testid": i }) {
583
+ var pe = 480, me = 340;
584
+ function he({ value: e, confirmed: t, total: r, "data-testid": i }) {
579
585
  let o = a(null), c = a(0);
580
586
  return n(() => {
581
587
  let n = o.current;
582
588
  if (!n) return;
583
- let i = v(n, fe, pe);
589
+ let i = v(n, pe, me);
584
590
  c.current = 0;
585
- let a = fe / 2, s = Math.PI, l = 2 * Math.PI, d = Math.PI, p, g = () => {
591
+ let a = pe / 2, s = Math.PI, l = 2 * Math.PI, d = Math.PI, p, g = () => {
586
592
  c.current++;
587
593
  let n = c.current;
588
- i.clearRect(0, 0, fe, pe), i.letterSpacing = f.letterSpacing;
594
+ i.clearRect(0, 0, pe, me), i.letterSpacing = f.letterSpacing;
589
595
  let o = D(Math.min(n / 80, 1)), _ = A(Math.min(n / 72, 1));
590
596
  i.beginPath(), i.arc(a, 220, 120, s, l), i.strokeStyle = h(u.bd, .35), i.lineWidth = 46, i.stroke(), [
591
597
  {
@@ -645,16 +651,16 @@ function me({ value: e, confirmed: t, total: r, "data-testid": i }) {
645
651
  "data-testid": i,
646
652
  style: {
647
653
  position: "relative",
648
- width: fe,
649
- height: pe
654
+ width: pe,
655
+ height: me
650
656
  },
651
657
  children: /* @__PURE__ */ s("canvas", {
652
658
  ref: o,
653
659
  role: "img",
654
660
  "aria-label": `Compensation event gauge — ${e}% of NCEs confirmed as compensation events`,
655
661
  style: {
656
- width: fe,
657
- height: pe,
662
+ width: pe,
663
+ height: me,
658
664
  display: "block"
659
665
  }
660
666
  })
@@ -662,7 +668,7 @@ function me({ value: e, confirmed: t, total: r, "data-testid": i }) {
662
668
  }
663
669
  //#endregion
664
670
  //#region src/canvas/useCanvasLoop.ts
665
- function he(e, t, r, i, o = !0, s = {}) {
671
+ function ge(e, t, r, i, o = !0, s = {}) {
666
672
  let c = a(0), { easing: l = D, durationFrames: u = 48 } = s;
667
673
  n(() => {
668
674
  let n = e.current;
@@ -694,28 +700,28 @@ function he(e, t, r, i, o = !0, s = {}) {
694
700
  }
695
701
  //#endregion
696
702
  //#region src/components/multiMetricConstellationChart/MultiMetricConstellationChart.tsx
697
- var z = 780, ge = 234, _e = 130, ve = 52, ye = [
703
+ var z = 780, _e = 234, ve = 130, ye = 52, be = [
698
704
  u.blue,
699
705
  u.amber,
700
706
  u.purple,
701
707
  u.green
702
- ], be = [
708
+ ], xe = [
703
709
  "Base Value",
704
710
  "Variations",
705
711
  "Commitment"
706
- ], xe = [
712
+ ], Se = [
707
713
  "Base",
708
714
  "Var",
709
715
  "Commit"
710
716
  ];
711
- function Se({ items: e = [], "data-testid": t }) {
717
+ function Ce({ items: e = [], "data-testid": t }) {
712
718
  let n = a(null), r = a(/* @__PURE__ */ new Map()), { hoveredRef: o, tooltip: l, hitZonesRef: d } = w(n, {
713
719
  width: z,
714
- height: ge
720
+ height: _e
715
721
  }), p = i(() => e.filter((e) => typeof e == "object" && !!e), [e]), g = i(() => {
716
722
  let e = Math.max(...p.map((e) => e.base ?? 0)), t = Math.max(...p.map((e) => e.variation ?? 0));
717
723
  return p.map((n, r) => {
718
- let i = z * (.12 + r * .19), a = _e, o = Math.min(z * .075, ve), s = ye[r % ye.length], c = [
724
+ let i = z * (.12 + r * .19), a = ve, o = Math.min(z * .075, ye), s = be[r % be.length], c = [
719
725
  (n.base ?? 0) / (e || 1) * 100,
720
726
  (n.variation ?? 0) / (t || 1) * 100,
721
727
  n.percentage ?? 0
@@ -724,10 +730,10 @@ function Se({ items: e = [], "data-testid": t }) {
724
730
  n.variationLabel ?? String(n.variation ?? 0),
725
731
  `${n.percentage ?? 0}%`
726
732
  ], u = c.map((e, t) => {
727
- let n = -Math.PI / 2 + t / be.length * Math.PI * 2, r = e / 100, s = o * Math.max(.08, r);
733
+ let n = -Math.PI / 2 + t / xe.length * Math.PI * 2, r = e / 100, s = o * Math.max(.08, r);
728
734
  return {
729
- name: be[t],
730
- short: xe[t],
735
+ name: xe[t],
736
+ short: Se[t],
731
737
  label: l[t],
732
738
  val: Math.round(e),
733
739
  x: i + Math.cos(n) * s,
@@ -747,8 +753,8 @@ function Se({ items: e = [], "data-testid": t }) {
747
753
  };
748
754
  });
749
755
  }, [p]);
750
- return he(n, z, ge, (e, t, n) => {
751
- N(r.current, o.current), d.current = [], b(e, z, ge, n, 30), g.forEach((t, i) => {
756
+ return ge(n, z, _e, (e, t, n) => {
757
+ N(r.current, o.current), d.current = [], b(e, z, _e, n, 30), g.forEach((t, i) => {
752
758
  let a = t.color, o = `constellation-${i}`, s = r.current.get(o) ?? 0;
753
759
  e.beginPath(), e.arc(t.cx, t.cy, t.baseR + 5, 0, Math.PI * 2), e.strokeStyle = h(u.bd, .08 + .08 * s), e.lineWidth = .5, e.stroke(), e.beginPath(), t.stars.forEach((t, n) => {
754
760
  n === 0 ? e.moveTo(t.x, t.y) : e.lineTo(t.x, t.y);
@@ -768,17 +774,17 @@ function Se({ items: e = [], "data-testid": t }) {
768
774
  sublabel: `${t.percentage ?? 0}% committed · scatter ${t.scatter.toFixed(1)}`,
769
775
  color: a
770
776
  });
771
- }), e.font = m.font, e.textAlign = "center", e.textBaseline = "middle", e.fillStyle = m.color, e.fillText("▲ top = Base value · ▼▸ lower-right = Variations · ◂▼ lower-left = Commitment % · hover stars for details", z / 2, ge - 14), x(e, z, ge, n, .012);
777
+ }), e.font = m.font, e.textAlign = "center", e.textBaseline = "middle", e.fillStyle = m.color, e.fillText("▲ top = Base value · ▼▸ lower-right = Variations · ◂▼ lower-left = Commitment % · hover stars for details", z / 2, _e - 14), x(e, z, _e, n, .012);
772
778
  }, !0), g.length === 0 ? /* @__PURE__ */ s(I, {
773
779
  width: z,
774
- height: ge,
780
+ height: _e,
775
781
  "data-testid": t
776
782
  }) : /* @__PURE__ */ c("div", {
777
783
  "data-testid": t,
778
784
  style: {
779
785
  position: "relative",
780
786
  width: z,
781
- height: ge
787
+ height: _e
782
788
  },
783
789
  children: [/* @__PURE__ */ s("canvas", {
784
790
  ref: n,
@@ -786,19 +792,19 @@ function Se({ items: e = [], "data-testid": t }) {
786
792
  "aria-label": "Contract value breakdown per contractor — multi-KPI constellation chart",
787
793
  style: {
788
794
  width: z,
789
- height: ge,
795
+ height: _e,
790
796
  display: "block"
791
797
  }
792
798
  }), /* @__PURE__ */ s(C, {
793
799
  ...l,
794
800
  parentW: z,
795
- parentH: ge
801
+ parentH: _e
796
802
  })]
797
803
  });
798
804
  }
799
805
  //#endregion
800
806
  //#region src/components/stackedHorizontalBarChart/StackedHorizontalBarChart.tsx
801
- var Ce = 680, we = 220, Te = 8, Ee = [
807
+ var we = 680, Te = 220, Ee = 8, De = [
802
808
  u.blue,
803
809
  u.amber,
804
810
  u.purple,
@@ -808,48 +814,48 @@ var Ce = 680, we = 220, Te = 8, Ee = [
808
814
  right: 80,
809
815
  top: 16,
810
816
  bottom: 38
811
- }, De = 150, V = 18;
812
- function Oe(e, t, n) {
817
+ }, Oe = 150, V = 18;
818
+ function ke(e, t, n) {
813
819
  if (e.measureText(t).width <= n) return t;
814
820
  let r = t;
815
821
  for (; r.length > 0 && e.measureText(r + "…").width > n;) r = r.slice(0, -1);
816
822
  return r + "…";
817
823
  }
818
- function ke(e) {
824
+ function Ae(e) {
819
825
  let t = Math.abs(e), n = e < 0 ? "-" : "";
820
826
  return t >= 1e6 ? `${n}£${(t / 1e6).toFixed(1)}M` : t >= 1e3 ? `${n}£${(t / 1e3).toFixed(1)}K` : `${n}£${t.toFixed(0)}`;
821
827
  }
822
- function Ae({ data: e, "data-testid": t }) {
823
- let n = a(null), r = a(/* @__PURE__ */ new Map()), [i, l] = o(!1), { items: d = [], totals: g } = e, _ = d.filter((e) => typeof e == "object" && !!e), v = [..._].sort((e, t) => (t.total ?? 0) - (e.total ?? 0)), b = i ? v : v.slice(0, Te), x = b.length, S = Math.max(...v.map((e) => Math.abs(e.total ?? 0)), 1), T = Math.max(we, B.top + B.bottom + x * V + Math.max(0, x - 1) * 8), D = Ce - B.left - De - B.right, k = x > 1 ? (T - B.top - B.bottom - x * V) / (x - 1) : 0, A = _.length === 0, { hoveredRef: j, tooltip: P, hitZonesRef: F } = w(n, {
824
- width: Ce,
825
- height: T
828
+ function je({ data: e, "data-testid": t }) {
829
+ let n = a(null), r = a(/* @__PURE__ */ new Map()), [i, l] = o(!1), { items: d = [], totals: g } = e, _ = d.filter((e) => typeof e == "object" && !!e), v = [..._].sort((e, t) => (t.total ?? 0) - (e.total ?? 0)), b = i ? v : v.slice(0, Ee), x = b.length, S = Math.max(...v.map((e) => Math.abs(e.total ?? 0)), 1), T = x * V + Math.max(0, x - 1) * 8, D = B.top + B.bottom + T, k = we - B.left - Oe - B.right, A = _.length === 0, { hoveredRef: j, tooltip: P, hitZonesRef: F } = w(n, {
830
+ width: we,
831
+ height: D
826
832
  });
827
- return he(n, Ce, T, (e, t) => {
833
+ return ge(n, we, D, (e, t) => {
828
834
  N(r.current, j.current), F.current = [], b.forEach((n, i) => {
829
- let a = Ee[i % Ee.length], o = M(t, i, x, O), s = B.top + i * (V + k), c = B.left + De, l = r.current.get(n.id) ?? 0, d = Math.max(n.base ?? 0, 0), m = Math.max(n.total ?? 0, 0), g = d / S * D * o, _ = m / S * D * o, v = _ - g;
830
- e.font = f.font, e.fillStyle = l > 0 ? a : f.color, e.textAlign = "right", e.textBaseline = "middle", e.fillText(Oe(e, n.name ?? "", De - 16), c - 8, s + V / 2), e.fillStyle = h(u.bd, .25), e.beginPath(), e.roundRect(c, s, D, V, 4), e.fill(), g > 0 && (l > 0 && y(e, c + g / 2, s + V / 2, g * .3, a, .1 * l), e.fillStyle = h(a, .5 + l * .15), e.beginPath(), e.roundRect(c, s, g, V, 4), e.fill()), v > 2 && (e.fillStyle = h(a, .22 + l * .08), e.beginPath(), e.roundRect(c + g, s, v, V, [
835
+ let a = De[i % De.length], o = M(t, i, x, O), s = B.top + i * (V + 8), c = B.left + Oe, l = r.current.get(n.id) ?? 0, d = Math.max(n.base ?? 0, 0), m = Math.max(n.total ?? 0, 0), g = d / S * k * o, _ = m / S * k * o, v = _ - g;
836
+ e.font = f.font, e.fillStyle = l > 0 ? a : f.color, e.textAlign = "right", e.textBaseline = "middle", e.fillText(ke(e, n.name ?? "", Oe - 16), c - 8, s + V / 2), e.fillStyle = h(u.bd, .25), e.beginPath(), e.roundRect(c, s, k, V, 4), e.fill(), g > 0 && (l > 0 && y(e, c + g / 2, s + V / 2, g * .3, a, .1 * l), e.fillStyle = h(a, .5 + l * .15), e.beginPath(), e.roundRect(c, s, g, V, 4), e.fill()), v > 2 && (e.fillStyle = h(a, .22 + l * .08), e.beginPath(), e.roundRect(c + g, s, v, V, [
831
837
  0,
832
838
  4,
833
839
  4,
834
840
  0
835
- ]), e.fill(), e.setLineDash([2, 3]), e.strokeStyle = h(a, .55), e.lineWidth = 1, e.beginPath(), e.moveTo(c + g, s + 3), e.lineTo(c + g, s + V - 3), e.stroke(), e.setLineDash([])), l > 0 && _ > 0 && (e.strokeStyle = h(a, .5 * l), e.lineWidth = 1, e.setLineDash([]), e.beginPath(), e.roundRect(c, s, _, V, 4), e.stroke()), o > .35 && (e.globalAlpha = Math.min(1, (o - .35) / .4), e.font = p.font, e.fillStyle = l > 0 ? a : p.color, e.textAlign = "left", e.textBaseline = "middle", e.fillText(n.totalLabel ?? ke(n.total ?? 0), c + _ + 6, s + V / 2), e.globalAlpha = 1), E(F.current, n.id, c, s, Math.max(_, 1), V, {
841
+ ]), e.fill(), e.setLineDash([2, 3]), e.strokeStyle = h(a, .55), e.lineWidth = 1, e.beginPath(), e.moveTo(c + g, s + 3), e.lineTo(c + g, s + V - 3), e.stroke(), e.setLineDash([])), l > 0 && _ > 0 && (e.strokeStyle = h(a, .5 * l), e.lineWidth = 1, e.setLineDash([]), e.beginPath(), e.roundRect(c, s, _, V, 4), e.stroke()), o > .35 && (e.globalAlpha = Math.min(1, (o - .35) / .4), e.font = p.font, e.fillStyle = l > 0 ? a : p.color, e.textAlign = "left", e.textBaseline = "middle", e.fillText(n.totalLabel ?? Ae(n.total ?? 0), c + _ + 6, s + V / 2), e.globalAlpha = 1), E(F.current, n.id, c, s, Math.max(_, 1), V, {
836
842
  label: n.name,
837
- value: `${n.totalLabel ?? ke(n.total ?? 0)} total`,
838
- sublabel: `Base ${n.baseLabel ?? ke(n.base ?? 0)} + Var ${n.variationLabel ?? ke(n.variation ?? 0)} · ${n.percentage ?? 0}% committed`,
843
+ value: `${n.totalLabel ?? Ae(n.total ?? 0)} total`,
844
+ sublabel: `Base ${n.baseLabel ?? Ae(n.base ?? 0)} + Var ${n.variationLabel ?? Ae(n.variation ?? 0)} · ${n.percentage ?? 0}% committed`,
839
845
  color: a
840
846
  });
841
847
  });
842
- let n = T - 14;
843
- e.textBaseline = "middle", e.font = m.font, e.textAlign = "left", e.fillStyle = h(u.blue, .5), e.beginPath(), e.roundRect(B.left + De, n - 3, 14, 6, 2), e.fill(), e.fillStyle = m.color, e.fillText("base value", B.left + De + 18, n), e.fillStyle = h(u.blue, .22), e.beginPath(), e.roundRect(B.left + De + 94, n - 3, 14, 6, 2), e.fill(), e.setLineDash([2, 3]), e.strokeStyle = h(u.blue, .5), e.lineWidth = .5, e.beginPath(), e.moveTo(B.left + De + 101, n - 3), e.lineTo(B.left + De + 101, n + 3), e.stroke(), e.setLineDash([]), e.fillStyle = m.color, e.fillText("approved variations", B.left + De + 112, n), e.font = m.font, e.textAlign = "right", e.fillStyle = m.color, e.fillText(`Portfolio: ${ke(g?.total ?? 0)}`, Ce - 8, n);
848
+ let n = D - 14;
849
+ e.textBaseline = "middle", e.font = m.font, e.textAlign = "left", e.fillStyle = h(u.blue, .5), e.beginPath(), e.roundRect(B.left + Oe, n - 3, 14, 6, 2), e.fill(), e.fillStyle = m.color, e.fillText("base value", B.left + Oe + 18, n), e.fillStyle = h(u.blue, .22), e.beginPath(), e.roundRect(B.left + Oe + 94, n - 3, 14, 6, 2), e.fill(), e.setLineDash([2, 3]), e.strokeStyle = h(u.blue, .5), e.lineWidth = .5, e.beginPath(), e.moveTo(B.left + Oe + 101, n - 3), e.lineTo(B.left + Oe + 101, n + 3), e.stroke(), e.setLineDash([]), e.fillStyle = m.color, e.fillText("approved variations", B.left + Oe + 112, n), e.font = m.font, e.textAlign = "right", e.fillStyle = m.color, e.fillText(`Portfolio: ${Ae(g?.total ?? 0)}`, we - 8, n);
844
850
  }, !0, { easing: O }), A ? /* @__PURE__ */ s(I, {
845
- width: Ce,
846
- height: we,
851
+ width: we,
852
+ height: Te,
847
853
  message: "No contract data available",
848
854
  "data-testid": t
849
855
  }) : /* @__PURE__ */ c("div", {
850
856
  "data-testid": t,
851
857
  style: {
852
- width: Ce,
858
+ width: we,
853
859
  transition: "all 0.25s ease"
854
860
  },
855
861
  children: [/* @__PURE__ */ c("div", {
@@ -859,17 +865,17 @@ function Ae({ data: e, "data-testid": t }) {
859
865
  role: "img",
860
866
  "aria-label": "Total contract value per contractor — horizontal bar chart",
861
867
  style: {
862
- width: Ce,
863
- height: T,
868
+ width: we,
869
+ height: D,
864
870
  display: "block",
865
871
  borderRadius: 8
866
872
  }
867
873
  }), /* @__PURE__ */ s(C, {
868
874
  ...P,
869
- parentW: Ce,
870
- parentH: T
875
+ parentW: we,
876
+ parentH: D
871
877
  })]
872
- }), _.length > Te && /* @__PURE__ */ s("div", {
878
+ }), _.length > Ee && /* @__PURE__ */ s("div", {
873
879
  style: { marginTop: 8 },
874
880
  children: /* @__PURE__ */ s(ae, {
875
881
  expanded: i,
@@ -880,94 +886,94 @@ function Ae({ data: e, "data-testid": t }) {
880
886
  }
881
887
  //#endregion
882
888
  //#region src/components/rankedCardLeaderboard/RankedCardLeaderboard.tsx
883
- var H = 780, U = 240, je = 12, Me = 10, Ne = [
889
+ var Me = 780, H = 240, Ne = 12, Pe = 10, Fe = [
884
890
  "Highest exposure",
885
891
  "Elevated risk",
886
892
  "Moderate exposure",
887
893
  "Moderate exposure",
888
894
  "Low exposure"
889
895
  ];
890
- function Pe({ items: e = [], "data-testid": t }) {
896
+ function Ie({ items: e = [], "data-testid": t }) {
891
897
  let r = a(null), o = a(0), l = a(/* @__PURE__ */ new Map()), { hoveredRef: m, tooltip: g, hitZonesRef: _ } = w(r, {
892
- width: H,
893
- height: U
898
+ width: Me,
899
+ height: H
894
900
  }), b = [...i(() => e.filter((e) => typeof e == "object" && !!e), [e])].sort((e, t) => (t.count ?? 0) - (e.count ?? 0)).slice(0, 5), S = b.reduce((e, t) => e + (t.count ?? 0), 0);
895
901
  return n(() => {
896
902
  let e = r.current;
897
903
  if (!e) return;
898
- let t = v(e, H, U);
904
+ let t = v(e, Me, H);
899
905
  o.current = 0;
900
- let n = Math.min(5, b.length), i = (H - 2 * je - 4 * Me) / 5, a = U * .84, s = U * .08, c = n * i + (n - 1) * Me, g = Math.round((H - c) / 2), C, w = () => {
906
+ let n = (Me - 2 * Ne - 4 * Pe) / 5, i = H * .84, a = H * .08, s = Ne, c, g = () => {
901
907
  o.current++;
902
908
  let e = o.current;
903
- t.clearRect(0, 0, H, U), t.letterSpacing = f.letterSpacing, _.current = [], l.current.forEach((e, t) => {
909
+ t.clearRect(0, 0, Me, H), t.letterSpacing = f.letterSpacing, _.current = [], l.current.forEach((e, t) => {
904
910
  let n = t === m.current ? 1 : 0, r = e + (n - e) * .12;
905
911
  Math.abs(r - n) < .005 ? n === 0 ? l.current.delete(t) : l.current.set(t, 1) : l.current.set(t, r);
906
- }), m.current && !l.current.has(m.current) && l.current.set(m.current, 0), b.forEach((n, r) => {
907
- let o = r === 0, c = r === 0 ? u.red : r === 1 ? u.amber : d[r % d.length], m = g + r * (i + Me), v = l.current.get(n.id) ?? 0, b = v * 8, x = m - b / 2, C = i + b, w = o ? j(e, .04, 3e-4) * .06 + .06 : 0;
908
- t.fillStyle = h(c, .08 + v * .07), t.beginPath(), t.roundRect(x, s, C, a, 6), t.fill(), t.strokeStyle = h(c, .2 + v * .4 + w), t.lineWidth = o ? 1.5 : 1, t.stroke(), (v > .01 || o) && y(t, x + C / 2, s + a / 2, C * .55, c, w + v * .14), t.font = p.font, t.textAlign = "left", t.textBaseline = "top", t.fillStyle = h(c, .5 + v * .35), t.fillText(`#${r + 1}`, x + 7, s + 6);
909
- let T = Math.min(i * .28, a * .32, 72), D = x + C / 2, O = s + a * .38, k = t.createRadialGradient(D, O - T * .2, 0, D, O, T);
910
- k.addColorStop(0, h(c, .5 + v * .2)), k.addColorStop(1, h(c, .2 + v * .1)), t.beginPath(), t.arc(D, O, T, 0, Math.PI * 2), t.fillStyle = k, t.fill(), t.strokeStyle = h(c, .4 + v * .3), t.lineWidth = 1, t.stroke(), t.font = p.font, t.textAlign = "center", t.textBaseline = "middle", t.fillStyle = h(u.t1, .9), t.fillText(n.abbreviation ?? n.name?.slice(0, 6) ?? "", D, O);
911
- let A = n.label ?? String(n.count ?? 0);
912
- t.font = p.font, t.textBaseline = "alphabetic", t.fillStyle = h(c, .9 + v * .1), t.fillText(A, D, s + a * .76), n.label || (t.font = f.font, t.fillStyle = f.color, t.fillText("open EWs", D, s + a * .88));
913
- let M = Math.round((n.count ?? 0) / (S || 1) * 100), N = Ne[r] ?? "Low exposure";
914
- E(_.current, n.id, m, s, i, a, {
915
- label: n.name,
912
+ }), m.current && !l.current.has(m.current) && l.current.set(m.current, 0), b.forEach((r, o) => {
913
+ let c = o === 0, m = o === 0 ? u.red : o === 1 ? u.amber : d[o % d.length], g = s + o * (n + Pe), v = l.current.get(r.id) ?? 0, b = v * 8, x = g - b / 2, C = n + b, w = c ? j(e, .04, 3e-4) * .06 + .06 : 0;
914
+ t.fillStyle = h(m, .08 + v * .07), t.beginPath(), t.roundRect(x, a, C, i, 6), t.fill(), t.strokeStyle = h(m, .2 + v * .4 + w), t.lineWidth = c ? 1.5 : 1, t.stroke(), (v > .01 || c) && y(t, x + C / 2, a + i / 2, C * .55, m, w + v * .14), t.font = p.font, t.textAlign = "left", t.textBaseline = "top", t.fillStyle = h(m, .5 + v * .35), t.fillText(`#${o + 1}`, x + 7, a + 6);
915
+ let T = Math.min(n * .28, i * .32, 72), D = x + C / 2, O = a + i * .38, k = t.createRadialGradient(D, O - T * .2, 0, D, O, T);
916
+ k.addColorStop(0, h(m, .5 + v * .2)), k.addColorStop(1, h(m, .2 + v * .1)), t.beginPath(), t.arc(D, O, T, 0, Math.PI * 2), t.fillStyle = k, t.fill(), t.strokeStyle = h(m, .4 + v * .3), t.lineWidth = 1, t.stroke(), t.font = p.font, t.textAlign = "center", t.textBaseline = "middle", t.fillStyle = h(u.t1, .9), t.fillText(r.abbreviation ?? r.name?.slice(0, 6) ?? "", D, O);
917
+ let A = r.label ?? String(r.count ?? 0);
918
+ t.font = p.font, t.textBaseline = "alphabetic", t.fillStyle = h(m, .9 + v * .1), t.fillText(A, D, a + i * .76), r.label || (t.font = f.font, t.fillStyle = f.color, t.fillText("open EWs", D, a + i * .88));
919
+ let M = Math.round((r.count ?? 0) / (S || 1) * 100), N = Fe[o] ?? "Low exposure";
920
+ E(_.current, r.id, g, a, n, i, {
921
+ label: r.name,
916
922
  value: `${A ?? 0} open · ${M}% of total`,
917
- sublabel: `Rank #${r + 1} · ${N}`,
918
- color: c
923
+ sublabel: `Rank #${o + 1} · ${N}`,
924
+ color: m
919
925
  });
920
- }), x(t, H, U, e, .015), C = requestAnimationFrame(w);
926
+ }), x(t, Me, H, e, .015), c = requestAnimationFrame(g);
921
927
  };
922
- return w(), () => cancelAnimationFrame(C);
928
+ return g(), () => cancelAnimationFrame(c);
923
929
  }, [b, S]), b.length === 0 ? /* @__PURE__ */ s(I, {
924
- width: H,
925
- height: U,
930
+ width: Me,
931
+ height: H,
926
932
  "data-testid": t
927
933
  }) : /* @__PURE__ */ c("div", {
928
934
  "data-testid": t,
929
935
  style: {
930
936
  position: "relative",
931
- width: H,
932
- height: U
937
+ width: Me,
938
+ height: H
933
939
  },
934
940
  children: [/* @__PURE__ */ s("canvas", {
935
941
  ref: r,
936
942
  role: "img",
937
943
  "aria-label": "Contractor rank — open EW count per contractor",
938
944
  style: {
939
- width: H,
940
- height: U,
945
+ width: Me,
946
+ height: H,
941
947
  display: "block",
942
948
  borderRadius: 8
943
949
  }
944
950
  }), /* @__PURE__ */ s(C, {
945
951
  ...g,
946
- parentW: H,
947
- parentH: U
952
+ parentW: Me,
953
+ parentH: H
948
954
  })]
949
955
  });
950
956
  }
951
957
  //#endregion
952
958
  //#region src/components/dotMatrixChart/DotMatrixChart.tsx
953
- var W = 680, G = 260;
954
- function Fe({ items: e = [], "data-testid": t }) {
959
+ var U = 680, W = 260;
960
+ function Le({ items: e = [], "data-testid": t }) {
955
961
  let r = a(null), o = a(0), l = a(/* @__PURE__ */ new Map()), { hoveredRef: d, tooltip: p, hitZonesRef: m } = w(r, {
956
- width: W,
957
- height: G
962
+ width: U,
963
+ height: W
958
964
  }), g = i(() => e.filter((e) => typeof e == "object" && !!e), [e]);
959
965
  return n(() => {
960
966
  let e = r.current;
961
967
  if (!e) return;
962
- let t = v(e, W, G);
968
+ let t = v(e, U, W);
963
969
  o.current = 0;
964
- let n = g.length, i = Math.max(...g.map((e) => e.count), 1), a = i, s = W * .05, c = G * .1, p = W * .9 / n, _ = G * .7 / a, S = g.reduce((e, t) => e + t.count, 0), C, w = () => {
970
+ let n = g.length, i = Math.max(...g.map((e) => e.count), 1), a = i, s = U * .05, c = W * .1, p = U * .9 / n, _ = W * .7 / a, S = g.reduce((e, t) => e + t.count, 0), C, w = () => {
965
971
  o.current++;
966
972
  let e = o.current;
967
- t.clearRect(0, 0, W, G), m.current = [], l.current.forEach((e, t) => {
973
+ t.clearRect(0, 0, U, W), m.current = [], l.current.forEach((e, t) => {
968
974
  let n = t === d.current ? 1 : 0, r = e + (n - e) * .12;
969
975
  Math.abs(r - n) < .005 ? n === 0 ? l.current.delete(t) : l.current.set(t, 1) : l.current.set(t, r);
970
- }), d.current && !l.current.has(d.current) && l.current.set(d.current, 0), b(t, W, G, e, 40, h(u.blue, .04)), g.forEach((n, r) => {
976
+ }), d.current && !l.current.has(d.current) && l.current.set(d.current, 0), b(t, U, W, e, 40, h(u.blue, .04)), g.forEach((n, r) => {
971
977
  let o = n.count === i, d = u.blue, g = l.current.get(`${n.category}-col`) ?? 0;
972
978
  for (let u = 0; u < a; u++) {
973
979
  let a = s + r * p + p / 2, f = c + u * _ + _ / 2, v = Math.min(p, _) * .38;
@@ -985,40 +991,40 @@ function Fe({ items: e = [], "data-testid": t }) {
985
991
  }
986
992
  let v = c + a * _ + 16;
987
993
  t.font = f.font, t.textAlign = "center", t.textBaseline = "alphabetic", t.fillStyle = o ? u.blue : h(u.t2, .65), t.fillText(n.category, s + r * p + p / 2, v);
988
- }), x(t, W, G, e, .015), C = requestAnimationFrame(w);
994
+ }), x(t, U, W, e, .015), C = requestAnimationFrame(w);
989
995
  };
990
996
  return w(), () => cancelAnimationFrame(C);
991
997
  }, [g]), g.length === 0 ? /* @__PURE__ */ s(I, {
992
- width: W,
993
- height: G,
998
+ width: U,
999
+ height: W,
994
1000
  "data-testid": t
995
1001
  }) : /* @__PURE__ */ c("div", {
996
1002
  "data-testid": t,
997
1003
  style: {
998
1004
  position: "relative",
999
- width: W,
1000
- height: G
1005
+ width: U,
1006
+ height: W
1001
1007
  },
1002
1008
  children: [/* @__PURE__ */ s("canvas", {
1003
1009
  ref: r,
1004
1010
  role: "img",
1005
1011
  "aria-label": "Early Warning count by category — breathing dot grid",
1006
1012
  style: {
1007
- width: W,
1008
- height: G,
1013
+ width: U,
1014
+ height: W,
1009
1015
  display: "block",
1010
1016
  borderRadius: 8
1011
1017
  }
1012
1018
  }), /* @__PURE__ */ s(C, {
1013
1019
  ...p,
1014
- parentW: W,
1015
- parentH: G
1020
+ parentW: U,
1021
+ parentH: W
1016
1022
  })]
1017
1023
  });
1018
1024
  }
1019
1025
  //#endregion
1020
1026
  //#region src/components/lineChart/LineChart.tsx
1021
- function Ie({ rows: e = [], className: t, colors: n }) {
1027
+ function Re({ rows: e = [], className: t, colors: n }) {
1022
1028
  return /* @__PURE__ */ s(ee, {
1023
1029
  rows: e,
1024
1030
  variant: "line",
@@ -1028,7 +1034,7 @@ function Ie({ rows: e = [], className: t, colors: n }) {
1028
1034
  }
1029
1035
  //#endregion
1030
1036
  //#region src/components/constants.ts
1031
- var Le = [
1037
+ var ze = [
1032
1038
  "#4C93D9",
1033
1039
  "#5DA537",
1034
1040
  "#F3862C",
@@ -1036,7 +1042,7 @@ var Le = [
1036
1042
  "#A0B724",
1037
1043
  "#EEBF3B",
1038
1044
  "#3C45D1"
1039
- ], Re = {
1045
+ ], Be = {
1040
1046
  nodes: [
1041
1047
  {
1042
1048
  id: "supplier-x",
@@ -1079,8 +1085,8 @@ var Le = [
1079
1085
  };
1080
1086
  //#endregion
1081
1087
  //#region src/components/miniBars/MiniBars.tsx
1082
- function ze({ rows: e = [], className: t, colors: n }) {
1083
- let r = n?.slices ?? Le;
1088
+ function Ve({ rows: e = [], className: t, colors: n }) {
1089
+ let r = n?.slices ?? ze;
1084
1090
  return /* @__PURE__ */ s("div", {
1085
1091
  className: ["d3-mini-bars", t].filter(Boolean).join(" "),
1086
1092
  children: e.map(([e, t, n], i) => /* @__PURE__ */ c("div", {
@@ -1106,7 +1112,7 @@ function ze({ rows: e = [], className: t, colors: n }) {
1106
1112
  width: Math.max(0, Math.min(100, t)),
1107
1113
  height: "12",
1108
1114
  rx: "6",
1109
- className: `d3-mini-fill tone-${i % Le.length}`,
1115
+ className: `d3-mini-fill tone-${i % ze.length}`,
1110
1116
  fill: r[i % r.length]
1111
1117
  })]
1112
1118
  })
@@ -1117,102 +1123,137 @@ function ze({ rows: e = [], className: t, colors: n }) {
1117
1123
  });
1118
1124
  }
1119
1125
  //#endregion
1126
+ //#region src/utils/numberFormat.ts
1127
+ var He = [
1128
+ {
1129
+ value: 0xe8d4a51000,
1130
+ suffix: "T",
1131
+ divisor: 0xe8d4a51000
1132
+ },
1133
+ {
1134
+ value: 1e9,
1135
+ suffix: "B",
1136
+ divisor: 1e9
1137
+ },
1138
+ {
1139
+ value: 1e6,
1140
+ suffix: "M",
1141
+ divisor: 1e6
1142
+ },
1143
+ {
1144
+ value: 1e3,
1145
+ suffix: "K",
1146
+ divisor: 1e3
1147
+ }
1148
+ ];
1149
+ function Ue(e, t = 1) {
1150
+ let n = Math.abs(e), r = e < 0 ? "-" : "";
1151
+ for (let e of He) if (n >= e.value) return `${r}${(n / e.divisor).toFixed(t)}${e.suffix}`;
1152
+ return `${r}${n.toFixed(0)}`;
1153
+ }
1154
+ //#endregion
1120
1155
  //#region src/components/radialFanTreeChart/RadialFanTreeChart.tsx
1121
- var Be = 680, Ve = 320, He = 60, Ue = 28;
1122
- function We({ total: e = 0, totalLabel: t, items: r = [], "data-testid": o }) {
1123
- let l = a(null), m = a(/* @__PURE__ */ new Map()), g = a(0), _ = i(() => r.filter((e) => typeof e == "object" && !!e), [r]), b = i(() => Math.max(Ve, He + Math.max(0, _.length - 1) * Ue), [_.length]), { hoveredRef: x, tooltip: S, hitZonesRef: E } = w(l, {
1124
- width: Be,
1125
- height: b
1156
+ var We = 800, Ge = 320, Ke = 60, qe = 28;
1157
+ function Je({ total: e = 0, totalLabel: t, items: r = [], width: o = We, "data-testid": l }) {
1158
+ let m = a(null), g = a(/* @__PURE__ */ new Map()), _ = a(0), b = i(() => r.filter((e) => typeof e == "object" && !!e), [r]), x = i(() => Math.max(Ge, Ke + Math.max(0, b.length - 1) * qe), [b.length]), { hoveredRef: S, tooltip: E, hitZonesRef: O } = w(m, {
1159
+ width: o,
1160
+ height: x
1126
1161
  });
1127
1162
  return n(() => {
1128
- let n = l.current;
1163
+ let n = m.current;
1129
1164
  if (!n) return;
1130
- let r = v(n, Be, b);
1131
- g.current = 0;
1132
- let i = b / 2, a = Be - 80, o = Math.max(..._.map((e) => e.count ?? 0), 1), s = _.length > 1 ? (b - 60) / (_.length - 1) : 0, c = _.map((e, t) => ({
1165
+ let r = v(n, o, x);
1166
+ _.current = 0;
1167
+ let i = x / 2, a = o - 200, s = Math.max(...b.map((e) => e.count ?? 0), 1), c = b.length > 1 ? (x - 60) / (b.length - 1) : 0, l = b.map((e, t) => ({
1133
1168
  x: a,
1134
- y: 30 + t * s
1135
- })), S, C = () => {
1136
- g.current++;
1137
- let n = g.current;
1138
- r.clearRect(0, 0, Be, b), r.letterSpacing = f.letterSpacing;
1139
- let s = D(Math.min(n / 72, 1));
1140
- N(m.current, x.current), E.current = [], y(r, 88, i, 48 * s, u.blue, .15 * s), _.forEach((t, n) => {
1141
- let l = d[n % d.length], g = M(s, n, _.length, D), v = c[n], b = m.current.get(t.id) ?? 0, x = Math.max(1.5, (t.count ?? 0) / o * 6);
1142
- if (g < .01) return;
1143
- let S = 88 + (a - 88) * .4, C = i, w = 88 + (a - 88) * .6, O = v.y, k = g;
1169
+ y: 30 + t * c
1170
+ })), C, w = () => {
1171
+ _.current++;
1172
+ let n = _.current;
1173
+ r.clearRect(0, 0, o, x), r.letterSpacing = f.letterSpacing;
1174
+ let c = D(Math.min(n / 72, 1));
1175
+ if (N(g.current, S.current), O.current = [], y(r, 88, i, 48 * c, u.blue, .15 * c), b.forEach((t, n) => {
1176
+ let o = d[n % d.length], m = M(c, n, b.length, D), _ = l[n], v = g.current.get(t.id) ?? 0, x = Math.max(1.5, (t.count ?? 0) / s * 6);
1177
+ if (m < .01) return;
1178
+ let S = 88 + (a - 88) * .4, C = i, w = 88 + (a - 88) * .6, E = _.y, k = m;
1144
1179
  r.beginPath();
1145
1180
  for (let e = 0; e <= 40; e++) {
1146
- let t = e / 40 * k, n = (1 - t) ** 3 * 88 + 3 * (1 - t) ** 2 * t * S + 3 * (1 - t) * t ** 2 * w + t ** 3 * v.x, a = (1 - t) ** 3 * i + 3 * (1 - t) ** 2 * t * C + 3 * (1 - t) * t ** 2 * O + t ** 3 * v.y;
1181
+ let t = e / 40 * k, n = (1 - t) ** 3 * 88 + 3 * (1 - t) ** 2 * t * S + 3 * (1 - t) * t ** 2 * w + t ** 3 * _.x, a = (1 - t) ** 3 * i + 3 * (1 - t) ** 2 * t * C + 3 * (1 - t) * t ** 2 * E + t ** 3 * _.y;
1147
1182
  e === 0 ? r.moveTo(n, a) : r.lineTo(n, a);
1148
1183
  }
1149
- if (r.strokeStyle = h(l, b > 0 ? .8 : .45), r.lineWidth = x * (b > 0 ? 1.3 : 1), r.stroke(), g > .85) {
1150
- let n = Math.min(1, (g - .85) / .15), i = 4 + (t.count ?? 0) / o * 12;
1151
- y(r, v.x, v.y, i * 2.5, l, (.25 + b * .2) * n), r.beginPath(), r.arc(v.x, v.y, i * n, 0, Math.PI * 2), r.fillStyle = h(l, (.7 + b * .2) * n), r.fill();
1152
- let a = t.label ?? String(t.count ?? 0);
1153
- T(E.current, t.id, v.x, v.y, i + 8, {
1184
+ if (r.strokeStyle = h(o, v > 0 ? .8 : .45), r.lineWidth = x * (v > 0 ? 1.3 : 1), r.stroke(), m > .85) {
1185
+ let n = Math.min(1, (m - .85) / .15), i = 4 + (t.count ?? 0) / s * 12;
1186
+ y(r, _.x, _.y, i * 2.5, o, (.25 + v * .2) * n), r.beginPath(), r.arc(_.x, _.y, i * n, 0, Math.PI * 2), r.fillStyle = h(o, (.7 + v * .2) * n), r.fill();
1187
+ let a = Ue(t.count ?? 0);
1188
+ T(O.current, t.id, _.x, _.y, i + 8, {
1154
1189
  label: t.name,
1155
1190
  value: `${a} NCEs raised`,
1156
1191
  sublabel: `${Math.round((t.count ?? 0) / (e || 1) * 100)}% of all NCEs`,
1157
- color: l
1192
+ color: o
1158
1193
  }), r.globalAlpha = n, r.font = f.font, r.textAlign = "left";
1159
- let s = t.abbreviation ?? t.name?.slice(0, 6) ?? "", c = ` ${a}`, d = v.x + i + 6, m = v.y + 4;
1160
- r.fillStyle = b > 0 ? l : h(u.t2, .85), r.fillText(s, d, m);
1161
- let _ = r.measureText(s).width;
1162
- r.font = p.font, r.fillStyle = b > 0 ? l : u.t1, r.fillText(c, d + _, m), r.globalAlpha = 1;
1194
+ let c = t.abbreviation ?? t.name?.slice(0, 6) ?? "", l = ` ${Ue(t.count ?? 0)}`, d = _.x + i + 6, g = _.y + 4;
1195
+ r.fillStyle = v > 0 ? o : h(u.t2, .85), r.fillText(c, d, g);
1196
+ let b = r.measureText(c).width;
1197
+ r.font = p.font, r.fillStyle = v > 0 ? o : u.t1, r.fillText(l, d + b, g), r.globalAlpha = 1;
1163
1198
  }
1164
- }), r.beginPath(), r.arc(88, i, 32 * s, 0, Math.PI * 2), r.fillStyle = u.bgL, r.fill(), r.strokeStyle = h(u.blue, .6 * s), r.lineWidth = 2, r.stroke(), s > .4 && (r.globalAlpha = Math.min(1, (s - .4) / .4), r.font = "500 24px 'Satoshi Variable', 'DM Sans', sans-serif", r.fillStyle = u.t1, r.textAlign = "center", r.fillText(t ?? String(e), 88, i + 5), r.font = f.font, r.fillStyle = f.color, r.fillText("NCEs", 88, i + 18), r.globalAlpha = 1), S = requestAnimationFrame(C);
1199
+ }), r.beginPath(), r.arc(88, i, 32 * c, 0, Math.PI * 2), r.fillStyle = u.bgL, r.fill(), r.strokeStyle = h(u.blue, .6 * c), r.lineWidth = 2, r.stroke(), c > .4) {
1200
+ r.globalAlpha = Math.min(1, (c - .4) / .4), r.font = "500 24px 'Satoshi Variable', 'DM Sans', sans-serif", r.fillStyle = u.t1, r.textAlign = "center";
1201
+ let n = t ?? Ue(e, 0);
1202
+ r.fillText(n, 88, i + 2), r.font = f.font, r.fillStyle = f.color, r.fillText("NCEs", 88, i + 22), r.globalAlpha = 1;
1203
+ }
1204
+ C = requestAnimationFrame(w);
1165
1205
  };
1166
- return C(), () => cancelAnimationFrame(S);
1206
+ return w(), () => cancelAnimationFrame(C);
1167
1207
  }, [
1168
1208
  e,
1169
1209
  t,
1170
- _,
1171
- b
1172
- ]), _.length === 0 ? /* @__PURE__ */ s(I, {
1173
- width: Be,
1174
- height: Ve,
1175
- "data-testid": o
1210
+ b,
1211
+ x,
1212
+ o
1213
+ ]), b.length === 0 ? /* @__PURE__ */ s(I, {
1214
+ width: o,
1215
+ height: Ge,
1216
+ "data-testid": l
1176
1217
  }) : /* @__PURE__ */ c("div", {
1177
- "data-testid": o,
1218
+ "data-testid": l,
1178
1219
  style: {
1179
1220
  position: "relative",
1180
- width: Be,
1181
- height: b
1221
+ width: o,
1222
+ height: x
1182
1223
  },
1183
1224
  children: [/* @__PURE__ */ s("canvas", {
1184
- ref: l,
1225
+ ref: m,
1185
1226
  role: "img",
1186
1227
  "aria-label": "NCE fault tree — NCEs per contractor as branching tree",
1187
1228
  style: {
1188
- width: Be,
1189
- height: b,
1229
+ width: o,
1230
+ height: x,
1190
1231
  display: "block"
1191
1232
  }
1192
1233
  }), /* @__PURE__ */ s(C, {
1193
- ...S,
1194
- parentW: Be,
1195
- parentH: b
1234
+ ...E,
1235
+ parentW: o,
1236
+ parentH: x
1196
1237
  })]
1197
1238
  });
1198
1239
  }
1199
1240
  //#endregion
1200
1241
  //#region src/components/pieChart/PieChart.tsx
1201
- var Ge = 192, Ke = Ge, qe = Ge + 80;
1202
- function Je({ rows: e = [], variant: t, className: r, colors: i }) {
1242
+ var Ye = 192, Xe = Ye, Ze = Ye + 80;
1243
+ function Qe({ rows: e = [], variant: t, className: r, colors: i }) {
1203
1244
  let o = a(null), f = a(/* @__PURE__ */ new Map()), p = a(0), m = i?.slices ?? d, { hoveredRef: g, tooltip: b, hitZonesRef: x } = w(o, {
1204
- width: Ke,
1205
- height: qe
1245
+ width: Xe,
1246
+ height: Ze
1206
1247
  });
1207
1248
  return n(() => {
1208
1249
  let n = o.current;
1209
1250
  if (!n) return;
1210
- let r = v(n, Ke, qe);
1251
+ let r = v(n, Xe, Ze);
1211
1252
  p.current = 0;
1212
- let i = Ke / 2, a = Ge / 2, s = Ge * .4, c = t === "donut" ? Ge * .21 : 0, l = e.reduce((e, t) => e + (t.pricing ?? 0), 0) || 1, d, b = () => {
1253
+ let i = Xe / 2, a = Ye / 2, s = Ye * .4, c = t === "donut" ? Ye * .21 : 0, l = e.reduce((e, t) => e + (t.pricing ?? 0), 0) || 1, d, b = () => {
1213
1254
  p.current++;
1214
1255
  let n = p.current;
1215
- r.clearRect(0, 0, Ke, qe);
1256
+ r.clearRect(0, 0, Xe, Ze);
1216
1257
  let o = 1 - (1 - Math.min(n / 48, 1)) ** 3;
1217
1258
  N(f.current, g.current), x.current = [];
1218
1259
  let v = -Math.PI / 2;
@@ -1226,10 +1267,10 @@ function Je({ rows: e = [], variant: t, className: r, colors: i }) {
1226
1267
  let O = j(n, .03, 3e-4), k = s + b * 6 + (b > 0 ? O * 2 : 0);
1227
1268
  r.beginPath(), r.moveTo(i + Math.cos(v) * c, a + Math.sin(v) * c), r.arc(i, a, k, v, g), c > 0 ? r.arc(i, a, c, g, v, !0) : r.lineTo(i, a), r.closePath(), r.fillStyle = h(_, .7 + b * .2), r.fill(), r.strokeStyle = h(u.bg, .8), r.lineWidth = 1.5, r.stroke(), v = g;
1228
1269
  }), t === "donut" && e.length > 0 && y(r, i, a, c * .8, u.blue, .06);
1229
- let S = Ge + 12;
1270
+ let S = Ye + 12;
1230
1271
  e.forEach((e, t) => {
1231
1272
  let n = m[t % m.length], i = (e.pricing ?? 0) / l, a = f.current.get(e.id ?? `sl-${t}`) ?? 0, o = S + t * 18;
1232
- r.beginPath(), r.arc(8, o, 4, 0, Math.PI * 2), r.fillStyle = h(n, .8 + a * .2), r.fill(), r.font = "9px 'JetBrains Mono', monospace", r.fillStyle = h(u.t2, .7 + a * .2), r.textAlign = "left", r.fillText(e.vendor, 18, o + 3.5), r.font = "bold 9px 'JetBrains Mono', monospace", r.fillStyle = _(u.t3, n, a), r.textAlign = "right", r.fillText(`${e.pricing ?? 0} (${Math.round(i * 100)}%)`, Ke - 4, o + 3.5);
1273
+ r.beginPath(), r.arc(8, o, 4, 0, Math.PI * 2), r.fillStyle = h(n, .8 + a * .2), r.fill(), r.font = "9px 'JetBrains Mono', monospace", r.fillStyle = h(u.t2, .7 + a * .2), r.textAlign = "left", r.fillText(e.vendor, 18, o + 3.5), r.font = "bold 9px 'JetBrains Mono', monospace", r.fillStyle = _(u.t3, n, a), r.textAlign = "right", r.fillText(`${e.pricing ?? 0} (${Math.round(i * 100)}%)`, Xe - 4, o + 3.5);
1233
1274
  }), d = requestAnimationFrame(b);
1234
1275
  };
1235
1276
  return b(), () => cancelAnimationFrame(d);
@@ -1243,30 +1284,30 @@ function Je({ rows: e = [], variant: t, className: r, colors: i }) {
1243
1284
  children: /* @__PURE__ */ c("div", {
1244
1285
  style: {
1245
1286
  position: "relative",
1246
- width: Ke,
1247
- height: qe
1287
+ width: Xe,
1288
+ height: Ze
1248
1289
  },
1249
1290
  children: [/* @__PURE__ */ s("canvas", {
1250
1291
  ref: o,
1251
1292
  role: "img",
1252
1293
  "aria-label": `${t} chart`,
1253
1294
  style: {
1254
- width: Ke,
1255
- height: qe,
1295
+ width: Xe,
1296
+ height: Ze,
1256
1297
  display: "block",
1257
1298
  borderRadius: 8
1258
1299
  }
1259
1300
  }), /* @__PURE__ */ s(C, {
1260
1301
  ...b,
1261
- parentW: Ke,
1262
- parentH: qe
1302
+ parentW: Xe,
1303
+ parentH: Ze
1263
1304
  })]
1264
1305
  })
1265
1306
  });
1266
1307
  }
1267
1308
  //#endregion
1268
1309
  //#region src/components/sankey/SankeySvg.tsx
1269
- function Ye(e, t, n, r) {
1310
+ function $e(e, t, n, r) {
1270
1311
  let i = new Set(t.map((e) => e.source)), a = new Set(t.map((e) => e.target)), o = /* @__PURE__ */ new Map(), s = [];
1271
1312
  for (e.forEach((e) => {
1272
1313
  i.has(e.id) && !a.has(e.id) && s.push({
@@ -1311,8 +1352,8 @@ function Ye(e, t, n, r) {
1311
1352
  });
1312
1353
  }), f;
1313
1354
  }
1314
- function Xe({ nodes: e, links: t, width: r = 960, height: o = 280, ariaLabel: f, selectedEntity: p, className: m, colors: g }) {
1315
- let _ = a(null), b = a(/* @__PURE__ */ new Map()), S = a(0), D = a([]), O = g?.nodes ?? d, k = g?.links ?? u.bd, A = g?.activeLinks ?? u.blue, M = g?.activeNodes ?? u.blue, P = i(() => Ye(e, t, r, o), [
1355
+ function et({ nodes: e, links: t, width: r = 960, height: o = 280, ariaLabel: f, selectedEntity: p, className: m, colors: g }) {
1356
+ let _ = a(null), b = a(/* @__PURE__ */ new Map()), S = a(0), D = a([]), O = g?.nodes ?? d, k = g?.links ?? u.bd, A = g?.activeLinks ?? u.blue, M = g?.activeNodes ?? u.blue, P = i(() => $e(e, t, r, o), [
1316
1357
  e,
1317
1358
  t,
1318
1359
  r,
@@ -1412,7 +1453,7 @@ function Xe({ nodes: e, links: t, width: r = 960, height: o = 280, ariaLabel: f,
1412
1453
  }
1413
1454
  //#endregion
1414
1455
  //#region src/canvas/CausalFlowCanvas.tsx
1415
- var Ze = [
1456
+ var tt = [
1416
1457
  {
1417
1458
  x: .13,
1418
1459
  y: .48
@@ -1445,7 +1486,7 @@ var Ze = [
1445
1486
  x: .92,
1446
1487
  y: .22
1447
1488
  }
1448
- ], Qe = [
1489
+ ], nt = [
1449
1490
  u.blue,
1450
1491
  u.orange,
1451
1492
  u.red,
@@ -1453,7 +1494,7 @@ var Ze = [
1453
1494
  u.green,
1454
1495
  u.amber,
1455
1496
  u.t2
1456
- ], $e = [
1497
+ ], rt = [
1457
1498
  26,
1458
1499
  24,
1459
1500
  24,
@@ -1463,21 +1504,21 @@ var Ze = [
1463
1504
  22,
1464
1505
  22
1465
1506
  ];
1466
- function et(e, t) {
1507
+ function it(e, t) {
1467
1508
  let n = 1 - t;
1468
1509
  return {
1469
1510
  x: n * n * n * e.p0.x + 3 * n * n * t * e.p1.x + 3 * n * t * t * e.p2.x + t * t * t * e.p3.x,
1470
1511
  y: n * n * n * e.p0.y + 3 * n * n * t * e.p1.y + 3 * n * t * t * e.p2.y + t * t * t * e.p3.y
1471
1512
  };
1472
1513
  }
1473
- function tt(e, t) {
1514
+ function at(e, t) {
1474
1515
  let n = 1 - t, r = 3 * n * n * (e.p1.x - e.p0.x) + 6 * n * t * (e.p2.x - e.p1.x) + 3 * t * t * (e.p3.x - e.p2.x), i = 3 * n * n * (e.p1.y - e.p0.y) + 6 * n * t * (e.p2.y - e.p1.y) + 3 * t * t * (e.p3.y - e.p2.y), a = Math.sqrt(r * r + i * i) || 1;
1475
1516
  return {
1476
1517
  x: -i / a,
1477
1518
  y: r / a
1478
1519
  };
1479
1520
  }
1480
- function nt(e, t) {
1521
+ function ot(e, t) {
1481
1522
  let n = t.x - e.x, r = t.y - e.y;
1482
1523
  return {
1483
1524
  p0: {
@@ -1498,7 +1539,7 @@ function nt(e, t) {
1498
1539
  }
1499
1540
  };
1500
1541
  }
1501
- function rt({ nodes: e, links: t, width: r = 960, height: o = 280, selectedEntity: l }) {
1542
+ function st({ nodes: e, links: t, width: r = 960, height: o = 280, selectedEntity: l }) {
1502
1543
  let d = a(null), f = a(0), p = a([]), { hoveredRef: m, tooltip: g, hitZonesRef: S } = w(d, {
1503
1544
  width: r,
1504
1545
  height: o
@@ -1506,15 +1547,15 @@ function rt({ nodes: e, links: t, width: r = 960, height: o = 280, selectedEntit
1506
1547
  let t = /* @__PURE__ */ new Map();
1507
1548
  return e.forEach((e, n) => t.set(e.id, n)), t;
1508
1549
  }, [e]), O = i(() => t.length > 0 ? Math.max(...t.map((e) => e.value)) : 100, [t]), k = (e) => O > 1 ? e / 100 : e, A = i(() => e.map((e, t) => {
1509
- let n = Ze[t % Ze.length];
1550
+ let n = tt[t % tt.length];
1510
1551
  return {
1511
1552
  id: e.id,
1512
1553
  label: e.name,
1513
1554
  sub: e.valueLabel ?? "",
1514
1555
  x: n.x * r,
1515
1556
  y: n.y * o,
1516
- r: $e[t % $e.length],
1517
- color: Qe[t % Qe.length]
1557
+ r: rt[t % rt.length],
1558
+ color: nt[t % nt.length]
1518
1559
  };
1519
1560
  }), [
1520
1561
  e,
@@ -1536,7 +1577,7 @@ function rt({ nodes: e, links: t, width: r = 960, height: o = 280, selectedEntit
1536
1577
  if (t.clearRect(0, 0, r, o), S.current = [], b(t, r, o, e, 50, h(u.blue, .05)), M.forEach((e, n) => {
1537
1578
  let r = A[e.fromIdx], i = A[e.toIdx];
1538
1579
  if (!r || !i) return;
1539
- let a = !!l && (r.id === l || i.id === l), o = _(r.color, i.color, .5), s = a ? .18 : .05, c = a ? .25 : .1, d = nt(r, i);
1580
+ let a = !!l && (r.id === l || i.id === l), o = _(r.color, i.color, .5), s = a ? .18 : .05, c = a ? .25 : .1, d = ot(r, i);
1540
1581
  t.beginPath(), t.moveTo(d.p0.x, d.p0.y), t.bezierCurveTo(d.p1.x, d.p1.y, d.p2.x, d.p2.y, d.p3.x, d.p3.y), t.strokeStyle = h(o, s), t.lineWidth = 16, t.lineCap = "round", t.stroke(), t.strokeStyle = h(o, c), t.lineWidth = 1.5, t.stroke();
1541
1582
  for (let t = 0; t < e.conf * 2.5; t++) Math.random() < .45 && p.current.push({
1542
1583
  edgeIdx: n,
@@ -1545,7 +1586,7 @@ function rt({ nodes: e, links: t, width: r = 960, height: o = 280, selectedEntit
1545
1586
  off: (Math.random() - .5) * 13,
1546
1587
  sz: .7 + Math.random() * 2
1547
1588
  });
1548
- let f = et(d, .5), m = `${Math.round(e.conf * 100)}%`;
1589
+ let f = it(d, .5), m = `${Math.round(e.conf * 100)}%`;
1549
1590
  t.font = "bold 12px 'JetBrains Mono', monospace", t.textBaseline = "middle";
1550
1591
  let g = t.measureText(m).width + 14;
1551
1592
  t.fillStyle = "rgba(10,16,24,0.88)", t.beginPath(), t.roundRect(f.x - g / 2, f.y - 11, g, 22, 6), t.fill(), t.strokeStyle = h(u.blue, .25), t.lineWidth = 1, t.stroke(), t.fillStyle = h(u.blue, .9), t.textAlign = "center", t.fillText(m, f.x, f.y);
@@ -1555,7 +1596,7 @@ function rt({ nodes: e, links: t, width: r = 960, height: o = 280, selectedEntit
1555
1596
  if (!n) return !1;
1556
1597
  let r = A[n.fromIdx], i = A[n.toIdx];
1557
1598
  if (!r || !i) return !1;
1558
- let a = nt(r, i), o = et(a, e.t), s = tt(a, e.t), c = o.x + s.x * e.off, l = o.y + s.y * e.off, u = Math.sin(e.t * Math.PI) * .7, d = _(r.color, i.color, e.t);
1599
+ let a = ot(r, i), o = it(a, e.t), s = at(a, e.t), c = o.x + s.x * e.off, l = o.y + s.y * e.off, u = Math.sin(e.t * Math.PI) * .7, d = _(r.color, i.color, e.t);
1559
1600
  return y(t, c, l, e.sz * 3, d, u * .1), t.beginPath(), t.arc(c, l, e.sz, 0, Math.PI * 2), t.fillStyle = h(d, u), t.fill(), !0;
1560
1601
  }), p.current.length > 350 && (p.current = p.current.slice(-350)), A.forEach((n, r) => {
1561
1602
  let i = l === n.id, a = m.current === `node-${r}`, o = j(e, .03, 3e-4) * .1 + 1, s = n.r * o * (i ? 1.15 : 1);
@@ -1612,10 +1653,10 @@ function rt({ nodes: e, links: t, width: r = 960, height: o = 280, selectedEntit
1612
1653
  }
1613
1654
  //#endregion
1614
1655
  //#region src/components/sankey/ProcessSankey.tsx
1615
- function it({ selectedEntity: e, colors: t }) {
1616
- return /* @__PURE__ */ s(rt, {
1617
- nodes: Re.nodes,
1618
- links: Re.links,
1656
+ function ct({ selectedEntity: e, colors: t }) {
1657
+ return /* @__PURE__ */ s(st, {
1658
+ nodes: Be.nodes,
1659
+ links: Be.links,
1619
1660
  width: 960,
1620
1661
  height: 280,
1621
1662
  selectedEntity: e
@@ -1623,7 +1664,7 @@ function it({ selectedEntity: e, colors: t }) {
1623
1664
  }
1624
1665
  //#endregion
1625
1666
  //#region src/components/sankey/RankingSankey.tsx
1626
- function at({ rows: e = [], className: t, colors: n }) {
1667
+ function lt({ rows: e = [], className: t, colors: n }) {
1627
1668
  let { nodes: r, links: a } = i(() => {
1628
1669
  let t = e.slice(0, 5);
1629
1670
  return {
@@ -1641,7 +1682,7 @@ function at({ rows: e = [], className: t, colors: n }) {
1641
1682
  }))
1642
1683
  };
1643
1684
  }, [e]);
1644
- return /* @__PURE__ */ s(Xe, {
1685
+ return /* @__PURE__ */ s(et, {
1645
1686
  nodes: r,
1646
1687
  links: a,
1647
1688
  width: 760,
@@ -1653,62 +1694,62 @@ function at({ rows: e = [], className: t, colors: n }) {
1653
1694
  }
1654
1695
  //#endregion
1655
1696
  //#region src/components/balanceScaleChart/BalanceScaleChart.tsx
1656
- var ot = 500, st = 320;
1657
- function ct({ left: e, right: t, "data-testid": r }) {
1697
+ var ut = 500, dt = 320;
1698
+ function ft({ left: e, right: t, "data-testid": r }) {
1658
1699
  let i = a(null), o = a(0);
1659
1700
  return n(() => {
1660
1701
  let n = i.current;
1661
1702
  if (!n) return;
1662
- let r = v(n, ot, st);
1703
+ let r = v(n, ut, dt);
1663
1704
  o.current = 0;
1664
- let a = ot / 2, s = Math.max(e.value, t.value), c = (e.value - t.value) / s * 14, l, d = () => {
1705
+ let a = ut / 2, s = Math.max(e.value, t.value), c = (e.value - t.value) / s * 14, l, d = () => {
1665
1706
  o.current++;
1666
1707
  let n = o.current;
1667
- r.clearRect(0, 0, ot, st), r.letterSpacing = f.letterSpacing;
1668
- let i = D(Math.min(n / 80, 1)), g = c * A(Math.min(n / 80, 1)) * Math.PI / 180;
1669
- r.strokeStyle = h(u.bd, .5 * i), r.lineWidth = 2, r.beginPath(), r.moveTo(a, 100), r.lineTo(a, st - 80), r.stroke(), r.beginPath(), r.arc(a, 100, 5 * i, 0, Math.PI * 2), r.fillStyle = u.t2, r.fill();
1670
- let _ = {
1671
- x: a - Math.cos(g) * 160,
1672
- y: 100 + Math.sin(-g) * 160
1673
- }, v = {
1674
- x: a + Math.cos(g) * 160,
1675
- y: 100 + Math.sin(g) * 160
1708
+ r.clearRect(0, 0, ut, dt), r.letterSpacing = f.letterSpacing;
1709
+ let i = D(Math.min(n / 80, 1)), m = c * A(Math.min(n / 80, 1)) * Math.PI / 180;
1710
+ r.strokeStyle = h(u.bd, .5 * i), r.lineWidth = 2, r.beginPath(), r.moveTo(a, 100), r.lineTo(a, dt - 80), r.stroke(), r.beginPath(), r.arc(a, 100, 5 * i, 0, Math.PI * 2), r.fillStyle = u.t2, r.fill();
1711
+ let g = {
1712
+ x: a - Math.cos(m) * 160,
1713
+ y: 100 + Math.sin(-m) * 160
1714
+ }, _ = {
1715
+ x: a + Math.cos(m) * 160,
1716
+ y: 100 + Math.sin(m) * 160
1676
1717
  };
1677
- r.strokeStyle = h(u.t2, .5 * i), r.lineWidth = 2, r.beginPath(), r.moveTo(_.x, _.y), r.lineTo(v.x, v.y), r.stroke();
1678
- let b = Math.max(20, e.value / s * 100 * i), x = _.y + 18;
1679
- y(r, _.x, x + b / 2, 90 * .5, u.green, .18 * i), r.fillStyle = h(u.green, .5 * i), r.beginPath(), r.roundRect(_.x - 90 / 2, x, 90, b, [
1718
+ r.strokeStyle = h(u.t2, .5 * i), r.lineWidth = 2, r.beginPath(), r.moveTo(g.x, g.y), r.lineTo(_.x, _.y), r.stroke();
1719
+ let v = Math.max(20, e.value / s * 100 * i), b = g.y + 18;
1720
+ y(r, g.x, b + v / 2, 90 * .5, u.green, .18 * i), r.fillStyle = h(u.green, .5 * i), r.beginPath(), r.roundRect(g.x - 90 / 2, b, 90, v, [
1680
1721
  0,
1681
1722
  0,
1682
1723
  6,
1683
1724
  6
1684
1725
  ]), r.fill(), r.strokeStyle = h(u.green, .7 * i), r.lineWidth = 1.5, r.stroke(), r.strokeStyle = h(u.t2, .35 * i), r.lineWidth = 1, [-90 / 3, 90 / 3].forEach((e) => {
1685
- r.beginPath(), r.moveTo(_.x + e, _.y + 4), r.lineTo(_.x + e, x), r.stroke();
1686
- }), i > .5 && (r.globalAlpha = Math.min(1, (i - .5) / .5), r.font = p.font, r.fillStyle = u.green, r.textAlign = "center", r.fillText(e.label, _.x, x + b + 18), r.font = f.font, r.fillStyle = f.color, r.fillText("Accepted", _.x, x + b + 32), r.fillText(`${e.count} quotations`, _.x, x + b + 44), r.globalAlpha = 1);
1687
- let S = Math.max(20, t.value / s * 100 * i), C = v.y + 18;
1688
- r.fillStyle = h(u.amber, .3 * i), r.strokeStyle = h(u.amber, .5 * i), r.lineWidth = 1.5, r.beginPath(), r.roundRect(v.x - 90 / 2, C, 90, S, [
1726
+ r.beginPath(), r.moveTo(g.x + e, g.y + 4), r.lineTo(g.x + e, b), r.stroke();
1727
+ }), i > .5 && (r.globalAlpha = Math.min(1, (i - .5) / .5), r.font = p.font, r.fillStyle = u.green, r.textAlign = "center", r.fillText(e.label, g.x, b + v + 18), r.font = f.font, r.fillStyle = f.color, r.fillText("Accepted", g.x, b + v + 38), r.fillText(`${e.count} quotations`, g.x, b + v + 58), r.globalAlpha = 1);
1728
+ let x = Math.max(20, t.value / s * 100 * i), S = _.y + 18;
1729
+ r.fillStyle = h(u.amber, .3 * i), r.strokeStyle = h(u.amber, .5 * i), r.lineWidth = 1.5, r.beginPath(), r.roundRect(_.x - 90 / 2, S, 90, x, [
1689
1730
  0,
1690
1731
  0,
1691
1732
  6,
1692
1733
  6
1693
1734
  ]), r.fill(), r.stroke(), r.strokeStyle = h(u.t2, .35 * i), r.lineWidth = 1, [-90 / 3, 90 / 3].forEach((e) => {
1694
- r.beginPath(), r.moveTo(v.x + e, v.y + 4), r.lineTo(v.x + e, C), r.stroke();
1695
- }), i > .5 && (r.globalAlpha = Math.min(1, (i - .5) / .5), r.font = p.font, r.fillStyle = u.amber, r.textAlign = "center", r.fillText(t.label, v.x, C + S + 18), r.font = f.font, r.fillStyle = f.color, r.fillText("Submitted", v.x, C + S + 32), r.fillText(`${t.count} quotations`, v.x, C + S + 44), r.globalAlpha = 1), i > .85 && Math.abs(c) > 1 && (r.globalAlpha = Math.min(1, (i - .85) / .15) * .6, r.font = m.font, r.fillStyle = m.color, r.textAlign = "center", r.fillText(`${Math.abs(c).toFixed(1)}° tilt toward accepted`, a, st - 12), r.globalAlpha = 1), l = requestAnimationFrame(d);
1735
+ r.beginPath(), r.moveTo(_.x + e, _.y + 4), r.lineTo(_.x + e, S), r.stroke();
1736
+ }), i > .5 && (r.globalAlpha = Math.min(1, (i - .5) / .5), r.font = p.font, r.fillStyle = u.amber, r.textAlign = "center", r.fillText(t.label, _.x, S + x + 18), r.font = f.font, r.fillStyle = f.color, r.fillText("Submitted", _.x, S + x + 38), r.fillText(`${t.count} quotations`, _.x, S + x + 58), r.globalAlpha = 1), l = requestAnimationFrame(d);
1696
1737
  };
1697
1738
  return d(), () => cancelAnimationFrame(l);
1698
1739
  }, [e, t]), /* @__PURE__ */ s("div", {
1699
1740
  "data-testid": r,
1700
1741
  style: {
1701
1742
  position: "relative",
1702
- width: ot,
1703
- height: st
1743
+ width: ut,
1744
+ height: dt
1704
1745
  },
1705
1746
  children: /* @__PURE__ */ s("canvas", {
1706
1747
  ref: i,
1707
1748
  role: "img",
1708
1749
  "aria-label": "Quotation balance — accepted vs submitted quotation value",
1709
1750
  style: {
1710
- width: ot,
1711
- height: st,
1751
+ width: ut,
1752
+ height: dt,
1712
1753
  display: "block"
1713
1754
  }
1714
1755
  })
@@ -1716,25 +1757,25 @@ function ct({ left: e, right: t, "data-testid": r }) {
1716
1757
  }
1717
1758
  //#endregion
1718
1759
  //#region src/components/areaLineChart/AreaLineChart.tsx
1719
- var lt = 680, K = 280;
1720
- function ut({ points: e = [], "data-testid": t }) {
1760
+ var pt = 680, G = 280;
1761
+ function mt({ points: e = [], "data-testid": t }) {
1721
1762
  let r = a(null), o = a(/* @__PURE__ */ new Map()), l = a(0), { hoveredRef: d, tooltip: p, hitZonesRef: m } = w(r, {
1722
- width: lt,
1723
- height: K
1763
+ width: pt,
1764
+ height: G
1724
1765
  }), g = i(() => e.filter((e) => typeof e == "object" && !!e), [e]);
1725
1766
  return n(() => {
1726
1767
  let e = r.current;
1727
1768
  if (!e) return;
1728
- let t = v(e, lt, K);
1769
+ let t = v(e, pt, G);
1729
1770
  l.current = 0;
1730
- let n = lt - 54 - 28, i = K - 30 - 54, a = Math.max(...g.map((e) => e.count), 1), s = g.length, c = s > 1 ? n / (s - 1) : n, p = g.map((e, t) => ({
1771
+ let n = pt - 54 - 28, i = G - 30 - 54, a = Math.max(...g.map((e) => e.count), 1), s = g.length, c = s > 1 ? n / (s - 1) : n, p = g.map((e, t) => ({
1731
1772
  x: 54 + t * c,
1732
1773
  y: 30 + i - e.count / a * i,
1733
1774
  point: e
1734
1775
  })), _, b = () => {
1735
1776
  l.current++;
1736
1777
  let e = l.current;
1737
- t.clearRect(0, 0, lt, K), t.letterSpacing = f.letterSpacing;
1778
+ t.clearRect(0, 0, pt, G), t.letterSpacing = f.letterSpacing;
1738
1779
  let r = D(Math.min(e / 72, 1));
1739
1780
  N(o.current, d.current), m.current = [], [
1740
1781
  .25,
@@ -1744,7 +1785,7 @@ function ut({ points: e = [], "data-testid": t }) {
1744
1785
  ].forEach((e) => {
1745
1786
  let r = 30 + i - e * i;
1746
1787
  t.strokeStyle = h(u.bd, .18), t.lineWidth = 1, t.setLineDash([3, 5]), t.beginPath(), t.moveTo(54, r), t.lineTo(54 + n, r), t.stroke(), t.setLineDash([]), t.font = f.font, t.fillStyle = f.color, t.textAlign = "right", t.fillText(String(Math.round(a * e)), 48, r + 3);
1747
- }), t.save(), t.translate(12, 30 + i / 2), t.rotate(-Math.PI / 2), t.font = f.font, t.fillStyle = f.color, t.textAlign = "center", t.fillText("Submissions", 0, 0), t.restore(), t.font = f.font, t.fillStyle = f.color, t.textAlign = "center", t.fillText("Week", 54 + n / 2, K - 6), t.strokeStyle = h(u.bd, .3), t.lineWidth = 1, t.setLineDash([]), t.beginPath(), t.moveTo(54, 30 + i), t.lineTo(54 + n, 30 + i), t.stroke();
1788
+ }), t.save(), t.translate(12, 30 + i / 2), t.rotate(-Math.PI / 2), t.font = f.font, t.fillStyle = f.color, t.textAlign = "center", t.fillText("Submissions", 0, 0), t.restore(), t.font = f.font, t.fillStyle = f.color, t.textAlign = "center", t.fillText("Week", 54 + n / 2, G - 6), t.strokeStyle = h(u.bd, .3), t.lineWidth = 1, t.setLineDash([]), t.beginPath(), t.moveTo(54, 30 + i), t.lineTo(54 + n, 30 + i), t.stroke();
1748
1789
  let c = r * (s - 1), g = Math.floor(c) + 1;
1749
1790
  if (g >= 2) {
1750
1791
  t.beginPath(), t.moveTo(p[0].x, 30 + i), t.lineTo(p[0].x, p[0].y);
@@ -1772,13 +1813,13 @@ function ut({ points: e = [], "data-testid": t }) {
1772
1813
  color: u.blue
1773
1814
  }), s > 0 && S(t, e.x, 30, 30 + i, h(u.blue, .15 * s));
1774
1815
  let c = e.point.count === a;
1775
- (s > 0 || c) && y(t, e.x, e.y, 14, u.blue, (c ? .3 : 0) + s * .25), t.beginPath(), t.arc(e.x, e.y, s > 0 ? 5 : 3.5, 0, Math.PI * 2), t.fillStyle = h(u.blue, s > 0 ? 1 : .8), t.fill(), (s > 0 || c) && (t.font = f.font, t.fillStyle = u.blue, t.textAlign = "center", t.fillText(String(e.point.count), e.x, e.y - 10)), t.font = f.font, t.fillStyle = s > 0 ? u.blue : f.color, t.textAlign = "center", t.fillText(e.point.week, e.x, K - 54 + 14);
1816
+ (s > 0 || c) && y(t, e.x, e.y, 14, u.blue, (c ? .3 : 0) + s * .25), t.beginPath(), t.arc(e.x, e.y, s > 0 ? 5 : 3.5, 0, Math.PI * 2), t.fillStyle = h(u.blue, s > 0 ? 1 : .8), t.fill(), (s > 0 || c) && (t.font = f.font, t.fillStyle = u.blue, t.textAlign = "center", t.fillText(String(e.point.count), e.x, e.y - 10)), t.font = f.font, t.fillStyle = s > 0 ? u.blue : f.color, t.textAlign = "center", t.fillText(e.point.week, e.x, G - 54 + 14);
1776
1817
  }), _ = requestAnimationFrame(b);
1777
1818
  };
1778
1819
  return b(), () => cancelAnimationFrame(_);
1779
1820
  }, [g]), g.length < 2 ? /* @__PURE__ */ s(I, {
1780
- width: lt,
1781
- height: K,
1821
+ width: pt,
1822
+ height: G,
1782
1823
  "data-testid": t
1783
1824
  }) : /* @__PURE__ */ s("div", {
1784
1825
  "data-testid": t,
@@ -1790,114 +1831,132 @@ function ut({ points: e = [], "data-testid": t }) {
1790
1831
  children: /* @__PURE__ */ c("div", {
1791
1832
  style: {
1792
1833
  position: "relative",
1793
- width: lt,
1794
- height: K
1834
+ width: pt,
1835
+ height: G
1795
1836
  },
1796
1837
  children: [/* @__PURE__ */ s("canvas", {
1797
1838
  ref: r,
1798
1839
  role: "img",
1799
1840
  "aria-label": "Trend chart — count over time",
1800
1841
  style: {
1801
- width: lt,
1802
- height: K,
1842
+ width: pt,
1843
+ height: G,
1803
1844
  display: "block"
1804
1845
  }
1805
1846
  }), /* @__PURE__ */ s(C, {
1806
1847
  ...p,
1807
- parentW: lt,
1808
- parentH: K
1848
+ parentW: pt,
1849
+ parentH: G
1809
1850
  })]
1810
1851
  })
1811
1852
  });
1812
1853
  }
1813
1854
  //#endregion
1814
1855
  //#region src/components/trend/Trend.tsx
1815
- var dt = 680, q = 280, ft = 54, pt = 28, mt = 64, ht = f.font, gt = 12, _t = Math.PI * 2, vt = 72, yt = 20, bt = 5e3;
1816
- function xt({ points: e = [], "data-testid": t }) {
1856
+ var ht = 680, K = 280, gt = 54, _t = 48, vt = 64, yt = f.font, bt = 12, xt = Math.PI * 2, St = 72, Ct = 20, wt = 5e3;
1857
+ function Tt({ points: e = [], "data-testid": t }) {
1817
1858
  let r = a(null), o = a(null), l = a(0), d = i(() => e.filter((e) => typeof e == "object" && !!e), [e]), p = i(() => {
1818
- if (d.length <= 1) return mt;
1859
+ if (d.length <= 1) return vt;
1819
1860
  let e = document.createElement("canvas").getContext("2d");
1820
- if (!e) return mt;
1821
- e.font = ht;
1822
- let t = Math.max(1, Math.ceil(d.length / yt)), n = Math.max(...d.filter((e, n) => n % t === 0).map((t) => e.measureText(t.week).width));
1823
- return Math.max(mt, n + gt);
1824
- }, [d]), m = Math.round(p / 2), g = pt + m + Math.max(0, d.length - 1) * p, _ = Math.max(dt - ft, Math.min(g, bt)), { tooltip: y, hitZonesRef: b } = w(r, {
1861
+ if (!e) return vt;
1862
+ e.font = yt;
1863
+ let t = Math.max(1, Math.ceil(d.length / Ct)), n = Math.max(...d.filter((e, n) => n % t === 0).map((t) => e.measureText(t.week).width));
1864
+ return Math.max(vt, n + bt);
1865
+ }, [d]), m = Math.round(p / 2), g = _t + m + Math.max(0, d.length - 1) * p, _ = Math.max(ht - gt, Math.min(g, wt)), { tooltip: y, hitZonesRef: b } = w(r, {
1825
1866
  width: _,
1826
- height: q
1867
+ height: K
1827
1868
  });
1828
1869
  return n(() => {
1829
1870
  let e = r.current;
1830
1871
  if (!e) return;
1831
- let t = v(e, _, q), n = o.current ? v(o.current, ft, q) : null;
1872
+ let t = v(e, _, K), n = o.current ? v(o.current, gt, K) : null;
1832
1873
  l.current = 0;
1833
- let i = d.length <= vt ? vt : Math.max(24, Math.round(vt * (vt / d.length))), a = _ - pt, s = q - 30 - 54, c = Math.max(...d.map((e) => e.count), 1), g = d.length, y = g > 1 ? (a - m) / (g - 1) : a - m, x = Math.max(1, Math.ceil(p / y)), S = d.map((e, t) => ({
1834
- x: m + t * y,
1835
- y: 30 + s - e.count / c * s,
1874
+ let i = d.length <= St ? St : Math.max(24, Math.round(St * (St / d.length))), a = _ - _t, s = K - 42 - 54, c = d.map((e) => e.count), g = Math.min(...c), y = Math.max(...c), x = y - g || 1, S = d.length, C = S > 1 ? (a - m) / (S - 1) : a - m, w = Math.max(1, Math.ceil(p / C)), E = g < 0, O = E ? 42 + s - -g / x * s : 42 + s, k = d.map((e, t) => ({
1875
+ x: m + t * C,
1876
+ y: 42 + s - (e.count - g) / x * s,
1836
1877
  point: e
1837
1878
  }));
1838
- n && (n.clearRect(0, 0, ft, q), n.letterSpacing = f.letterSpacing, [
1839
- .25,
1840
- .5,
1841
- .75,
1842
- 1
1843
- ].forEach((e) => {
1844
- let t = 30 + s - e * s;
1845
- n.font = f.font, n.fillStyle = f.color, n.textAlign = "right", n.fillText(String(Math.round(c * e)), ft - 6, t + 3);
1846
- }), n.save(), n.translate(12, 30 + s / 2), n.rotate(-Math.PI / 2), n.font = f.font, n.fillStyle = f.color, n.textAlign = "center", n.fillText("Count", 0, 0), n.restore());
1847
- let C = t.createLinearGradient(0, 30, 0, 30 + s);
1848
- C.addColorStop(0, h(u.blue, .22)), C.addColorStop(1, h(u.blue, .02));
1849
- let w = 0, E, O = (e) => {
1850
- t.font = ht, t.fillStyle = f.color, t.textAlign = "center";
1851
- for (let n = 0; n < e; n++) n % x === 0 && t.fillText(S[n].point.week, S[n].x, q - 54 + 14);
1852
- }, k = () => {
1879
+ if (n) {
1880
+ n.clearRect(0, 0, gt, K), n.letterSpacing = f.letterSpacing;
1881
+ let e = E ? [
1882
+ g,
1883
+ g + x * .25,
1884
+ g + x * .5,
1885
+ g + x * .75,
1886
+ y
1887
+ ] : [
1888
+ 0,
1889
+ y * .25,
1890
+ y * .5,
1891
+ y * .75,
1892
+ y
1893
+ ];
1894
+ e.forEach((t, r) => {
1895
+ let i = r / (e.length - 1), a = 42 + s - i * s;
1896
+ n.font = f.font, n.fillStyle = f.color, n.textAlign = "right", n.fillText(Ue(t), gt - 6, a + 3);
1897
+ }), n.save(), n.translate(12, 42 + s / 2), n.rotate(-Math.PI / 2), n.font = f.font, n.fillStyle = f.color, n.textAlign = "center", n.fillText("Count", 0, 0), n.restore();
1898
+ }
1899
+ let A = t.createLinearGradient(0, 42, 0, 42 + s);
1900
+ A.addColorStop(0, h(u.blue, .22)), A.addColorStop(1, h(u.blue, .02));
1901
+ let j = 0, M, N = (e) => {
1902
+ t.font = yt, t.fillStyle = f.color, t.textAlign = "center";
1903
+ for (let n = 0; n < e; n++) n % w === 0 && t.fillText(k[n].point.week, k[n].x, K - 54 + 14);
1904
+ }, P = () => {
1853
1905
  l.current++;
1854
1906
  let e = Math.min(l.current / i, 1), n = D(e), r = e >= 1;
1855
- t.clearRect(0, 0, _, q), t.letterSpacing = f.letterSpacing, [
1907
+ t.clearRect(0, 0, _, K), t.letterSpacing = f.letterSpacing, (E ? [
1908
+ 0,
1856
1909
  .25,
1857
1910
  .5,
1858
1911
  .75,
1859
1912
  1
1860
- ].forEach((e) => {
1861
- let n = 30 + s - e * s;
1913
+ ] : [
1914
+ .25,
1915
+ .5,
1916
+ .75,
1917
+ 1
1918
+ ]).forEach((e) => {
1919
+ let n = 42 + s - e * s;
1862
1920
  t.strokeStyle = h(u.bd, .18), t.lineWidth = 1, t.setLineDash([3, 5]), t.beginPath(), t.moveTo(0, n), t.lineTo(a, n), t.stroke(), t.setLineDash([]);
1863
- }), t.font = f.font, t.fillStyle = f.color, t.textAlign = "center", t.fillText("Period", m + (a - m) / 2, q - 6), t.strokeStyle = h(u.bd, .3), t.lineWidth = 1, t.beginPath(), t.moveTo(m, 30 + s), t.lineTo(a, 30 + s), t.stroke();
1864
- let o = n * (g - 1), c = Math.floor(o) + 1;
1921
+ }), t.font = f.font, t.fillStyle = f.color, t.textAlign = "center", t.fillText("Period", m + (a - m) / 2, K - 6), t.strokeStyle = h(u.bd, E ? .5 : .3), t.lineWidth = E ? 2 : 1, t.beginPath(), t.moveTo(m, E ? O : 42 + s), t.lineTo(a, E ? O : 42 + s), t.stroke();
1922
+ let o = n * (S - 1), c = Math.floor(o) + 1;
1865
1923
  if (c >= 2) {
1866
- t.beginPath(), t.moveTo(S[0].x, 30 + s), t.lineTo(S[0].x, S[0].y);
1924
+ let e = E ? O : 42 + s;
1925
+ t.beginPath(), t.moveTo(k[0].x, e), t.lineTo(k[0].x, k[0].y);
1867
1926
  for (let e = 1; e < c; e++) {
1868
- let n = o - Math.floor(o), r = e === c - 1 && e === Math.ceil(o) && n > 0, i = r ? S[e - 1].x + (S[e].x - S[e - 1].x) * n : S[e].x, a = r ? S[e - 1].y + (S[e].y - S[e - 1].y) * n : S[e].y;
1927
+ let n = o - Math.floor(o), r = e === c - 1 && e === Math.ceil(o) && n > 0, i = r ? k[e - 1].x + (k[e].x - k[e - 1].x) * n : k[e].x, a = r ? k[e - 1].y + (k[e].y - k[e - 1].y) * n : k[e].y;
1869
1928
  t.lineTo(i, a);
1870
1929
  }
1871
- t.lineTo(S[c - 1].x, 30 + s), t.closePath(), t.fillStyle = C, t.fill();
1930
+ t.lineTo(k[c - 1].x, e), t.closePath(), t.fillStyle = A, t.fill();
1872
1931
  }
1873
1932
  t.beginPath();
1874
1933
  for (let e = 0; e < c; e++) {
1875
- let n = o - Math.floor(o), r = e === c - 1 && e > 0 && e === Math.ceil(o) && n > 0, i = r ? S[e - 1].x + (S[e].x - S[e - 1].x) * n : S[e].x, a = r ? S[e - 1].y + (S[e].y - S[e - 1].y) * n : S[e].y;
1934
+ let n = o - Math.floor(o), r = e === c - 1 && e > 0 && e === Math.ceil(o) && n > 0, i = r ? k[e - 1].x + (k[e].x - k[e - 1].x) * n : k[e].x, a = r ? k[e - 1].y + (k[e].y - k[e - 1].y) * n : k[e].y;
1876
1935
  e === 0 ? t.moveTo(i, a) : t.lineTo(i, a);
1877
1936
  }
1878
1937
  t.strokeStyle = h(u.blue, .85), t.lineWidth = 2, t.stroke(), t.fillStyle = h(u.blue, .8), t.beginPath();
1879
- for (let e = 0; e < c; e++) t.moveTo(S[e].x + 3.5, S[e].y), t.arc(S[e].x, S[e].y, 3.5, 0, _t);
1880
- if (t.fill(), c > w) {
1938
+ for (let e = 0; e < c; e++) t.moveTo(k[e].x + 3.5, k[e].y), t.arc(k[e].x, k[e].y, 3.5, 0, xt);
1939
+ if (t.fill(), c > j) {
1881
1940
  b.current = [];
1882
- for (let e = 0; e < c; e++) T(b.current, `pt-${e}`, S[e].x, S[e].y, 10, {
1883
- label: S[e].point.week,
1884
- value: `${S[e].point.count} submissions`,
1885
- sublabel: `£${S[e].point.value}M value`,
1941
+ for (let e = 0; e < c; e++) T(b.current, `pt-${e}`, k[e].x, k[e].y, 10, {
1942
+ label: k[e].point.week,
1943
+ value: `${k[e].point.count} submissions`,
1944
+ sublabel: `£${k[e].point.value}M value`,
1886
1945
  color: u.blue
1887
1946
  });
1888
- w = c;
1947
+ j = c;
1889
1948
  }
1890
- r && O(g), r || (E = requestAnimationFrame(k));
1949
+ r && N(S), r || (M = requestAnimationFrame(P));
1891
1950
  };
1892
- return k(), () => cancelAnimationFrame(E);
1951
+ return P(), () => cancelAnimationFrame(M);
1893
1952
  }, [
1894
1953
  d,
1895
1954
  _,
1896
1955
  p,
1897
1956
  b
1898
1957
  ]), d.length < 2 ? /* @__PURE__ */ s(I, {
1899
- width: dt,
1900
- height: q,
1958
+ width: ht,
1959
+ height: K,
1901
1960
  "data-testid": t
1902
1961
  }) : /* @__PURE__ */ c("div", {
1903
1962
  "data-testid": t,
@@ -1910,8 +1969,8 @@ function xt({ points: e = [], "data-testid": t }) {
1910
1969
  ref: o,
1911
1970
  "aria-hidden": "true",
1912
1971
  style: {
1913
- width: ft,
1914
- height: q,
1972
+ width: gt,
1973
+ height: K,
1915
1974
  display: "block",
1916
1975
  flexShrink: 0
1917
1976
  }
@@ -1925,7 +1984,7 @@ function xt({ points: e = [], "data-testid": t }) {
1925
1984
  style: {
1926
1985
  position: "relative",
1927
1986
  width: _,
1928
- height: q
1987
+ height: K
1929
1988
  },
1930
1989
  children: [/* @__PURE__ */ s("canvas", {
1931
1990
  ref: r,
@@ -1933,13 +1992,13 @@ function xt({ points: e = [], "data-testid": t }) {
1933
1992
  "aria-label": "Trend chart — count over time",
1934
1993
  style: {
1935
1994
  width: _,
1936
- height: q,
1995
+ height: K,
1937
1996
  display: "block"
1938
1997
  }
1939
1998
  }), /* @__PURE__ */ s(C, {
1940
1999
  ...y,
1941
2000
  parentW: _,
1942
- parentH: q
2001
+ parentH: K
1943
2002
  })]
1944
2003
  })
1945
2004
  })]
@@ -1947,38 +2006,38 @@ function xt({ points: e = [], "data-testid": t }) {
1947
2006
  }
1948
2007
  //#endregion
1949
2008
  //#region src/components/proportionalBandChart/ProportionalBandChart.tsx
1950
- var J = 680, St = 240;
1951
- function Ct(e, t, n) {
2009
+ var q = 680, Et = 240;
2010
+ function Dt(e, t, n) {
1952
2011
  if (e.measureText(t).width <= n) return t;
1953
2012
  let r = t;
1954
2013
  for (; r.length > 0 && e.measureText(`${r}…`).width > n;) r = r.slice(0, -1);
1955
2014
  return `${r}…`;
1956
2015
  }
1957
- var wt = {
2016
+ var Ot = {
1958
2017
  Critical: u.red,
1959
2018
  High: u.orange,
1960
2019
  Medium: u.amber,
1961
2020
  Low: u.green
1962
2021
  };
1963
- function Tt({ severities: e = [], "data-testid": t }) {
2022
+ function kt({ severities: e = [], "data-testid": t }) {
1964
2023
  let r = a(null), o = a(/* @__PURE__ */ new Map()), l = a(0), { hoveredRef: d, tooltip: m, hitZonesRef: g } = w(r, {
1965
- width: J,
1966
- height: St
2024
+ width: q,
2025
+ height: Et
1967
2026
  }), _ = i(() => e.filter((e) => typeof e == "object" && !!e), [e]);
1968
2027
  return n(() => {
1969
2028
  let e = r.current;
1970
2029
  if (!e) return;
1971
- let t = v(e, J, St);
2030
+ let t = v(e, q, Et);
1972
2031
  l.current = 0;
1973
- let n = _.reduce((e, t) => e + (t.count ?? 0), 0), i = J - 28 - 28, a = St - 50 - 52, s = _.map((e) => (e.count ?? 0) / (n || 1) * i), c, m = () => {
2032
+ let n = _.reduce((e, t) => e + (t.count ?? 0), 0), i = q - 28 - 28, a = Et - 50 - 52, s = _.map((e) => (e.count ?? 0) / (n || 1) * i), c, m = () => {
1974
2033
  l.current++;
1975
2034
  let e = l.current;
1976
- t.clearRect(0, 0, J, St), t.letterSpacing = f.letterSpacing;
2035
+ t.clearRect(0, 0, q, Et), t.letterSpacing = f.letterSpacing;
1977
2036
  let r = O(Math.min(e / 60, 1));
1978
- N(o.current, d.current), g.current = [], t.strokeStyle = h(u.bd, .2), t.lineWidth = 1, t.beginPath(), t.rect(28, 50, i, a), t.stroke(), t.strokeStyle = h(u.t2, .15), t.lineWidth = 1, t.setLineDash([4, 4]), t.beginPath(), t.moveTo(J / 2, 50), t.lineTo(J / 2, 50 + a), t.stroke(), t.setLineDash([]);
2037
+ N(o.current, d.current), g.current = [], t.strokeStyle = h(u.bd, .2), t.lineWidth = 1, t.beginPath(), t.rect(28, 50, i, a), t.stroke(), t.strokeStyle = h(u.t2, .15), t.lineWidth = 1, t.setLineDash([4, 4]), t.beginPath(), t.moveTo(q / 2, 50), t.lineTo(q / 2, 50 + a), t.stroke(), t.setLineDash([]);
1979
2038
  let v = 28;
1980
2039
  _.forEach((e, i) => {
1981
- let c = wt[e.severity] ?? u.blue, l = s[i], d = o.current.get(e.severity) ?? 0, m = v + l / 2, _ = l * .85, b = l * r, x = _ * r, S = m - x / 2;
2040
+ let c = Ot[e.severity] ?? u.blue, l = s[i], d = o.current.get(e.severity) ?? 0, m = v + l / 2, _ = l * .85, b = l * r, x = _ * r, S = m - x / 2;
1982
2041
  if (b > 0 && (d > 0 && y(t, v + b / 2, 50 + a / 2, b * .4, c, .15 * d), t.beginPath(), t.moveTo(S, 50), t.lineTo(S + x, 50), t.lineTo(v + b, 50 + a), t.lineTo(v, 50 + a), t.closePath(), t.fillStyle = h(c, .45 + d * .25), t.fill(), t.strokeStyle = h(c, (.5 + d * .3) * r), t.lineWidth = d > 0 ? 2 : 1, t.beginPath(), t.moveTo(S, 50), t.lineTo(S + x, 50), t.stroke(), t.strokeStyle = h(c, (.3 + d * .3) * r), t.lineWidth = d > 0 ? 2 : 1, t.beginPath(), t.moveTo(v, 50 + a), t.lineTo(v + b, 50 + a), t.stroke()), E(g.current, e.severity, v, 50, l, a, {
1983
2042
  label: e.severity,
1984
2043
  value: `${e.count} Early Warnings`,
@@ -1986,7 +2045,7 @@ function Tt({ severities: e = [], "data-testid": t }) {
1986
2045
  color: c
1987
2046
  }), r > .5) {
1988
2047
  let i = Math.min(1, (r - .5) / .5), o = v + l / 2;
1989
- t.globalAlpha = i, t.font = f.font, t.fillStyle = d > 0 ? c : h(c, .9), t.textAlign = "center", t.fillText(Ct(t, e.severity, l - 12), o, 38), t.font = p.font, t.fillStyle = d > 0 ? u.t1 : h(u.t1, .85), t.fillText(String(e.count), o, 50 + a / 2 + 6), t.font = f.font, t.fillStyle = d > 0 ? c : f.color, t.fillText(`${Math.round((e.count ?? 0) / (n || 1) * 100)}%`, o, 50 + a + 18), t.globalAlpha = 1;
2048
+ t.globalAlpha = i, t.font = f.font, t.fillStyle = d > 0 ? c : h(c, .9), t.textAlign = "center", t.fillText(Dt(t, e.severity, l - 12), o, 38), t.font = p.font, t.fillStyle = d > 0 ? u.t1 : h(u.t1, .85), t.fillText(String(e.count), o, 50 + a / 2 + 6), t.font = f.font, t.fillStyle = d > 0 ? c : f.color, t.fillText(`${Math.round((e.count ?? 0) / (n || 1) * 100)}%`, o, 50 + a + 18), t.globalAlpha = 1;
1990
2049
  }
1991
2050
  v += l;
1992
2051
  });
@@ -1995,64 +2054,64 @@ function Tt({ severities: e = [], "data-testid": t }) {
1995
2054
  };
1996
2055
  return m(), () => cancelAnimationFrame(c);
1997
2056
  }, [_]), _.length === 0 ? /* @__PURE__ */ s(I, {
1998
- width: J,
1999
- height: St,
2057
+ width: q,
2058
+ height: Et,
2000
2059
  "data-testid": t
2001
2060
  }) : /* @__PURE__ */ c("div", {
2002
2061
  "data-testid": t,
2003
2062
  style: {
2004
2063
  position: "relative",
2005
- width: J,
2006
- height: St
2064
+ width: q,
2065
+ height: Et
2007
2066
  },
2008
2067
  children: [/* @__PURE__ */ s("canvas", {
2009
2068
  ref: r,
2010
2069
  role: "img",
2011
2070
  "aria-label": "Early Warning severity distribution — prism spectrum bands",
2012
2071
  style: {
2013
- width: J,
2014
- height: St,
2072
+ width: q,
2073
+ height: Et,
2015
2074
  display: "block"
2016
2075
  }
2017
2076
  }), /* @__PURE__ */ s(C, {
2018
2077
  ...m,
2019
- parentW: J,
2020
- parentH: St
2078
+ parentW: q,
2079
+ parentH: Et
2021
2080
  })]
2022
2081
  });
2023
2082
  }
2024
2083
  //#endregion
2025
2084
  //#region src/components/hubAndSpokeRadialChart/HubAndSpokeRadialChart.tsx
2026
- var Y = 460, X = 300, Et = {
2085
+ var J = 460, Y = 300, At = {
2027
2086
  Open: u.red,
2028
2087
  Submitted: u.amber,
2029
2088
  Closed: u.green
2030
2089
  };
2031
- function Dt({ segments: e = [], title: t, "data-testid": r }) {
2090
+ function jt({ segments: e = [], title: t, "data-testid": r }) {
2032
2091
  let o = a(null), l = a(0), d = a(/* @__PURE__ */ new Map()), { hoveredRef: m, tooltip: g, hitZonesRef: _ } = w(o, {
2033
- width: Y,
2034
- height: X
2092
+ width: J,
2093
+ height: Y
2035
2094
  }), S = i(() => e.filter((e) => typeof e == "object" && !!e), [e]);
2036
2095
  return n(() => {
2037
2096
  let e = o.current;
2038
2097
  if (!e) return;
2039
- let t = v(e, Y, X);
2098
+ let t = v(e, J, Y);
2040
2099
  l.current = 0;
2041
- let n = Y * .5, r = X * .54, i = Y * .22, a = S.reduce((e, t) => e + (t.count ?? 0), 0), s = Math.max(...S.map((e) => e.count ?? 0), 1), c, g = () => {
2100
+ let n = J * .5, r = Y * .54, i = J * .22, a = S.reduce((e, t) => e + (t.count ?? 0), 0), s = Math.max(...S.map((e) => e.count ?? 0), 1), c, g = () => {
2042
2101
  l.current++;
2043
2102
  let e = l.current;
2044
- t.clearRect(0, 0, Y, X), t.letterSpacing = f.letterSpacing, _.current = [], d.current.forEach((e, t) => {
2103
+ t.clearRect(0, 0, J, Y), t.letterSpacing = f.letterSpacing, _.current = [], d.current.forEach((e, t) => {
2045
2104
  let n = t === m.current ? 1 : 0, r = e + (n - e) * .12;
2046
2105
  Math.abs(r - n) < .005 ? n === 0 ? d.current.delete(t) : d.current.set(t, 1) : d.current.set(t, r);
2047
- }), m.current && !d.current.has(m.current) && d.current.set(m.current, 0), b(t, Y, X, e, 40, h(u.blue, .04)), S.forEach((a, o) => {
2048
- let c = o / 3 * Math.PI * 2 - Math.PI / 2, l = n + Math.cos(c) * i, d = r + Math.sin(c) * i, f = Et[a.status] ?? u.blue, m = 2 + a.count / s * 8;
2106
+ }), m.current && !d.current.has(m.current) && d.current.set(m.current, 0), b(t, J, Y, e, 40, h(u.blue, .04)), S.forEach((a, o) => {
2107
+ let c = o / 3 * Math.PI * 2 - Math.PI / 2, l = n + Math.cos(c) * i, d = r + Math.sin(c) * i, f = At[a.status] ?? u.blue, m = 2 + a.count / s * 8;
2049
2108
  t.beginPath(), t.moveTo(n, r), t.lineTo(l, d), t.strokeStyle = h(f, .08), t.lineWidth = m * 2, t.stroke(), t.beginPath(), t.moveTo(n, r), t.lineTo(l, d), t.strokeStyle = h(f, .25), t.lineWidth = 1, t.stroke();
2050
2109
  let g = (e * .005 + o * .33) % 1, _ = n + (l - n) * g, v = r + (d - r) * g;
2051
2110
  y(t, _, v, 6, f, .4), t.beginPath(), t.arc(_, v, 2, 0, Math.PI * 2), t.fillStyle = h(f, .8), t.fill();
2052
2111
  let b = (n + l) / 2, x = (r + d) / 2;
2053
2112
  t.font = p.font, t.textAlign = "center", t.textBaseline = "middle", t.fillStyle = h(f, .85), t.fillText(String(a.count), b, x);
2054
2113
  }), S.forEach((e, o) => {
2055
- let c = o / 3 * Math.PI * 2 - Math.PI / 2, l = n + Math.cos(c) * i, p = r + Math.sin(c) * i, m = Et[e.status] ?? u.blue, g = 10 + e.count / s * 18, v = d.current.get(e.status) ?? 0;
2114
+ let c = o / 3 * Math.PI * 2 - Math.PI / 2, l = n + Math.cos(c) * i, p = r + Math.sin(c) * i, m = At[e.status] ?? u.blue, g = 10 + e.count / s * 18, v = d.current.get(e.status) ?? 0;
2056
2115
  y(t, l, p, g * 2.5, m, .2 + v * .15);
2057
2116
  let b = t.createRadialGradient(l, p - g * .2, 0, l, p, g);
2058
2117
  b.addColorStop(0, h(m, .8 + v * .2)), b.addColorStop(1, h(m, .4 + v * .1)), t.beginPath(), t.arc(l, p, g, 0, Math.PI * 2), t.fillStyle = b, t.fill(), t.font = "bold " + f.font, t.textAlign = "center", t.textBaseline = "middle", t.fillStyle = h(u.t1, .9), t.fillText(e.status, l, p), T(_.current, e.status, l, p, g + 6, {
@@ -2069,41 +2128,41 @@ function Dt({ segments: e = [], title: t, "data-testid": r }) {
2069
2128
  label: "Total EW Status",
2070
2129
  value: `${a} Early Warnings`,
2071
2130
  color: u.t2
2072
- }), x(t, Y, X, e, .015), c = requestAnimationFrame(g);
2131
+ }), x(t, J, Y, e, .015), c = requestAnimationFrame(g);
2073
2132
  };
2074
2133
  return g(), () => cancelAnimationFrame(c);
2075
2134
  }, [S, t]), S.length === 0 ? /* @__PURE__ */ s(I, {
2076
- width: Y,
2077
- height: X,
2135
+ width: J,
2136
+ height: Y,
2078
2137
  "data-testid": r
2079
2138
  }) : /* @__PURE__ */ c("div", {
2080
2139
  "data-testid": r,
2081
2140
  style: {
2082
2141
  position: "relative",
2083
- width: Y,
2084
- height: X
2142
+ width: J,
2143
+ height: Y
2085
2144
  },
2086
2145
  children: [/* @__PURE__ */ s("canvas", {
2087
2146
  ref: o,
2088
2147
  role: "img",
2089
2148
  "aria-label": t ?? "EW status arc visualization",
2090
2149
  style: {
2091
- width: Y,
2092
- height: X,
2150
+ width: J,
2151
+ height: Y,
2093
2152
  display: "block",
2094
2153
  borderRadius: 8
2095
2154
  }
2096
2155
  }), /* @__PURE__ */ s(C, {
2097
2156
  ...g,
2098
- parentW: Y,
2099
- parentH: X
2157
+ parentW: J,
2158
+ parentH: Y
2100
2159
  })]
2101
2160
  });
2102
2161
  }
2103
2162
  //#endregion
2104
2163
  //#region src/components/trendChart/TrendChart.tsx
2105
- var Ot = 280, Z = 96;
2106
- function kt({ points: e = [], className: t, colors: r }) {
2164
+ var Mt = 280, X = 96;
2165
+ function Nt({ points: e = [], className: t, colors: r }) {
2107
2166
  let o = a(null), d = a(/* @__PURE__ */ new Map()), f = a(0), p = i(() => e.filter(Array.isArray).map(([e, t]) => {
2108
2167
  let n = String(t).match(/-?\d+(\.\d+)?/);
2109
2168
  return {
@@ -2111,18 +2170,18 @@ function kt({ points: e = [], className: t, colors: r }) {
2111
2170
  value: n ? Number(n[0]) : 0
2112
2171
  };
2113
2172
  }), [e]), { mouseRef: m, hoveredRef: g, tooltip: _, hitZonesRef: b } = w(o, {
2114
- width: Ot,
2115
- height: Z
2173
+ width: Mt,
2174
+ height: X
2116
2175
  });
2117
2176
  return n(() => {
2118
2177
  let e = o.current;
2119
2178
  if (!e) return;
2120
- let t = v(e, Ot, Z);
2179
+ let t = v(e, Mt, X);
2121
2180
  f.current = 0;
2122
2181
  let n = r?.line ?? u.blue, i = r?.point ?? u.blue, a = r?.axisLine ?? u.bd, s, c = () => {
2123
2182
  f.current++;
2124
2183
  let e = f.current;
2125
- if (t.clearRect(0, 0, Ot, Z), p.length < 2) {
2184
+ if (t.clearRect(0, 0, Mt, X), p.length < 2) {
2126
2185
  s = requestAnimationFrame(c);
2127
2186
  return;
2128
2187
  }
@@ -2131,9 +2190,9 @@ function kt({ points: e = [], className: t, colors: r }) {
2131
2190
  right: 12,
2132
2191
  top: 16,
2133
2192
  bottom: 20
2134
- }, o = Ot - r.left - r.right, l = Z - r.top - r.bottom, _ = p.map((e) => e.value), v = Math.min(..._), x = Math.max(..._) - v || 1, C = (e) => r.left + e / (p.length - 1) * o, w = (e) => r.top + (1 - (e - v) / x) * l, E = 1 - (1 - Math.min(e / 48, 1)) ** 3, D = Math.max(2, Math.floor(E * p.length));
2135
- if (N(d.current, g.current), b.current = [], t.strokeStyle = h(a, .3), t.lineWidth = .5, t.setLineDash([]), t.beginPath(), t.moveTo(r.left, Z - r.bottom), t.lineTo(Ot - r.right, Z - r.bottom), t.stroke(), t.font = "9px 'JetBrains Mono', monospace", t.fillStyle = h(u.t4, .9), t.textAlign = "center", p.forEach((e, n) => {
2136
- t.fillText(e.label.replace("Day ", "D"), C(n), Z - 4);
2193
+ }, o = Mt - r.left - r.right, l = X - r.top - r.bottom, _ = p.map((e) => e.value), v = Math.min(..._), x = Math.max(..._) - v || 1, C = (e) => r.left + e / (p.length - 1) * o, w = (e) => r.top + (1 - (e - v) / x) * l, E = 1 - (1 - Math.min(e / 48, 1)) ** 3, D = Math.max(2, Math.floor(E * p.length));
2194
+ if (N(d.current, g.current), b.current = [], t.strokeStyle = h(a, .3), t.lineWidth = .5, t.setLineDash([]), t.beginPath(), t.moveTo(r.left, X - r.bottom), t.lineTo(Mt - r.right, X - r.bottom), t.stroke(), t.font = "9px 'JetBrains Mono', monospace", t.fillStyle = h(u.t4, .9), t.textAlign = "center", p.forEach((e, n) => {
2195
+ t.fillText(e.label.replace("Day ", "D"), C(n), X - 4);
2137
2196
  }), m.current.over && g.current) {
2138
2197
  let e = parseInt(g.current.split("-")[1]);
2139
2198
  isNaN(e) || S(t, C(e), r.top, r.top + l);
@@ -2169,44 +2228,50 @@ function kt({ points: e = [], className: t, colors: r }) {
2169
2228
  children: /* @__PURE__ */ c("div", {
2170
2229
  style: {
2171
2230
  position: "relative",
2172
- width: Ot,
2173
- height: Z
2231
+ width: Mt,
2232
+ height: X
2174
2233
  },
2175
2234
  children: [/* @__PURE__ */ s("canvas", {
2176
2235
  ref: o,
2177
2236
  role: "img",
2178
2237
  "aria-label": "trend chart",
2179
2238
  style: {
2180
- width: Ot,
2181
- height: Z,
2239
+ width: Mt,
2240
+ height: X,
2182
2241
  display: "block",
2183
2242
  borderRadius: 8
2184
2243
  }
2185
2244
  }), /* @__PURE__ */ s(C, {
2186
2245
  ..._,
2187
- parentW: Ot,
2188
- parentH: Z
2246
+ parentW: Mt,
2247
+ parentH: X
2189
2248
  })]
2190
2249
  })
2191
2250
  });
2192
2251
  }
2193
2252
  //#endregion
2194
2253
  //#region src/components/segmentedSplitBarChart/SegmentedSplitBarChart.tsx
2195
- var At = 680, jt = 8, Mt = 26, Nt = 14, Pt = 16, Ft = 32;
2196
- function It({ items: e = [], "data-testid": t }) {
2197
- let r = a(null), l = a(/* @__PURE__ */ new Map()), d = a(0), [g, _] = o(!1), b = i(() => e.filter((e) => typeof e == "object" && !!e), [e]), x = i(() => g ? b : b.slice(0, jt), [b, g]), S = Pt + Ft + x.length * (Mt + Nt) - Nt, { hoveredRef: T, tooltip: D, hitZonesRef: k } = w(r, {
2198
- width: At,
2254
+ function Pt(e, t, n) {
2255
+ if (e.measureText(t).width <= n) return t;
2256
+ let r = t;
2257
+ for (; r.length > 0 && e.measureText(r + "…").width > n;) r = r.slice(0, -1);
2258
+ return r + "…";
2259
+ }
2260
+ var Ft = 680, It = 8, Lt = 26, Rt = 14, zt = 16, Bt = 32;
2261
+ function Vt({ items: e = [], "data-testid": t }) {
2262
+ let r = a(null), l = a(/* @__PURE__ */ new Map()), d = a(0), [g, _] = o(!1), b = i(() => e.filter((e) => typeof e == "object" && !!e), [e]), x = i(() => g ? b : b.slice(0, It), [b, g]), S = zt + Bt + x.length * (Lt + Rt) - Rt, { hoveredRef: T, tooltip: D, hitZonesRef: k } = w(r, {
2263
+ width: Ft,
2199
2264
  height: S
2200
2265
  });
2201
2266
  return n(() => {
2202
2267
  let e = r.current;
2203
2268
  if (!e) return;
2204
- let t = v(e, At, S);
2269
+ let t = v(e, Ft, S);
2205
2270
  d.current = 0;
2206
- let n = Pt, i = Ft, a = Mt, o = Nt, s = At - 60 - 28, c = Math.max(...x.map((e) => (e.implemented ?? 0) + (e.unimplemented ?? 0)), 1), g = x.length * (a + o) - o, _ = n + (S - n - i - g) / 2, b, C = () => {
2271
+ let n = zt, i = Bt, a = Lt, o = Rt, s = Ft - 60 - 28, c = Math.max(...x.map((e) => (e.implemented ?? 0) + (e.unimplemented ?? 0)), 1), g = x.length * (a + o) - o, _ = n + (S - n - i - g) / 2, b, C = () => {
2207
2272
  d.current++;
2208
2273
  let e = d.current;
2209
- t.clearRect(0, 0, At, S);
2274
+ t.clearRect(0, 0, Ft, S);
2210
2275
  let n = O(Math.min(e / 60, 1));
2211
2276
  N(l.current, T.current), k.current = [], x.forEach((e, r) => {
2212
2277
  let i = M(n, r, x.length, O), d = _ + r * (a + o), m = (e.implemented ?? 0) + (e.unimplemented ?? 0), g = (e.implemented ?? 0) / c * s * i, v = (e.unimplemented ?? 0) / c * s * i, b = `${e.id}-impl`, S = `${e.id}-un`, C = l.current.get(b) ?? 0, w = l.current.get(S) ?? 0;
@@ -2220,7 +2285,7 @@ function It({ items: e = [], "data-testid": t }) {
2220
2285
  value: `${e.unimplemented ?? 0} variations`,
2221
2286
  sublabel: `${Math.round((e.unimplemented ?? 0) / (m || 1) * 100)}% pending`,
2222
2287
  color: u.amber
2223
- }), t.font = f.font, t.fillStyle = u.t2, t.textAlign = "right", t.fillText(e.abbreviation ?? e.name?.slice(0, 6) ?? "", 52, d + a / 2 + 4), t.fillStyle = h(u.bd, .15), t.beginPath(), t.roundRect(60, d, m / c * s, a, 4), t.fill(), g > 0 && (C > 0 && y(t, 60 + g / 2, d + a / 2, g * .3, u.green, .12 * C), t.fillStyle = h(u.green, .6 + C * .2), t.beginPath(), t.roundRect(60, d, g, a, [
2288
+ }), t.font = f.font, t.fillStyle = u.t2, t.textAlign = "right", t.fillText(Pt(t, e.abbreviation ?? e.name ?? "", 44), 52, d + a / 2 + 4), t.fillStyle = h(u.bd, .15), t.beginPath(), t.roundRect(60, d, m / c * s, a, 4), t.fill(), g > 0 && (C > 0 && y(t, 60 + g / 2, d + a / 2, g * .3, u.green, .12 * C), t.fillStyle = h(u.green, .6 + C * .2), t.beginPath(), t.roundRect(60, d, g, a, [
2224
2289
  4,
2225
2290
  0,
2226
2291
  0,
@@ -2237,16 +2302,16 @@ function It({ items: e = [], "data-testid": t }) {
2237
2302
  };
2238
2303
  return C(), () => cancelAnimationFrame(b);
2239
2304
  }, [x, S]), b.length === 0 ? /* @__PURE__ */ s(I, {
2240
- width: At,
2305
+ width: Ft,
2241
2306
  height: 160,
2242
2307
  "data-testid": t
2243
2308
  }) : /* @__PURE__ */ c("div", {
2244
2309
  "data-testid": t,
2245
- style: { width: At },
2310
+ style: { width: Ft },
2246
2311
  children: [/* @__PURE__ */ c("div", {
2247
2312
  style: {
2248
2313
  position: "relative",
2249
- width: At,
2314
+ width: Ft,
2250
2315
  height: S
2251
2316
  },
2252
2317
  children: [/* @__PURE__ */ s("canvas", {
@@ -2254,16 +2319,16 @@ function It({ items: e = [], "data-testid": t }) {
2254
2319
  role: "img",
2255
2320
  "aria-label": "Implemented vs unimplemented variations per contractor — split bar",
2256
2321
  style: {
2257
- width: At,
2322
+ width: Ft,
2258
2323
  height: S,
2259
2324
  display: "block"
2260
2325
  }
2261
2326
  }), /* @__PURE__ */ s(C, {
2262
2327
  ...D,
2263
- parentW: At,
2328
+ parentW: Ft,
2264
2329
  parentH: S
2265
2330
  })]
2266
- }), b.length > jt && /* @__PURE__ */ s("div", {
2331
+ }), b.length > It && /* @__PURE__ */ s("div", {
2267
2332
  style: { marginTop: 8 },
2268
2333
  children: /* @__PURE__ */ s(ae, {
2269
2334
  expanded: g,
@@ -2274,18 +2339,18 @@ function It({ items: e = [], "data-testid": t }) {
2274
2339
  }
2275
2340
  //#endregion
2276
2341
  //#region src/components/weeklyFlow/WeeklyFlow.tsx
2277
- var Lt = 800, Rt = 360;
2278
- function zt({ items: e = [], "data-testid": t }) {
2342
+ var Ht = 800, Ut = 360;
2343
+ function Wt({ items: e = [], "data-testid": t }) {
2279
2344
  let r = a(null), i = a(/* @__PURE__ */ new Map()), o = a(0), { hoveredRef: l, tooltip: m, hitZonesRef: g } = w(r, {
2280
- width: Lt,
2281
- height: Rt
2345
+ width: Ht,
2346
+ height: Ut
2282
2347
  });
2283
2348
  return n(() => {
2284
2349
  let t = r.current;
2285
2350
  if (!t) return;
2286
- let n = v(t, Lt, Rt);
2351
+ let n = v(t, Ht, Ut);
2287
2352
  o.current = 0;
2288
- let a = e.reduce((e, t) => e + (t.base ?? 0), 0), s = e.reduce((e, t) => e + (t.variation ?? 0), 0), c = e.reduce((e, t) => e + (t.total ?? 0), 0), m = Rt - 20 - 26, _ = m - 6 * (e.length - 1), b = 20, x = e.map((e, t) => {
2353
+ let a = e.reduce((e, t) => e + (t.base ?? 0), 0), s = e.reduce((e, t) => e + (t.variation ?? 0), 0), c = e.reduce((e, t) => e + (t.total ?? 0), 0), m = Ut - 20 - 26, _ = m - 6 * (e.length - 1), b = 20, x = e.map((e, t) => {
2289
2354
  let n = Math.max(24, (e.total ?? 0) / (c || 1) * _), r = {
2290
2355
  x: 100 - 110 / 2,
2291
2356
  y: b,
@@ -2313,16 +2378,16 @@ function zt({ items: e = [], "data-testid": t }) {
2313
2378
  }, j, P = () => {
2314
2379
  o.current++;
2315
2380
  let t = o.current;
2316
- n.clearRect(0, 0, Lt, Rt), n.letterSpacing = f.letterSpacing;
2381
+ n.clearRect(0, 0, Ht, Ut), n.letterSpacing = f.letterSpacing;
2317
2382
  let r = D(Math.min(t / 80, 1));
2318
2383
  if (N(i.current, l.current), g.current = [], e.forEach((t, o) => {
2319
2384
  let c = x[o], l = M(r, o, e.length, D), u = i.current.get(t.id) ?? 0;
2320
2385
  if (l < .01) return;
2321
2386
  let d = (t.base ?? 0) / (t.total || 1), f = (t.variation ?? 0) / (t.total || 1), p = c.h * d, m = c.h * f, h = c.y + p / 2, g = c.y + p + m / 2, _ = Math.max(2, (t.base ?? 0) / a * C), v = Math.max(2, (t.variation ?? 0) / s * w), y = O.y + e.slice(0, o).reduce((e, t) => e + (t.base ?? 0) / a * C, 0) + _ / 2, b = k.y + e.slice(0, o).reduce((e, t) => e + (t.variation ?? 0) / s * w, 0) + v / 2, S = u * .2 + .18;
2322
- Bt(n, c.x + 110, h, 420 - 110 / 2, y, _ * l, c.color, S), Bt(n, c.x + 110, g, 420 - 110 / 2, b, v * l, c.color, S * .75);
2387
+ Gt(n, c.x + 110, h, 420 - 110 / 2, y, _ * l, c.color, S), Gt(n, c.x + 110, g, 420 - 110 / 2, b, v * l, c.color, S * .75);
2323
2388
  }), r > .3) {
2324
2389
  let e = Math.min(1, (r - .3) / .7), t = A.y + a / c * m / 2, i = A.y + m - s / c * m / 2;
2325
- Bt(n, 475, O.cy, 720 - 110 / 2, t, C * e, u.blue, .25 * e), Bt(n, 475, k.cy, 720 - 110 / 2, i, w * e, u.amber, .22 * e);
2390
+ Gt(n, 475, O.cy, 720 - 110 / 2, t, C * e, u.blue, .25 * e), Gt(n, 475, k.cy, 720 - 110 / 2, i, w * e, u.amber, .22 * e);
2326
2391
  }
2327
2392
  if ([
2328
2393
  "Contractors",
@@ -2334,7 +2399,7 @@ function zt({ items: e = [], "data-testid": t }) {
2334
2399
  420,
2335
2400
  720
2336
2401
  ][t];
2337
- n.font = f.font, n.fillStyle = f.color, n.textAlign = "center", n.fillText(e, r, Rt - 8);
2402
+ n.font = f.font, n.fillStyle = f.color, n.textAlign = "center", n.fillText(e, r, Ut - 8);
2338
2403
  }), e.forEach((t, a) => {
2339
2404
  let o = x[a], s = M(r, a, e.length, D), c = i.current.get(t.id) ?? 0;
2340
2405
  E(g.current, t.id, o.x, o.y, 110, o.h, {
@@ -2358,33 +2423,33 @@ function zt({ items: e = [], "data-testid": t }) {
2358
2423
  "data-testid": t,
2359
2424
  style: {
2360
2425
  position: "relative",
2361
- width: Lt,
2362
- height: Rt
2426
+ width: Ht,
2427
+ height: Ut
2363
2428
  },
2364
2429
  children: [/* @__PURE__ */ s("canvas", {
2365
2430
  ref: r,
2366
2431
  role: "img",
2367
2432
  "aria-label": "Weekly report flow — base value and variations per contractor flowing to total commitment",
2368
2433
  style: {
2369
- width: Lt,
2370
- height: Rt,
2434
+ width: Ht,
2435
+ height: Ut,
2371
2436
  display: "block"
2372
2437
  }
2373
2438
  }), /* @__PURE__ */ s(C, {
2374
2439
  ...m,
2375
- parentW: Lt,
2376
- parentH: Rt
2440
+ parentW: Ht,
2441
+ parentH: Ut
2377
2442
  })]
2378
2443
  });
2379
2444
  }
2380
- function Bt(e, t, n, r, i, a, o, s) {
2445
+ function Gt(e, t, n, r, i, a, o, s) {
2381
2446
  let c = (t + r) / 2;
2382
2447
  e.beginPath(), e.moveTo(t, n - a / 2), e.bezierCurveTo(c, n - a / 2, c, i - a / 2, r, i - a / 2), e.lineTo(r, i + a / 2), e.bezierCurveTo(c, i + a / 2, c, n + a / 2, t, n + a / 2), e.closePath(), e.fillStyle = h(o, s), e.fill();
2383
2448
  }
2384
2449
  //#endregion
2385
2450
  //#region src/components/visualizationRenderer/VisualizationRenderer.tsx
2386
- function Vt({ config: e, className: t }) {
2387
- return e.type === "line" ? /* @__PURE__ */ s(Ie, {
2451
+ function Kt({ config: e, className: t }) {
2452
+ return e.type === "line" ? /* @__PURE__ */ s(Re, {
2388
2453
  rows: e.rows,
2389
2454
  className: t
2390
2455
  }) : e.type === "area" ? /* @__PURE__ */ s(te, {
@@ -2393,78 +2458,78 @@ function Vt({ config: e, className: t }) {
2393
2458
  }) : e.type === "bar" ? /* @__PURE__ */ s(ie, {
2394
2459
  rows: e.rows,
2395
2460
  className: t
2396
- }) : e.type === "pie" ? /* @__PURE__ */ s(Je, {
2461
+ }) : e.type === "pie" ? /* @__PURE__ */ s(Qe, {
2397
2462
  rows: e.rows,
2398
2463
  variant: "pie",
2399
2464
  className: t
2400
- }) : e.type === "donut" ? /* @__PURE__ */ s(Je, {
2465
+ }) : e.type === "donut" ? /* @__PURE__ */ s(Qe, {
2401
2466
  rows: e.rows,
2402
2467
  variant: "donut",
2403
2468
  className: t
2404
- }) : e.type === "sankey" ? /* @__PURE__ */ s(at, {
2469
+ }) : e.type === "sankey" ? /* @__PURE__ */ s(lt, {
2405
2470
  rows: e.rows,
2406
2471
  className: t
2407
- }) : e.type === "flow" ? /* @__PURE__ */ s(it, {
2472
+ }) : e.type === "flow" ? /* @__PURE__ */ s(ct, {
2408
2473
  selectedEntity: e.selectedEntity,
2409
2474
  className: t
2410
- }) : e.type === "trend" ? /* @__PURE__ */ s(kt, {
2475
+ }) : e.type === "trend" ? /* @__PURE__ */ s(Nt, {
2411
2476
  points: e.points,
2412
2477
  className: t
2413
- }) : e.type === "mini-bars" ? /* @__PURE__ */ s(ze, {
2478
+ }) : e.type === "mini-bars" ? /* @__PURE__ */ s(Ve, {
2414
2479
  rows: e.rows,
2415
2480
  className: t
2416
- }) : e.type === "stacked-horizontal-bar-chart" ? /* @__PURE__ */ s(Ae, { data: e.data }) : e.type === "multi-metric-constellation-chart" ? /* @__PURE__ */ s(Se, { items: e.items }) : e.type === "progress-race-chart" ? /* @__PURE__ */ s(de, { items: e.items }) : e.type === "hub-and-spoke-radial-chart" ? /* @__PURE__ */ s(Dt, {
2481
+ }) : e.type === "stacked-horizontal-bar-chart" ? /* @__PURE__ */ s(je, { data: e.data }) : e.type === "multi-metric-constellation-chart" ? /* @__PURE__ */ s(Ce, { items: e.items }) : e.type === "progress-race-chart" ? /* @__PURE__ */ s(fe, { items: e.items }) : e.type === "hub-and-spoke-radial-chart" ? /* @__PURE__ */ s(jt, {
2417
2482
  segments: e.segments,
2418
2483
  title: e.title
2419
- }) : e.type === "dot-matrix-chart" ? /* @__PURE__ */ s(Fe, { items: e.items }) : e.type === "ranked-card-leaderboard" ? /* @__PURE__ */ s(Pe, { items: e.items }) : e.type === "proportional-band-chart" ? /* @__PURE__ */ s(Tt, { severities: e.severities }) : e.type === "radial-fan-tree-chart" ? /* @__PURE__ */ s(We, {
2484
+ }) : e.type === "dot-matrix-chart" ? /* @__PURE__ */ s(Le, { items: e.items }) : e.type === "ranked-card-leaderboard" ? /* @__PURE__ */ s(Ie, { items: e.items }) : e.type === "proportional-band-chart" ? /* @__PURE__ */ s(kt, { severities: e.severities }) : e.type === "radial-fan-tree-chart" ? /* @__PURE__ */ s(Je, {
2420
2485
  total: e.total,
2421
2486
  totalLabel: e.totalLabel,
2422
2487
  items: e.items
2423
- }) : e.type === "semi-circular-gauge-chart" ? /* @__PURE__ */ s(me, {
2488
+ }) : e.type === "semi-circular-gauge-chart" ? /* @__PURE__ */ s(he, {
2424
2489
  value: e.value,
2425
2490
  confirmed: e.confirmed,
2426
2491
  total: e.total
2427
- }) : e.type === "segmented-split-bar-chart" ? /* @__PURE__ */ s(It, { items: e.items }) : e.type === "balance-scale-chart" ? /* @__PURE__ */ s(ct, {
2492
+ }) : e.type === "segmented-split-bar-chart" ? /* @__PURE__ */ s(Vt, { items: e.items }) : e.type === "balance-scale-chart" ? /* @__PURE__ */ s(ft, {
2428
2493
  left: e.left,
2429
2494
  right: e.right
2430
- }) : e.type === "area-line-chart" ? /* @__PURE__ */ s(ut, { points: e.points }) : e.type === "trend-view" ? /* @__PURE__ */ s(xt, { points: e.points }) : e.type === "weekly-flow" ? /* @__PURE__ */ s(zt, { items: e.items }) : /* @__PURE__ */ s("div", {
2495
+ }) : e.type === "area-line-chart" ? /* @__PURE__ */ s(mt, { points: e.points }) : e.type === "trend-view" ? /* @__PURE__ */ s(Tt, { points: e.points }) : e.type === "weekly-flow" ? /* @__PURE__ */ s(Wt, { items: e.items }) : /* @__PURE__ */ s("div", {
2431
2496
  className: "viz-empty",
2432
2497
  children: "Visualization unavailable"
2433
2498
  });
2434
2499
  }
2435
2500
  //#endregion
2436
2501
  //#region src/utils/mounts.tsx
2437
- var Ht = [];
2438
- function Ut(e) {
2502
+ var qt = [];
2503
+ function Jt(e) {
2439
2504
  try {
2440
2505
  return JSON.parse(decodeURIComponent(e));
2441
2506
  } catch {
2442
2507
  return null;
2443
2508
  }
2444
2509
  }
2445
- function Wt() {
2446
- for (; Ht.length;) {
2447
- let e = Ht.pop();
2510
+ function Yt() {
2511
+ for (; qt.length;) {
2512
+ let e = qt.pop();
2448
2513
  e && e.unmount();
2449
2514
  }
2450
2515
  }
2451
- function Gt() {
2452
- Wt(), document.querySelectorAll("[data-d3-viz]").forEach((t) => {
2516
+ function Xt() {
2517
+ Yt(), document.querySelectorAll("[data-d3-viz]").forEach((t) => {
2453
2518
  let n = t.dataset.d3Viz;
2454
2519
  if (!n) return;
2455
- let r = Ut(n);
2520
+ let r = Jt(n);
2456
2521
  if (!r) return;
2457
2522
  let i = e(t);
2458
- Ht.push(i), i.render(/* @__PURE__ */ s(Vt, { config: r }));
2523
+ qt.push(i), i.render(/* @__PURE__ */ s(Kt, { config: r }));
2459
2524
  });
2460
2525
  }
2461
- function Kt(e) {
2526
+ function Zt(e) {
2462
2527
  return encodeURIComponent(JSON.stringify(e));
2463
2528
  }
2464
2529
  //#endregion
2465
2530
  //#region src/components/donutChart/DonutChart.tsx
2466
- function qt({ rows: e = [], className: t, colors: n }) {
2467
- return /* @__PURE__ */ s(Je, {
2531
+ function Qt({ rows: e = [], className: t, colors: n }) {
2532
+ return /* @__PURE__ */ s(Qe, {
2468
2533
  rows: e,
2469
2534
  variant: "donut",
2470
2535
  className: t,
@@ -2473,7 +2538,7 @@ function qt({ rows: e = [], className: t, colors: n }) {
2473
2538
  }
2474
2539
  //#endregion
2475
2540
  //#region src/components/keyHighlights/KeyHighlights.tsx
2476
- var Q = {
2541
+ var Z = {
2477
2542
  bg: "transparent",
2478
2543
  border: "transparent",
2479
2544
  t1: u.t1,
@@ -2483,20 +2548,20 @@ var Q = {
2483
2548
  red: u.red,
2484
2549
  amber: u.amber,
2485
2550
  green: u.green
2486
- }, $ = "'Satoshi Variable', 'DM Sans', sans-serif", Jt = {
2551
+ }, Q = "'Satoshi Variable', 'DM Sans', sans-serif", $t = {
2487
2552
  color: "#F7F7F7",
2488
- fontFamily: $,
2553
+ fontFamily: Q,
2489
2554
  fontSize: 24,
2490
2555
  fontWeight: 500,
2491
2556
  lineHeight: "32px"
2492
- }, Yt = {
2557
+ }, $ = {
2493
2558
  color: "#C2C2C2",
2494
- fontFamily: $,
2559
+ fontFamily: Q,
2495
2560
  fontSize: 18,
2496
2561
  fontWeight: 400,
2497
2562
  lineHeight: "20px"
2498
2563
  };
2499
- function Xt({ chips: e = [] }) {
2564
+ function en({ chips: e = [] }) {
2500
2565
  return /* @__PURE__ */ s("div", {
2501
2566
  style: {
2502
2567
  display: "flex",
@@ -2510,21 +2575,21 @@ function Xt({ chips: e = [] }) {
2510
2575
  display: "flex",
2511
2576
  alignItems: "baseline",
2512
2577
  gap: 8,
2513
- padding: "8px 12px",
2514
- background: Q.bg,
2515
- border: `1px solid ${Q.border}`,
2578
+ padding: "8px 0px",
2579
+ background: Z.bg,
2580
+ border: `1px solid ${Z.border}`,
2516
2581
  borderRadius: 5,
2517
2582
  boxSizing: "border-box"
2518
2583
  },
2519
2584
  children: [/* @__PURE__ */ s("span", {
2520
2585
  style: {
2521
- ...Jt,
2522
- color: e.color ?? Q.t1
2586
+ ...$t,
2587
+ color: e.color ?? Z.t1
2523
2588
  },
2524
2589
  children: e.value
2525
2590
  }), /* @__PURE__ */ s("span", {
2526
2591
  style: {
2527
- ...Yt,
2592
+ ...$,
2528
2593
  flex: 1
2529
2594
  },
2530
2595
  children: e.label
@@ -2532,7 +2597,7 @@ function Xt({ chips: e = [] }) {
2532
2597
  }, t))
2533
2598
  });
2534
2599
  }
2535
- function Zt({ items: e = [] }) {
2600
+ function tn({ items: e = [] }) {
2536
2601
  return /* @__PURE__ */ s("div", {
2537
2602
  style: {
2538
2603
  display: "flex",
@@ -2546,27 +2611,27 @@ function Zt({ items: e = [] }) {
2546
2611
  alignItems: "flex-start",
2547
2612
  width: 260,
2548
2613
  height: 120,
2549
- padding: 24,
2614
+ padding: "24px 0",
2550
2615
  gap: 8,
2551
2616
  flexShrink: 0,
2552
- border: `1px solid ${Q.border}`,
2553
- background: Q.bg,
2617
+ border: `1px solid ${Z.border}`,
2618
+ background: Z.bg,
2554
2619
  boxSizing: "border-box"
2555
2620
  },
2556
2621
  children: [/* @__PURE__ */ s("div", {
2557
2622
  style: {
2558
- ...Jt,
2559
- color: e.color ?? Q.t1
2623
+ ...$t,
2624
+ color: e.color ?? Z.t1
2560
2625
  },
2561
2626
  children: e.value
2562
2627
  }), /* @__PURE__ */ s("div", {
2563
- style: { ...Yt },
2628
+ style: { ...$ },
2564
2629
  children: e.label
2565
2630
  })]
2566
2631
  }, t))
2567
2632
  });
2568
2633
  }
2569
- function Qt({ items: e = [] }) {
2634
+ function nn({ items: e = [] }) {
2570
2635
  return /* @__PURE__ */ s("div", {
2571
2636
  style: {
2572
2637
  display: "flex",
@@ -2578,29 +2643,29 @@ function Qt({ items: e = [] }) {
2578
2643
  display: "flex",
2579
2644
  alignItems: "center",
2580
2645
  gap: 12,
2581
- padding: "9px 14px",
2582
- background: Q.bg,
2583
- border: `1px solid ${Q.border}`
2646
+ padding: "9px 0px",
2647
+ background: Z.bg,
2648
+ border: `1px solid ${Z.border}`
2584
2649
  },
2585
2650
  children: [
2586
2651
  /* @__PURE__ */ s("span", {
2587
2652
  style: {
2588
2653
  fontSize: 18,
2589
2654
  fontWeight: 500,
2590
- color: e.color ?? Q.t2,
2591
- background: (e.color ?? Q.t2) + "22",
2655
+ color: e.color ?? Z.t2,
2656
+ background: (e.color ?? Z.t2) + "22",
2592
2657
  padding: "2px 8px",
2593
2658
  borderRadius: 4,
2594
- fontFamily: $,
2659
+ fontFamily: Q,
2595
2660
  flexShrink: 0
2596
2661
  },
2597
2662
  children: e.name
2598
2663
  }),
2599
2664
  /* @__PURE__ */ s("span", {
2600
2665
  style: {
2601
- ...Jt,
2666
+ ...$t,
2602
2667
  fontSize: 18,
2603
- color: e.color ?? Q.t1,
2668
+ color: e.color ?? Z.t1,
2604
2669
  minWidth: 70,
2605
2670
  flexShrink: 0
2606
2671
  },
@@ -2608,7 +2673,7 @@ function Qt({ items: e = [] }) {
2608
2673
  }),
2609
2674
  /* @__PURE__ */ s("span", {
2610
2675
  style: {
2611
- ...Yt,
2676
+ ...$,
2612
2677
  flex: 1
2613
2678
  },
2614
2679
  children: e.kpiLabel
@@ -2617,7 +2682,7 @@ function Qt({ items: e = [] }) {
2617
2682
  }, t))
2618
2683
  });
2619
2684
  }
2620
- function $t({ items: e = [] }) {
2685
+ function rn({ items: e = [] }) {
2621
2686
  return /* @__PURE__ */ s("div", {
2622
2687
  style: {
2623
2688
  display: "flex",
@@ -2631,31 +2696,31 @@ function $t({ items: e = [] }) {
2631
2696
  alignItems: "flex-start",
2632
2697
  width: 260,
2633
2698
  height: 120,
2634
- padding: 24,
2699
+ padding: "24px 0",
2635
2700
  gap: 8,
2636
2701
  flexShrink: 0,
2637
- background: Q.bg,
2702
+ background: Z.bg,
2638
2703
  boxSizing: "border-box"
2639
2704
  },
2640
2705
  children: [/* @__PURE__ */ s("div", {
2641
2706
  style: {
2642
- ...Jt,
2643
- color: e.color ?? Q.t1
2707
+ ...$t,
2708
+ color: e.color ?? Z.t1
2644
2709
  },
2645
2710
  children: e.value
2646
2711
  }), /* @__PURE__ */ s("div", {
2647
- style: { ...Yt },
2712
+ style: { ...$ },
2648
2713
  children: e.label
2649
2714
  })]
2650
2715
  }, t))
2651
2716
  });
2652
2717
  }
2653
- var en = {
2654
- red: Q.red,
2655
- amber: Q.amber,
2656
- green: Q.green
2718
+ var an = {
2719
+ red: Z.red,
2720
+ amber: Z.amber,
2721
+ green: Z.green
2657
2722
  };
2658
- function tn({ items: e = [] }) {
2723
+ function on({ items: e = [] }) {
2659
2724
  return /* @__PURE__ */ s("div", {
2660
2725
  style: {
2661
2726
  display: "flex",
@@ -2663,15 +2728,15 @@ function tn({ items: e = [] }) {
2663
2728
  gap: 5
2664
2729
  },
2665
2730
  children: e.map((e, t) => {
2666
- let n = en[e.severity];
2731
+ let n = an[e.severity];
2667
2732
  return /* @__PURE__ */ c("div", {
2668
2733
  style: {
2669
2734
  display: "flex",
2670
2735
  alignItems: "flex-start",
2671
2736
  gap: 10,
2672
- padding: "10px 14px",
2673
- background: Q.bg,
2674
- border: `1px solid ${Q.border}`
2737
+ padding: "10px 0px",
2738
+ background: Z.bg,
2739
+ border: `1px solid ${Z.border}`
2675
2740
  },
2676
2741
  children: [/* @__PURE__ */ s("span", { style: {
2677
2742
  width: 7,
@@ -2681,14 +2746,14 @@ function tn({ items: e = [] }) {
2681
2746
  flexShrink: 0,
2682
2747
  marginTop: 5
2683
2748
  } }), /* @__PURE__ */ s("span", {
2684
- style: { ...Yt },
2749
+ style: { ...$ },
2685
2750
  children: e.text
2686
2751
  })]
2687
2752
  }, t);
2688
2753
  })
2689
2754
  });
2690
2755
  }
2691
- function nn({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
2756
+ function sn({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
2692
2757
  let a = t - e;
2693
2758
  return /* @__PURE__ */ c("div", { children: [/* @__PURE__ */ c("div", {
2694
2759
  style: {
@@ -2712,8 +2777,8 @@ function nn({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
2712
2777
  top: 43,
2713
2778
  left: 0,
2714
2779
  fontSize: 16,
2715
- color: Q.t4,
2716
- fontFamily: $
2780
+ color: Z.t4,
2781
+ fontFamily: Q
2717
2782
  },
2718
2783
  children: [e, n]
2719
2784
  }),
@@ -2723,8 +2788,8 @@ function nn({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
2723
2788
  top: 43,
2724
2789
  right: 0,
2725
2790
  fontSize: 16,
2726
- color: Q.t4,
2727
- fontFamily: $
2791
+ color: Z.t4,
2792
+ fontFamily: Q
2728
2793
  },
2729
2794
  children: [t, n]
2730
2795
  }),
@@ -2747,7 +2812,7 @@ function nn({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
2747
2812
  style: {
2748
2813
  fontSize: 18,
2749
2814
  color: o,
2750
- fontFamily: $,
2815
+ fontFamily: Q,
2751
2816
  whiteSpace: "nowrap"
2752
2817
  },
2753
2818
  children: t.name
@@ -2756,7 +2821,7 @@ function nn({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
2756
2821
  fontSize: 18,
2757
2822
  fontWeight: 500,
2758
2823
  color: o,
2759
- fontFamily: $,
2824
+ fontFamily: Q,
2760
2825
  whiteSpace: "nowrap"
2761
2826
  },
2762
2827
  children: [t.val, n]
@@ -2779,7 +2844,7 @@ function nn({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
2779
2844
  style: {
2780
2845
  fontSize: 18,
2781
2846
  color: o,
2782
- fontFamily: $,
2847
+ fontFamily: Q,
2783
2848
  whiteSpace: "nowrap"
2784
2849
  },
2785
2850
  children: t.name
@@ -2788,7 +2853,7 @@ function nn({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
2788
2853
  fontSize: 18,
2789
2854
  fontWeight: 500,
2790
2855
  color: o,
2791
- fontFamily: $,
2856
+ fontFamily: Q,
2792
2857
  whiteSpace: "nowrap"
2793
2858
  },
2794
2859
  children: [t.val, n]
@@ -2798,9 +2863,9 @@ function nn({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
2798
2863
  }, r);
2799
2864
  })
2800
2865
  ]
2801
- }), i && i.length > 0 && /* @__PURE__ */ s(Xt, { chips: i })] });
2866
+ }), i && i.length > 0 && /* @__PURE__ */ s(en, { chips: i })] });
2802
2867
  }
2803
- function rn({ leftPct: e, leftLabel: t, leftValue: n, leftColor: r, rightPct: i, rightLabel: a, rightValue: o, rightColor: l, chips: d }) {
2868
+ function cn({ leftPct: e, leftLabel: t, leftValue: n, leftColor: r, rightPct: i, rightLabel: a, rightValue: o, rightColor: l, chips: d }) {
2804
2869
  let f = r ?? u.blue, p = l ?? u.blue;
2805
2870
  return /* @__PURE__ */ c("div", { children: [
2806
2871
  /* @__PURE__ */ c("div", {
@@ -2826,7 +2891,7 @@ function rn({ leftPct: e, leftLabel: t, leftValue: n, leftColor: r, rightPct: i,
2826
2891
  fontSize: 18,
2827
2892
  fontWeight: 500,
2828
2893
  color: f,
2829
- fontFamily: $
2894
+ fontFamily: Q
2830
2895
  },
2831
2896
  children: n
2832
2897
  })
@@ -2849,7 +2914,7 @@ function rn({ leftPct: e, leftLabel: t, leftValue: n, leftColor: r, rightPct: i,
2849
2914
  fontSize: 18,
2850
2915
  fontWeight: 500,
2851
2916
  color: p,
2852
- fontFamily: $
2917
+ fontFamily: Q
2853
2918
  },
2854
2919
  children: o
2855
2920
  })
@@ -2867,7 +2932,7 @@ function rn({ leftPct: e, leftLabel: t, leftValue: n, leftColor: r, rightPct: i,
2867
2932
  style: {
2868
2933
  fontSize: 18,
2869
2934
  color: f,
2870
- fontFamily: $
2935
+ fontFamily: Q
2871
2936
  },
2872
2937
  children: [
2873
2938
  e,
@@ -2884,7 +2949,7 @@ function rn({ leftPct: e, leftLabel: t, leftValue: n, leftColor: r, rightPct: i,
2884
2949
  style: {
2885
2950
  fontSize: 18,
2886
2951
  color: p,
2887
- fontFamily: $
2952
+ fontFamily: Q
2888
2953
  },
2889
2954
  children: [
2890
2955
  i,
@@ -2894,10 +2959,10 @@ function rn({ leftPct: e, leftLabel: t, leftValue: n, leftColor: r, rightPct: i,
2894
2959
  })
2895
2960
  })]
2896
2961
  }),
2897
- d && d.length > 0 && /* @__PURE__ */ s(Xt, { chips: d })
2962
+ d && d.length > 0 && /* @__PURE__ */ s(en, { chips: d })
2898
2963
  ] });
2899
2964
  }
2900
- function an({ pct: e, label: t, color: n, chips: r }) {
2965
+ function ln({ pct: e, label: t, color: n, chips: r }) {
2901
2966
  let i = n ?? u.blue, a = 2 * Math.PI * 30, o = a * (1 - e / 100);
2902
2967
  return /* @__PURE__ */ c("div", {
2903
2968
  style: {
@@ -2947,7 +3012,7 @@ function an({ pct: e, label: t, color: n, chips: r }) {
2947
3012
  fontSize: 18,
2948
3013
  fontWeight: 500,
2949
3014
  color: i,
2950
- fontFamily: $
3015
+ fontFamily: Q
2951
3016
  },
2952
3017
  children: [e, "%"]
2953
3018
  })
@@ -2956,7 +3021,7 @@ function an({ pct: e, label: t, color: n, chips: r }) {
2956
3021
  style: { flex: 1 },
2957
3022
  children: [/* @__PURE__ */ s("div", {
2958
3023
  style: {
2959
- ...Yt,
3024
+ ...$,
2960
3025
  marginBottom: 10
2961
3026
  },
2962
3027
  children: t
@@ -2972,18 +3037,18 @@ function an({ pct: e, label: t, color: n, chips: r }) {
2972
3037
  alignItems: "baseline",
2973
3038
  gap: 8,
2974
3039
  padding: "7px 10px",
2975
- background: Q.bg,
2976
- border: `1px solid ${Q.border}`,
3040
+ background: Z.bg,
3041
+ border: `1px solid ${Z.border}`,
2977
3042
  borderRadius: 5
2978
3043
  },
2979
3044
  children: [/* @__PURE__ */ s("span", {
2980
3045
  style: {
2981
- ...Jt,
2982
- color: e.color ?? Q.t1
3046
+ ...$t,
3047
+ color: e.color ?? Z.t1
2983
3048
  },
2984
3049
  children: e.value
2985
3050
  }), /* @__PURE__ */ s("span", {
2986
- style: { ...Yt },
3051
+ style: { ...$ },
2987
3052
  children: e.label
2988
3053
  })]
2989
3054
  }, t))
@@ -2991,16 +3056,16 @@ function an({ pct: e, label: t, color: n, chips: r }) {
2991
3056
  })]
2992
3057
  });
2993
3058
  }
2994
- var on = {
3059
+ var un = {
2995
3060
  green: "#34D39918",
2996
3061
  amber: "#FBBF2418",
2997
3062
  red: "#F0606018"
2998
- }, sn = {
3063
+ }, dn = {
2999
3064
  green: "#34D399",
3000
3065
  amber: "#FBBF24",
3001
3066
  red: "#F06060"
3002
3067
  };
3003
- function cn({ items: e = [] }) {
3068
+ function fn({ items: e = [] }) {
3004
3069
  return /* @__PURE__ */ s("div", {
3005
3070
  style: {
3006
3071
  display: "flex",
@@ -3012,20 +3077,20 @@ function cn({ items: e = [] }) {
3012
3077
  display: "flex",
3013
3078
  alignItems: "center",
3014
3079
  gap: 10,
3015
- padding: "8px 12px",
3016
- background: Q.bg,
3017
- border: `1px solid ${Q.border}`
3080
+ padding: "8px 0px",
3081
+ background: Z.bg,
3082
+ border: `1px solid ${Z.border}`
3018
3083
  },
3019
3084
  children: [
3020
3085
  /* @__PURE__ */ s("span", {
3021
3086
  style: {
3022
3087
  fontSize: 18,
3023
3088
  fontWeight: 500,
3024
- color: e.color ?? Q.t2,
3025
- background: (e.color ?? Q.t2) + "1A",
3089
+ color: e.color ?? Z.t2,
3090
+ background: (e.color ?? Z.t2) + "1A",
3026
3091
  padding: "2px 7px",
3027
3092
  borderRadius: 4,
3028
- fontFamily: $,
3093
+ fontFamily: Q,
3029
3094
  flexShrink: 0,
3030
3095
  minWidth: 62,
3031
3096
  textAlign: "center"
@@ -3043,7 +3108,7 @@ function cn({ items: e = [] }) {
3043
3108
  children: /* @__PURE__ */ s("div", { style: {
3044
3109
  height: "100%",
3045
3110
  width: `${e.pct}%`,
3046
- background: e.color ?? Q.t2,
3111
+ background: e.color ?? Z.t2,
3047
3112
  borderRadius: 2,
3048
3113
  opacity: .75
3049
3114
  } })
@@ -3052,8 +3117,8 @@ function cn({ items: e = [] }) {
3052
3117
  style: {
3053
3118
  fontSize: 18,
3054
3119
  fontWeight: 500,
3055
- color: e.color ?? Q.t1,
3056
- fontFamily: $,
3120
+ color: e.color ?? Z.t1,
3121
+ fontFamily: Q,
3057
3122
  flexShrink: 0,
3058
3123
  minWidth: 52,
3059
3124
  textAlign: "right"
@@ -3064,11 +3129,11 @@ function cn({ items: e = [] }) {
3064
3129
  style: {
3065
3130
  fontSize: 18,
3066
3131
  fontWeight: 500,
3067
- color: sn[e.badgeSeverity],
3068
- background: on[e.badgeSeverity],
3132
+ color: dn[e.badgeSeverity],
3133
+ background: un[e.badgeSeverity],
3069
3134
  padding: "2px 7px",
3070
3135
  borderRadius: 4,
3071
- fontFamily: $,
3136
+ fontFamily: Q,
3072
3137
  flexShrink: 0,
3073
3138
  minWidth: 72,
3074
3139
  textAlign: "center"
@@ -3077,7 +3142,7 @@ function cn({ items: e = [] }) {
3077
3142
  }),
3078
3143
  e.sublabel && /* @__PURE__ */ s("span", {
3079
3144
  style: {
3080
- ...Yt,
3145
+ ...$,
3081
3146
  flexShrink: 0,
3082
3147
  minWidth: 80,
3083
3148
  textAlign: "right"
@@ -3088,12 +3153,12 @@ function cn({ items: e = [] }) {
3088
3153
  }, t))
3089
3154
  });
3090
3155
  }
3091
- var ln = {
3092
- red: Q.red,
3093
- amber: Q.amber,
3094
- green: Q.green
3156
+ var pn = {
3157
+ red: Z.red,
3158
+ amber: Z.amber,
3159
+ green: Z.green
3095
3160
  };
3096
- function un({ items: e = [] }) {
3161
+ function mn({ items: e = [] }) {
3097
3162
  return /* @__PURE__ */ s("div", {
3098
3163
  style: {
3099
3164
  display: "flex",
@@ -3101,7 +3166,7 @@ function un({ items: e = [] }) {
3101
3166
  gap: 5
3102
3167
  },
3103
3168
  children: e.map((e, t) => {
3104
- let n = ln[e.severity];
3169
+ let n = pn[e.severity];
3105
3170
  return /* @__PURE__ */ c("div", {
3106
3171
  style: {
3107
3172
  display: "flex",
@@ -3123,7 +3188,7 @@ function un({ items: e = [] }) {
3123
3188
  /* @__PURE__ */ s("span", {
3124
3189
  style: {
3125
3190
  flex: 1,
3126
- ...Yt
3191
+ ...$
3127
3192
  },
3128
3193
  children: e.text
3129
3194
  }),
@@ -3135,14 +3200,14 @@ function un({ items: e = [] }) {
3135
3200
  background: n + "20",
3136
3201
  padding: "2px 7px",
3137
3202
  borderRadius: 4,
3138
- fontFamily: $,
3203
+ fontFamily: Q,
3139
3204
  flexShrink: 0
3140
3205
  },
3141
3206
  children: e.tag
3142
3207
  }),
3143
3208
  /* @__PURE__ */ s("span", {
3144
3209
  style: {
3145
- ...Yt,
3210
+ ...$,
3146
3211
  flexShrink: 0,
3147
3212
  marginTop: 1
3148
3213
  },
@@ -3153,7 +3218,7 @@ function un({ items: e = [] }) {
3153
3218
  })
3154
3219
  });
3155
3220
  }
3156
- function dn({ columns: e = [], rows: t = [] }) {
3221
+ function hn({ columns: e = [], rows: t = [] }) {
3157
3222
  return /* @__PURE__ */ c("div", {
3158
3223
  style: {
3159
3224
  display: "flex",
@@ -3165,16 +3230,16 @@ function dn({ columns: e = [], rows: t = [] }) {
3165
3230
  display: "flex",
3166
3231
  alignItems: "center",
3167
3232
  gap: 10,
3168
- padding: "0 12px 6px",
3169
- borderBottom: `1px solid ${Q.border}`
3233
+ padding: "0 0px 6px",
3234
+ borderBottom: `1px solid ${Z.border}`
3170
3235
  },
3171
3236
  children: [/* @__PURE__ */ s("div", { style: { minWidth: 64 } }), e.map((e, t) => /* @__PURE__ */ s("div", {
3172
3237
  style: {
3173
3238
  flex: 1,
3174
3239
  fontSize: 18,
3175
3240
  fontWeight: 500,
3176
- color: Q.t2,
3177
- fontFamily: $,
3241
+ color: Z.t2,
3242
+ fontFamily: Q,
3178
3243
  textTransform: "uppercase",
3179
3244
  letterSpacing: .6
3180
3245
  },
@@ -3185,19 +3250,19 @@ function dn({ columns: e = [], rows: t = [] }) {
3185
3250
  display: "flex",
3186
3251
  alignItems: "center",
3187
3252
  gap: 10,
3188
- padding: "8px 12px",
3189
- background: Q.bg,
3190
- border: `1px solid ${Q.border}`
3253
+ padding: "8px 0px",
3254
+ background: Z.bg,
3255
+ border: `1px solid ${Z.border}`
3191
3256
  },
3192
3257
  children: [/* @__PURE__ */ s("span", {
3193
3258
  style: {
3194
3259
  fontSize: 18,
3195
3260
  fontWeight: 600,
3196
- color: Q.t2,
3197
- background: (e.color ?? Q.t4) + "1A",
3261
+ color: Z.t2,
3262
+ background: (e.color ?? Z.t4) + "1A",
3198
3263
  padding: "2px 8px",
3199
3264
  borderRadius: 4,
3200
- fontFamily: $,
3265
+ fontFamily: Q,
3201
3266
  flexShrink: 0,
3202
3267
  minWidth: 64,
3203
3268
  textAlign: "center"
@@ -3208,29 +3273,29 @@ function dn({ columns: e = [], rows: t = [] }) {
3208
3273
  flex: 1,
3209
3274
  fontSize: 18,
3210
3275
  fontWeight: 500,
3211
- color: e.color ?? Q.t1,
3212
- fontFamily: $
3276
+ color: e.color ?? Z.t1,
3277
+ fontFamily: Q
3213
3278
  },
3214
3279
  children: t
3215
3280
  }, n))]
3216
3281
  }, t))]
3217
3282
  });
3218
3283
  }
3219
- function fn({ block: e }) {
3284
+ function gn({ block: e }) {
3220
3285
  if (!e) return null;
3221
3286
  switch (e.type) {
3222
- case "stats": return /* @__PURE__ */ s(Zt, { items: e.items });
3223
- case "ranked": return /* @__PURE__ */ s(Qt, { items: e.items });
3224
- case "chips": return /* @__PURE__ */ s($t, { items: e.items });
3225
- case "badges": return /* @__PURE__ */ s(tn, { items: e.items });
3226
- case "dot-strip": return /* @__PURE__ */ s(nn, {
3287
+ case "stats": return /* @__PURE__ */ s(tn, { items: e.items });
3288
+ case "ranked": return /* @__PURE__ */ s(nn, { items: e.items });
3289
+ case "chips": return /* @__PURE__ */ s(rn, { items: e.items });
3290
+ case "badges": return /* @__PURE__ */ s(on, { items: e.items });
3291
+ case "dot-strip": return /* @__PURE__ */ s(sn, {
3227
3292
  min: e.min,
3228
3293
  max: e.max,
3229
3294
  unit: e.unit,
3230
3295
  dots: e.dots,
3231
3296
  chips: e.chips
3232
3297
  });
3233
- case "proportion": return /* @__PURE__ */ s(rn, {
3298
+ case "proportion": return /* @__PURE__ */ s(cn, {
3234
3299
  leftPct: e.leftPct,
3235
3300
  leftLabel: e.leftLabel,
3236
3301
  leftValue: e.leftValue,
@@ -3241,15 +3306,15 @@ function fn({ block: e }) {
3241
3306
  rightColor: e.rightColor,
3242
3307
  chips: e.chips
3243
3308
  });
3244
- case "ring": return /* @__PURE__ */ s(an, {
3309
+ case "ring": return /* @__PURE__ */ s(ln, {
3245
3310
  pct: e.pct,
3246
3311
  label: e.label,
3247
3312
  color: e.color,
3248
3313
  chips: e.chips
3249
3314
  });
3250
- case "scorecard-rows": return /* @__PURE__ */ s(cn, { items: e.items });
3251
- case "flags-list": return /* @__PURE__ */ s(un, { items: e.items });
3252
- case "comparison-rows": return /* @__PURE__ */ s(dn, {
3315
+ case "scorecard-rows": return /* @__PURE__ */ s(fn, { items: e.items });
3316
+ case "flags-list": return /* @__PURE__ */ s(mn, { items: e.items });
3317
+ case "comparison-rows": return /* @__PURE__ */ s(hn, {
3253
3318
  columns: e.columns,
3254
3319
  rows: e.rows
3255
3320
  });
@@ -3258,14 +3323,14 @@ function fn({ block: e }) {
3258
3323
  }
3259
3324
  //#endregion
3260
3325
  //#region src/components/keyHighlights/Takeaway.tsx
3261
- var pn = "'Satoshi Variable', 'DM Sans', sans-serif", mn = {
3326
+ var _n = "'Satoshi Variable', 'DM Sans', sans-serif", vn = {
3262
3327
  color: "#C2C2C2",
3263
- fontFamily: pn,
3328
+ fontFamily: _n,
3264
3329
  fontSize: 18,
3265
3330
  fontWeight: 400,
3266
3331
  lineHeight: 1.65
3267
3332
  };
3268
- function hn({ text: e }) {
3333
+ function yn({ text: e }) {
3269
3334
  return /* @__PURE__ */ c("div", {
3270
3335
  style: {
3271
3336
  padding: "8px 0px",
@@ -3278,16 +3343,16 @@ function hn({ text: e }) {
3278
3343
  fontSize: 18,
3279
3344
  fontWeight: 500,
3280
3345
  color: u.t1,
3281
- fontFamily: pn,
3346
+ fontFamily: _n,
3282
3347
  lineHeight: 1.65,
3283
3348
  marginRight: 8
3284
3349
  },
3285
3350
  children: "Takeaway"
3286
3351
  }), /* @__PURE__ */ s("span", {
3287
- style: { ...mn },
3352
+ style: { ...vn },
3288
3353
  children: e
3289
3354
  })]
3290
3355
  });
3291
3356
  }
3292
3357
  //#endregion
3293
- export { te as AreaChart, ie as BarChart, l as ChartFrame, qt as DonutChart, fn as KeyHighlights, Ie as LineChart, ze as MiniBars, Je as PieChart, it as ProcessSankey, at as RankingSankey, Xe as SankeySvg, ee as SeriesChart, hn as Takeaway, xt as Trend, kt as TrendChart, Vt as VisualizationRenderer, Wt as cleanupVisualizationMounts, Gt as hydrateVisualizationMounts, Kt as serializeVisualizationConfig };
3358
+ export { te as AreaChart, ie as BarChart, l as ChartFrame, Qt as DonutChart, gn as KeyHighlights, Re as LineChart, Ve as MiniBars, Qe as PieChart, ct as ProcessSankey, lt as RankingSankey, et as SankeySvg, ee as SeriesChart, yn as Takeaway, Tt as Trend, Nt as TrendChart, Kt as VisualizationRenderer, Yt as cleanupVisualizationMounts, Xt as hydrateVisualizationMounts, Zt as serializeVisualizationConfig };