durable-actors-observer 0.17.0 → 0.18.0

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
@@ -13,10 +13,11 @@ import * as x from "@radix-ui/react-tooltip";
13
13
  import { Drawer as S } from "vaul";
14
14
  import be from "swr/infinite";
15
15
  //#region src/client/cacheKeys.ts
16
- var xe = (e) => ["actors", e], Se = (e) => ["requests", e], Ce = (e, t) => [
16
+ var xe = (e) => ["actors", e], Se = (e) => ["requests", e], Ce = (e, t, n) => [
17
17
  "residency",
18
18
  e,
19
- t
19
+ t,
20
+ n
20
21
  ], we = (e) => ["websockets", e], Te = (e, { actorName: t, actorId: n, requestId: r, level: i, search: a }) => [
21
22
  "logs",
22
23
  e,
@@ -48,13 +49,13 @@ var xe = (e) => ["actors", e], Se = (e) => ["requests", e], Ce = (e, t) => [
48
49
  });
49
50
  return r && o.set("cursor", r), i && o.set("actorName", i), a && o.set("actorId", a), await this.get(`requests?${o}`);
50
51
  }
51
- async listResidency(e, { fromMs: t, toMs: n }) {
52
- let r = new URLSearchParams({
52
+ async listResidency(e, { fromMs: t, toMs: n }, r) {
53
+ let i = new URLSearchParams({
53
54
  actorName: e,
54
55
  fromMs: String(t),
55
56
  toMs: String(n)
56
57
  });
57
- return await this.get(`residency?${r}`);
58
+ return r && i.set("actorId", r), await this.get(`residency?${i}`);
58
59
  }
59
60
  async listWebSockets() {
60
61
  return await this.get("websockets");
@@ -271,17 +272,24 @@ function Ue(e, t, n) {
271
272
  function w(e, t, n, i, o) {
272
273
  let c = a(n);
273
274
  c.current = n;
274
- let l = s(e, async () => {
275
- let e = await t();
276
- return i ? c.current(e, i.recentEvents()) : e;
277
- }, o), { mutate: u } = l;
275
+ let l = a(0), u = s(e, async () => {
276
+ l.current++;
277
+ try {
278
+ let e = await t();
279
+ return i ? c.current(e, i.recentEvents()) : e;
280
+ } finally {
281
+ l.current--;
282
+ }
283
+ }, o), { mutate: d } = u;
278
284
  return r(() => {
279
285
  if (!i) return;
280
- let e = i.subscribe((e) => void u((t) => t === void 0 ? t : c.current(t, e), { revalidate: !1 })), t = i.onReconnect(() => void u());
286
+ let e = i.subscribe((e) => {
287
+ l.current === 0 && d((t) => t === void 0 ? t : c.current(t, e), { revalidate: !1 });
288
+ }), t = i.onReconnect(() => void d());
281
289
  return () => {
282
290
  e(), t();
283
291
  };
284
- }, [i, u]), l;
292
+ }, [i, d]), u;
285
293
  }
286
294
  function We(e, t) {
287
295
  let [n] = o(() => new He()), i = t?.toString() ?? null;
@@ -643,18 +651,21 @@ function Kt(e) {
643
651
  }
644
652
  //#endregion
645
653
  //#region src/lib/views/residency.ts
646
- function qt(e) {
647
- return (t, n) => {
648
- let r = [...t.periods];
649
- for (let t of n) t.type === "instance" && t.item.actorName === e && Jt(r, t);
654
+ function qt(e, t) {
655
+ return (n, r) => {
656
+ let i = [...n.periods];
657
+ for (let n of r) n.type === "instance" && Jt(n, e, t) && Yt(i, n);
650
658
  return {
651
- ...t,
652
- periods: r
659
+ ...n,
660
+ periods: i
653
661
  };
654
662
  };
655
663
  }
656
- function Jt(e, { item: t }) {
657
- let { actorId: n, status: r, occurredAtMs: i } = t, a = Yt(e, n), o = e[a];
664
+ function Jt({ item: e }, t, n) {
665
+ return e.actorName === t && (n === void 0 || e.actorId === n);
666
+ }
667
+ function Yt(e, { item: t }) {
668
+ let { actorId: n, status: r, occurredAtMs: i } = t, a = Xt(e, n), o = e[a];
658
669
  if (!(o && i <= o.fromMs)) {
659
670
  if (o?.status === r) {
660
671
  e[a] = {
@@ -674,24 +685,24 @@ function Jt(e, { item: t }) {
674
685
  });
675
686
  }
676
687
  }
677
- function Yt(e, t) {
688
+ function Xt(e, t) {
678
689
  for (let n = e.length - 1; n >= 0; n--) if (e[n].actorId === t) return n;
679
690
  return -1;
680
691
  }
681
692
  //#endregion
682
693
  //#region src/hooks/useResidency.ts
683
- function Xt(e, t) {
684
- let { baseUrl: n, events: r } = R(), { data: i, error: a, isLoading: o } = w([...Ce(n, e), ...F(t)], () => new C(n).listResidency(e, I(t)), qt(e), t.live ? r : null);
694
+ function Zt(e, t, n) {
695
+ let { baseUrl: r, events: i } = R(), { data: a, error: o, isLoading: s } = w([...Ce(r, e, n), ...F(t)], () => new C(r).listResidency(e, I(t), n), qt(e, n), t.live ? i : null);
685
696
  return {
686
- residency: i ?? null,
687
- isLoading: o,
688
- isError: !i && !!a,
689
- error: a
697
+ residency: a ?? null,
698
+ isLoading: s,
699
+ isError: !a && !!o,
700
+ error: o
690
701
  };
691
702
  }
692
703
  //#endregion
693
704
  //#region src/lib/actorTypes.ts
694
- var Zt = (e) => `actors/${encodeURIComponent(e)}`, Qt = (e) => `instances/${encodeURIComponent(e)}`;
705
+ var Qt = (e) => `actors/${encodeURIComponent(e)}`, $t = (e) => `instances/${encodeURIComponent(e)}`;
695
706
  function z({ actorName: e, instances: t }) {
696
707
  return {
697
708
  actorName: e,
@@ -700,62 +711,62 @@ function z({ actorName: e, instances: t }) {
700
711
  dormant: t.filter((e) => e.status === "dormant").length
701
712
  };
702
713
  }
703
- function $t(e) {
714
+ function en(e) {
704
715
  return [...e].sort((e, t) => (t.lastActiveAtMs ?? 0) - (e.lastActiveAtMs ?? 0));
705
716
  }
706
717
  //#endregion
707
718
  //#region src/lib/requestStats.ts
708
719
  var B = (e) => e.queueWaitMs, V = (e) => e.durationMs - (e.queueWaitMs ?? 0);
709
- function en(e, t, n) {
720
+ function tn(e, t, n) {
710
721
  return {
711
- average: cn(ln(e, n)),
712
- series: un(e, t, n)
722
+ average: ln(un(e, n)),
723
+ series: dn(e, t, n)
713
724
  };
714
725
  }
715
- function tn(e, t) {
716
- return nn(e, t).map((e) => e / (t.stepMs / 1e3));
717
- }
718
726
  function nn(e, t) {
727
+ return rn(e, t).map((e) => e / (t.stepMs / 1e3));
728
+ }
729
+ function rn(e, t) {
719
730
  let n = Array(P(t)).fill(0);
720
- for (let r of rn(e)) {
731
+ for (let r of an(e)) {
721
732
  let e = Et(t, r.startedAtMs);
722
733
  e !== null && (n[e] += 1);
723
734
  }
724
735
  return n;
725
736
  }
726
- function rn(e) {
737
+ function an(e) {
727
738
  return e.filter((e) => e.outcome !== "rerouted");
728
739
  }
729
- function an(e, t) {
730
- return rn(e).filter((e) => sn(e, t));
740
+ function on(e, t) {
741
+ return an(e).filter((e) => cn(e, t));
731
742
  }
732
- function on(e, t, n) {
733
- let r = e.filter((e) => e.kind === "websocket" && e.connectionId === t && sn(e, n));
743
+ function sn(e, t, n) {
744
+ let r = e.filter((e) => e.kind === "websocket" && e.connectionId === t && cn(e, n));
734
745
  return {
735
746
  messages: r.filter((e) => e.operation === "onMessage").length,
736
747
  failures: r.filter((e) => e.outcome !== "completed" && e.outcome !== "rerouted").length
737
748
  };
738
749
  }
739
- function sn(e, t) {
750
+ function cn(e, t) {
740
751
  return e.startedAtMs <= t.toMs && e.startedAtMs + e.durationMs >= t.fromMs;
741
752
  }
742
753
  function H(e, t) {
743
- let n = ln(e, t);
744
- return n.length ? cn(n) : null;
754
+ let n = un(e, t);
755
+ return n.length ? ln(n) : null;
745
756
  }
746
- function cn(e) {
757
+ function ln(e) {
747
758
  return e.length ? e.reduce((e, t) => e + t, 0) / e.length : 0;
748
759
  }
749
- function ln(e, t) {
760
+ function un(e, t) {
750
761
  return e.map(t).filter((e) => e !== null);
751
762
  }
752
- function un(e, t, n) {
763
+ function dn(e, t, n) {
753
764
  let r = Array.from({ length: P(t) }, () => []);
754
765
  for (let i of e) {
755
766
  let e = Et(t, i.startedAtMs), a = n(i);
756
767
  e !== null && a !== null && r[e].push(a);
757
768
  }
758
- return r.map(cn);
769
+ return r.map(ln);
759
770
  }
760
771
  //#endregion
761
772
  //#region src/lib/utils.ts
@@ -764,7 +775,7 @@ function U(...e) {
764
775
  }
765
776
  //#endregion
766
777
  //#region src/components/ui/button.tsx
767
- var dn = he("inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
778
+ var fn = he("inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
768
779
  variants: {
769
780
  variant: {
770
781
  default: "bg-primary text-primary-foreground hover:bg-primary/90",
@@ -795,7 +806,7 @@ function W({ className: e, variant: t = "default", size: n = "default", asChild:
795
806
  "data-slot": "button",
796
807
  "data-variant": t,
797
808
  "data-size": n,
798
- className: U(dn({
809
+ className: U(fn({
799
810
  variant: t,
800
811
  size: n,
801
812
  className: e
@@ -805,7 +816,7 @@ function W({ className: e, variant: t = "default", size: n = "default", asChild:
805
816
  }
806
817
  //#endregion
807
818
  //#region src/components/ui/calendar.tsx
808
- function fn({ className: e, classNames: t, showOutsideDays: n = !0, captionLayout: r = "label", buttonVariant: i = "ghost", formatters: a, components: o, ...s }) {
819
+ function pn({ className: e, classNames: t, showOutsideDays: n = !0, captionLayout: r = "label", buttonVariant: i = "ghost", formatters: a, components: o, ...s }) {
809
820
  let c = ye();
810
821
  return /* @__PURE__ */ u(ve, {
811
822
  showOutsideDays: n,
@@ -820,8 +831,8 @@ function fn({ className: e, classNames: t, showOutsideDays: n = !0, captionLayou
820
831
  months: U("relative flex flex-col gap-4 md:flex-row", c.months),
821
832
  month: U("flex w-full flex-col gap-4", c.month),
822
833
  nav: U("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1", c.nav),
823
- button_previous: U(dn({ variant: i }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", c.button_previous),
824
- button_next: U(dn({ variant: i }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", c.button_next),
834
+ button_previous: U(fn({ variant: i }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", c.button_previous),
835
+ button_next: U(fn({ variant: i }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", c.button_next),
825
836
  month_caption: U("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)", c.month_caption),
826
837
  dropdowns: U("flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium", c.dropdowns),
827
838
  dropdown_root: U("relative rounded-md border border-input shadow-xs has-focus:border-ring has-focus:ring-[3px] has-focus:ring-ring/50", c.dropdown_root),
@@ -854,7 +865,7 @@ function fn({ className: e, classNames: t, showOutsideDays: n = !0, captionLayou
854
865
  className: U("size-4", e),
855
866
  ...n
856
867
  }),
857
- DayButton: pn,
868
+ DayButton: mn,
858
869
  WeekNumber: ({ children: e, ...t }) => /* @__PURE__ */ u("td", {
859
870
  ...t,
860
871
  children: /* @__PURE__ */ u("div", {
@@ -867,7 +878,7 @@ function fn({ className: e, classNames: t, showOutsideDays: n = !0, captionLayou
867
878
  ...s
868
879
  });
869
880
  }
870
- function pn({ className: e, day: t, modifiers: n, ...i }) {
881
+ function mn({ className: e, day: t, modifiers: n, ...i }) {
871
882
  let o = ye(), s = a(null);
872
883
  return r(() => {
873
884
  n.focused && s.current?.focus();
@@ -886,7 +897,7 @@ function pn({ className: e, day: t, modifiers: n, ...i }) {
886
897
  }
887
898
  //#endregion
888
899
  //#region src/components/ui/input.tsx
889
- function mn({ className: e, type: t, ...n }) {
900
+ function hn({ className: e, type: t, ...n }) {
890
901
  return /* @__PURE__ */ u("input", {
891
902
  type: t,
892
903
  "data-slot": "input",
@@ -896,19 +907,19 @@ function mn({ className: e, type: t, ...n }) {
896
907
  }
897
908
  //#endregion
898
909
  //#region src/components/ui/popover.tsx
899
- function hn(e) {
910
+ function gn(e) {
900
911
  return /* @__PURE__ */ u(b.Root, {
901
912
  "data-slot": "popover",
902
913
  ...e
903
914
  });
904
915
  }
905
- function gn(e) {
916
+ function _n(e) {
906
917
  return /* @__PURE__ */ u(b.Trigger, {
907
918
  "data-slot": "popover-trigger",
908
919
  ...e
909
920
  });
910
921
  }
911
- function _n({ className: e, align: t = "center", sideOffset: n = 4, ...r }) {
922
+ function vn({ className: e, align: t = "center", sideOffset: n = 4, ...r }) {
912
923
  return /* @__PURE__ */ u(b.Portal, { children: /* @__PURE__ */ u(b.Content, {
913
924
  "data-slot": "popover-content",
914
925
  align: t,
@@ -919,31 +930,31 @@ function _n({ className: e, align: t = "center", sideOffset: n = 4, ...r }) {
919
930
  }
920
931
  //#endregion
921
932
  //#region src/components/timeRange/timeRangePicker.tsx
922
- function vn({ timeWindow: e, onChange: t }) {
933
+ function yn({ timeWindow: e, onChange: t }) {
923
934
  let [n, r] = o(!1), [i, a] = o("quick"), s = (t) => {
924
935
  r(t), t && a(e.live ? "quick" : "custom");
925
936
  }, c = (e) => {
926
937
  t(e), r(!1);
927
938
  };
928
- return /* @__PURE__ */ d(hn, {
939
+ return /* @__PURE__ */ d(gn, {
929
940
  open: n,
930
941
  onOpenChange: s,
931
- children: [/* @__PURE__ */ u(gn, {
942
+ children: [/* @__PURE__ */ u(_n, {
932
943
  asChild: !0,
933
944
  children: /* @__PURE__ */ d(W, {
934
945
  variant: "outline",
935
946
  size: "sm",
936
947
  className: "text-xs tabular-nums",
937
- children: [/* @__PURE__ */ u(yn, { timeWindow: e }), /* @__PURE__ */ u(ne, { className: "opacity-60" })]
948
+ children: [/* @__PURE__ */ u(bn, { timeWindow: e }), /* @__PURE__ */ u(ne, { className: "opacity-60" })]
938
949
  })
939
- }), /* @__PURE__ */ u(_n, {
950
+ }), /* @__PURE__ */ u(vn, {
940
951
  align: "end",
941
952
  className: "w-auto p-0",
942
- children: i === "quick" ? /* @__PURE__ */ u(bn, {
953
+ children: i === "quick" ? /* @__PURE__ */ u(xn, {
943
954
  timeWindow: e,
944
955
  onSelect: c,
945
956
  onCustom: () => a("custom")
946
- }) : /* @__PURE__ */ u(xn, {
957
+ }) : /* @__PURE__ */ u(Sn, {
947
958
  timeWindow: e,
948
959
  onApply: c,
949
960
  onBack: () => a("quick")
@@ -951,10 +962,10 @@ function vn({ timeWindow: e, onChange: t }) {
951
962
  })]
952
963
  });
953
964
  }
954
- function yn({ timeWindow: { fromMs: e, toMs: t, live: n } }) {
965
+ function bn({ timeWindow: { fromMs: e, toMs: t, live: n } }) {
955
966
  return n ? /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("span", { className: "size-1.5 animate-pulse rounded-full bg-success motion-reduce:animate-none" }), bt(t - e)] }) : /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(ee, {}), ot(e, t)] });
956
967
  }
957
- function bn({ timeWindow: e, onSelect: t, onCustom: n }) {
968
+ function xn({ timeWindow: e, onSelect: t, onCustom: n }) {
958
969
  let r = e.live ? e.toMs - e.fromMs : null;
959
970
  return /* @__PURE__ */ d("div", {
960
971
  className: "flex w-48 flex-col gap-0.5 p-1.5",
@@ -985,11 +996,11 @@ function bn({ timeWindow: e, onSelect: t, onCustom: n }) {
985
996
  ]
986
997
  });
987
998
  }
988
- function xn({ timeWindow: e, onApply: t, onBack: n }) {
999
+ function Sn({ timeWindow: e, onApply: t, onBack: n }) {
989
1000
  let [r, i] = o({
990
1001
  from: new Date(e.fromMs),
991
1002
  to: new Date(e.toMs)
992
- }), [a, s] = o(T(e.fromMs)), [c, l] = o(T(e.toMs)), f = Cn(r, a, c);
1003
+ }), [a, s] = o(T(e.fromMs)), [c, l] = o(T(e.toMs)), f = wn(r, a, c);
993
1004
  return /* @__PURE__ */ d("div", { children: [
994
1005
  /* @__PURE__ */ d(W, {
995
1006
  variant: "ghost",
@@ -998,7 +1009,7 @@ function xn({ timeWindow: e, onApply: t, onBack: n }) {
998
1009
  className: "mt-2 ml-2 text-xs font-normal text-muted-foreground",
999
1010
  children: [/* @__PURE__ */ u(re, {}), "Quick ranges"]
1000
1011
  }),
1001
- /* @__PURE__ */ u(fn, {
1012
+ /* @__PURE__ */ u(pn, {
1002
1013
  mode: "range",
1003
1014
  selected: r,
1004
1015
  onSelect: i,
@@ -1007,11 +1018,11 @@ function xn({ timeWindow: e, onApply: t, onBack: n }) {
1007
1018
  }),
1008
1019
  /* @__PURE__ */ d("div", {
1009
1020
  className: "grid grid-cols-2 gap-3 border-t p-3",
1010
- children: [/* @__PURE__ */ u(Sn, {
1021
+ children: [/* @__PURE__ */ u(Cn, {
1011
1022
  label: "Start",
1012
1023
  value: a,
1013
1024
  onChange: s
1014
- }), /* @__PURE__ */ u(Sn, {
1025
+ }), /* @__PURE__ */ u(Cn, {
1015
1026
  label: "End",
1016
1027
  value: c,
1017
1028
  onChange: l
@@ -1028,7 +1039,7 @@ function xn({ timeWindow: e, onApply: t, onBack: n }) {
1028
1039
  })
1029
1040
  ] });
1030
1041
  }
1031
- function Sn({ label: e, value: t, onChange: n }) {
1042
+ function Cn({ label: e, value: t, onChange: n }) {
1032
1043
  let r = i();
1033
1044
  return /* @__PURE__ */ d("div", {
1034
1045
  className: "grid gap-1.5",
@@ -1036,7 +1047,7 @@ function Sn({ label: e, value: t, onChange: n }) {
1036
1047
  htmlFor: r,
1037
1048
  className: "text-xs text-muted-foreground",
1038
1049
  children: e
1039
- }), /* @__PURE__ */ u(mn, {
1050
+ }), /* @__PURE__ */ u(hn, {
1040
1051
  id: r,
1041
1052
  type: "time",
1042
1053
  value: t,
@@ -1045,7 +1056,7 @@ function Sn({ label: e, value: t, onChange: n }) {
1045
1056
  })]
1046
1057
  });
1047
1058
  }
1048
- function Cn(e, t, n) {
1059
+ function wn(e, t, n) {
1049
1060
  if (!e?.from || !t || !n) return null;
1050
1061
  let r = St(e.from, t), i = St(e.to ?? e.from, n);
1051
1062
  return r < i ? {
@@ -1056,20 +1067,20 @@ function Cn(e, t, n) {
1056
1067
  }
1057
1068
  //#endregion
1058
1069
  //#region src/components/timeRange/timeRangeControl.tsx
1059
- function wn() {
1070
+ function Tn() {
1060
1071
  let e = L(), t = Lt();
1061
1072
  return /* @__PURE__ */ d("div", {
1062
1073
  className: "flex items-center gap-2",
1063
- children: [/* @__PURE__ */ u(vn, {
1074
+ children: [/* @__PURE__ */ u(yn, {
1064
1075
  timeWindow: e,
1065
1076
  onChange: t
1066
- }), /* @__PURE__ */ u(Tn, {
1077
+ }), /* @__PURE__ */ u(En, {
1067
1078
  live: e.live,
1068
1079
  onToggle: () => t(Ct(e))
1069
1080
  })]
1070
1081
  });
1071
1082
  }
1072
- function Tn({ live: e, onToggle: t }) {
1083
+ function En({ live: e, onToggle: t }) {
1073
1084
  let n = e ? "Pause live updates" : "Resume live updates";
1074
1085
  return /* @__PURE__ */ u(W, {
1075
1086
  variant: "outline",
@@ -1082,7 +1093,7 @@ function Tn({ live: e, onToggle: t }) {
1082
1093
  }
1083
1094
  //#endregion
1084
1095
  //#region src/components/ui/pageHeader.tsx
1085
- function En({ titleId: e, title: t, back: n, badge: r, meta: i, aside: a }) {
1096
+ function Dn({ titleId: e, title: t, back: n, badge: r, meta: i, aside: a }) {
1086
1097
  return /* @__PURE__ */ d("header", {
1087
1098
  className: "flex flex-wrap items-end justify-between gap-4",
1088
1099
  children: [/* @__PURE__ */ d("div", {
@@ -1147,7 +1158,7 @@ function K({ id: e, title: t, description: n, aside: r, busy: a, className: o, c
1147
1158
  }
1148
1159
  //#endregion
1149
1160
  //#region src/components/ui/segmentedControl.tsx
1150
- function Dn({ label: e, options: t, value: n, onChange: r }) {
1161
+ function On({ label: e, options: t, value: n, onChange: r }) {
1151
1162
  return /* @__PURE__ */ u("div", {
1152
1163
  role: "group",
1153
1164
  "aria-label": e,
@@ -1170,7 +1181,7 @@ function Dn({ label: e, options: t, value: n, onChange: r }) {
1170
1181
  }
1171
1182
  //#endregion
1172
1183
  //#region src/components/actorType/instanceStatus.tsx
1173
- function On({ live: e, className: t, children: n }) {
1184
+ function kn({ live: e, className: t, children: n }) {
1174
1185
  return /* @__PURE__ */ d("span", {
1175
1186
  className: U("inline-flex items-center gap-1.25", e ? "text-success" : "text-muted-foreground", t),
1176
1187
  children: [e && /* @__PURE__ */ u("span", { className: "size-1.5 rounded-full bg-success" }), n]
@@ -1178,13 +1189,13 @@ function On({ live: e, className: t, children: n }) {
1178
1189
  }
1179
1190
  //#endregion
1180
1191
  //#region src/components/actorType/instancesCard.tsx
1181
- var kn = 24, An = 240;
1182
- function jn({ actor: e, requests: t, failed: n, now: r }) {
1183
- let [i, a] = o("all"), s = (e && $t(e.instances))?.filter((e) => i === "all" || e.status === i) ?? null;
1192
+ var An = 24, jn = 240;
1193
+ function Mn({ actor: e, requests: t, failed: n, now: r }) {
1194
+ let [i, a] = o("all"), s = (e && en(e.instances))?.filter((e) => i === "all" || e.status === i) ?? null;
1184
1195
  return /* @__PURE__ */ u(K, {
1185
1196
  title: "Instances",
1186
1197
  description: "Sorted by last active. Number shows open sockets.",
1187
- aside: e && /* @__PURE__ */ u(Mn, {
1198
+ aside: e && /* @__PURE__ */ u(Nn, {
1188
1199
  actor: e,
1189
1200
  value: i,
1190
1201
  onChange: a
@@ -1194,17 +1205,17 @@ function jn({ actor: e, requests: t, failed: n, now: r }) {
1194
1205
  children: n ? /* @__PURE__ */ u("p", {
1195
1206
  className: "py-4 text-[13px] text-muted-foreground",
1196
1207
  children: "Couldn't reach the observer API."
1197
- }) : e && s ? /* @__PURE__ */ u(Nn, {
1208
+ }) : e && s ? /* @__PURE__ */ u(Pn, {
1198
1209
  actor: e,
1199
1210
  instances: s,
1200
1211
  requests: t,
1201
1212
  now: r
1202
- }) : /* @__PURE__ */ u(zn, {})
1213
+ }) : /* @__PURE__ */ u(Bn, {})
1203
1214
  });
1204
1215
  }
1205
- function Mn({ actor: e, value: t, onChange: n }) {
1216
+ function Nn({ actor: e, value: t, onChange: n }) {
1206
1217
  let { total: r, live: i, dormant: a } = z(e);
1207
- return /* @__PURE__ */ u(Dn, {
1218
+ return /* @__PURE__ */ u(On, {
1208
1219
  label: "Filter instances",
1209
1220
  value: t,
1210
1221
  onChange: n,
@@ -1227,36 +1238,36 @@ function Mn({ actor: e, value: t, onChange: n }) {
1227
1238
  ]
1228
1239
  });
1229
1240
  }
1230
- function Nn({ actor: e, instances: t, requests: n, now: r }) {
1241
+ function Pn({ actor: e, instances: t, requests: n, now: r }) {
1231
1242
  let [i, a] = o(null);
1232
1243
  if (!t.length) return /* @__PURE__ */ u("p", {
1233
1244
  className: "py-4 text-[13px] text-muted-foreground",
1234
1245
  children: "No instances match this filter."
1235
1246
  });
1236
- let s = t.slice(0, An);
1247
+ let s = t.slice(0, jn);
1237
1248
  return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("ul", {
1238
1249
  "aria-label": `${e.actorName} instances, most recently active first`,
1239
1250
  className: "mt-6 grid grid-cols-24 gap-1.5 tabular-nums",
1240
- children: s.map((e, t) => /* @__PURE__ */ u(Pn, {
1251
+ children: s.map((e, t) => /* @__PURE__ */ u(Fn, {
1241
1252
  instance: e,
1242
1253
  active: e.actorId === i,
1243
- alignRight: t % kn >= kn / 2,
1254
+ alignRight: t % An >= An / 2,
1244
1255
  onActive: a,
1245
1256
  requests: n,
1246
1257
  now: r
1247
1258
  }, e.actorId))
1248
- }), /* @__PURE__ */ u(Ln, {
1259
+ }), /* @__PURE__ */ u(Rn, {
1249
1260
  actor: e,
1250
1261
  shown: s.length,
1251
1262
  matching: t.length
1252
1263
  })] });
1253
1264
  }
1254
- function Pn({ instance: e, active: t, alignRight: n, onActive: r, requests: a, now: o }) {
1265
+ function Fn({ instance: e, active: t, alignRight: n, onActive: r, requests: a, now: o }) {
1255
1266
  let s = i(), c = e.status === "live", l = e.connections.length;
1256
1267
  return /* @__PURE__ */ d("li", {
1257
1268
  className: "relative",
1258
1269
  children: [/* @__PURE__ */ u(f, {
1259
- to: Qt(e.actorId),
1270
+ to: $t(e.actorId),
1260
1271
  "aria-label": `${e.actorId}, ${e.status}, ${O(l, "open socket")}`,
1261
1272
  "aria-describedby": t ? s : void 0,
1262
1273
  onMouseEnter: () => r(e.actorId),
@@ -1265,7 +1276,7 @@ function Pn({ instance: e, active: t, alignRight: n, onActive: r, requests: a, n
1265
1276
  onBlur: () => r(null),
1266
1277
  className: U("grid h-6.5 w-full place-items-center rounded-[5px] text-[10px] font-medium outline-none", c ? "bg-success text-background" : "bg-muted shadow-[inset_0_0_0_1px_var(--border)]", t && "outline-2 outline-offset-2 outline-foreground"),
1267
1278
  children: l > 0 ? E(l) : !c && /* @__PURE__ */ u("span", { className: "size-1 rounded-full bg-muted-foreground/40" })
1268
- }), t && /* @__PURE__ */ u(Fn, {
1279
+ }), t && /* @__PURE__ */ u(In, {
1269
1280
  id: s,
1270
1281
  instance: e,
1271
1282
  requests: a,
@@ -1274,7 +1285,7 @@ function Pn({ instance: e, active: t, alignRight: n, onActive: r, requests: a, n
1274
1285
  })]
1275
1286
  });
1276
1287
  }
1277
- function Fn({ id: e, instance: t, requests: n, now: r, alignRight: i }) {
1288
+ function In({ id: e, instance: t, requests: n, now: r, alignRight: i }) {
1278
1289
  let a = n?.filter((e) => e.actorId === t.actorId) ?? [], o = H(a, B), s = H(a, V), c = t.status === "live";
1279
1290
  return /* @__PURE__ */ d("div", {
1280
1291
  id: e,
@@ -1287,32 +1298,32 @@ function Fn({ id: e, instance: t, requests: n, now: r, alignRight: i }) {
1287
1298
  translate: "no",
1288
1299
  className: "truncate",
1289
1300
  children: t.actorId
1290
- }), /* @__PURE__ */ u(On, {
1301
+ }), /* @__PURE__ */ u(kn, {
1291
1302
  live: c,
1292
1303
  className: "text-[11px] font-medium",
1293
1304
  children: c ? "Live" : "Dormant"
1294
1305
  })]
1295
1306
  }),
1296
- /* @__PURE__ */ u(In, {
1307
+ /* @__PURE__ */ u(Ln, {
1297
1308
  label: "Open sockets",
1298
1309
  value: E(t.connections.length)
1299
1310
  }),
1300
- /* @__PURE__ */ u(In, {
1311
+ /* @__PURE__ */ u(Ln, {
1301
1312
  label: "Avg queue time",
1302
1313
  value: o === null ? "—" : D(o)
1303
1314
  }),
1304
- /* @__PURE__ */ u(In, {
1315
+ /* @__PURE__ */ u(Ln, {
1305
1316
  label: "Avg latency",
1306
1317
  value: s === null ? "—" : D(s)
1307
1318
  }),
1308
- /* @__PURE__ */ u(In, {
1319
+ /* @__PURE__ */ u(Ln, {
1309
1320
  label: "Last active",
1310
1321
  value: t.lastActiveAtMs ? ft(t.lastActiveAtMs, r) : "—"
1311
1322
  })
1312
1323
  ]
1313
1324
  });
1314
1325
  }
1315
- function In({ label: e, value: t }) {
1326
+ function Ln({ label: e, value: t }) {
1316
1327
  return /* @__PURE__ */ d("div", {
1317
1328
  className: "mt-1.5 flex justify-between text-muted-foreground",
1318
1329
  children: [/* @__PURE__ */ u("span", { children: e }), /* @__PURE__ */ u("b", {
@@ -1321,17 +1332,17 @@ function In({ label: e, value: t }) {
1321
1332
  })]
1322
1333
  });
1323
1334
  }
1324
- function Ln({ actor: e, shown: t, matching: n }) {
1335
+ function Rn({ actor: e, shown: t, matching: n }) {
1325
1336
  let { live: r, dormant: i } = z(e);
1326
1337
  return /* @__PURE__ */ d("div", {
1327
1338
  className: "mt-4 flex flex-wrap items-center gap-5 text-[13px] text-muted-foreground tabular-nums",
1328
1339
  children: [
1329
- /* @__PURE__ */ u(Rn, {
1340
+ /* @__PURE__ */ u(zn, {
1330
1341
  swatch: "bg-success",
1331
1342
  label: "Live",
1332
1343
  count: r
1333
1344
  }),
1334
- /* @__PURE__ */ u(Rn, {
1345
+ /* @__PURE__ */ u(zn, {
1335
1346
  swatch: "bg-muted shadow-[inset_0_0_0_1px_var(--border)]",
1336
1347
  label: "Dormant",
1337
1348
  count: i
@@ -1345,7 +1356,7 @@ function Ln({ actor: e, shown: t, matching: n }) {
1345
1356
  ]
1346
1357
  });
1347
1358
  }
1348
- function Rn({ swatch: e, label: t, count: n }) {
1359
+ function zn({ swatch: e, label: t, count: n }) {
1349
1360
  return /* @__PURE__ */ d("span", {
1350
1361
  className: "flex items-center gap-1.75",
1351
1362
  children: [
@@ -1359,7 +1370,7 @@ function Rn({ swatch: e, label: t, count: n }) {
1359
1370
  ]
1360
1371
  });
1361
1372
  }
1362
- function zn() {
1373
+ function Bn() {
1363
1374
  return /* @__PURE__ */ u("div", {
1364
1375
  className: "mt-6 grid grid-cols-24 gap-1.5",
1365
1376
  children: Array.from({ length: 72 }, (e, t) => /* @__PURE__ */ u(G, { className: "h-6.5 rounded-[5px]" }, t))
@@ -1367,7 +1378,7 @@ function zn() {
1367
1378
  }
1368
1379
  //#endregion
1369
1380
  //#region src/components/ui/residencyBar.tsx
1370
- function Bn({ liveShare: e, label: t, pulse: n, className: r, style: i }) {
1381
+ function Vn({ liveShare: e, label: t, pulse: n, className: r, style: i }) {
1371
1382
  return /* @__PURE__ */ d("div", {
1372
1383
  role: "img",
1373
1384
  "aria-label": t,
@@ -1380,27 +1391,27 @@ function Bn({ liveShare: e, label: t, pulse: n, className: r, style: i }) {
1380
1391
  }), /* @__PURE__ */ u("div", { className: "flex-1 bg-border" })]
1381
1392
  });
1382
1393
  }
1383
- function Vn({ live: e, dormant: t }) {
1394
+ function Hn({ live: e, dormant: t }) {
1384
1395
  return /* @__PURE__ */ d("div", {
1385
1396
  className: "mt-3 flex justify-between gap-4 text-[13px] tabular-nums",
1386
- children: [/* @__PURE__ */ u(Un, {
1397
+ children: [/* @__PURE__ */ u(Wn, {
1387
1398
  swatch: "bg-success",
1388
1399
  label: "Live",
1389
1400
  count: e
1390
- }), /* @__PURE__ */ u(Un, {
1401
+ }), /* @__PURE__ */ u(Wn, {
1391
1402
  swatch: "bg-border",
1392
1403
  label: "Dormant",
1393
1404
  count: t
1394
1405
  })]
1395
1406
  });
1396
1407
  }
1397
- function Hn() {
1408
+ function Un() {
1398
1409
  return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(G, { className: "mt-auto h-10 w-full rounded-sm" }), /* @__PURE__ */ d("div", {
1399
1410
  className: "mt-3 flex justify-between gap-4",
1400
1411
  children: [/* @__PURE__ */ u(G, { className: "h-3.5 w-28" }), /* @__PURE__ */ u(G, { className: "h-3.5 w-28" })]
1401
1412
  })] });
1402
1413
  }
1403
- function Un({ swatch: e, label: t, count: n }) {
1414
+ function Wn({ swatch: e, label: t, count: n }) {
1404
1415
  return /* @__PURE__ */ d("span", {
1405
1416
  className: "flex items-center gap-1.75 text-muted-foreground",
1406
1417
  children: [
@@ -1416,7 +1427,7 @@ function Un({ swatch: e, label: t, count: n }) {
1416
1427
  }
1417
1428
  //#endregion
1418
1429
  //#region src/components/ui/statCard.tsx
1419
- function Wn({ label: e, value: t, unit: n, busy: r, children: a }) {
1430
+ function Gn({ label: e, value: t, unit: n, busy: r, children: a }) {
1420
1431
  let o = i();
1421
1432
  return /* @__PURE__ */ d("article", {
1422
1433
  "aria-labelledby": o,
@@ -1428,7 +1439,7 @@ function Wn({ label: e, value: t, unit: n, busy: r, children: a }) {
1428
1439
  className: "truncate text-[13px] font-medium text-muted-foreground",
1429
1440
  children: e
1430
1441
  }),
1431
- t !== void 0 && /* @__PURE__ */ u(Gn, {
1442
+ t !== void 0 && /* @__PURE__ */ u(Kn, {
1432
1443
  value: t,
1433
1444
  unit: n,
1434
1445
  className: "mt-3.5"
@@ -1437,7 +1448,7 @@ function Wn({ label: e, value: t, unit: n, busy: r, children: a }) {
1437
1448
  ]
1438
1449
  });
1439
1450
  }
1440
- function Gn({ value: e, unit: t, className: n }) {
1451
+ function Kn({ value: e, unit: t, className: n }) {
1441
1452
  return /* @__PURE__ */ d("div", {
1442
1453
  className: U("flex items-baseline gap-2 text-[44px] leading-none font-bold tracking-[-0.035em] tabular-nums", n),
1443
1454
  children: [e, t !== void 0 && /* @__PURE__ */ u("div", {
@@ -1448,45 +1459,45 @@ function Gn({ value: e, unit: t, className: n }) {
1448
1459
  }
1449
1460
  //#endregion
1450
1461
  //#region src/components/actorType/liveDormantCard.tsx
1451
- function Kn({ summary: e, failed: t }) {
1452
- return /* @__PURE__ */ u(Wn, {
1462
+ function qn({ summary: e, failed: t }) {
1463
+ return /* @__PURE__ */ u(Gn, {
1453
1464
  label: "Live & Dormant",
1454
1465
  busy: !e && !t,
1455
- children: e ? /* @__PURE__ */ u(qn, { ...e }) : /* @__PURE__ */ u(Jn, { failed: t })
1466
+ children: e ? /* @__PURE__ */ u(Jn, { ...e }) : /* @__PURE__ */ u(Yn, { failed: t })
1456
1467
  });
1457
1468
  }
1458
- function qn({ live: e, dormant: t, total: n }) {
1469
+ function Jn({ live: e, dormant: t, total: n }) {
1459
1470
  let r = n ? e / n : 0;
1460
1471
  return /* @__PURE__ */ d(l, { children: [
1461
1472
  /* @__PURE__ */ d("div", {
1462
1473
  className: "mt-3.5 flex flex-wrap gap-x-10 gap-y-2",
1463
- children: [/* @__PURE__ */ u(Gn, {
1474
+ children: [/* @__PURE__ */ u(Kn, {
1464
1475
  value: E(e),
1465
1476
  unit: "live"
1466
- }), /* @__PURE__ */ u(Gn, {
1477
+ }), /* @__PURE__ */ u(Kn, {
1467
1478
  value: E(t),
1468
1479
  unit: "dormant",
1469
1480
  className: "text-muted-foreground/75"
1470
1481
  })]
1471
1482
  }),
1472
- /* @__PURE__ */ u(Bn, {
1483
+ /* @__PURE__ */ u(Vn, {
1473
1484
  liveShare: r,
1474
1485
  label: `${E(e)} live, ${E(t)} dormant, ${ut(r)} live`,
1475
1486
  pulse: !0,
1476
1487
  className: "mt-auto h-10 rounded-sm"
1477
1488
  }),
1478
- /* @__PURE__ */ u(Vn, {})
1489
+ /* @__PURE__ */ u(Hn, {})
1479
1490
  ] });
1480
1491
  }
1481
- function Jn({ failed: e }) {
1492
+ function Yn({ failed: e }) {
1482
1493
  return e ? /* @__PURE__ */ u("p", {
1483
1494
  className: "mt-3.5 text-[13px] text-muted-foreground",
1484
1495
  children: "Couldn't reach the observer API."
1485
- }) : /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(G, { className: "mt-3.5 h-11 w-48 max-w-full" }), /* @__PURE__ */ u(Hn, {})] });
1496
+ }) : /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(G, { className: "mt-3.5 h-11 w-48 max-w-full" }), /* @__PURE__ */ u(Un, {})] });
1486
1497
  }
1487
1498
  //#endregion
1488
1499
  //#region src/components/ui/expandFooter.tsx
1489
- function Yn({ shown: e, total: t, noun: n, expandLabel: r, expanded: i, onToggle: a }) {
1500
+ function Xn({ shown: e, total: t, noun: n, expandLabel: r, expanded: i, onToggle: a }) {
1490
1501
  return /* @__PURE__ */ d("div", {
1491
1502
  className: "flex justify-between border-t pt-3 text-xs text-muted-foreground tabular-nums",
1492
1503
  children: [/* @__PURE__ */ d("span", { children: [
@@ -1504,8 +1515,8 @@ function Yn({ shown: e, total: t, noun: n, expandLabel: r, expanded: i, onToggle
1504
1515
  }
1505
1516
  //#endregion
1506
1517
  //#region src/components/ui/timeline.tsx
1507
- var Xn = 6, Zn = "bg-[linear-gradient(90deg,color-mix(in_oklab,var(--border)_55%,transparent)_1px,transparent_1px)] bg-size-[calc(100%/6)_100%] shadow-[inset_-1px_0_0_var(--border)]";
1508
- function Qn({ timeWindow: e, grid: t, label: n, trailing: r }) {
1518
+ var Zn = 6, Qn = "bg-[linear-gradient(90deg,color-mix(in_oklab,var(--border)_55%,transparent)_1px,transparent_1px)] bg-size-[calc(100%/6)_100%] shadow-[inset_-1px_0_0_var(--border)]";
1519
+ function $n({ timeWindow: e, grid: t, label: n, trailing: r }) {
1509
1520
  return /* @__PURE__ */ d("div", {
1510
1521
  "aria-hidden": !0,
1511
1522
  className: `${t} h-6 border-b`,
@@ -1516,9 +1527,9 @@ function Qn({ timeWindow: e, grid: t, label: n, trailing: r }) {
1516
1527
  }),
1517
1528
  /* @__PURE__ */ u("div", {
1518
1529
  className: "relative h-full text-[11px] text-muted-foreground tabular-nums",
1519
- children: N(e, Xn).map((e, t) => /* @__PURE__ */ u("span", {
1520
- className: U("absolute top-1", t === 0 ? "" : t === Xn ? "-translate-x-full text-foreground" : "-translate-x-1/2"),
1521
- style: { left: `${t / Xn * 100}%` },
1530
+ children: N(e, Zn).map((e, t) => /* @__PURE__ */ u("span", {
1531
+ className: U("absolute top-1", t === 0 ? "" : t === Zn ? "-translate-x-full text-foreground" : "-translate-x-1/2"),
1532
+ style: { left: `${t / Zn * 100}%` },
1522
1533
  children: e
1523
1534
  }, t))
1524
1535
  }),
@@ -1529,15 +1540,15 @@ function Qn({ timeWindow: e, grid: t, label: n, trailing: r }) {
1529
1540
  ]
1530
1541
  });
1531
1542
  }
1532
- function $n({ label: e, children: t }) {
1543
+ function er({ label: e, children: t }) {
1533
1544
  return /* @__PURE__ */ u("div", {
1534
1545
  role: "img",
1535
1546
  "aria-label": e,
1536
- className: `relative h-full ${Zn} before:absolute before:inset-x-0 before:top-1/2 before:border-t before:border-dashed before:border-border`,
1547
+ className: `relative h-full ${Qn} before:absolute before:inset-x-0 before:top-1/2 before:border-t before:border-dashed before:border-border`,
1537
1548
  children: t
1538
1549
  });
1539
1550
  }
1540
- function er(e, { fromMs: t, toMs: n }, r) {
1551
+ function tr(e, { fromMs: t, toMs: n }, r) {
1541
1552
  let i = n - t, a = (t) => r && t === e.length - 1;
1542
1553
  return e.map((e, r) => ({
1543
1554
  fromMs: Math.max(e.fromMs, t),
@@ -1551,26 +1562,26 @@ function er(e, { fromMs: t, toMs: n }, r) {
1551
1562
  }
1552
1563
  //#endregion
1553
1564
  //#region src/components/ui/tooltip.tsx
1554
- function tr({ delayDuration: e = 0, ...t }) {
1565
+ function nr({ delayDuration: e = 0, ...t }) {
1555
1566
  return /* @__PURE__ */ u(x.Provider, {
1556
1567
  "data-slot": "tooltip-provider",
1557
1568
  delayDuration: e,
1558
1569
  ...t
1559
1570
  });
1560
1571
  }
1561
- function nr(e) {
1562
- return /* @__PURE__ */ u(tr, { children: /* @__PURE__ */ u(x.Root, {
1572
+ function rr(e) {
1573
+ return /* @__PURE__ */ u(nr, { children: /* @__PURE__ */ u(x.Root, {
1563
1574
  "data-slot": "tooltip",
1564
1575
  ...e
1565
1576
  }) });
1566
1577
  }
1567
- function rr(e) {
1578
+ function ir(e) {
1568
1579
  return /* @__PURE__ */ u(x.Trigger, {
1569
1580
  "data-slot": "tooltip-trigger",
1570
1581
  ...e
1571
1582
  });
1572
1583
  }
1573
- function ir({ className: e, sideOffset: t = 0, children: n, ...r }) {
1584
+ function ar({ className: e, sideOffset: t = 0, children: n, ...r }) {
1574
1585
  return /* @__PURE__ */ u(x.Portal, { children: /* @__PURE__ */ d(x.Content, {
1575
1586
  "data-slot": "tooltip-content",
1576
1587
  sideOffset: t,
@@ -1581,12 +1592,12 @@ function ir({ className: e, sideOffset: t = 0, children: n, ...r }) {
1581
1592
  }
1582
1593
  //#endregion
1583
1594
  //#region src/components/actorType/residencyCard.tsx
1584
- var ar = 10, or = "grid grid-cols-[minmax(0,210px)_1fr_minmax(0,128px)] items-center gap-6";
1585
- function sr({ actor: e, history: t, requests: n, failed: r, timeWindow: i }) {
1586
- let [a, s] = o(!1), c = e && $t(e.instances), f = t && cr(t), p = a ? c : c?.slice(0, ar);
1595
+ var or = 10, sr = "grid grid-cols-[minmax(0,210px)_1fr_minmax(0,128px)] items-center gap-6";
1596
+ function cr({ actor: e, history: t, requests: n, failed: r, timeWindow: i }) {
1597
+ let [a, s] = o(!1), c = e && en(e.instances), f = t && lr(t), p = a ? c : c?.slice(0, or);
1587
1598
  return /* @__PURE__ */ u(K, {
1588
1599
  title: "Residency",
1589
- aside: /* @__PURE__ */ u(lr, {}),
1600
+ aside: /* @__PURE__ */ u(ur, {}),
1590
1601
  busy: !p && !r,
1591
1602
  className: "pb-3",
1592
1603
  children: r ? /* @__PURE__ */ u("p", {
@@ -1594,18 +1605,18 @@ function sr({ actor: e, history: t, requests: n, failed: r, timeWindow: i }) {
1594
1605
  children: "Couldn't reach the observer API."
1595
1606
  }) : /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ d("div", {
1596
1607
  className: "mt-3.5",
1597
- children: [/* @__PURE__ */ u(Qn, {
1608
+ children: [/* @__PURE__ */ u($n, {
1598
1609
  timeWindow: i,
1599
- grid: or,
1610
+ grid: sr,
1600
1611
  label: "Instance",
1601
1612
  trailing: "Time live"
1602
- }), p && f ? p.map((e) => /* @__PURE__ */ u(ur, {
1613
+ }), p && f ? p.map((e) => /* @__PURE__ */ u(dr, {
1603
1614
  instance: e,
1604
1615
  periods: f.get(e.actorId) ?? [],
1605
1616
  requests: n && n.filter((t) => t.actorId === e.actorId),
1606
1617
  timeWindow: i
1607
- }, e.actorId)) : /* @__PURE__ */ u(hr, {})]
1608
- }), c && /* @__PURE__ */ u(Yn, {
1618
+ }, e.actorId)) : /* @__PURE__ */ u(gr, {})]
1619
+ }), c && /* @__PURE__ */ u(Xn, {
1609
1620
  shown: p?.length ?? 0,
1610
1621
  total: c.length,
1611
1622
  noun: "instance",
@@ -1615,12 +1626,12 @@ function sr({ actor: e, history: t, requests: n, failed: r, timeWindow: i }) {
1615
1626
  })] })
1616
1627
  });
1617
1628
  }
1618
- function cr({ periods: e }) {
1629
+ function lr({ periods: e }) {
1619
1630
  let t = /* @__PURE__ */ new Map();
1620
1631
  for (let n of e) n.status === "live" && t.set(n.actorId, [...t.get(n.actorId) ?? [], n]);
1621
1632
  return t;
1622
1633
  }
1623
- function lr() {
1634
+ function ur() {
1624
1635
  return /* @__PURE__ */ d("div", {
1625
1636
  className: "flex gap-4.5 text-xs text-muted-foreground",
1626
1637
  children: [/* @__PURE__ */ d("span", {
@@ -1632,11 +1643,11 @@ function lr() {
1632
1643
  })]
1633
1644
  });
1634
1645
  }
1635
- function ur({ instance: e, periods: t, requests: n, timeWindow: r }) {
1636
- let i = e.status === "live", a = er(t, r, i && r.live), o = dr(a);
1646
+ function dr({ instance: e, periods: t, requests: n, timeWindow: r }) {
1647
+ let i = e.status === "live", a = tr(t, r, i && r.live), o = fr(a);
1637
1648
  return /* @__PURE__ */ d(f, {
1638
- to: Qt(e.actorId),
1639
- className: `${or} h-11.5 border-b border-border/50 transition-colors outline-none last:border-b-0 hover:bg-muted/40 focus-visible:ring-2 focus-visible:ring-ring`,
1649
+ to: $t(e.actorId),
1650
+ className: `${sr} h-11.5 border-b border-border/50 transition-colors outline-none last:border-b-0 hover:bg-muted/40 focus-visible:ring-2 focus-visible:ring-ring`,
1640
1651
  children: [
1641
1652
  /* @__PURE__ */ d("div", {
1642
1653
  className: "flex min-w-0 items-center gap-2.5",
@@ -1651,11 +1662,11 @@ function ur({ instance: e, periods: t, requests: n, timeWindow: r }) {
1651
1662
  children: e.actorId
1652
1663
  }), /* @__PURE__ */ u("span", {
1653
1664
  className: "mt-0.5 block truncate text-[11px] text-muted-foreground tabular-nums",
1654
- children: fr(i, t, e, r.fromMs)
1665
+ children: pr(i, t, e, r.fromMs)
1655
1666
  })]
1656
1667
  })]
1657
1668
  }),
1658
- /* @__PURE__ */ u(pr, {
1669
+ /* @__PURE__ */ u(mr, {
1659
1670
  segments: a,
1660
1671
  requests: n,
1661
1672
  label: `${e.actorId}: ${o ? `live ${k(o)}` : "dormant"}, ${M(r)}`
@@ -1667,10 +1678,10 @@ function ur({ instance: e, periods: t, requests: n, timeWindow: r }) {
1667
1678
  ]
1668
1679
  });
1669
1680
  }
1670
- function dr(e) {
1681
+ function fr(e) {
1671
1682
  return e.reduce((e, t) => e + t.toMs - t.fromMs, 0);
1672
1683
  }
1673
- function fr(e, t, n, r) {
1684
+ function pr(e, t, n, r) {
1674
1685
  if (e) {
1675
1686
  let e = t.at(-1)?.fromMs;
1676
1687
  return e && e > r ? `Woke ${T(e)}` : "Live";
@@ -1678,18 +1689,18 @@ function fr(e, t, n, r) {
1678
1689
  let i = t.at(-1)?.toMs ?? n.lastActiveAtMs;
1679
1690
  return i ? `Slept ${T(i)}` : "Dormant";
1680
1691
  }
1681
- function pr({ segments: e, requests: t, label: n }) {
1682
- return /* @__PURE__ */ u($n, {
1692
+ function mr({ segments: e, requests: t, label: n }) {
1693
+ return /* @__PURE__ */ u(er, {
1683
1694
  label: n,
1684
- children: e.map((e) => /* @__PURE__ */ u(mr, {
1695
+ children: e.map((e) => /* @__PURE__ */ u(hr, {
1685
1696
  segment: e,
1686
1697
  requests: t
1687
1698
  }, e.left))
1688
1699
  });
1689
1700
  }
1690
- function mr({ segment: e, requests: t }) {
1691
- let n = t && an(t, e);
1692
- return /* @__PURE__ */ d(nr, { children: [/* @__PURE__ */ u(rr, {
1701
+ function hr({ segment: e, requests: t }) {
1702
+ let n = t && on(t, e);
1703
+ return /* @__PURE__ */ d(rr, { children: [/* @__PURE__ */ u(ir, {
1693
1704
  asChild: !0,
1694
1705
  children: /* @__PURE__ */ u("span", {
1695
1706
  className: U("absolute top-1/2 h-2.5 -translate-y-1/2 rounded-full bg-success shadow-[0_0_12px_color-mix(in_oklab,var(--success)_20%,transparent)] before:absolute before:-inset-x-1.5 before:-inset-y-2", e.now && "rounded-r-[1px] after:absolute after:top-0.75 after:right-1 after:size-1 after:rounded-full after:bg-background"),
@@ -1698,7 +1709,7 @@ function mr({ segment: e, requests: t }) {
1698
1709
  width: `${e.width * 100}%`
1699
1710
  }
1700
1711
  })
1701
- }), /* @__PURE__ */ d(ir, {
1712
+ }), /* @__PURE__ */ d(ar, {
1702
1713
  className: "tabular-nums",
1703
1714
  children: [/* @__PURE__ */ u("div", {
1704
1715
  className: "font-medium",
@@ -1714,9 +1725,9 @@ function mr({ segment: e, requests: t }) {
1714
1725
  })]
1715
1726
  })] });
1716
1727
  }
1717
- function hr() {
1728
+ function gr() {
1718
1729
  return Array.from({ length: 4 }, (e, t) => /* @__PURE__ */ d("div", {
1719
- className: `${or} h-11.5 border-b border-border/50 last:border-b-0`,
1730
+ className: `${sr} h-11.5 border-b border-border/50 last:border-b-0`,
1720
1731
  children: [
1721
1732
  /* @__PURE__ */ d("div", {
1722
1733
  className: "flex items-center gap-2.5",
@@ -1732,9 +1743,9 @@ function hr() {
1732
1743
  }
1733
1744
  //#endregion
1734
1745
  //#region src/components/ui/sparkline.tsx
1735
- var q = 300, J = 64, gr = 8;
1736
- function _r({ values: e, color: t, label: n, describePoint: r }) {
1737
- let a = i(), [s, c] = o(null), l = br(e), f = l.map(({ x: e, y: t }, n) => `${n ? "L" : "M"}${e.toFixed(1)},${t.toFixed(1)}`).join(" "), p = s === null ? void 0 : l[s];
1746
+ var q = 300, J = 64, _r = 8;
1747
+ function vr({ values: e, color: t, label: n, describePoint: r }) {
1748
+ let a = i(), [s, c] = o(null), l = xr(e), f = l.map(({ x: e, y: t }, n) => `${n ? "L" : "M"}${e.toFixed(1)},${t.toFixed(1)}`).join(" "), p = s === null ? void 0 : l[s];
1738
1749
  return /* @__PURE__ */ d("div", {
1739
1750
  className: "relative mt-auto h-16 w-full",
1740
1751
  children: [
@@ -1796,19 +1807,19 @@ function _r({ values: e, color: t, label: n, describePoint: r }) {
1796
1807
  })
1797
1808
  ]
1798
1809
  }),
1799
- p && /* @__PURE__ */ u(vr, {
1810
+ p && /* @__PURE__ */ u(yr, {
1800
1811
  point: p,
1801
1812
  color: t
1802
1813
  }),
1803
- r && l.map((e, t) => /* @__PURE__ */ u(yr, {
1804
- style: xr(t, l.length),
1814
+ r && l.map((e, t) => /* @__PURE__ */ u(br, {
1815
+ style: Sr(t, l.length),
1805
1816
  point: r(t),
1806
1817
  onOpenChange: (e) => c((n) => e ? t : n === t ? null : n)
1807
1818
  }, t))
1808
1819
  ]
1809
1820
  });
1810
1821
  }
1811
- function vr({ point: e, color: t }) {
1822
+ function yr({ point: e, color: t }) {
1812
1823
  return /* @__PURE__ */ u("span", {
1813
1824
  "aria-hidden": !0,
1814
1825
  className: "pointer-events-none absolute size-2 -translate-1/2 rounded-full border-2 border-background",
@@ -1819,16 +1830,16 @@ function vr({ point: e, color: t }) {
1819
1830
  }
1820
1831
  });
1821
1832
  }
1822
- function yr({ style: e, point: t, onOpenChange: n }) {
1823
- return /* @__PURE__ */ d(nr, {
1833
+ function br({ style: e, point: t, onOpenChange: n }) {
1834
+ return /* @__PURE__ */ d(rr, {
1824
1835
  onOpenChange: n,
1825
- children: [/* @__PURE__ */ u(rr, {
1836
+ children: [/* @__PURE__ */ u(ir, {
1826
1837
  asChild: !0,
1827
1838
  children: /* @__PURE__ */ u("span", {
1828
1839
  className: "absolute inset-y-0",
1829
1840
  style: e
1830
1841
  })
1831
- }), /* @__PURE__ */ d(ir, {
1842
+ }), /* @__PURE__ */ d(ar, {
1832
1843
  className: "tabular-nums",
1833
1844
  children: [/* @__PURE__ */ u("div", {
1834
1845
  className: "opacity-80",
@@ -1840,14 +1851,14 @@ function yr({ style: e, point: t, onOpenChange: n }) {
1840
1851
  })]
1841
1852
  });
1842
1853
  }
1843
- function br(e) {
1854
+ function xr(e) {
1844
1855
  let t = Math.min(...e), n = Math.max(...e) - t || 1, r = q / Math.max(e.length - 1, 1);
1845
1856
  return e.map((e, i) => ({
1846
1857
  x: i * r,
1847
- y: gr + (1 - (e - t) / n) * 40
1858
+ y: _r + (1 - (e - t) / n) * 40
1848
1859
  }));
1849
1860
  }
1850
- function xr(e, t) {
1861
+ function Sr(e, t) {
1851
1862
  let n = t > 1 ? e / (t - 1) : .5, r = .5 / Math.max(t - 1, 1), i = Math.max(0, n - r), a = Math.min(1, n + r);
1852
1863
  return {
1853
1864
  left: `${i * 100}%`,
@@ -1856,8 +1867,8 @@ function xr(e, t) {
1856
1867
  }
1857
1868
  //#endregion
1858
1869
  //#region src/components/ui/trendCard.tsx
1859
- function Sr({ label: e, value: t, unit: n, busy: r, failed: i, series: a, axis: o, color: s, chartLabel: c, describePoint: f }) {
1860
- return /* @__PURE__ */ d(Wn, {
1870
+ function Cr({ label: e, value: t, unit: n, busy: r, failed: i, series: a, axis: o, color: s, chartLabel: c, describePoint: f }) {
1871
+ return /* @__PURE__ */ d(Gn, {
1861
1872
  label: e,
1862
1873
  value: t,
1863
1874
  unit: r ? /* @__PURE__ */ u(G, { className: "h-3.5 w-9" }) : n,
@@ -1865,7 +1876,7 @@ function Sr({ label: e, value: t, unit: n, busy: r, failed: i, series: a, axis:
1865
1876
  children: [i && /* @__PURE__ */ u("p", {
1866
1877
  className: "mt-2 text-[13px] text-muted-foreground",
1867
1878
  children: "Couldn't reach the observer API."
1868
- }), r ? /* @__PURE__ */ u(Cr, { ticks: o.length }) : /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(_r, {
1879
+ }), r ? /* @__PURE__ */ u(wr, { ticks: o.length }) : /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(vr, {
1869
1880
  values: a,
1870
1881
  color: s,
1871
1882
  label: c,
@@ -1876,7 +1887,7 @@ function Sr({ label: e, value: t, unit: n, busy: r, failed: i, series: a, axis:
1876
1887
  })] })]
1877
1888
  });
1878
1889
  }
1879
- function Cr({ ticks: e }) {
1890
+ function wr({ ticks: e }) {
1880
1891
  return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(G, { className: "mt-auto h-16 w-full rounded-sm" }), /* @__PURE__ */ u("div", {
1881
1892
  className: "mt-1.5 flex h-4 items-center justify-between",
1882
1893
  children: Array.from({ length: e }, (e, t) => /* @__PURE__ */ u(G, { className: "h-3 w-9" }, t))
@@ -1884,9 +1895,9 @@ function Cr({ ticks: e }) {
1884
1895
  }
1885
1896
  //#endregion
1886
1897
  //#region src/components/actorType/timingCard.tsx
1887
- function wr({ label: e, pick: t, color: n, chartLabel: r, requests: i, failed: a, timeWindow: o }) {
1888
- let s = i && en(i, o, t), c = !s && !a, [l, d] = dt(s?.average ?? 0), f = s ? l : c ? /* @__PURE__ */ u(G, { className: "h-11 w-20" }) : "—", p = s?.series ?? Array(P(o)).fill(0);
1889
- return /* @__PURE__ */ u(Sr, {
1898
+ function Tr({ label: e, pick: t, color: n, chartLabel: r, requests: i, failed: a, timeWindow: o }) {
1899
+ let s = i && tn(i, o, t), c = !s && !a, [l, d] = dt(s?.average ?? 0), f = s ? l : c ? /* @__PURE__ */ u(G, { className: "h-11 w-20" }) : "—", p = s?.series ?? Array(P(o)).fill(0);
1900
+ return /* @__PURE__ */ u(Cr, {
1890
1901
  label: e,
1891
1902
  value: f,
1892
1903
  unit: d,
@@ -1904,12 +1915,12 @@ function wr({ label: e, pick: t, color: n, chartLabel: r, requests: i, failed: a
1904
1915
  }
1905
1916
  //#endregion
1906
1917
  //#region src/components/actorType/actorTypePage.tsx
1907
- function Tr() {
1908
- let { actorName: e = "" } = _(), { actorTypes: t, isError: n } = R(), r = L(), { requests: i, isError: a } = Wt(e), { residency: o, isError: s } = Xt(e, r), c = t?.actors.find((t) => t.actorName === e) ?? null;
1918
+ function Er() {
1919
+ let { actorName: e = "" } = _(), { actorTypes: t, isError: n } = R(), r = L(), { requests: i, isError: a } = Wt(e), { residency: o, isError: s } = Zt(e, r), c = t?.actors.find((t) => t.actorName === e) ?? null;
1909
1920
  return /* @__PURE__ */ d("section", {
1910
1921
  "aria-labelledby": "actor-type-heading",
1911
1922
  className: "flex flex-col gap-5",
1912
- children: [/* @__PURE__ */ u(Er, {
1923
+ children: [/* @__PURE__ */ u(Dr, {
1913
1924
  actorName: e,
1914
1925
  actor: c,
1915
1926
  loading: !t && !n
@@ -1926,11 +1937,11 @@ function Tr() {
1926
1937
  /* @__PURE__ */ d("div", {
1927
1938
  className: "grid gap-4 lg:grid-cols-3",
1928
1939
  children: [
1929
- /* @__PURE__ */ u(Kn, {
1940
+ /* @__PURE__ */ u(qn, {
1930
1941
  summary: c && z(c),
1931
1942
  failed: n
1932
1943
  }),
1933
- /* @__PURE__ */ u(wr, {
1944
+ /* @__PURE__ */ u(Tr, {
1934
1945
  label: "Avg Queue Time",
1935
1946
  pick: B,
1936
1947
  color: "var(--chart-1)",
@@ -1939,7 +1950,7 @@ function Tr() {
1939
1950
  failed: a,
1940
1951
  timeWindow: r
1941
1952
  }),
1942
- /* @__PURE__ */ u(wr, {
1953
+ /* @__PURE__ */ u(Tr, {
1943
1954
  label: "Avg Request Latency",
1944
1955
  pick: V,
1945
1956
  color: "var(--chart-2)",
@@ -1950,13 +1961,13 @@ function Tr() {
1950
1961
  })
1951
1962
  ]
1952
1963
  }),
1953
- /* @__PURE__ */ u(jn, {
1964
+ /* @__PURE__ */ u(Mn, {
1954
1965
  actor: c,
1955
1966
  requests: i,
1956
1967
  failed: n,
1957
1968
  now: r.toMs
1958
1969
  }),
1959
- /* @__PURE__ */ u(sr, {
1970
+ /* @__PURE__ */ u(cr, {
1960
1971
  actor: c,
1961
1972
  history: o,
1962
1973
  requests: i,
@@ -1967,8 +1978,8 @@ function Tr() {
1967
1978
  })]
1968
1979
  });
1969
1980
  }
1970
- function Er({ actorName: e, actor: t, loading: n }) {
1971
- return /* @__PURE__ */ u(En, {
1981
+ function Dr({ actorName: e, actor: t, loading: n }) {
1982
+ return /* @__PURE__ */ u(Dn, {
1972
1983
  titleId: "actor-type-heading",
1973
1984
  title: e,
1974
1985
  back: {
@@ -1976,65 +1987,65 @@ function Er({ actorName: e, actor: t, loading: n }) {
1976
1987
  label: "Overview"
1977
1988
  },
1978
1989
  meta: t ? `Actor type · ${O(t.instances.length, "instance")}` : n ? /* @__PURE__ */ u(G, { className: "h-3.5 w-40" }) : "Actor type",
1979
- aside: /* @__PURE__ */ u(wn, {})
1990
+ aside: /* @__PURE__ */ u(Tn, {})
1980
1991
  });
1981
1992
  }
1982
1993
  //#endregion
1983
1994
  //#region src/components/overview/activeActorsCard.tsx
1984
- function Dr() {
1985
- let { actorTypes: e, isError: t } = R(), n = e && Or(e), r = !n && !t, i = n ? E(n.live) : r ? /* @__PURE__ */ u(G, { className: "h-11 w-28" }) : "—";
1986
- return /* @__PURE__ */ u(Wn, {
1995
+ function Or() {
1996
+ let { actorTypes: e, isError: t } = R(), n = e && kr(e), r = !n && !t, i = n ? E(n.live) : r ? /* @__PURE__ */ u(G, { className: "h-11 w-28" }) : "—";
1997
+ return /* @__PURE__ */ u(Gn, {
1987
1998
  label: "Active Actors",
1988
1999
  value: i,
1989
2000
  unit: r ? /* @__PURE__ */ u(G, { className: "h-3.5 w-7" }) : "live",
1990
2001
  busy: r,
1991
- children: n ? /* @__PURE__ */ u(kr, { ...n }) : /* @__PURE__ */ u(Ar, { failed: t })
2002
+ children: n ? /* @__PURE__ */ u(Ar, { ...n }) : /* @__PURE__ */ u(jr, { failed: t })
1992
2003
  });
1993
2004
  }
1994
- function Or(e) {
2005
+ function kr(e) {
1995
2006
  let t = e.actors.flatMap((e) => e.instances);
1996
2007
  return {
1997
2008
  live: t.filter((e) => e.status === "live").length,
1998
2009
  dormant: t.filter((e) => e.status === "dormant").length
1999
2010
  };
2000
2011
  }
2001
- function kr({ live: e, dormant: t }) {
2012
+ function Ar({ live: e, dormant: t }) {
2002
2013
  let n = e + t, r = n ? e / n : 0;
2003
- return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(Bn, {
2014
+ return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(Vn, {
2004
2015
  liveShare: r,
2005
2016
  label: `${E(e)} live actors, ${E(t)} dormant actors`,
2006
2017
  pulse: !0,
2007
2018
  className: "mt-auto h-10 rounded-sm"
2008
- }), /* @__PURE__ */ u(Vn, {
2019
+ }), /* @__PURE__ */ u(Hn, {
2009
2020
  live: e,
2010
2021
  dormant: t
2011
2022
  })] });
2012
2023
  }
2013
- function Ar({ failed: e }) {
2024
+ function jr({ failed: e }) {
2014
2025
  return e ? /* @__PURE__ */ u("p", {
2015
2026
  className: "mt-2 text-[13px] text-muted-foreground",
2016
2027
  children: "Couldn't reach the observer API."
2017
- }) : /* @__PURE__ */ u(Hn, {});
2028
+ }) : /* @__PURE__ */ u(Un, {});
2018
2029
  }
2019
2030
  //#endregion
2020
2031
  //#region src/components/overview/actorTypesCard.tsx
2021
- function jr() {
2032
+ function Mr() {
2022
2033
  let { actorTypes: e, isError: t } = R(), n = e && e.actors.map(z).sort((e, t) => t.total - e.total);
2023
2034
  return /* @__PURE__ */ u(K, {
2024
2035
  title: "Actor Types",
2025
- aside: /* @__PURE__ */ u(Mr, {}),
2036
+ aside: /* @__PURE__ */ u(Nr, {}),
2026
2037
  busy: !n && !t,
2027
2038
  className: "pb-2.5",
2028
2039
  children: /* @__PURE__ */ u("div", {
2029
2040
  className: "mt-1.5",
2030
- children: /* @__PURE__ */ u(Nr, {
2041
+ children: /* @__PURE__ */ u(Pr, {
2031
2042
  rows: n,
2032
2043
  failed: t
2033
2044
  })
2034
2045
  })
2035
2046
  });
2036
2047
  }
2037
- function Mr() {
2048
+ function Nr() {
2038
2049
  return /* @__PURE__ */ d("div", {
2039
2050
  className: "flex gap-4 text-xs text-muted-foreground",
2040
2051
  children: [/* @__PURE__ */ d("span", {
@@ -2046,30 +2057,30 @@ function Mr() {
2046
2057
  })]
2047
2058
  });
2048
2059
  }
2049
- function Nr({ rows: e, failed: t }) {
2060
+ function Pr({ rows: e, failed: t }) {
2050
2061
  if (t) return /* @__PURE__ */ u("p", {
2051
2062
  className: "py-4 text-[13px] text-muted-foreground",
2052
2063
  children: "Couldn't reach the observer API."
2053
2064
  });
2054
- if (!e) return /* @__PURE__ */ u(Rr, {});
2065
+ if (!e) return /* @__PURE__ */ u(zr, {});
2055
2066
  if (!e.length) return /* @__PURE__ */ u("p", {
2056
2067
  className: "py-4 text-[13px] text-muted-foreground",
2057
2068
  children: "No actor types deployed yet."
2058
2069
  });
2059
2070
  let n = Math.max(...e.map((e) => e.total), 1);
2060
- return /* @__PURE__ */ u("ul", { children: e.map((e) => /* @__PURE__ */ u(Ir, {
2071
+ return /* @__PURE__ */ u("ul", { children: e.map((e) => /* @__PURE__ */ u(Lr, {
2061
2072
  row: e,
2062
2073
  largest: n
2063
2074
  }, e.actorName)) });
2064
2075
  }
2065
- var Pr = "grid items-center gap-x-7 gap-y-3 py-4 md:grid-cols-[190px_1fr_168px]", Fr = "border-t border-border/60 first:border-t-0";
2066
- function Ir({ row: e, largest: t }) {
2076
+ var Fr = "grid items-center gap-x-7 gap-y-3 py-4 md:grid-cols-[190px_1fr_168px]", Ir = "border-t border-border/60 first:border-t-0";
2077
+ function Lr({ row: e, largest: t }) {
2067
2078
  let n = e.total ? e.live / e.total : 0;
2068
2079
  return /* @__PURE__ */ u("li", {
2069
- className: Fr,
2080
+ className: Ir,
2070
2081
  children: /* @__PURE__ */ d(f, {
2071
- to: Zt(e.actorName),
2072
- className: `${Pr} -mx-3 rounded-lg px-3 tabular-nums transition-colors outline-none hover:bg-muted/50 focus-visible:ring-2 focus-visible:ring-ring`,
2082
+ to: Qt(e.actorName),
2083
+ className: `${Fr} -mx-3 rounded-lg px-3 tabular-nums transition-colors outline-none hover:bg-muted/50 focus-visible:ring-2 focus-visible:ring-ring`,
2073
2084
  children: [
2074
2085
  /* @__PURE__ */ d("div", {
2075
2086
  className: "min-w-0",
@@ -2082,7 +2093,7 @@ function Ir({ row: e, largest: t }) {
2082
2093
  children: O(e.total, "instance")
2083
2094
  })]
2084
2095
  }),
2085
- /* @__PURE__ */ u(Lr, {
2096
+ /* @__PURE__ */ u(Rr, {
2086
2097
  row: e,
2087
2098
  liveShare: n,
2088
2099
  width: e.total / t
@@ -2107,10 +2118,10 @@ function Ir({ row: e, largest: t }) {
2107
2118
  })
2108
2119
  });
2109
2120
  }
2110
- function Lr({ row: e, liveShare: t, width: n }) {
2121
+ function Rr({ row: e, liveShare: t, width: n }) {
2111
2122
  return /* @__PURE__ */ u("div", {
2112
2123
  className: "relative flex h-5.5 items-center before:absolute before:inset-x-0 before:top-1/2 before:h-px before:bg-border/60",
2113
- children: /* @__PURE__ */ u(Bn, {
2124
+ children: /* @__PURE__ */ u(Vn, {
2114
2125
  liveShare: t,
2115
2126
  label: `${E(e.live)} of ${E(e.total)} live, ${ut(t)}`,
2116
2127
  className: "h-5.5 min-w-2.5 rounded-[3px]",
@@ -2118,13 +2129,13 @@ function Lr({ row: e, liveShare: t, width: n }) {
2118
2129
  })
2119
2130
  });
2120
2131
  }
2121
- function Rr() {
2132
+ function zr() {
2122
2133
  return /* @__PURE__ */ u("ul", { children: [
2123
2134
  100,
2124
2135
  60,
2125
2136
  20
2126
2137
  ].map((e) => /* @__PURE__ */ d("li", {
2127
- className: `${Pr} ${Fr}`,
2138
+ className: `${Fr} ${Ir}`,
2128
2139
  children: [
2129
2140
  /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u(G, { className: "h-4 w-28" }), /* @__PURE__ */ u(G, { className: "mt-1.5 h-3 w-20" })] }),
2130
2141
  /* @__PURE__ */ u(G, {
@@ -2137,12 +2148,12 @@ function Rr() {
2137
2148
  }
2138
2149
  //#endregion
2139
2150
  //#region src/components/overview/requestCountCard.tsx
2140
- function zr() {
2141
- let { requests: e, isRequestsError: t } = R(), n = L(), r = e && Vr(e, n), i = !r && !t, a = /* @__PURE__ */ u(Br, {
2151
+ function Br() {
2152
+ let { requests: e, isRequestsError: t } = R(), n = L(), r = e && Hr(e, n), i = !r && !t, a = /* @__PURE__ */ u(Vr, {
2142
2153
  total: r?.total,
2143
2154
  loading: i
2144
2155
  }), o = M(n), s = r?.series ?? Array(P(n)).fill(0);
2145
- return /* @__PURE__ */ u(Sr, {
2156
+ return /* @__PURE__ */ u(Cr, {
2146
2157
  label: "Total Requests",
2147
2158
  value: a,
2148
2159
  unit: "requests",
@@ -2158,11 +2169,11 @@ function zr() {
2158
2169
  })
2159
2170
  });
2160
2171
  }
2161
- function Br({ total: e, loading: t }) {
2172
+ function Vr({ total: e, loading: t }) {
2162
2173
  return e === void 0 ? t ? /* @__PURE__ */ u(G, { className: "h-11 w-28" }) : /* @__PURE__ */ u(l, { children: "—" }) : /* @__PURE__ */ u(l, { children: E(e) });
2163
2174
  }
2164
- function Vr(e, t) {
2165
- let n = nn(e, t);
2175
+ function Hr(e, t) {
2176
+ let n = rn(e, t);
2166
2177
  return {
2167
2178
  total: n.reduce((e, t) => e + t, 0),
2168
2179
  series: n
@@ -2170,7 +2181,7 @@ function Vr(e, t) {
2170
2181
  }
2171
2182
  //#endregion
2172
2183
  //#region src/lib/sockets.ts
2173
- function Hr(e) {
2184
+ function Ur(e) {
2174
2185
  return {
2175
2186
  fromMs: e.openedAtMs,
2176
2187
  toMs: e.closedAtMs ?? Infinity
@@ -2180,8 +2191,8 @@ function Hr(e) {
2180
2191
  //#region src/lib/trendWindow.ts
2181
2192
  var Y = 36e5;
2182
2193
  Y / 30;
2183
- var Ur = Array(30).fill(0);
2184
- function Wr(e) {
2194
+ var Wr = Array(30).fill(0);
2195
+ function Gr(e) {
2185
2196
  return [
2186
2197
  T(e - Y),
2187
2198
  T(e - Y / 2),
@@ -2190,44 +2201,44 @@ function Wr(e) {
2190
2201
  }
2191
2202
  //#endregion
2192
2203
  //#region src/components/overview/socketsCard.tsx
2193
- function Gr() {
2194
- let { actorTypes: e, sessions: t, isError: n, isSocketsError: r } = R(), i = Date.now(), a = n || r, o = e && t && Kr(e, t, i), s = !o && !a, c = o ? E(o.open) : s ? /* @__PURE__ */ u(G, { className: "h-11 w-28" }) : "—", l = o?.series ?? Ur;
2195
- return /* @__PURE__ */ u(Sr, {
2204
+ function Kr() {
2205
+ let { actorTypes: e, sessions: t, isError: n, isSocketsError: r } = R(), i = Date.now(), a = n || r, o = e && t && qr(e, t, i), s = !o && !a, c = o ? E(o.open) : s ? /* @__PURE__ */ u(G, { className: "h-11 w-28" }) : "—", l = o?.series ?? Wr;
2206
+ return /* @__PURE__ */ u(Cr, {
2196
2207
  label: "WebSocket Connections",
2197
2208
  value: c,
2198
2209
  unit: "open",
2199
2210
  busy: s,
2200
2211
  failed: !o && a,
2201
2212
  series: l,
2202
- axis: Wr(i),
2213
+ axis: Gr(i),
2203
2214
  color: "var(--chart-2)",
2204
2215
  chartLabel: o ? `Open WebSocket connections over the last hour, now ${E(o.open)}` : "Open WebSocket connections over the last hour",
2205
2216
  describePoint: (e) => ({
2206
- at: T(Jr(i, e)),
2217
+ at: T(Yr(i, e)),
2207
2218
  value: O(l[e] ?? 0, "open connection")
2208
2219
  })
2209
2220
  });
2210
2221
  }
2211
- function Kr(e, t, n) {
2222
+ function qr(e, t, n) {
2212
2223
  let r = e.actors.flatMap((e) => e.instances).reduce((e, t) => e + t.connections.length, 0);
2213
2224
  return {
2214
2225
  open: r,
2215
- series: [...qr(t, n).slice(0, -1), r]
2226
+ series: [...Jr(t, n).slice(0, -1), r]
2216
2227
  };
2217
2228
  }
2218
- function qr(e, t) {
2219
- return Array.from({ length: 30 }, (n, r) => e.filter((e) => Yr(e, Jr(t, r))).length);
2220
- }
2221
2229
  function Jr(e, t) {
2222
- return e - Y + Y / 29 * t;
2230
+ return Array.from({ length: 30 }, (n, r) => e.filter((e) => Xr(e, Yr(t, r))).length);
2223
2231
  }
2224
2232
  function Yr(e, t) {
2225
- let n = Hr(e);
2233
+ return e - Y + Y / 29 * t;
2234
+ }
2235
+ function Xr(e, t) {
2236
+ let n = Ur(e);
2226
2237
  return n.fromMs <= t && t < n.toMs;
2227
2238
  }
2228
2239
  //#endregion
2229
2240
  //#region src/components/overview/overview.tsx
2230
- function Xr() {
2241
+ function Zr() {
2231
2242
  return /* @__PURE__ */ d("section", {
2232
2243
  "aria-labelledby": "overview-heading",
2233
2244
  className: "flex flex-col gap-5",
@@ -2243,45 +2254,45 @@ function Xr() {
2243
2254
  children: [/* @__PURE__ */ d("div", {
2244
2255
  className: "grid gap-4 lg:grid-cols-3",
2245
2256
  children: [
2246
- /* @__PURE__ */ u(Dr, {}),
2247
- /* @__PURE__ */ u(zr, {}),
2248
- /* @__PURE__ */ u(Gr, {})
2257
+ /* @__PURE__ */ u(Or, {}),
2258
+ /* @__PURE__ */ u(Br, {}),
2259
+ /* @__PURE__ */ u(Kr, {})
2249
2260
  ]
2250
- }), /* @__PURE__ */ u(jr, {})]
2261
+ }), /* @__PURE__ */ u(Mr, {})]
2251
2262
  })]
2252
2263
  });
2253
2264
  }
2254
2265
  //#endregion
2255
2266
  //#region src/components/ui/drawer.tsx
2256
- function Zr({ ...e }) {
2267
+ function Qr({ ...e }) {
2257
2268
  return /* @__PURE__ */ u(S.Root, {
2258
2269
  "data-slot": "drawer",
2259
2270
  ...e
2260
2271
  });
2261
2272
  }
2262
- function Qr({ ...e }) {
2273
+ function $r({ ...e }) {
2263
2274
  return /* @__PURE__ */ u(S.Portal, {
2264
2275
  "data-slot": "drawer-portal",
2265
2276
  ...e
2266
2277
  });
2267
2278
  }
2268
- function $r({ ...e }) {
2279
+ function ei({ ...e }) {
2269
2280
  return /* @__PURE__ */ u(S.Close, {
2270
2281
  "data-slot": "drawer-close",
2271
2282
  ...e
2272
2283
  });
2273
2284
  }
2274
- function ei({ className: e, ...t }) {
2285
+ function ti({ className: e, ...t }) {
2275
2286
  return /* @__PURE__ */ u(S.Overlay, {
2276
2287
  "data-slot": "drawer-overlay",
2277
2288
  className: U("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0", e),
2278
2289
  ...t
2279
2290
  });
2280
2291
  }
2281
- function ti({ className: e, children: t, container: n, ...r }) {
2282
- return /* @__PURE__ */ d(Qr, {
2292
+ function ni({ className: e, children: t, container: n, ...r }) {
2293
+ return /* @__PURE__ */ d($r, {
2283
2294
  container: n,
2284
- children: [/* @__PURE__ */ u(ei, {}), /* @__PURE__ */ d(S.Content, {
2295
+ children: [/* @__PURE__ */ u(ti, {}), /* @__PURE__ */ d(S.Content, {
2285
2296
  "data-slot": "drawer-content",
2286
2297
  className: U("group/drawer-content fixed z-50 flex h-auto flex-col bg-background", "data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b", "data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t", "data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:h-full data-[vaul-drawer-direction=right]:w-full data-[vaul-drawer-direction=right]:max-w-[440px] data-[vaul-drawer-direction=right]:border-l", "data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm", e),
2287
2298
  ...r,
@@ -2289,21 +2300,21 @@ function ti({ className: e, children: t, container: n, ...r }) {
2289
2300
  })]
2290
2301
  });
2291
2302
  }
2292
- function ni({ className: e, ...t }) {
2303
+ function ri({ className: e, ...t }) {
2293
2304
  return /* @__PURE__ */ u("div", {
2294
2305
  "data-slot": "drawer-header",
2295
2306
  className: U("flex flex-col gap-1.5 p-4", e),
2296
2307
  ...t
2297
2308
  });
2298
2309
  }
2299
- function ri({ className: e, ...t }) {
2310
+ function ii({ className: e, ...t }) {
2300
2311
  return /* @__PURE__ */ u(S.Title, {
2301
2312
  "data-slot": "drawer-title",
2302
2313
  className: U("font-medium text-foreground", e),
2303
2314
  ...t
2304
2315
  });
2305
2316
  }
2306
- function ii({ className: e, ...t }) {
2317
+ function ai({ className: e, ...t }) {
2307
2318
  return /* @__PURE__ */ u(S.Description, {
2308
2319
  "data-slot": "drawer-description",
2309
2320
  className: U("text-sm text-muted-foreground", e),
@@ -2312,8 +2323,8 @@ function ii({ className: e, ...t }) {
2312
2323
  }
2313
2324
  //#endregion
2314
2325
  //#region src/client/DrawerContext.tsx
2315
- var ai = t(void 0);
2316
- function oi({ children: e }) {
2326
+ var oi = t(void 0);
2327
+ function si({ children: e }) {
2317
2328
  let [t, n] = o({
2318
2329
  open: !1,
2319
2330
  entry: null
@@ -2330,23 +2341,23 @@ function oi({ children: e }) {
2330
2341
  entry: e
2331
2342
  }));
2332
2343
  }
2333
- return r(l, [s]), /* @__PURE__ */ d(ai.Provider, {
2344
+ return r(l, [s]), /* @__PURE__ */ d(oi.Provider, {
2334
2345
  value: {
2335
2346
  openKey: t.open ? t.entry.key : null,
2336
2347
  show: c,
2337
2348
  close: l
2338
2349
  },
2339
- children: [e, /* @__PURE__ */ u(Zr, {
2350
+ children: [e, /* @__PURE__ */ u(Qr, {
2340
2351
  direction: "right",
2341
2352
  autoFocus: !0,
2342
2353
  open: t.open,
2343
2354
  onOpenChange: (e) => !e && l(),
2344
- children: /* @__PURE__ */ d(ti, {
2355
+ children: /* @__PURE__ */ d(ni, {
2345
2356
  className: "bg-card font-satoshi text-card-foreground antialiased shadow-(--shadow-dialog) data-[vaul-drawer-direction=right]:w-full",
2346
2357
  onCloseAutoFocus: (e) => {
2347
2358
  e.preventDefault(), i.current?.focus({ preventScroll: !0 });
2348
2359
  },
2349
- children: [t.entry?.content, /* @__PURE__ */ u($r, {
2360
+ children: [t.entry?.content, /* @__PURE__ */ u(ei, {
2350
2361
  asChild: !0,
2351
2362
  children: /* @__PURE__ */ u(W, {
2352
2363
  className: "absolute top-3 right-3",
@@ -2360,16 +2371,16 @@ function oi({ children: e }) {
2360
2371
  })]
2361
2372
  });
2362
2373
  }
2363
- function si() {
2364
- let e = n(ai);
2374
+ function ci() {
2375
+ let e = n(oi);
2365
2376
  if (!e) throw Error("useDrawer must be used within a DrawerProvider");
2366
2377
  return e;
2367
2378
  }
2368
2379
  //#endregion
2369
2380
  //#region src/components/overview/requestRateCard.tsx
2370
- function ci({ requests: e, failed: t, timeWindow: n, color: r }) {
2371
- let i = e && li(e, n), a = !i && !t, o = i ? lt(i.current) : a ? /* @__PURE__ */ u(G, { className: "h-11 w-28" }) : "—", s = i?.series ?? Array(P(n)).fill(0);
2372
- return /* @__PURE__ */ u(Sr, {
2381
+ function li({ requests: e, failed: t, timeWindow: n, color: r }) {
2382
+ let i = e && ui(e, n), a = !i && !t, o = i ? lt(i.current) : a ? /* @__PURE__ */ u(G, { className: "h-11 w-28" }) : "—", s = i?.series ?? Array(P(n)).fill(0);
2383
+ return /* @__PURE__ */ u(Cr, {
2373
2384
  label: "Requests / Second",
2374
2385
  value: o,
2375
2386
  unit: "req/s",
@@ -2385,8 +2396,8 @@ function ci({ requests: e, failed: t, timeWindow: n, color: r }) {
2385
2396
  })
2386
2397
  });
2387
2398
  }
2388
- function li(e, t) {
2389
- let n = tn(e, t);
2399
+ function ui(e, t) {
2400
+ let n = nn(e, t);
2390
2401
  return {
2391
2402
  current: n.at(-1) ?? 0,
2392
2403
  series: n
@@ -2394,12 +2405,12 @@ function li(e, t) {
2394
2405
  }
2395
2406
  //#endregion
2396
2407
  //#region src/components/instance/connectionsCard.tsx
2397
- var ui = 10, X = "grid grid-cols-[minmax(0,150px)_1fr] items-center gap-6";
2398
- function di({ instance: e, sessions: t, livePeriods: n, requests: r, failed: i, timeWindow: a }) {
2399
- let [s, c] = o(!1), f = e && t && fi(t, a), p = s ? f : f?.slice(0, ui);
2408
+ var di = 10, X = "grid grid-cols-[minmax(0,150px)_1fr] items-center gap-6";
2409
+ function fi({ instance: e, sessions: t, livePeriods: n, requests: r, failed: i, timeWindow: a }) {
2410
+ let [s, c] = o(!1), f = e && t && pi(t, a), p = s ? f : f?.slice(0, di);
2400
2411
  return /* @__PURE__ */ u(K, {
2401
2412
  title: "WebSocket Connections",
2402
- aside: /* @__PURE__ */ u(pi, { closed: f?.some((e) => !e.open) ?? !1 }),
2413
+ aside: /* @__PURE__ */ u(mi, { closed: f?.some((e) => !e.open) ?? !1 }),
2403
2414
  busy: !p && !i,
2404
2415
  className: "pb-3",
2405
2416
  children: i ? /* @__PURE__ */ u("p", {
@@ -2407,17 +2418,17 @@ function di({ instance: e, sessions: t, livePeriods: n, requests: r, failed: i,
2407
2418
  children: "Couldn't reach the observer API."
2408
2419
  }) : /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ d("div", {
2409
2420
  className: "mt-3.5",
2410
- children: [/* @__PURE__ */ u(Qn, {
2421
+ children: [/* @__PURE__ */ u($n, {
2411
2422
  timeWindow: a,
2412
2423
  grid: X
2413
2424
  }), e && f && p && n ? /* @__PURE__ */ d(l, { children: [
2414
- /* @__PURE__ */ u(mi, {
2425
+ /* @__PURE__ */ u(hi, {
2415
2426
  instance: e,
2416
2427
  periods: n,
2417
2428
  requests: r,
2418
2429
  timeWindow: a
2419
2430
  }),
2420
- p.map((e) => /* @__PURE__ */ u(hi, {
2431
+ p.map((e) => /* @__PURE__ */ u(gi, {
2421
2432
  row: e,
2422
2433
  requests: r,
2423
2434
  timeWindow: a
@@ -2430,8 +2441,8 @@ function di({ instance: e, sessions: t, livePeriods: n, requests: r, failed: i,
2430
2441
  "."
2431
2442
  ]
2432
2443
  })
2433
- ] }) : /* @__PURE__ */ u(_i, {})]
2434
- }), f && f.length > ui && /* @__PURE__ */ u(Yn, {
2444
+ ] }) : /* @__PURE__ */ u(vi, {})]
2445
+ }), f && f.length > di && /* @__PURE__ */ u(Xn, {
2435
2446
  shown: p?.length ?? 0,
2436
2447
  total: f.length,
2437
2448
  noun: "connection",
@@ -2441,9 +2452,9 @@ function di({ instance: e, sessions: t, livePeriods: n, requests: r, failed: i,
2441
2452
  })] })
2442
2453
  });
2443
2454
  }
2444
- function fi(e, t) {
2455
+ function pi(e, t) {
2445
2456
  return e.flatMap((e) => {
2446
- let n = e.status === "open", r = Hr(e), [i] = er([r], t, n && t.live);
2457
+ let n = e.status === "open", r = Ur(e), [i] = tr([r], t, n && t.live);
2447
2458
  return i ? [{
2448
2459
  session: e,
2449
2460
  open: n,
@@ -2452,7 +2463,7 @@ function fi(e, t) {
2452
2463
  }] : [];
2453
2464
  }).sort((e, t) => e.span.fromMs - t.span.fromMs);
2454
2465
  }
2455
- function pi({ closed: e }) {
2466
+ function mi({ closed: e }) {
2456
2467
  return /* @__PURE__ */ d("div", {
2457
2468
  className: "flex gap-4.5 text-xs text-muted-foreground",
2458
2469
  children: [
@@ -2471,8 +2482,8 @@ function pi({ closed: e }) {
2471
2482
  ]
2472
2483
  });
2473
2484
  }
2474
- function mi({ instance: e, periods: t, requests: n, timeWindow: r }) {
2475
- let i = e.status === "live", a = er(t, r, i && r.live), o = dr(a);
2485
+ function hi({ instance: e, periods: t, requests: n, timeWindow: r }) {
2486
+ let i = e.status === "live", a = tr(t, r, i && r.live), o = fr(a);
2476
2487
  return /* @__PURE__ */ d("div", {
2477
2488
  className: `${X} mt-3 mb-4.5 h-10.5 overflow-hidden rounded-lg border border-border/70 bg-background/60`,
2478
2489
  children: [/* @__PURE__ */ d("div", {
@@ -2491,15 +2502,15 @@ function mi({ instance: e, periods: t, requests: n, timeWindow: r }) {
2491
2502
  k(o)
2492
2503
  ]
2493
2504
  })]
2494
- }), /* @__PURE__ */ u(pr, {
2505
+ }), /* @__PURE__ */ u(mr, {
2495
2506
  segments: a,
2496
2507
  requests: n,
2497
2508
  label: `Residency: live ${k(o)}, ${M(r)}`
2498
2509
  })]
2499
2510
  });
2500
2511
  }
2501
- function hi({ row: { session: e, open: t, span: n, segment: r }, requests: i, timeWindow: a }) {
2502
- let o = i ? on(i, e.connectionId, r) : null, s = o?.messages ?? e.messagesIn ?? 0, c = o?.failures ?? 0, l = !t && c > 0;
2512
+ function gi({ row: { session: e, open: t, span: n, segment: r }, requests: i, timeWindow: a }) {
2513
+ let o = i ? sn(i, e.connectionId, r) : null, s = o?.messages ?? e.messagesIn ?? 0, c = o?.failures ?? 0, l = !t && c > 0;
2503
2514
  return /* @__PURE__ */ d("div", {
2504
2515
  className: `${X} h-11 border-b border-border/50 last:border-b-0`,
2505
2516
  children: [/* @__PURE__ */ d("div", {
@@ -2512,9 +2523,9 @@ function hi({ row: { session: e, open: t, span: n, segment: r }, requests: i, ti
2512
2523
  className: U("mt-0.5 block truncate text-[11px] text-muted-foreground tabular-nums", l && "text-danger"),
2513
2524
  children: [t ? `${O(s, "message")} · ${k(a.toMs - n.fromMs)}` : `Closed ${T(n.toMs)}`, l && ` · ${O(c, "failure")}`]
2514
2525
  })]
2515
- }), /* @__PURE__ */ u($n, {
2526
+ }), /* @__PURE__ */ u(er, {
2516
2527
  label: `${e.connectionId}: ${e.status}, ${st(r.fromMs, r.toMs)}`,
2517
- children: /* @__PURE__ */ u(gi, {
2528
+ children: /* @__PURE__ */ u(_i, {
2518
2529
  messages: s,
2519
2530
  failures: c,
2520
2531
  segment: r,
@@ -2524,8 +2535,8 @@ function hi({ row: { session: e, open: t, span: n, segment: r }, requests: i, ti
2524
2535
  })]
2525
2536
  });
2526
2537
  }
2527
- function gi({ messages: e, failures: t, segment: n, open: r, failed: i }) {
2528
- return /* @__PURE__ */ d(nr, { children: [/* @__PURE__ */ u(rr, {
2538
+ function _i({ messages: e, failures: t, segment: n, open: r, failed: i }) {
2539
+ return /* @__PURE__ */ d(rr, { children: [/* @__PURE__ */ u(ir, {
2529
2540
  asChild: !0,
2530
2541
  children: /* @__PURE__ */ u("span", {
2531
2542
  className: U("absolute top-1/2 h-2.5 min-w-1 -translate-y-1/2 rounded-full before:absolute before:-inset-x-1.5 before:-inset-y-2", r ? "bg-chart-2 shadow-[0_0_12px_color-mix(in_oklab,var(--chart-2)_20%,transparent)]" : "bg-chart-2/55", n.now && "rounded-r-[1px] after:absolute after:top-0.75 after:right-1 after:size-1 after:rounded-full after:bg-background", !r && "after:absolute after:-top-0.75 after:right-0 after:h-4 after:w-0.5 after:rounded-[1px]", !r && (i ? "after:bg-danger" : "after:bg-chart-2")),
@@ -2534,7 +2545,7 @@ function gi({ messages: e, failures: t, segment: n, open: r, failed: i }) {
2534
2545
  width: `${n.width * 100}%`
2535
2546
  }
2536
2547
  })
2537
- }), /* @__PURE__ */ d(ir, {
2548
+ }), /* @__PURE__ */ d(ar, {
2538
2549
  className: "tabular-nums",
2539
2550
  children: [/* @__PURE__ */ u("div", {
2540
2551
  className: "font-medium",
@@ -2549,7 +2560,7 @@ function gi({ messages: e, failures: t, segment: n, open: r, failed: i }) {
2549
2560
  })]
2550
2561
  })] });
2551
2562
  }
2552
- function _i() {
2563
+ function vi() {
2553
2564
  return Array.from({ length: 4 }, (e, t) => /* @__PURE__ */ d("div", {
2554
2565
  className: `${X} h-11 border-b border-border/50 last:border-b-0`,
2555
2566
  children: [/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u(G, { className: "h-3.5 w-24" }), /* @__PURE__ */ u(G, { className: "mt-1.5 h-2.5 w-14" })] }), /* @__PURE__ */ u(G, {
@@ -2563,7 +2574,7 @@ function _i() {
2563
2574
  }
2564
2575
  //#endregion
2565
2576
  //#region src/hooks/useDebouncedValue.ts
2566
- function vi(e, t) {
2577
+ function yi(e, t) {
2567
2578
  let [n, i] = o(e);
2568
2579
  return r(() => {
2569
2580
  let n = setTimeout(() => i(e), t);
@@ -2577,7 +2588,7 @@ var Z = [
2577
2588
  "info",
2578
2589
  "warn",
2579
2590
  "error"
2580
- ], yi = 1e3, bi = [
2591
+ ], bi = 1e3, xi = [
2581
2592
  1,
2582
2593
  2,
2583
2594
  5,
@@ -2596,22 +2607,22 @@ var Z = [
2596
2607
  21600,
2597
2608
  43200,
2598
2609
  86400
2599
- ].map((e) => e * yi), xi = 60, Si = [
2610
+ ].map((e) => e * bi), Si = 60, Ci = [
2600
2611
  "message",
2601
2612
  "msg",
2602
2613
  "event"
2603
- ], Ci = 6;
2604
- function wi(e) {
2605
- return bi.find((t) => e / t <= xi) ?? bi.at(-1);
2614
+ ], wi = 6;
2615
+ function Ti(e) {
2616
+ return xi.find((t) => e / t <= Si) ?? xi.at(-1);
2606
2617
  }
2607
- function Ti({ fromMs: e, toMs: t }, n) {
2618
+ function Ei({ fromMs: e, toMs: t }, n) {
2608
2619
  let r = Math.floor(e / n) * n;
2609
2620
  return {
2610
2621
  fromMs: r,
2611
2622
  toMs: Math.max(Math.ceil(t / n) * n, r + n)
2612
2623
  };
2613
2624
  }
2614
- function Ei({ buckets: e }) {
2625
+ function Di({ buckets: e }) {
2615
2626
  let t = {
2616
2627
  debug: 0,
2617
2628
  info: 0,
@@ -2624,29 +2635,29 @@ function Ei({ buckets: e }) {
2624
2635
  function Q(e, t) {
2625
2636
  return Z.slice(t ? Z.indexOf(t) : 0).reduce((t, n) => t + e[n], 0);
2626
2637
  }
2627
- function Di(e) {
2638
+ function Oi(e) {
2628
2639
  let t = e.split("\n");
2629
2640
  return {
2630
2641
  firstLine: t[0] ?? "",
2631
2642
  moreLines: t.length - 1,
2632
- json: Ai(e)
2643
+ json: ji(e)
2633
2644
  };
2634
2645
  }
2635
- function Oi(e) {
2646
+ function ki(e) {
2636
2647
  if (Array.isArray(e)) return {
2637
2648
  headline: `${e.length} items`,
2638
2649
  fields: []
2639
2650
  };
2640
- let t = Si.find((t) => typeof e[t] == "string"), n = Object.entries(e).filter(([e]) => e !== t).slice(0, Ci).map(([e, t]) => [e, ji(t)]);
2651
+ let t = Ci.find((t) => typeof e[t] == "string"), n = Object.entries(e).filter(([e]) => e !== t).slice(0, wi).map(([e, t]) => [e, Mi(t)]);
2641
2652
  return {
2642
2653
  headline: t && e[t],
2643
2654
  fields: n
2644
2655
  };
2645
2656
  }
2646
- function ki(e) {
2657
+ function Ai(e) {
2647
2658
  return /^[0-9a-f]{8}-[0-9a-f]{4}-/iu.test(e) ? e.slice(0, 8) : e.length > 14 ? `${e.slice(0, 4)}…${e.slice(-8)}` : e;
2648
2659
  }
2649
- function Ai(e) {
2660
+ function ji(e) {
2650
2661
  let t = e.trim();
2651
2662
  if (t.startsWith("{") || t.startsWith("[")) try {
2652
2663
  let e = JSON.parse(t);
@@ -2655,7 +2666,7 @@ function Ai(e) {
2655
2666
  return;
2656
2667
  }
2657
2668
  }
2658
- function ji(e) {
2669
+ function Mi(e) {
2659
2670
  if (Array.isArray(e)) return "[…]";
2660
2671
  if (typeof e == "object" && e) return "{…}";
2661
2672
  let t = JSON.stringify(e);
@@ -2663,17 +2674,17 @@ function ji(e) {
2663
2674
  }
2664
2675
  //#endregion
2665
2676
  //#region src/lib/views/logs.ts
2666
- var Mi = 2e3;
2667
- function Ni(e) {
2677
+ var Ni = 2e3;
2678
+ function Pi(e) {
2668
2679
  let t = Z.slice(e ? Z.indexOf(e) : 0);
2669
2680
  return (e, n) => {
2670
- let r = Li(n).filter((e) => t.includes(e.level));
2681
+ let r = Ri(n).filter((e) => t.includes(e.level));
2671
2682
  if (r.length === 0) return e;
2672
2683
  let i = new Set(e.map((e) => e.logId));
2673
- return [...r.filter((e) => !i.has(e.logId)).reverse(), ...e].slice(0, Mi);
2684
+ return [...r.filter((e) => !i.has(e.logId)).reverse(), ...e].slice(0, Ni);
2674
2685
  };
2675
2686
  }
2676
- function Pi({ fromMs: e, bucketMs: t, buckets: n }, r) {
2687
+ function Fi({ fromMs: e, bucketMs: t, buckets: n }, r) {
2677
2688
  let i = {};
2678
2689
  return n.forEach((n, r) => i[e + r * t] = n), {
2679
2690
  bucketMs: t,
@@ -2681,14 +2692,14 @@ function Pi({ fromMs: e, bucketMs: t, buckets: n }, r) {
2681
2692
  counts: i
2682
2693
  };
2683
2694
  }
2684
- var Fi = (e, t) => {
2685
- let n = Li(t).filter((t) => t.timestampMs >= e.readAtMs && Z.includes(t.level));
2695
+ var Ii = (e, t) => {
2696
+ let n = Ri(t).filter((t) => t.timestampMs >= e.readAtMs && Z.includes(t.level));
2686
2697
  if (n.length === 0) return e;
2687
2698
  let r = { ...e.counts };
2688
2699
  for (let t of n) {
2689
2700
  let n = Math.floor(t.timestampMs / e.bucketMs) * e.bucketMs;
2690
2701
  r[n] = {
2691
- ...r[n] ?? Ri(),
2702
+ ...r[n] ?? zi(),
2692
2703
  [t.level]: (r[n]?.[t.level] ?? 0) + 1
2693
2704
  };
2694
2705
  }
@@ -2697,19 +2708,19 @@ var Fi = (e, t) => {
2697
2708
  counts: r
2698
2709
  };
2699
2710
  };
2700
- function Ii({ bucketMs: e, counts: t }, { fromMs: n, toMs: r }) {
2711
+ function Li({ bucketMs: e, counts: t }, { fromMs: n, toMs: r }) {
2701
2712
  let i = [];
2702
- for (let a = n; a < r; a += e) i.push(t[a] ?? Ri());
2713
+ for (let a = n; a < r; a += e) i.push(t[a] ?? zi());
2703
2714
  return {
2704
2715
  fromMs: n,
2705
2716
  bucketMs: e,
2706
2717
  buckets: i
2707
2718
  };
2708
2719
  }
2709
- function Li(e) {
2720
+ function Ri(e) {
2710
2721
  return e.flatMap((e) => e.type === "log" ? [e.item] : []);
2711
2722
  }
2712
- function Ri() {
2723
+ function zi() {
2713
2724
  return {
2714
2725
  debug: 0,
2715
2726
  info: 0,
@@ -2719,10 +2730,10 @@ function Ri() {
2719
2730
  }
2720
2731
  //#endregion
2721
2732
  //#region src/hooks/useLogs.ts
2722
- function zi(e, t, n) {
2723
- let r = We(e, t.live ? Bi(n) : null), i = Vi(e, t, n), { data: a } = w(De(e, n), async () => [], Ni(n.level), r), o = Hi(e, t, n, r), s = i.data;
2733
+ function Bi(e, t, n) {
2734
+ let r = We(e, t.live ? Vi(n) : null), i = Hi(e, t, n), { data: a } = w(De(e, n), async () => [], Pi(n.level), r), o = Ui(e, t, n, r), s = i.data;
2724
2735
  return {
2725
- lines: s ? Ui([...a ?? [], ...s.flatMap((e) => e.records)]) : null,
2736
+ lines: s ? Wi([...a ?? [], ...s.flatMap((e) => e.records)]) : null,
2726
2737
  hasOlder: !!s?.at(-1)?.nextCursor,
2727
2738
  loadingOlder: !!(s && i.size > s.length),
2728
2739
  loadOlder: () => i.setSize((e) => e + 1),
@@ -2730,14 +2741,14 @@ function zi(e, t, n) {
2730
2741
  isError: !s && !!i.error
2731
2742
  };
2732
2743
  }
2733
- function Bi(e) {
2744
+ function Vi(e) {
2734
2745
  let t = Me({
2735
2746
  ...e,
2736
2747
  level: null
2737
2748
  });
2738
2749
  return t.set("signals", "logs"), t;
2739
2750
  }
2740
- function Vi(e, t, n) {
2751
+ function Hi(e, t, n) {
2741
2752
  let r = new C(e);
2742
2753
  return be((r, i) => i && !i.nextCursor ? null : [
2743
2754
  ...Te(e, n),
@@ -2748,37 +2759,37 @@ function Vi(e, t, n) {
2748
2759
  revalidateOnFocus: !1
2749
2760
  });
2750
2761
  }
2751
- function Hi(e, t, n, r) {
2752
- let i = wi(t.toMs - t.fromMs), { data: a } = w([
2762
+ function Ui(e, t, n, r) {
2763
+ let i = Ti(t.toMs - t.fromMs), { data: a } = w([
2753
2764
  ...Ee(e, n),
2754
2765
  ...F(t),
2755
2766
  i
2756
2767
  ], async () => {
2757
2768
  let r = Date.now();
2758
- return Pi(await new C(e).getLogHistogram(n, Ti(I(t), i), i), r);
2759
- }, Fi, r, { keepPreviousData: !0 });
2760
- return a && Ii(a, Ti(I(t), i));
2769
+ return Fi(await new C(e).getLogHistogram(n, Ei(I(t), i), i), r);
2770
+ }, Ii, r, { keepPreviousData: !0 });
2771
+ return a && Li(a, Ei(I(t), i));
2761
2772
  }
2762
- function Ui(e) {
2773
+ function Wi(e) {
2763
2774
  return [...new Map(e.map((e) => [e.logId, e])).values()].sort((e, t) => t.timestampMs - e.timestampMs || (e.logId < t.logId ? 1 : -1));
2764
2775
  }
2765
2776
  //#endregion
2766
2777
  //#region src/components/instance/logChart.tsx
2767
- var Wi = {
2778
+ var Gi = {
2768
2779
  debug: "bg-muted-foreground/25",
2769
2780
  info: "bg-muted-foreground/55",
2770
2781
  warn: "bg-warning",
2771
2782
  error: "bg-danger"
2772
- }, Gi = [
2783
+ }, Ki = [
2773
2784
  2,
2774
2785
  4,
2775
2786
  6,
2776
2787
  10
2777
- ], Ki = 6;
2778
- function qi({ histogram: e, level: t, live: n, onZoom: r }) {
2788
+ ], qi = 6;
2789
+ function Ji({ histogram: e, level: t, live: n, onZoom: r }) {
2779
2790
  let [i, a] = o(null), [s, c] = o(null);
2780
2791
  if (!e) return /* @__PURE__ */ u(G, { className: "mt-4 mb-3.5 h-[122px] w-full rounded-sm" });
2781
- let { buckets: l, fromMs: f, bucketMs: p } = e, m = i !== null && i < l.length ? i : null, h = Ji(Math.max(...l.map((e) => Q(e, null)), 1)), g = (e) => {
2792
+ let { buckets: l, fromMs: f, bucketMs: p } = e, m = i !== null && i < l.length ? i : null, h = Yi(Math.max(...l.map((e) => Q(e, null)), 1)), g = (e) => {
2782
2793
  let t = e.currentTarget.getBoundingClientRect();
2783
2794
  return Math.min(l.length - 1, Math.max(0, Math.floor((e.clientX - t.left) / t.width * l.length)));
2784
2795
  };
@@ -2786,7 +2797,7 @@ function qi({ histogram: e, level: t, live: n, onZoom: r }) {
2786
2797
  className: "mt-4 border-b pb-3.5",
2787
2798
  children: [/* @__PURE__ */ d("div", {
2788
2799
  className: "relative pt-4",
2789
- children: [/* @__PURE__ */ u(Yi, { scale: h }), /* @__PURE__ */ d("div", {
2800
+ children: [/* @__PURE__ */ u(Xi, { scale: h }), /* @__PURE__ */ d("div", {
2790
2801
  role: "img",
2791
2802
  "aria-label": `Log lines per ${k(p)}; drag across the chart to zoom into a time range`,
2792
2803
  className: "relative ml-[42px] h-24 cursor-crosshair touch-none select-none",
@@ -2813,36 +2824,36 @@ function qi({ histogram: e, level: t, live: n, onZoom: r }) {
2813
2824
  children: [
2814
2825
  /* @__PURE__ */ u("div", {
2815
2826
  className: "absolute inset-0 flex items-end gap-0.5",
2816
- children: l.map((e, n) => /* @__PURE__ */ u(Xi, {
2827
+ children: l.map((e, n) => /* @__PURE__ */ u(Zi, {
2817
2828
  counts: e,
2818
2829
  scale: h,
2819
2830
  level: t,
2820
2831
  hovered: n === m
2821
2832
  }, n))
2822
2833
  }),
2823
- s && /* @__PURE__ */ u(Zi, {
2834
+ s && /* @__PURE__ */ u(Qi, {
2824
2835
  drag: s,
2825
2836
  buckets: l.length
2826
2837
  }),
2827
- m !== null && !s && Q(l[m], null) > 0 && /* @__PURE__ */ u(Qi, {
2838
+ m !== null && !s && Q(l[m], null) > 0 && /* @__PURE__ */ u($i, {
2828
2839
  index: m,
2829
2840
  histogram: e
2830
2841
  })
2831
2842
  ]
2832
2843
  })]
2833
- }), /* @__PURE__ */ u($i, {
2844
+ }), /* @__PURE__ */ u(ea, {
2834
2845
  histogram: e,
2835
2846
  live: n
2836
2847
  })]
2837
2848
  });
2838
2849
  }
2839
- function Ji(e) {
2850
+ function Yi(e) {
2840
2851
  for (let t = 1;; t *= 10) {
2841
- let n = Gi.find((n) => n * t >= e);
2852
+ let n = Ki.find((n) => n * t >= e);
2842
2853
  if (n) return n * t;
2843
2854
  }
2844
2855
  }
2845
- function Yi({ scale: e }) {
2856
+ function Xi({ scale: e }) {
2846
2857
  return /* @__PURE__ */ u("div", {
2847
2858
  "aria-hidden": !0,
2848
2859
  className: "pointer-events-none absolute inset-x-0 top-4 h-24",
@@ -2860,17 +2871,17 @@ function Yi({ scale: e }) {
2860
2871
  }, t))
2861
2872
  });
2862
2873
  }
2863
- function Xi({ counts: e, scale: t, level: n, hovered: r }) {
2874
+ function Zi({ counts: e, scale: t, level: n, hovered: r }) {
2864
2875
  let i = n ? Z.indexOf(n) : 0;
2865
2876
  return Q(e, null) ? /* @__PURE__ */ u("span", {
2866
2877
  className: U("flex h-full flex-1 flex-col-reverse rounded-[1px]", r && "outline outline-offset-1 outline-foreground"),
2867
2878
  children: Z.map((n, r) => e[n] ? /* @__PURE__ */ u("span", {
2868
- className: U("block w-full last:rounded-t-[1px]", Wi[n], r < i && "opacity-25"),
2879
+ className: U("block w-full last:rounded-t-[1px]", Gi[n], r < i && "opacity-25"),
2869
2880
  style: { height: `${e[n] / t * 100}%` }
2870
2881
  }, n) : null)
2871
2882
  }) : /* @__PURE__ */ u("span", { className: "h-px flex-1 bg-border/60" });
2872
2883
  }
2873
- function Zi({ drag: e, buckets: t }) {
2884
+ function Qi({ drag: e, buckets: t }) {
2874
2885
  let n = Math.min(e.from, e.to), r = Math.abs(e.to - e.from) + 1;
2875
2886
  return /* @__PURE__ */ u("div", {
2876
2887
  className: "pointer-events-none absolute inset-y-0 rounded-sm bg-foreground/10 ring-1 ring-foreground/40",
@@ -2880,7 +2891,7 @@ function Zi({ drag: e, buckets: t }) {
2880
2891
  }
2881
2892
  });
2882
2893
  }
2883
- function Qi({ index: e, histogram: { buckets: t, fromMs: n, bucketMs: r } }) {
2894
+ function $i({ index: e, histogram: { buckets: t, fromMs: n, bucketMs: r } }) {
2884
2895
  let i = t[e], a = n + e * r, o = r < 6e4 ? rt : T, s = e >= t.length / 2;
2885
2896
  return /* @__PURE__ */ d("div", {
2886
2897
  className: "pointer-events-none absolute top-1 z-10 rounded-lg border bg-card px-3 py-2 text-xs whitespace-nowrap text-muted-foreground shadow-(--shadow-popover)",
@@ -2899,7 +2910,7 @@ function Qi({ index: e, histogram: { buckets: t, fromMs: n, bucketMs: r } }) {
2899
2910
  children: [...Z].reverse().map((e) => /* @__PURE__ */ d("span", {
2900
2911
  className: "flex items-center gap-1.5",
2901
2912
  children: [
2902
- /* @__PURE__ */ u("i", { className: U("size-1.5 rounded-full", Wi[e]) }),
2913
+ /* @__PURE__ */ u("i", { className: U("size-1.5 rounded-full", Gi[e]) }),
2903
2914
  E(i[e]),
2904
2915
  " ",
2905
2916
  e
@@ -2908,33 +2919,33 @@ function Qi({ index: e, histogram: { buckets: t, fromMs: n, bucketMs: r } }) {
2908
2919
  })]
2909
2920
  });
2910
2921
  }
2911
- function $i({ histogram: { fromMs: e, bucketMs: t, buckets: n }, live: r }) {
2922
+ function ea({ histogram: { fromMs: e, bucketMs: t, buckets: n }, live: r }) {
2912
2923
  let i = t * n.length;
2913
2924
  return /* @__PURE__ */ u("div", {
2914
2925
  "aria-hidden": !0,
2915
2926
  className: "mt-1.5 ml-[42px] flex justify-between text-[11px] text-muted-foreground tabular-nums",
2916
- children: Array.from({ length: 7 }, (t, n) => /* @__PURE__ */ u("span", { children: r && n === Ki ? "Now" : at(e + n / Ki * i, i) }, n))
2927
+ children: Array.from({ length: 7 }, (t, n) => /* @__PURE__ */ u("span", { children: r && n === qi ? "Now" : at(e + n / qi * i, i) }, n))
2917
2928
  });
2918
2929
  }
2919
2930
  //#endregion
2920
2931
  //#region src/components/instance/logList.tsx
2921
- var ea = "grid items-center gap-x-4", ta = 16, na = 240, ra = {
2932
+ var ta = "grid items-center gap-x-4", na = 16, ra = 240, ia = {
2922
2933
  time: 104,
2923
2934
  level: 58,
2924
2935
  request: 104
2925
- }, ia = {
2936
+ }, aa = {
2926
2937
  debug: "border-border/60 text-muted-foreground/70",
2927
2938
  info: "text-muted-foreground",
2928
2939
  warn: "border-warning/35 bg-warning/10 text-warning",
2929
2940
  error: "border-danger/40 bg-danger/15 text-danger"
2930
- }, aa = {
2941
+ }, oa = {
2931
2942
  debug: "",
2932
2943
  info: "",
2933
2944
  warn: "shadow-[inset_2px_0_0_color-mix(in_oklab,var(--warning)_75%,transparent)]",
2934
2945
  error: "bg-[linear-gradient(90deg,color-mix(in_oklab,var(--danger)_10%,transparent),transparent_70%)] shadow-[inset_2px_0_0_var(--danger)]"
2935
- }, oa = /("(?:\\.|[^"\\])*")(?=\s*:)\s*:|("(?:\\.|[^"\\])*")|-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?|\b(?:true|false|null)\b/gu;
2936
- function sa({ lines: e, failed: t, search: n, filtered: r, onFilterRequest: i, onClearFilters: a, onReachEnd: s, columns: c }) {
2937
- let l = ca(c), [f, p] = o({
2946
+ }, sa = /("(?:\\.|[^"\\])*")(?=\s*:)\s*:|("(?:\\.|[^"\\])*")|-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?|\b(?:true|false|null)\b/gu;
2947
+ function ca({ lines: e, failed: t, search: n, filtered: r, onFilterRequest: i, onClearFilters: a, onReachEnd: s, columns: c }) {
2948
+ let l = la(c), [f, p] = o({
2938
2949
  all: !1,
2939
2950
  toggled: /* @__PURE__ */ new Set()
2940
2951
  });
@@ -2942,8 +2953,8 @@ function sa({ lines: e, failed: t, search: n, filtered: r, onFilterRequest: i, o
2942
2953
  className: "py-6 text-[13px] text-muted-foreground",
2943
2954
  children: "Couldn't reach the observer API."
2944
2955
  });
2945
- if (!e) return /* @__PURE__ */ u(la, { layout: l });
2946
- if (!e.length) return /* @__PURE__ */ u(ua, {
2956
+ if (!e) return /* @__PURE__ */ u(ua, { layout: l });
2957
+ if (!e.length) return /* @__PURE__ */ u(da, {
2947
2958
  filtered: r,
2948
2959
  onClearFilters: a
2949
2960
  });
@@ -2958,10 +2969,10 @@ function sa({ lines: e, failed: t, search: n, filtered: r, onFilterRequest: i, o
2958
2969
  className: "max-h-[640px] overflow-y-auto",
2959
2970
  onScroll: (e) => {
2960
2971
  let t = e.currentTarget;
2961
- s && t.scrollHeight - t.scrollTop - t.clientHeight < na && s();
2972
+ s && t.scrollHeight - t.scrollTop - t.clientHeight < ra && s();
2962
2973
  },
2963
2974
  children: [/* @__PURE__ */ d("div", {
2964
- className: `${ea} sticky top-0 z-[1] h-7.5 border-b bg-card px-2 text-xs text-muted-foreground`,
2975
+ className: `${ta} sticky top-0 z-[1] h-7.5 border-b bg-card px-2 text-xs text-muted-foreground`,
2965
2976
  style: { gridTemplateColumns: l.gridTemplateColumns },
2966
2977
  children: [
2967
2978
  /* @__PURE__ */ u("span", { children: "Time" }),
@@ -2980,7 +2991,7 @@ function sa({ lines: e, failed: t, search: n, filtered: r, onFilterRequest: i, o
2980
2991
  })]
2981
2992
  })
2982
2993
  ]
2983
- }), /* @__PURE__ */ u("ol", { children: e.map((e) => /* @__PURE__ */ u(da, {
2994
+ }), /* @__PURE__ */ u("ol", { children: e.map((e) => /* @__PURE__ */ u(fa, {
2984
2995
  line: e,
2985
2996
  layout: l,
2986
2997
  expanded: m(e.logId),
@@ -2990,23 +3001,23 @@ function sa({ lines: e, failed: t, search: n, filtered: r, onFilterRequest: i, o
2990
3001
  }, e.logId)) })]
2991
3002
  });
2992
3003
  }
2993
- function ca(e) {
3004
+ function la(e) {
2994
3005
  let t = [
2995
- ra.time,
2996
- ...e.level ? [ra.level] : [],
2997
- ...e.request ? [ra.request] : []
3006
+ ia.time,
3007
+ ...e.level ? [ia.level] : [],
3008
+ ...e.request ? [ia.request] : []
2998
3009
  ];
2999
3010
  return {
3000
3011
  columns: e,
3001
3012
  gridTemplateColumns: `${t.map((e) => `${e}px`).join(" ")} minmax(0,1fr) 16px`,
3002
- messageOffset: t.reduce((e, t) => e + t + ta, 0)
3013
+ messageOffset: t.reduce((e, t) => e + t + na, 0)
3003
3014
  };
3004
3015
  }
3005
- function la({ layout: e }) {
3016
+ function ua({ layout: e }) {
3006
3017
  return /* @__PURE__ */ u("div", {
3007
3018
  className: "py-2",
3008
3019
  children: Array.from({ length: 6 }, (t, n) => /* @__PURE__ */ d("div", {
3009
- className: `${ea} h-8.5 px-2`,
3020
+ className: `${ta} h-8.5 px-2`,
3010
3021
  style: { gridTemplateColumns: e.gridTemplateColumns },
3011
3022
  children: [
3012
3023
  /* @__PURE__ */ u(G, { className: "h-3.5 w-20" }),
@@ -3020,7 +3031,7 @@ function la({ layout: e }) {
3020
3031
  }, n))
3021
3032
  });
3022
3033
  }
3023
- function ua({ filtered: e, onClearFilters: t }) {
3034
+ function da({ filtered: e, onClearFilters: t }) {
3024
3035
  return /* @__PURE__ */ u("p", {
3025
3036
  className: "py-8 text-center text-[13px] text-muted-foreground",
3026
3037
  children: e ? /* @__PURE__ */ d(l, { children: [
@@ -3035,13 +3046,13 @@ function ua({ filtered: e, onClearFilters: t }) {
3035
3046
  ] }) : "No logs in this time range."
3036
3047
  });
3037
3048
  }
3038
- function da({ line: e, layout: t, expanded: n, onToggle: r, search: i, onFilterRequest: a }) {
3039
- let o = Di(e.message);
3049
+ function fa({ line: e, layout: t, expanded: n, onToggle: r, search: i, onFilterRequest: a }) {
3050
+ let o = Oi(e.message);
3040
3051
  return /* @__PURE__ */ d("li", {
3041
- className: U("border-b border-border/55 px-2 last:border-b-0", aa[e.level]),
3052
+ className: U("border-b border-border/55 px-2 last:border-b-0", oa[e.level]),
3042
3053
  children: [/* @__PURE__ */ d("div", {
3043
3054
  onClick: r,
3044
- className: `${ea} min-h-8.5 cursor-pointer text-[12.5px]`,
3055
+ className: `${ta} min-h-8.5 cursor-pointer text-[12.5px]`,
3045
3056
  style: { gridTemplateColumns: t.gridTemplateColumns },
3046
3057
  children: [
3047
3058
  /* @__PURE__ */ u("span", {
@@ -3049,14 +3060,14 @@ function da({ line: e, layout: t, expanded: n, onToggle: r, search: i, onFilterR
3049
3060
  children: ct(e.timestampMs)
3050
3061
  }),
3051
3062
  t.columns.level && /* @__PURE__ */ u("span", {
3052
- className: U("justify-self-start rounded-sm border px-1.5 py-px text-[9.5px] font-bold tracking-[0.07em] uppercase", ia[e.level]),
3063
+ className: U("justify-self-start rounded-sm border px-1.5 py-px text-[9.5px] font-bold tracking-[0.07em] uppercase", aa[e.level]),
3053
3064
  children: e.level
3054
3065
  }),
3055
- t.columns.request && /* @__PURE__ */ u(fa, {
3066
+ t.columns.request && /* @__PURE__ */ u(pa, {
3056
3067
  requestId: e.requestId,
3057
3068
  onFilter: a
3058
3069
  }),
3059
- /* @__PURE__ */ u(pa, {
3070
+ /* @__PURE__ */ u(ma, {
3060
3071
  parsed: o,
3061
3072
  level: e.level,
3062
3073
  search: i
@@ -3072,14 +3083,14 @@ function da({ line: e, layout: t, expanded: n, onToggle: r, search: i, onFilterR
3072
3083
  children: /* @__PURE__ */ u(ie, { className: U("size-3.5 transition-transform", n && "rotate-90") })
3073
3084
  })
3074
3085
  ]
3075
- }), n && /* @__PURE__ */ u(ha, {
3086
+ }), n && /* @__PURE__ */ u(ga, {
3076
3087
  line: e,
3077
3088
  parsed: o,
3078
3089
  indent: t.messageOffset
3079
3090
  })]
3080
3091
  });
3081
3092
  }
3082
- function fa({ requestId: e, onFilter: t }) {
3093
+ function pa({ requestId: e, onFilter: t }) {
3083
3094
  return e === null ? /* @__PURE__ */ u("span", {
3084
3095
  className: "font-mono text-muted-foreground",
3085
3096
  title: "Logged outside a request, for example by a timer that fired after its call returned",
@@ -3095,26 +3106,26 @@ function fa({ requestId: e, onFilter: t }) {
3095
3106
  n.stopPropagation(), t(e);
3096
3107
  },
3097
3108
  className: "max-w-full justify-self-start truncate rounded-sm bg-chart-2/12 px-1.5 py-px font-mono text-[11.5px] text-chart-2 outline-none hover:bg-chart-2/22 focus-visible:ring-2 focus-visible:ring-ring",
3098
- children: ki(e)
3109
+ children: Ai(e)
3099
3110
  });
3100
3111
  }
3101
- function pa({ parsed: e, level: t, search: n }) {
3102
- return e.json ? /* @__PURE__ */ u(ma, {
3112
+ function ma({ parsed: e, level: t, search: n }) {
3113
+ return e.json ? /* @__PURE__ */ u(ha, {
3103
3114
  value: e.json,
3104
3115
  search: n
3105
3116
  }) : /* @__PURE__ */ d("span", {
3106
3117
  className: U("flex min-w-0 items-center gap-2 font-mono", t === "debug" ? "text-muted-foreground" : "text-foreground/95"),
3107
3118
  children: [/* @__PURE__ */ u("span", {
3108
3119
  className: "truncate",
3109
- children: ya(e.firstLine, n)
3120
+ children: ba(e.firstLine, n)
3110
3121
  }), e.moreLines > 0 && /* @__PURE__ */ d("span", {
3111
3122
  className: "shrink-0 rounded-full border px-2 font-sans text-[11px] text-muted-foreground",
3112
3123
  children: ["+", O(e.moreLines, "line")]
3113
3124
  })]
3114
3125
  });
3115
3126
  }
3116
- function ma({ value: t, search: n }) {
3117
- let { headline: r, fields: i } = Oi(t);
3127
+ function ha({ value: t, search: n }) {
3128
+ let { headline: r, fields: i } = ki(t);
3118
3129
  return /* @__PURE__ */ d("span", {
3119
3130
  className: "flex min-w-0 items-center gap-2 font-mono",
3120
3131
  children: [/* @__PURE__ */ u("span", {
@@ -3124,7 +3135,7 @@ function ma({ value: t, search: n }) {
3124
3135
  className: "truncate",
3125
3136
  children: [r && /* @__PURE__ */ u("span", {
3126
3137
  className: "mr-2.5 font-medium text-foreground",
3127
- children: ya(r, n)
3138
+ children: ba(r, n)
3128
3139
  }), i.map(([t, r], i) => /* @__PURE__ */ d(e, { children: [
3129
3140
  i > 0 && /* @__PURE__ */ u("span", {
3130
3141
  className: "text-muted-foreground",
@@ -3136,13 +3147,13 @@ function ma({ value: t, search: n }) {
3136
3147
  }),
3137
3148
  /* @__PURE__ */ u("span", {
3138
3149
  className: "text-foreground/95",
3139
- children: ya(r, n)
3150
+ children: ba(r, n)
3140
3151
  })
3141
3152
  ] }, t))]
3142
3153
  })]
3143
3154
  });
3144
3155
  }
3145
- function ha({ line: e, parsed: t, indent: n }) {
3156
+ function ga({ line: e, parsed: t, indent: n }) {
3146
3157
  let r = {
3147
3158
  timestamp: new Date(e.timestampMs).toISOString(),
3148
3159
  level: e.level,
@@ -3154,21 +3165,21 @@ function ha({ line: e, parsed: t, indent: n }) {
3154
3165
  return /* @__PURE__ */ d("div", {
3155
3166
  className: "pr-6 pb-4",
3156
3167
  style: { paddingLeft: n },
3157
- children: [/* @__PURE__ */ u(ga, { value: r }), /* @__PURE__ */ u("div", {
3168
+ children: [/* @__PURE__ */ u(_a, { value: r }), /* @__PURE__ */ u("div", {
3158
3169
  className: "mt-3",
3159
- children: /* @__PURE__ */ u(va, { text: JSON.stringify(r, null, 2) })
3170
+ children: /* @__PURE__ */ u(ya, { text: JSON.stringify(r, null, 2) })
3160
3171
  })]
3161
3172
  });
3162
3173
  }
3163
- function ga({ value: e }) {
3174
+ function _a({ value: e }) {
3164
3175
  return /* @__PURE__ */ u("pre", {
3165
3176
  className: "max-h-96 overflow-auto rounded-lg border bg-(--code-bg) px-3.5 py-2.5 font-mono text-xs leading-relaxed break-words whitespace-pre-wrap",
3166
- children: _a(JSON.stringify(e, null, 2))
3177
+ children: va(JSON.stringify(e, null, 2))
3167
3178
  });
3168
3179
  }
3169
- function _a(e) {
3180
+ function va(e) {
3170
3181
  let t = [], n = 0;
3171
- for (let r of e.matchAll(oa)) {
3182
+ for (let r of e.matchAll(sa)) {
3172
3183
  let [i, a, o] = r;
3173
3184
  t.push(e.slice(n, r.index), /* @__PURE__ */ u("span", {
3174
3185
  className: a ? "text-(--tk-plain)" : o ? "text-(--tk-string)" : "text-(--tk-type)",
@@ -3177,7 +3188,7 @@ function _a(e) {
3177
3188
  }
3178
3189
  return t.push(e.slice(n)), t;
3179
3190
  }
3180
- function va({ text: e }) {
3191
+ function ya({ text: e }) {
3181
3192
  let [t, n] = o(!1);
3182
3193
  return /* @__PURE__ */ d(W, {
3183
3194
  variant: "outline",
@@ -3188,7 +3199,7 @@ function va({ text: e }) {
3188
3199
  children: [u(t ? te : le, {}), t ? "Copied" : "Copy JSON"]
3189
3200
  });
3190
3201
  }
3191
- function ya(e, t) {
3202
+ function ba(e, t) {
3192
3203
  if (!t) return e;
3193
3204
  let n = e.toLowerCase(), r = t.toLowerCase(), i = [], a = 0;
3194
3205
  for (let t = n.indexOf(r); t >= 0; t = n.indexOf(r, a)) i.push(e.slice(a, t), /* @__PURE__ */ u("mark", {
@@ -3199,7 +3210,7 @@ function ya(e, t) {
3199
3210
  }
3200
3211
  //#endregion
3201
3212
  //#region src/components/instance/logsCard.tsx
3202
- var ba = [
3213
+ var xa = [
3203
3214
  {
3204
3215
  value: "all",
3205
3216
  label: "All"
@@ -3216,12 +3227,12 @@ var ba = [
3216
3227
  value: "error",
3217
3228
  label: "Error"
3218
3229
  }
3219
- ], xa = "logs", Sa = 300, Ca = {
3230
+ ], Sa = "logs", Ca = 300, wa = {
3220
3231
  level: !0,
3221
3232
  request: !1
3222
- }, wa = "durable-actors-observer:log-columns", Ta = [["level", "Level"], ["request", "Request"]];
3223
- function Ea({ actorName: e, actorId: t, requests: n, requestId: r, onRequestChange: i, timeWindow: a }) {
3224
- let { baseUrl: s } = R(), c = Lt(), [l, f] = o("all"), [p, m] = o(""), [h, g] = Aa(), _ = vi(p.trim(), Sa), v = l === "all" ? null : l, y = zi(s, a, {
3233
+ }, Ta = "durable-actors-observer:log-columns", Ea = [["level", "Level"], ["request", "Request"]];
3234
+ function Da({ actorName: e, actorId: t, requests: n, requestId: r, onRequestChange: i, timeWindow: a }) {
3235
+ let { baseUrl: s } = R(), c = Lt(), [l, f] = o("all"), [p, m] = o(""), [h, g] = ja(), _ = yi(p.trim(), Ca), v = l === "all" ? null : l, y = Bi(s, a, {
3225
3236
  actorName: e,
3226
3237
  actorId: t,
3227
3238
  requestId: r,
@@ -3231,21 +3242,21 @@ function Ea({ actorName: e, actorId: t, requests: n, requestId: r, onRequestChan
3231
3242
  i(null), m(""), f("all");
3232
3243
  };
3233
3244
  return /* @__PURE__ */ d(K, {
3234
- id: xa,
3245
+ id: Sa,
3235
3246
  title: "Logs",
3236
3247
  aside: /* @__PURE__ */ d("div", {
3237
3248
  className: "flex flex-wrap items-center gap-2",
3238
3249
  children: [
3239
- /* @__PURE__ */ u(Da, {
3250
+ /* @__PURE__ */ u(Oa, {
3240
3251
  value: p,
3241
3252
  onChange: m
3242
3253
  }),
3243
- /* @__PURE__ */ u(Oa, {
3254
+ /* @__PURE__ */ u(ka, {
3244
3255
  value: l,
3245
3256
  onChange: f,
3246
- totals: y.histogram && Ei(y.histogram)
3257
+ totals: y.histogram && Di(y.histogram)
3247
3258
  }),
3248
- /* @__PURE__ */ u(ka, {
3259
+ /* @__PURE__ */ u(Aa, {
3249
3260
  columns: h,
3250
3261
  onChange: g
3251
3262
  })
@@ -3254,13 +3265,13 @@ function Ea({ actorName: e, actorId: t, requests: n, requestId: r, onRequestChan
3254
3265
  busy: !y.lines && !y.isError,
3255
3266
  className: "pb-3.5",
3256
3267
  children: [
3257
- r && /* @__PURE__ */ u(Ma, {
3268
+ r && /* @__PURE__ */ u(Na, {
3258
3269
  requestId: r,
3259
3270
  call: ee.get(r),
3260
3271
  onRemove: () => i(null),
3261
3272
  onClearFilters: te
3262
3273
  }),
3263
- /* @__PURE__ */ u(qi, {
3274
+ /* @__PURE__ */ u(Ji, {
3264
3275
  histogram: y.histogram,
3265
3276
  level: v,
3266
3277
  live: a.live,
@@ -3269,7 +3280,7 @@ function Ea({ actorName: e, actorId: t, requests: n, requestId: r, onRequestChan
3269
3280
  ...e
3270
3281
  })
3271
3282
  }),
3272
- /* @__PURE__ */ u(sa, {
3283
+ /* @__PURE__ */ u(ca, {
3273
3284
  lines: y.lines,
3274
3285
  failed: y.isError,
3275
3286
  search: _,
@@ -3282,7 +3293,7 @@ function Ea({ actorName: e, actorId: t, requests: n, requestId: r, onRequestChan
3282
3293
  ]
3283
3294
  });
3284
3295
  }
3285
- function Da({ value: e, onChange: t }) {
3296
+ function Oa({ value: e, onChange: t }) {
3286
3297
  return /* @__PURE__ */ d("label", {
3287
3298
  className: "flex h-8 w-64 items-center gap-2 rounded-lg border bg-background/40 px-2.5 text-[12.5px] focus-within:border-ring focus-within:ring-2 focus-within:ring-ring/40",
3288
3299
  children: [
@@ -3311,20 +3322,20 @@ function Da({ value: e, onChange: t }) {
3311
3322
  ]
3312
3323
  });
3313
3324
  }
3314
- function Oa({ value: e, onChange: t, totals: n }) {
3315
- return /* @__PURE__ */ u(Dn, {
3325
+ function ka({ value: e, onChange: t, totals: n }) {
3326
+ return /* @__PURE__ */ u(On, {
3316
3327
  label: "Minimum log level",
3317
3328
  value: e,
3318
3329
  onChange: t,
3319
- options: ba.map((e) => ({
3330
+ options: xa.map((e) => ({
3320
3331
  ...e,
3321
- icon: (e.value === "warn" || e.value === "error") && /* @__PURE__ */ u("i", { className: U("size-1.5 rounded-full", Wi[e.value]) }),
3332
+ icon: (e.value === "warn" || e.value === "error") && /* @__PURE__ */ u("i", { className: U("size-1.5 rounded-full", Gi[e.value]) }),
3322
3333
  badge: n && E(Q(n, e.value === "all" ? null : e.value))
3323
3334
  }))
3324
3335
  });
3325
3336
  }
3326
- function ka({ columns: e, onChange: t }) {
3327
- return /* @__PURE__ */ d(hn, { children: [/* @__PURE__ */ u(gn, {
3337
+ function Aa({ columns: e, onChange: t }) {
3338
+ return /* @__PURE__ */ d(gn, { children: [/* @__PURE__ */ u(_n, {
3328
3339
  asChild: !0,
3329
3340
  children: /* @__PURE__ */ d(W, {
3330
3341
  variant: "outline",
@@ -3332,10 +3343,10 @@ function ka({ columns: e, onChange: t }) {
3332
3343
  className: "h-8 text-xs",
3333
3344
  children: [/* @__PURE__ */ u(ce, {}), "Columns"]
3334
3345
  })
3335
- }), /* @__PURE__ */ u(_n, {
3346
+ }), /* @__PURE__ */ u(vn, {
3336
3347
  align: "end",
3337
3348
  className: "w-44 p-1.5",
3338
- children: Ta.map(([n, r]) => /* @__PURE__ */ d("label", {
3349
+ children: Ea.map(([n, r]) => /* @__PURE__ */ d("label", {
3339
3350
  className: "flex cursor-pointer items-center gap-2.5 rounded-sm px-2 py-1.5 text-[13px] hover:bg-muted",
3340
3351
  children: [/* @__PURE__ */ u("input", {
3341
3352
  type: "checkbox",
@@ -3349,26 +3360,26 @@ function ka({ columns: e, onChange: t }) {
3349
3360
  }, n))
3350
3361
  })] });
3351
3362
  }
3352
- function Aa() {
3353
- let [e, t] = o(ja);
3363
+ function ja() {
3364
+ let [e, t] = o(Ma);
3354
3365
  return [e, (e) => {
3355
3366
  t(e);
3356
3367
  try {
3357
- localStorage.setItem(wa, JSON.stringify(e));
3368
+ localStorage.setItem(Ta, JSON.stringify(e));
3358
3369
  } catch {}
3359
3370
  }];
3360
3371
  }
3361
- function ja() {
3372
+ function Ma() {
3362
3373
  try {
3363
3374
  return {
3364
- ...Ca,
3365
- ...JSON.parse(localStorage.getItem(wa) ?? "{}")
3375
+ ...wa,
3376
+ ...JSON.parse(localStorage.getItem(Ta) ?? "{}")
3366
3377
  };
3367
3378
  } catch {
3368
- return Ca;
3379
+ return wa;
3369
3380
  }
3370
3381
  }
3371
- function Ma({ requestId: e, call: t, onRemove: n, onClearFilters: r }) {
3382
+ function Na({ requestId: e, call: t, onRemove: n, onClearFilters: r }) {
3372
3383
  return /* @__PURE__ */ d("div", {
3373
3384
  className: "mt-3.5 flex flex-wrap items-center gap-2 text-xs text-muted-foreground",
3374
3385
  children: [
@@ -3383,7 +3394,7 @@ function Ma({ requestId: e, call: t, onRemove: n, onClearFilters: r }) {
3383
3394
  /* @__PURE__ */ u("code", {
3384
3395
  title: e,
3385
3396
  className: "font-mono text-[11.5px] text-chart-2",
3386
- children: ki(e)
3397
+ children: Ai(e)
3387
3398
  }),
3388
3399
  t && /* @__PURE__ */ d("span", {
3389
3400
  className: "text-muted-foreground",
@@ -3409,7 +3420,7 @@ function Ma({ requestId: e, call: t, onRemove: n, onClearFilters: r }) {
3409
3420
  }
3410
3421
  //#endregion
3411
3422
  //#region src/components/ui/barChart.tsx
3412
- function Na({ values: e, label: t, highlighted: n, onSelect: r, barLabel: i, className: a }) {
3423
+ function Pa({ values: e, label: t, highlighted: n, onSelect: r, barLabel: i, className: a }) {
3413
3424
  let o = Math.max(...e, 1);
3414
3425
  return r ? /* @__PURE__ */ u("div", {
3415
3426
  role: "group",
@@ -3421,7 +3432,7 @@ function Na({ values: e, label: t, highlighted: n, onSelect: r, barLabel: i, cla
3421
3432
  "aria-pressed": t === n,
3422
3433
  onClick: () => r(t),
3423
3434
  className: U("group relative flex h-full flex-1 items-end rounded-[2px] outline-none focus-visible:ring-2 focus-visible:ring-ring", t === n && "after:absolute after:inset-x-0 after:-bottom-1 after:h-0.5 after:rounded-full after:bg-foreground"),
3424
- children: /* @__PURE__ */ u(Pa, {
3435
+ children: /* @__PURE__ */ u(Fa, {
3425
3436
  share: e / o,
3426
3437
  highlighted: t === n
3427
3438
  })
@@ -3430,13 +3441,13 @@ function Na({ values: e, label: t, highlighted: n, onSelect: r, barLabel: i, cla
3430
3441
  role: "img",
3431
3442
  "aria-label": t,
3432
3443
  className: U("flex items-end gap-1", a),
3433
- children: e.map((e, t) => /* @__PURE__ */ u(Pa, {
3444
+ children: e.map((e, t) => /* @__PURE__ */ u(Fa, {
3434
3445
  share: e / o,
3435
3446
  highlighted: t === n
3436
3447
  }, t))
3437
3448
  });
3438
3449
  }
3439
- function Pa({ share: e, highlighted: t }) {
3450
+ function Fa({ share: e, highlighted: t }) {
3440
3451
  return /* @__PURE__ */ u("span", {
3441
3452
  className: U("block flex-1 rounded-t-[1px]", e ? "bg-muted-foreground/40 group-hover:bg-muted-foreground/70" : "bg-border", t && "bg-foreground group-hover:bg-foreground"),
3442
3453
  style: { height: e ? `${e * 100}%` : "1px" }
@@ -3444,7 +3455,7 @@ function Pa({ share: e, highlighted: t }) {
3444
3455
  }
3445
3456
  //#endregion
3446
3457
  //#region src/components/ui/queueStripes.tsx
3447
- function Fa({ className: e, ...t }) {
3458
+ function Ia({ className: e, ...t }) {
3448
3459
  return /* @__PURE__ */ u("span", {
3449
3460
  "data-slot": "queue-stripes",
3450
3461
  className: U("bg-[repeating-linear-gradient(135deg,var(--chart-1)_0_2px,transparent_2px_4px)] shadow-[inset_0_0_0_1px_color-mix(in_oklab,var(--chart-1)_50%,transparent)]", e),
@@ -3453,49 +3464,49 @@ function Fa({ className: e, ...t }) {
3453
3464
  }
3454
3465
  //#endregion
3455
3466
  //#region src/components/instance/requestDetails.tsx
3456
- var Ia = {
3467
+ var La = {
3457
3468
  completed: "Completed",
3458
3469
  failed: "Failed",
3459
3470
  rejected: "Rejected",
3460
3471
  rerouted: "Rerouted",
3461
3472
  interrupted: "Interrupted"
3462
- }, La = {
3473
+ }, Ra = {
3463
3474
  method: "Method",
3464
3475
  websocket: "WebSocket"
3465
3476
  };
3466
- function Ra({ call: e, blocker: t, onShowLogs: n }) {
3477
+ function za({ call: e, blocker: t, onShowLogs: n }) {
3467
3478
  let r = e.outcome !== "completed";
3468
- return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ d(ni, {
3479
+ return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ d(ri, {
3469
3480
  className: "shrink-0 gap-2 border-b px-5 py-4 pr-14",
3470
3481
  children: [
3471
3482
  /* @__PURE__ */ d("div", {
3472
3483
  className: "flex items-center gap-2",
3473
- children: [/* @__PURE__ */ u(Ha, { state: e.hostState }), /* @__PURE__ */ u("span", {
3484
+ children: [/* @__PURE__ */ u(Ua, { state: e.hostState }), /* @__PURE__ */ u("span", {
3474
3485
  className: U("text-xs", r ? "text-danger" : "text-muted-foreground"),
3475
- children: Ia[e.outcome]
3486
+ children: La[e.outcome]
3476
3487
  })]
3477
3488
  }),
3478
- /* @__PURE__ */ u(ri, {
3489
+ /* @__PURE__ */ u(ii, {
3479
3490
  translate: "no",
3480
3491
  className: "truncate text-lg tracking-tight",
3481
3492
  children: e.operation
3482
3493
  }),
3483
- /* @__PURE__ */ d(ii, {
3494
+ /* @__PURE__ */ d(ai, {
3484
3495
  className: "text-[13px] tabular-nums",
3485
3496
  children: [
3486
- La[e.kind],
3497
+ Ra[e.kind],
3487
3498
  " · ",
3488
3499
  it(e.startedAtMs)
3489
3500
  ]
3490
3501
  })
3491
3502
  ]
3492
- }), /* @__PURE__ */ u(za, {
3503
+ }), /* @__PURE__ */ u(Ba, {
3493
3504
  call: e,
3494
3505
  blocker: t,
3495
3506
  onShowLogs: n
3496
3507
  })] });
3497
3508
  }
3498
- function za({ call: e, blocker: t, onShowLogs: n }) {
3509
+ function Ba({ call: e, blocker: t, onShowLogs: n }) {
3499
3510
  let r = e.queueWaitMs, i = r === null ? null : V(e), a = r !== null && e.durationMs > 0 ? r / e.durationMs * 100 : 0;
3500
3511
  return /* @__PURE__ */ d("div", {
3501
3512
  className: "min-h-0 flex-1 overflow-y-auto px-5 py-4",
@@ -3503,15 +3514,15 @@ function za({ call: e, blocker: t, onShowLogs: n }) {
3503
3514
  /* @__PURE__ */ d("div", {
3504
3515
  className: "grid grid-cols-3 gap-3",
3505
3516
  children: [
3506
- /* @__PURE__ */ u(Va, {
3517
+ /* @__PURE__ */ u(Ha, {
3507
3518
  label: "Queue",
3508
3519
  ms: r
3509
3520
  }),
3510
- /* @__PURE__ */ u(Va, {
3521
+ /* @__PURE__ */ u(Ha, {
3511
3522
  label: "In actor",
3512
3523
  ms: i
3513
3524
  }),
3514
- /* @__PURE__ */ u(Va, {
3525
+ /* @__PURE__ */ u(Ha, {
3515
3526
  label: "Overall",
3516
3527
  ms: e.durationMs
3517
3528
  })
@@ -3520,7 +3531,7 @@ function za({ call: e, blocker: t, onShowLogs: n }) {
3520
3531
  /* @__PURE__ */ d("div", {
3521
3532
  className: "mt-3.5 flex h-2 overflow-hidden rounded-full bg-muted",
3522
3533
  "aria-hidden": !0,
3523
- children: [a > 0 && /* @__PURE__ */ u(Fa, { style: { width: `${a}%` } }), /* @__PURE__ */ u("span", { className: U("min-w-0.5 flex-1", e.outcome === "completed" ? "bg-foreground" : "bg-danger") })]
3534
+ children: [a > 0 && /* @__PURE__ */ u(Ia, { style: { width: `${a}%` } }), /* @__PURE__ */ u("span", { className: U("min-w-0.5 flex-1", e.outcome === "completed" ? "bg-foreground" : "bg-danger") })]
3524
3535
  }),
3525
3536
  r === null ? /* @__PURE__ */ u("p", {
3526
3537
  className: "mt-2.5 text-xs text-muted-foreground",
@@ -3552,11 +3563,11 @@ function za({ call: e, blocker: t, onShowLogs: n }) {
3552
3563
  }),
3553
3564
  /* @__PURE__ */ u($, {
3554
3565
  label: "Kind",
3555
- value: La[e.kind]
3566
+ value: Ra[e.kind]
3556
3567
  }),
3557
3568
  /* @__PURE__ */ u($, {
3558
3569
  label: "Outcome",
3559
- value: Ia[e.outcome],
3570
+ value: La[e.outcome],
3560
3571
  danger: e.outcome !== "completed"
3561
3572
  }),
3562
3573
  /* @__PURE__ */ u($, {
@@ -3586,12 +3597,12 @@ function za({ call: e, blocker: t, onShowLogs: n }) {
3586
3597
  })
3587
3598
  ]
3588
3599
  }),
3589
- /* @__PURE__ */ u(Ba, { onShowLogs: n })
3600
+ /* @__PURE__ */ u(Va, { onShowLogs: n })
3590
3601
  ]
3591
3602
  });
3592
3603
  }
3593
- function Ba({ onShowLogs: e }) {
3594
- let t = si();
3604
+ function Va({ onShowLogs: e }) {
3605
+ let t = ci();
3595
3606
  function n() {
3596
3607
  t.close(), e();
3597
3608
  }
@@ -3603,7 +3614,7 @@ function Ba({ onShowLogs: e }) {
3603
3614
  children: ["View logs", /* @__PURE__ */ u(y, { "aria-hidden": !0 })]
3604
3615
  });
3605
3616
  }
3606
- function Va({ label: e, ms: t }) {
3617
+ function Ha({ label: e, ms: t }) {
3607
3618
  let [n, r] = dt(t ?? 0);
3608
3619
  return /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("div", {
3609
3620
  className: "text-xs text-muted-foreground",
@@ -3616,7 +3627,7 @@ function Va({ label: e, ms: t }) {
3616
3627
  })] })
3617
3628
  })] });
3618
3629
  }
3619
- function Ha({ state: e }) {
3630
+ function Ua({ state: e }) {
3620
3631
  let t = e === "warm";
3621
3632
  return /* @__PURE__ */ d("span", {
3622
3633
  className: U("inline-flex items-center gap-1.5 rounded-full border px-2 py-0.5 text-[11px] font-medium tracking-wide uppercase", t ? "border-success/25 bg-success/15 text-success" : "border-warning/30 bg-warning/15 text-warning"),
@@ -3638,7 +3649,7 @@ function $({ label: e, value: t, mono: n, danger: r }) {
3638
3649
  }
3639
3650
  //#endregion
3640
3651
  //#region src/components/instance/requestsCard.tsx
3641
- var Ua = .9, Wa = [
3652
+ var Wa = .9, Ga = [
3642
3653
  1,
3643
3654
  2,
3644
3655
  5,
@@ -3658,7 +3669,7 @@ var Ua = .9, Wa = [
3658
3669
  9e5,
3659
3670
  36e5,
3660
3671
  216e5
3661
- ], Ga = [
3672
+ ], Ka = [
3662
3673
  {
3663
3674
  label: "ms",
3664
3675
  ms: 1,
@@ -3674,24 +3685,24 @@ var Ua = .9, Wa = [
3674
3685
  ms: 6e4,
3675
3686
  below: Infinity
3676
3687
  }
3677
- ], Ka = "grid grid-cols-[52px_minmax(0,150px)_1fr_52px_70px_70px] items-center gap-4.5", qa = {
3688
+ ], qa = "grid grid-cols-[52px_minmax(0,150px)_1fr_52px_70px_70px] items-center gap-4.5", Ja = {
3678
3689
  completed: "ok",
3679
3690
  failed: "failed",
3680
3691
  rejected: "rejected",
3681
3692
  rerouted: "rerouted",
3682
3693
  interrupted: "interrupted"
3683
- }, Ja = {
3694
+ }, Ya = {
3684
3695
  method: "rpc",
3685
3696
  websocket: "ws"
3686
3697
  };
3687
- function Ya({ requests: e, failed: t, timeWindow: n, onShowLogs: r }) {
3688
- let [i, a] = o(null), s = si(), c = e && rn(e), f = c && nn(c, n), p = f && (i !== null && i < f.length ? i : Xa(f)), m = c && p !== null ? Za(c, n, p) : null, h = m?.slice(-40);
3698
+ function Xa({ requests: e, failed: t, timeWindow: n, onShowLogs: r }) {
3699
+ let [i, a] = o(null), s = ci(), c = e && an(e), f = c && rn(c, n), p = f && (i !== null && i < f.length ? i : Za(f)), m = c && p !== null ? Qa(c, n, p) : null, h = m?.slice(-40);
3689
3700
  function g(e, t) {
3690
3701
  if (s.openKey === e.eventId) return s.close();
3691
- let n = c ? lo(e, c) : void 0;
3702
+ let n = c ? uo(e, c) : void 0;
3692
3703
  s.show({
3693
3704
  key: e.eventId,
3694
- content: /* @__PURE__ */ u(Ra, {
3705
+ content: /* @__PURE__ */ u(za, {
3695
3706
  call: e,
3696
3707
  blocker: n,
3697
3708
  onShowLogs: () => r(e.requestId)
@@ -3700,45 +3711,45 @@ function Ya({ requests: e, failed: t, timeWindow: n, onShowLogs: r }) {
3700
3711
  }
3701
3712
  return /* @__PURE__ */ u(K, {
3702
3713
  title: "Requests",
3703
- aside: /* @__PURE__ */ u(Qa, {}),
3714
+ aside: /* @__PURE__ */ u($a, {}),
3704
3715
  busy: !f && !t,
3705
3716
  className: "pb-3.5",
3706
3717
  children: t ? /* @__PURE__ */ u("p", {
3707
3718
  className: "py-4 text-[13px] text-muted-foreground",
3708
3719
  children: "Couldn't reach the observer API."
3709
- }) : f && p !== null && m && h ? /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u($a, {
3720
+ }) : f && p !== null && m && h ? /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(eo, {
3710
3721
  counts: f,
3711
3722
  selected: p,
3712
3723
  onSelect: a,
3713
3724
  timeWindow: n
3714
- }), /* @__PURE__ */ u(eo, {
3725
+ }), /* @__PURE__ */ u(to, {
3715
3726
  calls: h,
3716
3727
  total: m.length,
3717
3728
  inspectedId: s.openKey,
3718
3729
  onInspect: g
3719
- })] }) : /* @__PURE__ */ u(mo, {})
3730
+ })] }) : /* @__PURE__ */ u(ho, {})
3720
3731
  });
3721
3732
  }
3722
- function Xa(e) {
3733
+ function Za(e) {
3723
3734
  let t = [...e].reverse().findIndex((e) => e > 0);
3724
3735
  return e.length - 1 - Math.max(t, 0);
3725
3736
  }
3726
- function Za(e, t, n) {
3737
+ function Qa(e, t, n) {
3727
3738
  return e.filter((e) => Et(t, e.startedAtMs) === n).sort((e, t) => e.startedAtMs - t.startedAtMs);
3728
3739
  }
3729
- function Qa() {
3740
+ function $a() {
3730
3741
  return /* @__PURE__ */ d("div", {
3731
3742
  className: "flex gap-4.5 text-xs text-muted-foreground",
3732
3743
  children: [/* @__PURE__ */ d("span", {
3733
3744
  className: "flex items-center gap-1.75",
3734
- children: [/* @__PURE__ */ u(Fa, { className: "h-2 w-4 rounded-xs" }), "Queue wait"]
3745
+ children: [/* @__PURE__ */ u(Ia, { className: "h-2 w-4 rounded-xs" }), "Queue wait"]
3735
3746
  }), /* @__PURE__ */ d("span", {
3736
3747
  className: "flex items-center gap-1.75",
3737
3748
  children: [/* @__PURE__ */ u("span", { className: "h-2 w-4 rounded-xs bg-foreground" }), "Running"]
3738
3749
  })]
3739
3750
  });
3740
3751
  }
3741
- function $a({ counts: e, selected: t, onSelect: n, timeWindow: r }) {
3752
+ function eo({ counts: e, selected: t, onSelect: n, timeWindow: r }) {
3742
3753
  let i = (e) => r.fromMs + e * r.stepMs, a = Math.min(i(t + 1), r.toMs), o = r.stepMs < 6e4 ? rt : T;
3743
3754
  return /* @__PURE__ */ d("div", {
3744
3755
  className: "mt-3.5 grid items-end gap-x-6 gap-y-3 border-b pt-3 pb-3.5 md:grid-cols-[282px_1fr]",
@@ -3753,7 +3764,7 @@ function $a({ counts: e, selected: t, onSelect: n, timeWindow: r }) {
3753
3764
  " – ",
3754
3765
  o(a)
3755
3766
  ]
3756
- }), /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u(Na, {
3767
+ }), /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u(Pa, {
3757
3768
  values: e,
3758
3769
  highlighted: t,
3759
3770
  onSelect: n,
@@ -3767,15 +3778,15 @@ function $a({ counts: e, selected: t, onSelect: n, timeWindow: r }) {
3767
3778
  })] })]
3768
3779
  });
3769
3780
  }
3770
- function eo({ calls: e, total: t, inspectedId: n, onInspect: r }) {
3781
+ function to({ calls: e, total: t, inspectedId: n, onInspect: r }) {
3771
3782
  if (!e.length) return /* @__PURE__ */ u("p", {
3772
3783
  className: "py-6 text-[13px] text-muted-foreground",
3773
3784
  children: "No requests in this slice."
3774
3785
  });
3775
- let i = e[0].startedAtMs, a = no(to(e)), o = ro(e);
3786
+ let i = e[0].startedAtMs, a = ro(no(e)), o = io(e);
3776
3787
  return /* @__PURE__ */ d(l, { children: [
3777
- /* @__PURE__ */ u(io, { scale: a }),
3778
- /* @__PURE__ */ u("ol", { children: o.map((t) => /* @__PURE__ */ u(ao, {
3788
+ /* @__PURE__ */ u(ao, { scale: a }),
3789
+ /* @__PURE__ */ u("ol", { children: o.map((t) => /* @__PURE__ */ u(oo, {
3779
3790
  row: t,
3780
3791
  calls: e,
3781
3792
  origin: i,
@@ -3783,24 +3794,24 @@ function eo({ calls: e, total: t, inspectedId: n, onInspect: r }) {
3783
3794
  inspectedId: n,
3784
3795
  onInspect: r
3785
3796
  }, t.key)) }),
3786
- /* @__PURE__ */ u(po, {
3797
+ /* @__PURE__ */ u(mo, {
3787
3798
  shown: e.length,
3788
3799
  total: t
3789
3800
  })
3790
3801
  ] });
3791
3802
  }
3792
- function to(e) {
3803
+ function no(e) {
3793
3804
  return Math.max(...e.map((e) => e.startedAtMs + e.durationMs)) - e[0].startedAtMs;
3794
3805
  }
3795
- function no(e) {
3796
- let t = e / Ua, n = Wa.find((e) => t / e <= 6) ?? Wa.at(-1), r = Math.max(n, Math.ceil(t / n) * n);
3806
+ function ro(e) {
3807
+ let t = e / Wa, n = Ga.find((e) => t / e <= 6) ?? Ga.at(-1), r = Math.max(n, Math.ceil(t / n) * n);
3797
3808
  return {
3798
3809
  spanMs: r,
3799
3810
  ticks: Array.from({ length: r / n + 1 }, (e, t) => t * n),
3800
- unit: Ga.find((e) => r < e.below) ?? Ga.at(-1)
3811
+ unit: Ka.find((e) => r < e.below) ?? Ka.at(-1)
3801
3812
  };
3802
3813
  }
3803
- function ro(e) {
3814
+ function io(e) {
3804
3815
  let t = /* @__PURE__ */ new Map();
3805
3816
  for (let n of e) {
3806
3817
  let e = `${n.kind}:${n.operation}`, r = t.get(e) ?? {
@@ -3813,10 +3824,10 @@ function ro(e) {
3813
3824
  }
3814
3825
  return [...t.values()].sort((e, t) => t.calls.length - e.calls.length || e.calls[0].startedAtMs - t.calls[0].startedAtMs);
3815
3826
  }
3816
- function io({ scale: { spanMs: e, ticks: t, unit: n } }) {
3827
+ function ao({ scale: { spanMs: e, ticks: t, unit: n } }) {
3817
3828
  return /* @__PURE__ */ d("div", {
3818
3829
  "aria-hidden": !0,
3819
- className: `${Ka} h-7.5 border-b text-xs text-muted-foreground`,
3830
+ className: `${qa} h-7.5 border-b text-xs text-muted-foreground`,
3820
3831
  children: [
3821
3832
  /* @__PURE__ */ u("span", { children: "Kind" }),
3822
3833
  /* @__PURE__ */ u("span", { children: "Method" }),
@@ -3843,18 +3854,18 @@ function io({ scale: { spanMs: e, ticks: t, unit: n } }) {
3843
3854
  ]
3844
3855
  });
3845
3856
  }
3846
- function ao({ row: e, calls: t, origin: n, scale: r, inspectedId: i, onInspect: a }) {
3847
- let o = e.calls.some(oo), s = H(e.calls, B) ?? 0, c = H(e.calls, V) ?? 0;
3857
+ function oo({ row: e, calls: t, origin: n, scale: r, inspectedId: i, onInspect: a }) {
3858
+ let o = e.calls.some(so), s = H(e.calls, B) ?? 0, c = H(e.calls, V) ?? 0;
3848
3859
  return /* @__PURE__ */ d("li", {
3849
- className: `${Ka} h-10 border-b border-border/50 text-xs tabular-nums last:border-b-0`,
3860
+ className: `${qa} h-10 border-b border-border/50 text-xs tabular-nums last:border-b-0`,
3850
3861
  children: [
3851
- /* @__PURE__ */ u(so, { kind: e.kind }),
3862
+ /* @__PURE__ */ u(co, { kind: e.kind }),
3852
3863
  /* @__PURE__ */ u("span", {
3853
3864
  translate: "no",
3854
3865
  className: U("truncate text-[13px]", o ? "text-danger" : "text-foreground/90"),
3855
3866
  children: e.operation
3856
3867
  }),
3857
- /* @__PURE__ */ u(co, {
3868
+ /* @__PURE__ */ u(lo, {
3858
3869
  row: e,
3859
3870
  calls: t,
3860
3871
  origin: n,
@@ -3877,25 +3888,25 @@ function ao({ row: e, calls: t, origin: n, scale: r, inspectedId: i, onInspect:
3877
3888
  ]
3878
3889
  });
3879
3890
  }
3880
- function oo(e) {
3891
+ function so(e) {
3881
3892
  return e.outcome !== "completed";
3882
3893
  }
3883
- function so({ kind: e }) {
3894
+ function co({ kind: e }) {
3884
3895
  return /* @__PURE__ */ u("span", {
3885
3896
  className: U("rounded-sm border py-0.5 text-center text-[10px] font-medium tracking-wide uppercase", e === "websocket" ? "border-chart-2/35 text-chart-2" : "text-foreground"),
3886
- children: Ja[e]
3897
+ children: Ya[e]
3887
3898
  });
3888
3899
  }
3889
- function co({ row: e, calls: t, origin: n, scale: { spanMs: r, ticks: i }, inspectedId: a, onInspect: o }) {
3900
+ function lo({ row: e, calls: t, origin: n, scale: { spanMs: r, ticks: i }, inspectedId: a, onInspect: o }) {
3890
3901
  let s = (e) => `${e / r * 100}%`;
3891
3902
  return /* @__PURE__ */ u("div", {
3892
3903
  role: "group",
3893
3904
  "aria-label": `${e.operation} calls`,
3894
3905
  className: "relative h-full bg-[linear-gradient(90deg,color-mix(in_oklab,var(--border)_55%,transparent)_1px,transparent_1px)]",
3895
3906
  style: { backgroundSize: `${100 / (i.length - 1)}% 100%` },
3896
- children: e.calls.map((e) => /* @__PURE__ */ u(uo, {
3907
+ children: e.calls.map((e) => /* @__PURE__ */ u(fo, {
3897
3908
  call: e,
3898
- blocker: lo(e, t),
3909
+ blocker: uo(e, t),
3899
3910
  selected: e.eventId === a,
3900
3911
  onInspect: o,
3901
3912
  left: s(e.startedAtMs - n),
@@ -3903,12 +3914,12 @@ function co({ row: e, calls: t, origin: n, scale: { spanMs: r, ticks: i }, inspe
3903
3914
  }, e.eventId))
3904
3915
  });
3905
3916
  }
3906
- function lo(e, t) {
3917
+ function uo(e, t) {
3907
3918
  if (e.queueWaitMs) return t.find((t) => t.eventId !== e.eventId && t.startedAtMs + (t.queueWaitMs ?? 0) <= e.startedAtMs && e.startedAtMs < t.startedAtMs + t.durationMs);
3908
3919
  }
3909
- function uo({ call: e, blocker: t, selected: n, onInspect: r, left: i, width: a }) {
3910
- let o = e.durationMs > 0 ? (e.queueWaitMs ?? 0) / e.durationMs : 0, s = oo(e), c = V(e) ?? e.durationMs, l = `${e.operation}, ${e.hostState}${e.queueWaitMs ? `, waited ${D(e.queueWaitMs)}` : ""}, ran ${D(c)}${s ? `, ${qa[e.outcome]}` : ""}`;
3911
- return /* @__PURE__ */ d(nr, { children: [/* @__PURE__ */ u(rr, {
3920
+ function fo({ call: e, blocker: t, selected: n, onInspect: r, left: i, width: a }) {
3921
+ let o = e.durationMs > 0 ? (e.queueWaitMs ?? 0) / e.durationMs : 0, s = so(e), c = V(e) ?? e.durationMs, l = `${e.operation}, ${e.hostState}${e.queueWaitMs ? `, waited ${D(e.queueWaitMs)}` : ""}, ran ${D(c)}${s ? `, ${Ja[e.outcome]}` : ""}`;
3922
+ return /* @__PURE__ */ d(rr, { children: [/* @__PURE__ */ u(ir, {
3912
3923
  asChild: !0,
3913
3924
  children: /* @__PURE__ */ d("button", {
3914
3925
  type: "button",
@@ -3921,26 +3932,26 @@ function uo({ call: e, blocker: t, selected: n, onInspect: r, left: i, width: a
3921
3932
  width: a
3922
3933
  },
3923
3934
  children: [
3924
- o > 0 && /* @__PURE__ */ u(Fa, {
3935
+ o > 0 && /* @__PURE__ */ u(Ia, {
3925
3936
  className: "h-full rounded-l-[2px]",
3926
3937
  style: { width: `${o * 100}%` }
3927
3938
  }),
3928
3939
  /* @__PURE__ */ u("span", { className: U("h-full min-w-0.75 flex-1 rounded-[2px] outline-offset-2 group-hover:outline-2 group-hover:outline-foreground group-focus-visible:outline-2 group-focus-visible:outline-foreground", o > 0 && "rounded-l-none", n && "outline-2 outline-foreground", s ? "bg-danger" : "bg-foreground") }),
3929
3940
  s && /* @__PURE__ */ u("span", {
3930
3941
  className: "absolute top-1/2 left-full ml-2 -translate-y-1/2 text-[11px] whitespace-nowrap text-danger",
3931
- children: qa[e.outcome]
3942
+ children: Ja[e.outcome]
3932
3943
  })
3933
3944
  ]
3934
3945
  })
3935
- }), /* @__PURE__ */ u(ir, {
3946
+ }), /* @__PURE__ */ u(ar, {
3936
3947
  className: "tabular-nums",
3937
- children: /* @__PURE__ */ u(fo, {
3948
+ children: /* @__PURE__ */ u(po, {
3938
3949
  call: e,
3939
3950
  blocker: t
3940
3951
  })
3941
3952
  })] });
3942
3953
  }
3943
- function fo({ call: e, blocker: t }) {
3954
+ function po({ call: e, blocker: t }) {
3944
3955
  let n = V(e) ?? e.durationMs;
3945
3956
  return /* @__PURE__ */ d("span", { children: [
3946
3957
  /* @__PURE__ */ u("b", {
@@ -3974,10 +3985,10 @@ function fo({ call: e, blocker: t }) {
3974
3985
  className: "font-medium",
3975
3986
  children: D(n)
3976
3987
  })] }),
3977
- oo(e) && ` · ${qa[e.outcome]}`
3988
+ so(e) && ` · ${Ja[e.outcome]}`
3978
3989
  ] });
3979
3990
  }
3980
- function po({ shown: e, total: t }) {
3991
+ function mo({ shown: e, total: t }) {
3981
3992
  return e >= t ? null : /* @__PURE__ */ d("p", {
3982
3993
  className: "border-t pt-3 text-xs text-muted-foreground tabular-nums",
3983
3994
  children: [
@@ -3988,11 +3999,11 @@ function po({ shown: e, total: t }) {
3988
3999
  ]
3989
4000
  });
3990
4001
  }
3991
- function mo() {
4002
+ function ho() {
3992
4003
  return /* @__PURE__ */ d("div", {
3993
4004
  className: "mt-3.5 pb-1",
3994
4005
  children: [/* @__PURE__ */ u(G, { className: "h-10 w-full rounded-sm" }), Array.from({ length: 5 }, (e, t) => /* @__PURE__ */ d("div", {
3995
- className: `${Ka} h-10`,
4006
+ className: `${qa} h-10`,
3996
4007
  children: [
3997
4008
  /* @__PURE__ */ u(G, { className: "h-4" }),
3998
4009
  /* @__PURE__ */ u(G, { className: "h-3.5 w-28" }),
@@ -4012,10 +4023,10 @@ function mo() {
4012
4023
  }
4013
4024
  //#endregion
4014
4025
  //#region src/components/instance/instancePage.tsx
4015
- function ho() {
4016
- let { actorName: e = "", actorId: t = "" } = _(), { actorTypes: n, isError: r, sessions: i, isSocketsError: a } = R(), s = L(), { requests: c, isError: l } = Gt(e, t), { residency: f, isError: p } = Xt(e, s), m = n?.actors.find((t) => t.actorName === e)?.instances.find((e) => e.actorId === t) ?? null, h = i?.filter((n) => n.actorName === e && n.actorId === t) ?? null, g = f && (cr(f).get(t) ?? []), [v, y] = o(null);
4026
+ function go() {
4027
+ let { actorName: e = "", actorId: t = "" } = _(), { actorTypes: n, isError: r, sessions: i, isSocketsError: a } = R(), s = L(), { requests: c, isError: l } = Gt(e, t), { residency: f, isError: p } = Zt(e, s, t), m = n?.actors.find((t) => t.actorName === e)?.instances.find((e) => e.actorId === t) ?? null, h = i?.filter((n) => n.actorName === e && n.actorId === t) ?? null, g = f && (lr(f).get(t) ?? []), [v, y] = o(null);
4017
4028
  function ee(e) {
4018
- y(e), document.getElementById(xa)?.scrollIntoView({
4029
+ y(e), document.getElementById(Sa)?.scrollIntoView({
4019
4030
  behavior: "smooth",
4020
4031
  block: "start"
4021
4032
  });
@@ -4023,7 +4034,7 @@ function ho() {
4023
4034
  return /* @__PURE__ */ d("section", {
4024
4035
  "aria-labelledby": "instance-heading",
4025
4036
  className: "flex flex-col gap-5",
4026
- children: [/* @__PURE__ */ u(go, {
4037
+ children: [/* @__PURE__ */ u(_o, {
4027
4038
  actorName: e,
4028
4039
  actorId: t,
4029
4040
  instance: m,
@@ -4045,13 +4056,13 @@ function ho() {
4045
4056
  /* @__PURE__ */ d("div", {
4046
4057
  className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-3",
4047
4058
  children: [
4048
- /* @__PURE__ */ u(ci, {
4059
+ /* @__PURE__ */ u(li, {
4049
4060
  requests: c,
4050
4061
  failed: l,
4051
4062
  timeWindow: s,
4052
4063
  color: "var(--foreground)"
4053
4064
  }),
4054
- /* @__PURE__ */ u(wr, {
4065
+ /* @__PURE__ */ u(Tr, {
4055
4066
  label: "Avg Queue Wait",
4056
4067
  pick: B,
4057
4068
  color: "var(--chart-1)",
@@ -4060,7 +4071,7 @@ function ho() {
4060
4071
  failed: l,
4061
4072
  timeWindow: s
4062
4073
  }),
4063
- /* @__PURE__ */ u(wr, {
4074
+ /* @__PURE__ */ u(Tr, {
4064
4075
  label: "Avg Request Time",
4065
4076
  pick: V,
4066
4077
  color: "var(--foreground)",
@@ -4071,13 +4082,13 @@ function ho() {
4071
4082
  })
4072
4083
  ]
4073
4084
  }),
4074
- /* @__PURE__ */ u(Ya, {
4085
+ /* @__PURE__ */ u(Xa, {
4075
4086
  requests: c,
4076
4087
  failed: l,
4077
4088
  timeWindow: s,
4078
4089
  onShowLogs: ee
4079
4090
  }),
4080
- /* @__PURE__ */ u(di, {
4091
+ /* @__PURE__ */ u(fi, {
4081
4092
  instance: m,
4082
4093
  sessions: h,
4083
4094
  livePeriods: g,
@@ -4085,7 +4096,7 @@ function ho() {
4085
4096
  failed: r || a || p,
4086
4097
  timeWindow: s
4087
4098
  }),
4088
- /* @__PURE__ */ u(Ea, {
4099
+ /* @__PURE__ */ u(Da, {
4089
4100
  actorName: e,
4090
4101
  actorId: t,
4091
4102
  requests: c,
@@ -4097,9 +4108,9 @@ function ho() {
4097
4108
  })]
4098
4109
  });
4099
4110
  }
4100
- function go({ actorName: e, actorId: t, instance: n, livePeriods: r, timeWindow: i, loading: a }) {
4111
+ function _o({ actorName: e, actorId: t, instance: n, livePeriods: r, timeWindow: i, loading: a }) {
4101
4112
  let o = n?.status === "live";
4102
- return /* @__PURE__ */ u(En, {
4113
+ return /* @__PURE__ */ u(Dn, {
4103
4114
  titleId: "instance-heading",
4104
4115
  title: t,
4105
4116
  back: {
@@ -4107,46 +4118,46 @@ function go({ actorName: e, actorId: t, instance: n, livePeriods: r, timeWindow:
4107
4118
  relative: "path",
4108
4119
  label: e
4109
4120
  },
4110
- badge: n && /* @__PURE__ */ u(_o, { live: o }),
4121
+ badge: n && /* @__PURE__ */ u(vo, { live: o }),
4111
4122
  meta: a ? /* @__PURE__ */ u(G, { className: "h-3.5 w-64" }) : /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("span", {
4112
4123
  translate: "no",
4113
4124
  children: e
4114
4125
  }), n && /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("span", {
4115
4126
  "aria-hidden": !0,
4116
4127
  children: "·"
4117
- }), /* @__PURE__ */ u("span", { children: vo(n, r, i) })] })] }),
4118
- aside: /* @__PURE__ */ u(wn, {})
4128
+ }), /* @__PURE__ */ u("span", { children: yo(n, r, i) })] })] }),
4129
+ aside: /* @__PURE__ */ u(Tn, {})
4119
4130
  });
4120
4131
  }
4121
- function _o({ live: e }) {
4122
- return /* @__PURE__ */ u(On, {
4132
+ function vo({ live: e }) {
4133
+ return /* @__PURE__ */ u(kn, {
4123
4134
  live: e,
4124
4135
  className: e ? "rounded-full border border-success/25 bg-success/15 py-0.75 pr-2.25 pl-2 text-xs font-medium" : "rounded-full border px-2.25 py-0.75 text-xs font-medium",
4125
4136
  children: e ? "Live" : "Dormant"
4126
4137
  });
4127
4138
  }
4128
- function vo(e, t, { fromMs: n, toMs: r }) {
4139
+ function yo(e, t, { fromMs: n, toMs: r }) {
4129
4140
  if (e.status !== "live") return e.lastActiveAtMs ? `Last active ${ft(e.lastActiveAtMs, r)}` : "Dormant";
4130
4141
  let i = t?.at(-1)?.fromMs;
4131
4142
  return i === void 0 ? "Live" : i <= n ? "Live for the whole window" : `Live since ${T(i)} (${k(r - i)})`;
4132
4143
  }
4133
4144
  //#endregion
4134
4145
  //#region src/routes.tsx
4135
- function yo() {
4136
- return /* @__PURE__ */ d(oi, { children: [/* @__PURE__ */ u(xo, {}), /* @__PURE__ */ d(h, { children: [
4146
+ function bo() {
4147
+ return /* @__PURE__ */ d(si, { children: [/* @__PURE__ */ u(So, {}), /* @__PURE__ */ d(h, { children: [
4137
4148
  /* @__PURE__ */ u(m, {
4138
4149
  index: !0,
4139
- element: /* @__PURE__ */ u(Xr, {})
4150
+ element: /* @__PURE__ */ u(Zr, {})
4140
4151
  }),
4141
4152
  /* @__PURE__ */ u(m, {
4142
4153
  path: "actors/:actorName",
4143
- element: /* @__PURE__ */ u(Tr, {})
4154
+ element: /* @__PURE__ */ u(Er, {})
4144
4155
  }),
4145
4156
  /* @__PURE__ */ u(m, {
4146
4157
  path: "actors/:actorName/instances/:actorId",
4147
4158
  element: /* @__PURE__ */ u(It, {
4148
4159
  initialRange: vt,
4149
- children: /* @__PURE__ */ u(ho, {})
4160
+ children: /* @__PURE__ */ u(go, {})
4150
4161
  })
4151
4162
  }),
4152
4163
  /* @__PURE__ */ u(m, {
@@ -4158,20 +4169,20 @@ function yo() {
4158
4169
  })
4159
4170
  ] })] });
4160
4171
  }
4161
- var bo = [
4172
+ var xo = [
4162
4173
  "actors",
4163
4174
  "websockets",
4164
4175
  "requests"
4165
4176
  ];
4166
- function xo() {
4177
+ function So() {
4167
4178
  let { pathname: e } = g(), { mutate: t } = c(), n = a(!0);
4168
4179
  return r(() => {
4169
4180
  if (n.current) {
4170
4181
  n.current = !1;
4171
4182
  return;
4172
4183
  }
4173
- t((e) => Array.isArray(e) && bo.includes(e[0]));
4184
+ t((e) => Array.isArray(e) && xo.includes(e[0]));
4174
4185
  }, [e, t]), null;
4175
4186
  }
4176
4187
  //#endregion
4177
- export { Tr as ActorTypePage, Ut as DataProvider, yo as ObserverRoutes, Xr as Overview, It as TimeRangeProvider };
4188
+ export { Er as ActorTypePage, Ut as DataProvider, bo as ObserverRoutes, Zr as Overview, It as TimeRangeProvider };