@agg-market/ui 3.0.1 → 4.0.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.
Files changed (41) hide show
  1. package/dist/chart.js +18 -5
  2. package/dist/chart.mjs +2 -2
  3. package/dist/{chunk-KUWTY4EM.mjs → chunk-3W7NBJLU.mjs} +1 -1
  4. package/dist/{chunk-MVJNQN7P.mjs → chunk-GNSPZ53C.mjs} +86 -85
  5. package/dist/{chunk-422MCIXV.mjs → chunk-HOXTJ742.mjs} +15 -11
  6. package/dist/{chunk-FF3QYU26.mjs → chunk-JNH64AKR.mjs} +31 -24
  7. package/dist/{chunk-RKCVOKE3.mjs → chunk-LA3FBBSJ.mjs} +2 -2
  8. package/dist/{chunk-CTVMT3VL.mjs → chunk-LCZKSITC.mjs} +2 -2
  9. package/dist/chunk-M4RJHRFT.mjs +445 -0
  10. package/dist/{chunk-RGHA4PZH.mjs → chunk-MBHTXNHX.mjs} +4 -4
  11. package/dist/{chunk-KSCSYCEF.mjs → chunk-MJHKBCXQ.mjs} +1 -1
  12. package/dist/{chunk-KRQFVMJE.mjs → chunk-OH56VUYK.mjs} +5 -19
  13. package/dist/{chunk-BN5VVHNV.mjs → chunk-OJVTGNIF.mjs} +17 -4
  14. package/dist/{chunk-ZJJA4I3I.mjs → chunk-P2PJBO5C.mjs} +1 -1
  15. package/dist/{chunk-GHB3GOCW.mjs → chunk-QM7CGMFG.mjs} +5 -21
  16. package/dist/event-list-item-details.js +213 -241
  17. package/dist/event-list-item-details.mjs +6 -6
  18. package/dist/event-list-item.js +156 -208
  19. package/dist/event-list-item.mjs +3 -3
  20. package/dist/event-list.js +159 -223
  21. package/dist/event-list.mjs +4 -4
  22. package/dist/event-market-page.js +476 -574
  23. package/dist/event-market-page.mjs +10 -11
  24. package/dist/home-page.js +159 -223
  25. package/dist/home-page.mjs +5 -5
  26. package/dist/index.js +296 -333
  27. package/dist/index.mjs +13 -13
  28. package/dist/market-details.js +323 -415
  29. package/dist/market-details.mjs +6 -7
  30. package/dist/place-order.js +151 -189
  31. package/dist/place-order.mjs +2 -2
  32. package/dist/settlement.js +151 -189
  33. package/dist/settlement.mjs +2 -2
  34. package/dist/skeleton.js +151 -189
  35. package/dist/skeleton.mjs +1 -1
  36. package/dist/styles.css +1 -1
  37. package/dist/switch-button.js +2 -2
  38. package/dist/switch-button.mjs +1 -1
  39. package/dist/tailwind.css +1 -1
  40. package/package.json +2 -2
  41. package/dist/chunk-V52WSZHQ.mjs +0 -482
@@ -63,7 +63,7 @@ __export(event_market_exports, {
63
63
  });
64
64
  module.exports = __toCommonJS(event_market_exports);
65
65
  var import_react9 = require("react");
66
- var import_hooks21 = require("@agg-market/hooks");
66
+ var import_hooks20 = require("@agg-market/hooks");
67
67
  var import_dayjs5 = __toESM(require("dayjs"));
68
68
 
69
69
  // src/events/item-details/index.tsx
@@ -328,10 +328,10 @@ var SwitchButton = ({
328
328
  return null;
329
329
  }
330
330
  const handleKeyDown = (event, optionIndex) => {
331
- if (event.key !== "ArrowLeft" && event.key !== "ArrowRight") {
331
+ if ((event == null ? void 0 : event.key) !== "ArrowLeft" && (event == null ? void 0 : event.key) !== "ArrowRight") {
332
332
  return;
333
333
  }
334
- event.preventDefault();
334
+ event == null ? void 0 : event.preventDefault();
335
335
  const nextOptionIndex = resolveNextEnabledIndex(
336
336
  options,
337
337
  optionIndex,
@@ -448,8 +448,18 @@ var normalizeSeries = (series) => {
448
448
  var defaultValueFormatter = (value) => {
449
449
  return `${Math.round(value)}%`;
450
450
  };
451
- var defaultTimeFormatter = (timestamp) => {
452
- return import_dayjs.default.unix(timestamp).format("MMM D");
451
+ var resolveTimeFormatter = (windowSeconds) => {
452
+ return (timestamp) => {
453
+ if (!Number.isFinite(timestamp))
454
+ return "";
455
+ if (windowSeconds <= 48 * 60 * 60) {
456
+ return import_dayjs.default.unix(timestamp).format("HH:mm");
457
+ }
458
+ if (windowSeconds <= 14 * 24 * 60 * 60) {
459
+ return import_dayjs.default.unix(timestamp).format("MMM D HH:mm");
460
+ }
461
+ return import_dayjs.default.unix(timestamp).format("MMM D");
462
+ };
453
463
  };
454
464
  var toLivelinePoints = (points) => {
455
465
  return points.map((point) => ({
@@ -572,6 +582,9 @@ var LineChart = ({
572
582
  const windowSeconds = (0, import_react2.useMemo)(() => {
573
583
  return resolveWindowSeconds(normalizedSeries);
574
584
  }, [normalizedSeries]);
585
+ const timeFormatter = (0, import_react2.useMemo)(() => {
586
+ return resolveTimeFormatter(windowSeconds);
587
+ }, [windowSeconds]);
575
588
  const seriesControls = showSeriesControls && normalizedSeries.length > 0 ? (_a = renderSeriesControls == null ? void 0 : renderSeriesControls({
576
589
  series: normalizedSeries,
577
590
  activeSeriesId,
@@ -610,7 +623,7 @@ var LineChart = ({
610
623
  pulse: false,
611
624
  window: windowSeconds,
612
625
  formatValue: defaultValueFormatter,
613
- formatTime: defaultTimeFormatter,
626
+ formatTime: timeFormatter,
614
627
  padding: {
615
628
  top: 12,
616
629
  right: 80,
@@ -687,6 +700,7 @@ var EventListItemSkeletonView = ({
687
700
  isStandalone = false
688
701
  }) => {
689
702
  const labels = (0, import_hooks7.useLabels)();
703
+ const outcomeTitleWidths = ["w-40", "w-[200px]"];
690
704
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
691
705
  Card,
692
706
  {
@@ -696,35 +710,23 @@ var EventListItemSkeletonView = ({
696
710
  "aria-busy": isStandalone || void 0,
697
711
  "aria-hidden": isStandalone ? void 0 : true,
698
712
  children: [
699
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex w-full items-start gap-3", children: [
700
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-10 w-10 rounded-agg-lg" }),
701
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-1 flex-col gap-2", children: [
702
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-5 w-[82%] rounded-agg-sm" }),
703
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-5 w-[68%] rounded-agg-sm" })
704
- ] })
713
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex h-14 w-full items-center gap-3 justify-stretch", children: [
714
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "size-10! rounded-agg-lg" }),
715
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-6 w-fit flex-1 rounded-agg-sm" })
705
716
  ] }),
706
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex flex-col gap-3", children: [0, 1].map((index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
707
- "div",
708
- {
709
- className: "grid w-full grid-cols-[minmax(0,1fr)_auto_auto] items-center gap-3",
710
- children: [
711
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
712
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-4 w-10 rounded-agg-sm" }),
713
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-9 w-[101px] rounded-agg-full" })
714
- ]
715
- },
716
- index
717
- )) }),
718
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center justify-between gap-2 text-agg-muted-foreground", children: [
719
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center gap-2", children: [
720
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-4 w-36 rounded-agg-sm" }),
717
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex flex-col gap-3", children: outcomeTitleWidths.map((outcomeTitleWidth, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex w-full items-center justify-between gap-3", children: [
718
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: cn("h-5 rounded-agg-sm", outcomeTitleWidth) }),
719
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-9 w-[100px] rounded-agg-full" })
720
+ ] }, index)) }),
721
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center justify-between gap-5 text-agg-muted-foreground", children: [
722
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
723
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-5 w-[100px] rounded-agg-sm" }),
721
724
  /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center gap-1", children: [
722
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "size-3 rounded-agg-full" }),
723
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "size-3 rounded-agg-full" }),
724
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "size-3 rounded-agg-full" })
725
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "size-[14px] rounded-agg-sm" }),
726
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "size-[14px] rounded-agg-sm" })
725
727
  ] })
726
728
  ] }),
727
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-4 w-20 rounded-agg-sm" })
729
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-5 w-[60px] rounded-agg-sm" })
728
730
  ] })
729
731
  ]
730
732
  }
@@ -744,13 +746,9 @@ var EventListSkeletonView = ({ className, ariaLabel }) => {
744
746
  "aria-label": ariaLabel != null ? ariaLabel : labels.eventList.loading("events"),
745
747
  "aria-busy": true,
746
748
  children: [
747
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("header", { className: "flex w-full flex-col items-start justify-between gap-2 md:flex-row md:flex-nowrap md:items-center md:gap-4", children: [
748
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-7 w-40 rounded-agg-sm" }),
749
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex max-w-full gap-2", children: [
750
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-10 w-20 rounded-agg-full" }),
751
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-10 w-20 rounded-agg-full" }),
752
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-10 w-24 rounded-agg-full" })
753
- ] })
749
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("header", { className: "flex w-full flex-col items-start justify-between gap-3 md:flex-row md:flex-nowrap md:items-center md:gap-5", children: [
750
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-7 w-[120px] rounded-agg-md" }),
751
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-8 w-full rounded-agg-md md:w-[400px]" })
754
752
  ] }),
755
753
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "grid grid-cols-1 gap-5 md:grid-cols-3", children: Array.from({ length: 3 }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
756
754
  EventListItemSkeletonView,
@@ -802,30 +800,26 @@ var EventListItemDetailsSkeletonView = ({
802
800
  "aria-label": ariaLabel != null ? ariaLabel : labels.eventItemDetails.loading,
803
801
  "aria-busy": true,
804
802
  children: [
805
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex w-full items-start gap-3 md:gap-4", children: [
806
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "size-10 rounded-agg-lg md:size-[60px]" }),
807
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex flex-1 flex-col gap-2", children: [
808
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-5 w-[82%] rounded-agg-sm md:h-7 md:w-[55%]" }),
809
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex gap-2 overflow-hidden", children: [
810
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-8 w-28 rounded-agg-full" }),
811
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-8 w-28 rounded-agg-full" }),
812
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-8 w-28 rounded-agg-full" })
813
- ] })
814
- ] })
803
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex h-14 w-full items-center gap-3 justify-stretch", children: [
804
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "size-10! rounded-agg-lg" }),
805
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-6 w-fit flex-1 rounded-agg-sm" })
815
806
  ] }),
816
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex flex-col gap-4", children: [
817
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-10 w-full rounded-agg-full md:w-[220px]" }),
818
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex gap-2 overflow-hidden", children: [
819
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-9 w-20 rounded-agg-full" }),
820
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-9 w-20 rounded-agg-full" }),
821
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-9 w-20 rounded-agg-full" }),
822
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-9 w-20 rounded-agg-full" })
807
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex w-full flex-col gap-4 md:gap-6", children: [
808
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex w-full flex-col gap-3 md:flex-row md:items-center md:justify-between", children: [
809
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex max-w-full gap-2 overflow-hidden", children: [
810
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-9 w-[100px] rounded-agg-full" }),
811
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-9 w-[100px] rounded-agg-full" }),
812
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-9 w-[100px] rounded-agg-full" })
813
+ ] }),
814
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-9 w-full max-w-[221px] rounded-agg-full md:w-[221px]" })
815
+ ] }),
816
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex w-full flex-col gap-3", children: [
817
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-[220px] w-full rounded-agg-xl md:h-[240px]" }),
818
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center justify-between", children: [
819
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-5 w-[59px] rounded-agg-sm" }),
820
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-5 w-40 rounded-agg-sm" })
821
+ ] })
823
822
  ] })
824
- ] }),
825
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "h-[300px] w-full rounded-agg-xl", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-full w-full rounded-agg-xl" }) }),
826
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center justify-between", children: [
827
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-5 w-24 rounded-agg-sm" }),
828
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-5 w-40 rounded-agg-sm" })
829
823
  ] })
830
824
  ]
831
825
  }
@@ -849,6 +843,77 @@ var orderBookRowLimitDefault = 4;
849
843
 
850
844
  // src/primitives/skeleton/views/market-details-skeleton-view.tsx
851
845
  var import_jsx_runtime10 = require("react/jsx-runtime");
846
+ var orderBookAskBarWidths = [
847
+ "w-[52px] md:w-[240px]",
848
+ "w-[48px] md:w-[200px]",
849
+ "w-[40px] md:w-[120px]",
850
+ "w-[36px] md:w-[60px]"
851
+ ];
852
+ var orderBookBidBarWidths = [
853
+ "w-[36px] md:w-[60px]",
854
+ "w-[40px] md:w-[120px]",
855
+ "w-[48px] md:w-[200px]",
856
+ "w-[52px] md:w-[240px]"
857
+ ];
858
+ var MarketDetailsHeaderSkeleton = () => {
859
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex flex-wrap items-center justify-between gap-3 px-4 py-3 md:px-5", children: [
860
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex min-w-0 items-center gap-3 md:min-w-52 md:gap-4", children: [
861
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "size-12 rounded-agg-lg md:size-[60px]" }),
862
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex min-w-0 flex-col gap-2", children: [
863
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-6 w-[132px] rounded-agg-sm" }),
864
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-4 w-[141px] rounded-agg-sm" })
865
+ ] })
866
+ ] }),
867
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-9 w-[60px] rounded-agg-md" }),
868
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex w-full gap-2 md:w-auto", children: [
869
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-9 w-full rounded-agg-full md:w-[135px]" }),
870
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-9 w-full rounded-agg-full md:w-[131px]" })
871
+ ] })
872
+ ] });
873
+ };
874
+ var MarketDetailsTabsSkeleton = () => {
875
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex h-14 items-end px-4 md:px-5", children: [
876
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex h-full flex-col items-end justify-end rounded-t-agg-lg", children: [
877
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "px-4 py-3", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-6 w-20 rounded-agg-sm" }) }),
878
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-[3px] w-full rounded-t-agg-sm" })
879
+ ] }),
880
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex h-full flex-col justify-center", children: [
881
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "px-4 py-3", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-6 w-12 rounded-agg-sm" }) }),
882
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "h-[3px] w-full" })
883
+ ] })
884
+ ] });
885
+ };
886
+ var MarketDetailsOrderBookRows = ({
887
+ side,
888
+ barWidths
889
+ }) => {
890
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex flex-col gap-2", children: barWidths.map((barWidthClassName, index) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex flex-col gap-2", children: [
891
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "grid grid-cols-[52px_1fr_1fr_52px] items-center gap-2 md:grid-cols-[88px_1fr_1fr_minmax(120px,220px)] md:gap-6", children: [
892
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex items-center gap-1 md:gap-3", children: [
893
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "size-4 rounded-agg-sm" }),
894
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-5 w-[60px] rounded-agg-sm" })
895
+ ] }),
896
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-5 rounded-agg-sm" }),
897
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-5 rounded-agg-sm" }),
898
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: cn("h-2 rounded-agg-full", barWidthClassName) }) })
899
+ ] }),
900
+ index < barWidths.length - 1 ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "h-px w-full bg-agg-separator" }) : null
901
+ ] }, `${side}-row-${index}`)) });
902
+ };
903
+ var MarketDetailsOderbookSkeleton = ({
904
+ className
905
+ }) => {
906
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: cn("flex flex-col gap-5", className), children: [
907
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex flex-col gap-2", children: [
908
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-4 w-10 rounded-agg-sm" }),
909
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(MarketDetailsOrderBookRows, { side: "ask", barWidths: orderBookAskBarWidths })
910
+ ] }),
911
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex flex-col gap-2", children: [
912
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-4 w-10 rounded-agg-sm" }),
913
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(MarketDetailsOrderBookRows, { side: "bid", barWidths: orderBookBidBarWidths })
914
+ ] })
915
+ ] });
916
+ };
852
917
  var MarketDetailsSkeletonView = ({
853
918
  className,
854
919
  ariaLabel,
@@ -863,60 +928,12 @@ var MarketDetailsSkeletonView = ({
863
928
  "aria-label": ariaLabel != null ? ariaLabel : labels.marketDetails.loading,
864
929
  "aria-busy": true,
865
930
  children: [
866
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex flex-col gap-3 p-4 md:px-5 md:py-4", children: [
867
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
868
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex min-w-0 items-center gap-3 md:gap-4", children: [
869
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "size-12 rounded-agg-lg md:size-[60px]" }),
870
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex min-w-0 flex-col gap-2", children: [
871
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-6 w-40 rounded-agg-sm" }),
872
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-4 w-28 rounded-agg-sm" })
873
- ] })
874
- ] }),
875
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-8 w-16 rounded-agg-sm" })
876
- ] }),
877
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex gap-2", children: [
878
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-10 flex-1 rounded-agg-full" }),
879
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-10 flex-1 rounded-agg-full" })
880
- ] })
881
- ] }),
931
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(MarketDetailsHeaderSkeleton, {}),
882
932
  isDetailed ? /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
883
933
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "h-px w-full bg-agg-separator" }),
884
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex h-14 items-end", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-full w-full rounded-none" }) }),
934
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(MarketDetailsTabsSkeleton, {}),
885
935
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "h-px w-full bg-agg-separator" }),
886
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex flex-col gap-4 p-5", children: [
887
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex flex-col gap-3", children: [
888
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-4 w-12 rounded-agg-sm" }),
889
- [0, 1, 2, 3].map((index) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
890
- "div",
891
- {
892
- className: "grid grid-cols-[52px_1fr_1fr_52px] items-center gap-2",
893
- children: [
894
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
895
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
896
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
897
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-2 rounded-agg-full" })
898
- ]
899
- },
900
- `ask-${index}`
901
- ))
902
- ] }),
903
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex flex-col gap-3", children: [
904
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-4 w-12 rounded-agg-sm" }),
905
- [0, 1, 2, 3].map((index) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
906
- "div",
907
- {
908
- className: "grid grid-cols-[52px_1fr_1fr_52px] items-center gap-2",
909
- children: [
910
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
911
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
912
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
913
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-2 rounded-agg-full" })
914
- ]
915
- },
916
- `bid-${index}`
917
- ))
918
- ] })
919
- ] })
936
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(MarketDetailsOderbookSkeleton, { className: "p-5" })
920
937
  ] }) : null
921
938
  ]
922
939
  }
@@ -927,65 +944,46 @@ MarketDetailsSkeletonView.displayName = "MarketDetailsSkeletonView";
927
944
  // src/primitives/skeleton/views/place-order-skeleton-view.tsx
928
945
  var import_jsx_runtime11 = require("react/jsx-runtime");
929
946
  var placeOrderCardClassName = "overflow-hidden rounded-agg-xl border border-agg-border bg-agg-secondary shadow-none hover:shadow-none";
947
+ var TabsSkeletonBar = () => {
948
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex w-full items-end border-b border-agg-border", children: [
949
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex flex-col rounded-t-agg-lg", children: [
950
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "px-5 py-2", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-6 w-10 rounded-agg-sm" }) }),
951
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-[3px] w-full rounded-t-agg-sm" })
952
+ ] }),
953
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex flex-col", children: [
954
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "px-5 py-2", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-6 w-10 rounded-agg-sm" }) }),
955
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "h-[3px] w-full" })
956
+ ] })
957
+ ] });
958
+ };
930
959
  var ContentBody = () => {
931
960
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: cn("flex flex-col gap-6 p-5"), children: [
932
961
  /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex flex-col gap-2", children: [
933
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex items-start justify-between gap-5", children: [
934
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-3", children: [
935
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-12 w-12 shrink-0 rounded-agg-lg" }),
936
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-2", children: [
937
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-5 w-[92%] rounded-agg-sm" }),
938
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-5 w-[80%] rounded-agg-sm" })
939
- ] })
940
- ] }),
941
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-6 w-6 rounded-agg-sm" })
962
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex min-w-0 items-center gap-3", children: [
963
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "size-12 shrink-0 rounded-agg-lg" }),
964
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-2", children: [
965
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-4 w-[92%] max-w-[240px] rounded-agg-sm" }),
966
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-4 w-[64%] max-w-[160px] rounded-agg-sm" })
967
+ ] })
942
968
  ] }),
943
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-5 w-28 rounded-agg-sm" })
969
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-6 w-[92px] rounded-agg-sm" }),
970
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(TabsSkeletonBar, {})
944
971
  ] }),
945
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "flex h-11 items-end border-b border-agg-separator", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex items-center gap-8", children: [
946
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex flex-col gap-2", children: [
947
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-5 w-10 rounded-agg-sm" }),
948
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-[3px] w-12 rounded-t-agg-sm" })
949
- ] }),
950
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-5 w-10 rounded-agg-sm" })
951
- ] }) }),
952
972
  /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex flex-col gap-4", children: [
953
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex gap-2", children: [
973
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex w-full gap-2", children: [
954
974
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-11 flex-1 rounded-agg-full" }),
955
975
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-11 flex-1 rounded-agg-full" })
956
976
  ] }),
957
977
  /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
958
978
  /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex flex-col gap-2", children: [
959
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-6 w-20 rounded-agg-sm" }),
960
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-4 w-28 rounded-agg-sm" })
979
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-5 w-[63px] rounded-agg-sm" }),
980
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-4 w-[118px] rounded-agg-sm" })
961
981
  ] }),
962
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-9 w-28 rounded-agg-sm" })
982
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: cn("text-agg-3xl font-agg-bold leading-agg-9 text-agg-separator"), children: "$0" })
963
983
  ] })
964
984
  ] }),
965
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex flex-col gap-2", children: [
966
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "rounded-agg-lg border border-agg-trade-highlight-border bg-agg-trade-highlight-surface p-3", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex flex-col gap-3", children: [
967
- [0, 1].map((index) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex flex-col gap-3", children: [
968
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
969
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex items-center gap-2", children: [
970
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "size-4 rounded-agg-full" }),
971
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-5 w-24 rounded-agg-sm" })
972
- ] }),
973
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-5 w-10 rounded-agg-sm" })
974
- ] }),
975
- index === 0 ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "h-px w-full bg-agg-trade-highlight-border" }) : null
976
- ] }, `place-order-route-${index}`)),
977
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "mx-auto h-5 w-40 rounded-agg-sm" })
978
- ] }) }),
979
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-4 w-36 rounded-agg-sm" })
980
- ] }),
981
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
982
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex flex-col gap-2", children: [
983
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-6 w-20 rounded-agg-sm" }),
984
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-4 w-24 rounded-agg-sm" })
985
- ] }),
986
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-9 w-36 rounded-agg-sm" })
987
- ] }),
988
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-4 w-[88%] self-center rounded-agg-sm" })
985
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-12 w-full rounded-agg-full" }),
986
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-4 w-full max-w-[240px] self-center rounded-agg-sm" })
989
987
  ] });
990
988
  };
991
989
  var PlaceOrderSkeletonView = ({
@@ -999,19 +997,7 @@ var PlaceOrderSkeletonView = ({
999
997
  role: "status",
1000
998
  "aria-label": ariaLabel != null ? ariaLabel : "Loading place order",
1001
999
  "aria-busy": true,
1002
- children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "flex w-full items-end justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
1003
- Card,
1004
- {
1005
- className: cn(
1006
- placeOrderCardClassName,
1007
- "w-full max-w-[400px] rounded-t-agg-xl rounded-b-none border-b-0"
1008
- ),
1009
- children: [
1010
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ContentBody, {}),
1011
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "border-t border-agg-separator bg-agg-secondary p-4", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SkeletonBlock, { className: "h-12 w-full rounded-agg-full" }) })
1012
- ]
1013
- }
1014
- ) })
1000
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "flex w-full items-end justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Card, { className: cn(placeOrderCardClassName, "w-full"), children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ContentBody, {}) }) })
1015
1001
  }
1016
1002
  );
1017
1003
  };
@@ -1037,38 +1023,27 @@ var SettlementSkeletonView = ({
1037
1023
  "aria-label": ariaLabel != null ? ariaLabel : labels.trading.settlementLoading,
1038
1024
  "aria-busy": true,
1039
1025
  children: [
1040
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col gap-1 md:flex-row md:items-center md:justify-between md:gap-4", children: [
1041
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "h-4 w-20 rounded-agg-sm" }),
1042
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "h-5 w-full max-w-80 rounded-agg-sm" })
1026
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex w-full items-center justify-between gap-4", children: [
1027
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "h-4 w-[81px] rounded-agg-sm" }),
1028
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "h-5 w-full max-w-[240px] rounded-agg-sm" })
1043
1029
  ] }),
1044
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col gap-2", children: [
1045
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "h-5 w-52 rounded-agg-sm" }),
1030
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex w-full flex-col gap-3", children: [
1031
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "h-5 w-[200px] rounded-agg-sm" }),
1046
1032
  /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col gap-2", children: [
1047
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "h-4 w-[88%] rounded-agg-sm" }),
1048
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "h-4 w-[84%] rounded-agg-sm" }),
1049
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "h-4 w-[80%] rounded-agg-sm" }),
1050
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "h-4 w-[74%] rounded-agg-sm" })
1033
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "h-4 w-full max-w-[320px] rounded-agg-sm" }),
1034
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "h-4 w-full max-w-[280px] rounded-agg-sm" })
1051
1035
  ] })
1052
1036
  ] }),
1053
1037
  /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "h-px w-full bg-agg-separator" }),
1054
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col gap-3", children: [
1055
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col gap-2", children: [
1056
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center gap-2", children: [
1057
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "size-4 rounded-agg-full" }),
1058
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "h-5 w-24 rounded-agg-sm" }),
1059
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "h-4 w-4 rounded-agg-sm" })
1060
- ] }),
1061
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col gap-2 pl-6", children: [
1062
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "h-4 w-full rounded-agg-sm" }),
1063
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "h-4 w-[92%] rounded-agg-sm" }),
1064
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "h-4 w-[34%] rounded-agg-sm" })
1065
- ] })
1038
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex w-full flex-col gap-3", children: [
1039
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center gap-2", children: [
1040
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "size-4 rounded-agg-sm" }),
1041
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "h-5 w-[100px] rounded-agg-sm" })
1066
1042
  ] }),
1067
- [0, 1, 2].map((index) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center gap-2", children: [
1068
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "size-4 rounded-agg-full" }),
1069
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "h-5 w-20 rounded-agg-sm" }),
1070
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "h-4 w-4 rounded-agg-sm" })
1071
- ] }, `settlement-venue-${index}`))
1043
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center gap-2", children: [
1044
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "size-4 rounded-agg-sm" }),
1045
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SkeletonBlock, { className: "h-5 w-[60px] rounded-agg-sm" })
1046
+ ] })
1072
1047
  ] })
1073
1048
  ]
1074
1049
  }
@@ -1418,27 +1393,14 @@ VenueLogo.displayName = "VenueLogo";
1418
1393
 
1419
1394
  // src/events/item/event-list-item.utils.ts
1420
1395
  var resolveEventListItemEvent = (fetchedEvent) => {
1421
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
1422
1396
  if (!fetchedEvent)
1423
1397
  return void 0;
1424
- const fallbackVenueEvent = fetchedEvent.venueEvents[0];
1425
- if (!fallbackVenueEvent)
1426
- return void 0;
1427
1398
  const mergedVenueMarkets = fetchedEvent.markets.flatMap(
1428
- (venueEvent) => venueEvent.venueMarkets
1399
+ (market) => market.venueMarkets
1429
1400
  );
1430
- const venueMarkets = mergedVenueMarkets.length > 0 ? mergedVenueMarkets : [];
1431
- if ((venueMarkets == null ? void 0 : venueMarkets.length) === 0)
1401
+ if (mergedVenueMarkets.length === 0)
1432
1402
  return void 0;
1433
- return __spreadProps(__spreadValues({}, fetchedEvent), {
1434
- id: fetchedEvent.id,
1435
- title: fetchedEvent.title || fallbackVenueEvent.title,
1436
- description: (_b = (_a = fetchedEvent.description) != null ? _a : fallbackVenueEvent.description) != null ? _b : null,
1437
- volume: (_d = (_c = fetchedEvent.volume) != null ? _c : fallbackVenueEvent.volume) != null ? _d : null,
1438
- startDate: (_f = (_e = fetchedEvent.startDate) != null ? _e : fallbackVenueEvent.startDate) != null ? _f : null,
1439
- endDate: (_h = (_g = fetchedEvent.endDate) != null ? _g : fallbackVenueEvent.endDate) != null ? _h : null,
1440
- creationDate: (_j = (_i = fetchedEvent.creationDate) != null ? _i : fallbackVenueEvent.creationDate) != null ? _j : null
1441
- });
1403
+ return fetchedEvent;
1442
1404
  };
1443
1405
  var normalizeProbability = (value) => {
1444
1406
  if (typeof value !== "number" || !Number.isFinite(value))
@@ -1497,15 +1459,14 @@ var resolveTileTitle = (event, primaryVenueMarket, titleOverride) => {
1497
1459
  return event.title;
1498
1460
  };
1499
1461
  var resolveTileImage = (event, primaryVenueMarket, imageOverride) => {
1500
- var _a, _b, _c, _d, _e, _f;
1501
1462
  if (typeof imageOverride === "string" && imageOverride.trim()) {
1502
1463
  return imageOverride;
1503
1464
  }
1504
1465
  if (typeof (primaryVenueMarket == null ? void 0 : primaryVenueMarket.image) === "string" && primaryVenueMarket.image.trim()) {
1505
1466
  return primaryVenueMarket.image;
1506
1467
  }
1507
- if (typeof ((_b = (_a = event.venueEvents) == null ? void 0 : _a[0]) == null ? void 0 : _b.image) === "string" && ((_d = (_c = event.venueEvents) == null ? void 0 : _c[0]) == null ? void 0 : _d.image.trim())) {
1508
- return (_f = (_e = event.venueEvents) == null ? void 0 : _e[0]) == null ? void 0 : _f.image;
1468
+ if (typeof event.image === "string" && event.image.trim()) {
1469
+ return event.image;
1509
1470
  }
1510
1471
  return void 0;
1511
1472
  };
@@ -1623,18 +1584,22 @@ var resolveOutcomesByVenue = (venueMarkets, selectedOutcomeLabel) => {
1623
1584
  };
1624
1585
  }).filter((item) => item != null);
1625
1586
  };
1626
- var buildPriceHistoryGroups = (selectedOutcomes) => {
1627
- const venueMarketOutcomeIdsByVenue = /* @__PURE__ */ new Map();
1628
- selectedOutcomes.forEach(({ venue, outcome }) => {
1629
- var _a;
1630
- if (!venueMarketOutcomeIdsByVenue.has(venue)) {
1631
- venueMarketOutcomeIdsByVenue.set(venue, []);
1587
+ var buildPriceHistoryGroups = (selectedOutcomes, fallbackMarketId) => {
1588
+ const marketIdByVenue = /* @__PURE__ */ new Map();
1589
+ selectedOutcomes.forEach(({ venue, market }) => {
1590
+ var _a, _b;
1591
+ const marketWithCanonicalId = market;
1592
+ const canonicalMarketId = (_a = marketWithCanonicalId.marketId) != null ? _a : fallbackMarketId;
1593
+ if (!canonicalMarketId)
1594
+ return;
1595
+ if (!marketIdByVenue.has(venue)) {
1596
+ marketIdByVenue.set(venue, /* @__PURE__ */ new Set());
1632
1597
  }
1633
- (_a = venueMarketOutcomeIdsByVenue.get(venue)) == null ? void 0 : _a.push(outcome.id);
1598
+ (_b = marketIdByVenue.get(venue)) == null ? void 0 : _b.add(canonicalMarketId);
1634
1599
  });
1635
- return [...venueMarketOutcomeIdsByVenue.entries()].map(([venue, venueMarketOutcomeIds]) => ({
1600
+ return [...marketIdByVenue.entries()].map(([venue, marketIds]) => ({
1636
1601
  venue,
1637
- venueMarketOutcomeIds
1602
+ venueMarketOutcomeIds: [...marketIds]
1638
1603
  })).filter((group) => group.venueMarketOutcomeIds.length > 0);
1639
1604
  };
1640
1605
  var resolveSeriesColor = (venue, index) => {
@@ -1694,13 +1659,18 @@ var resolveAverageProbability = (values) => {
1694
1659
  return validValues.reduce((sum, value) => sum + value, 0) / validValues.length;
1695
1660
  };
1696
1661
  var resolveOutcomeCandidateIds = (market, outcome) => {
1697
- var _a;
1698
- return [outcome.id, (_a = outcome.externalIdentifier) != null ? _a : void 0, market.externalIdentifier].filter(
1699
- (value) => typeof value === "string" && value.trim().length > 0
1700
- );
1662
+ var _a, _b;
1663
+ const marketWithCanonicalId = market;
1664
+ return [
1665
+ outcome.id,
1666
+ (_a = outcome.externalIdentifier) != null ? _a : void 0,
1667
+ market.externalIdentifier,
1668
+ (_b = marketWithCanonicalId.marketId) != null ? _b : void 0
1669
+ ].filter((value) => typeof value === "string" && value.trim().length > 0);
1701
1670
  };
1702
1671
  var EventListItemDetailsGraphSection = ({
1703
1672
  venueMarkets,
1673
+ canonicalMarketId,
1704
1674
  selectedOutcomeLabel,
1705
1675
  onSelectedOutcomeLabelChange,
1706
1676
  switchLabels,
@@ -1793,8 +1763,8 @@ var EventListItemDetailsGraphSection = ({
1793
1763
  return [...outcomeByModeAndId.values()];
1794
1764
  }, [selectedOutcomesByMode]);
1795
1765
  const priceHistoryGroups = (0, import_react3.useMemo)(() => {
1796
- return buildPriceHistoryGroups(allOutcomesForHistory);
1797
- }, [allOutcomesForHistory]);
1766
+ return buildPriceHistoryGroups(allOutcomesForHistory, canonicalMarketId);
1767
+ }, [allOutcomesForHistory, canonicalMarketId]);
1798
1768
  const timeWindow = (0, import_react3.useMemo)(() => {
1799
1769
  return getTimeWindowByRange(selectedTimeRange);
1800
1770
  }, [selectedTimeRange]);
@@ -1998,11 +1968,12 @@ var EventListItemDetailsContent = ({
1998
1968
  ariaLabel,
1999
1969
  defaultTimeRange
2000
1970
  }) => {
1971
+ var _a, _b;
2001
1972
  const config = (0, import_hooks13.useSdkUiConfig)();
2002
1973
  const labels = (0, import_hooks13.useLabels)();
2003
1974
  const venueMarkets = (0, import_react3.useMemo)(() => {
2004
- var _a, _b, _c;
2005
- return (_c = (_b = (_a = event.markets) == null ? void 0 : _a[0]) == null ? void 0 : _b.venueMarkets) != null ? _c : [];
1975
+ var _a2, _b2, _c;
1976
+ return (_c = (_b2 = (_a2 = event.markets) == null ? void 0 : _a2[0]) == null ? void 0 : _b2.venueMarkets) != null ? _c : [];
2006
1977
  }, [event.markets]);
2007
1978
  const primaryVenueMarket = (0, import_react3.useMemo)(() => {
2008
1979
  return selectPrimaryVenueMarket(venueMarkets);
@@ -2040,9 +2011,9 @@ var EventListItemDetailsContent = ({
2040
2011
  if (outcomeLabels.length === 0)
2041
2012
  return void 0;
2042
2013
  return [...outcomeLabels].sort((left, right) => {
2043
- var _a, _b;
2044
- const leftProbability = (_a = probabilityByLabel.get(left)) != null ? _a : -1;
2045
- const rightProbability = (_b = probabilityByLabel.get(right)) != null ? _b : -1;
2014
+ var _a2, _b2;
2015
+ const leftProbability = (_a2 = probabilityByLabel.get(left)) != null ? _a2 : -1;
2016
+ const rightProbability = (_b2 = probabilityByLabel.get(right)) != null ? _b2 : -1;
2046
2017
  return rightProbability - leftProbability;
2047
2018
  })[0];
2048
2019
  }, [outcomeLabels, probabilityByLabel]);
@@ -2058,18 +2029,18 @@ var EventListItemDetailsContent = ({
2058
2029
  setSelectedOutcomeLabel(fallbackOutcomeLabel);
2059
2030
  }, [isDateOutcomeMarket, mainOutcomeLabel, outcomeLabels, selectedOutcomeLabel]);
2060
2031
  const switchLabels = (0, import_react3.useMemo)(() => {
2061
- var _a, _b;
2032
+ var _a2, _b2;
2062
2033
  if (isDateOutcomeMarket) {
2063
2034
  return [labels.eventItemDetails.yes, labels.eventItemDetails.no];
2064
2035
  }
2065
2036
  const sortedOutcomeLabels = [...outcomeLabels].sort((left, right) => {
2066
- var _a2, _b2;
2067
- const leftProbability = (_a2 = probabilityByLabel.get(left)) != null ? _a2 : -1;
2068
- const rightProbability = (_b2 = probabilityByLabel.get(right)) != null ? _b2 : -1;
2037
+ var _a3, _b3;
2038
+ const leftProbability = (_a3 = probabilityByLabel.get(left)) != null ? _a3 : -1;
2039
+ const rightProbability = (_b3 = probabilityByLabel.get(right)) != null ? _b3 : -1;
2069
2040
  return rightProbability - leftProbability;
2070
2041
  });
2071
- const firstLabel = (_a = sortedOutcomeLabels[0]) != null ? _a : labels.eventItemDetails.yes;
2072
- const secondLabel = (_b = sortedOutcomeLabels.find((label) => label !== firstLabel)) != null ? _b : firstLabel;
2042
+ const firstLabel = (_a2 = sortedOutcomeLabels[0]) != null ? _a2 : labels.eventItemDetails.yes;
2043
+ const secondLabel = (_b2 = sortedOutcomeLabels.find((label) => label !== firstLabel)) != null ? _b2 : firstLabel;
2073
2044
  return [firstLabel, secondLabel];
2074
2045
  }, [
2075
2046
  isDateOutcomeMarket,
@@ -2079,8 +2050,8 @@ var EventListItemDetailsContent = ({
2079
2050
  probabilityByLabel
2080
2051
  ]);
2081
2052
  const volumeLabel = (0, import_react3.useMemo)(() => {
2082
- var _a;
2083
- const resolvedVolume = typeof event.volume === "number" ? event.volume : (_a = primaryVenueMarket == null ? void 0 : primaryVenueMarket.volume) != null ? _a : void 0;
2053
+ var _a2;
2054
+ const resolvedVolume = typeof event.volume === "number" ? event.volume : (_a2 = primaryVenueMarket == null ? void 0 : primaryVenueMarket.volume) != null ? _a2 : void 0;
2084
2055
  if (typeof resolvedVolume !== "number")
2085
2056
  return "";
2086
2057
  return `${config.formatCompactCurrency(resolvedVolume)} ${labels.eventItemDetails.volumeSuffix}`;
@@ -2178,6 +2149,7 @@ var EventListItemDetailsContent = ({
2178
2149
  EventListItemDetailsGraphSection,
2179
2150
  {
2180
2151
  venueMarkets,
2152
+ canonicalMarketId: (_b = (_a = event.markets) == null ? void 0 : _a[0]) == null ? void 0 : _b.id,
2181
2153
  selectedOutcomeLabel,
2182
2154
  onSelectedOutcomeLabelChange: setSelectedOutcomeLabel,
2183
2155
  switchLabels,
@@ -2303,7 +2275,7 @@ EventListItemDetails.displayName = "EventListItemDetails";
2303
2275
 
2304
2276
  // src/events/market-details/index.tsx
2305
2277
  var import_react6 = require("react");
2306
- var import_hooks17 = require("@agg-market/hooks");
2278
+ var import_hooks16 = require("@agg-market/hooks");
2307
2279
 
2308
2280
  // src/primitives/tabs/index.tsx
2309
2281
  var import_react5 = require("react");
@@ -4303,79 +4275,6 @@ var Tabs = ({
4303
4275
  };
4304
4276
  Tabs.displayName = "Tabs";
4305
4277
 
4306
- // src/primitives/loading-icon/index.tsx
4307
- var import_hooks16 = require("@agg-market/hooks");
4308
- var import_jsx_runtime65 = require("react/jsx-runtime");
4309
- var LoadingIcon = ({
4310
- size = "medium",
4311
- className,
4312
- ariaLabel
4313
- }) => {
4314
- const labels = (0, import_hooks16.useLabels)();
4315
- const { enableAnimations } = (0, import_hooks16.useSdkUiConfig)();
4316
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
4317
- "span",
4318
- {
4319
- role: "status",
4320
- "aria-label": ariaLabel != null ? ariaLabel : labels.common.loading,
4321
- className: cn(
4322
- "group/agg-loading-icon",
4323
- "inline-grid place-items-center text-agg-primary will-change-transform",
4324
- className
4325
- ),
4326
- children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "inline-grid place-items-center", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("svg", { viewBox: "0 0 44 44", className: cn("block", iconSizeClasses[size]), children: /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("g", { children: [
4327
- enableAnimations ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
4328
- "animateTransform",
4329
- {
4330
- attributeName: "transform",
4331
- attributeType: "XML",
4332
- type: "rotate",
4333
- from: "0 22 22",
4334
- to: "360 22 22",
4335
- dur: "1.4s",
4336
- repeatCount: "indefinite"
4337
- }
4338
- ) : null,
4339
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
4340
- "circle",
4341
- {
4342
- cx: "22",
4343
- cy: "22",
4344
- r: "16",
4345
- fill: "none",
4346
- stroke: "currentColor",
4347
- strokeWidth: "6",
4348
- strokeLinecap: "round",
4349
- strokeDasharray: "60 100",
4350
- strokeDashoffset: "0",
4351
- children: enableAnimations ? /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_jsx_runtime65.Fragment, { children: [
4352
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
4353
- "animate",
4354
- {
4355
- attributeName: "stroke-dasharray",
4356
- values: "1 100;60 100;1 100",
4357
- dur: "1.2s",
4358
- repeatCount: "indefinite"
4359
- }
4360
- ),
4361
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
4362
- "animate",
4363
- {
4364
- attributeName: "stroke-dashoffset",
4365
- values: "0;-25;-100",
4366
- dur: "1.2s",
4367
- repeatCount: "indefinite"
4368
- }
4369
- )
4370
- ] }) : null
4371
- }
4372
- )
4373
- ] }) }) })
4374
- }
4375
- );
4376
- };
4377
- LoadingIcon.displayName = "LoadingIcon";
4378
-
4379
4278
  // src/events/market-details/market-details.utils.ts
4380
4279
  var import_dayjs3 = __toESM(require("dayjs"));
4381
4280
  var import_zod = require("zod");
@@ -4500,8 +4399,7 @@ var resolveSubtitle = ({
4500
4399
  };
4501
4400
  var resolveOrderBookRows = ({
4502
4401
  data,
4503
- side,
4504
- depth
4402
+ side
4505
4403
  }) => {
4506
4404
  if (!(data == null ? void 0 : data.length))
4507
4405
  return [];
@@ -4532,9 +4430,8 @@ var resolveOrderBookRows = ({
4532
4430
  return left.price - right.price;
4533
4431
  return right.price - left.price;
4534
4432
  });
4535
- const limitedRows = sortedRows.slice(0, Math.max(1, depth));
4536
- const maxTotal = limitedRows.reduce((currentMax, row) => Math.max(currentMax, row.total), 0) || 1;
4537
- return limitedRows.map((row) => __spreadProps(__spreadValues({}, row), {
4433
+ const maxTotal = sortedRows.reduce((currentMax, row) => Math.max(currentMax, row.total), 0) || 1;
4434
+ return sortedRows.map((row) => __spreadProps(__spreadValues({}, row), {
4538
4435
  barScale: row.total / maxTotal
4539
4436
  }));
4540
4437
  };
@@ -4609,14 +4506,14 @@ var buildMarketDetailsModel = ({
4609
4506
  };
4610
4507
 
4611
4508
  // src/events/market-details/index.tsx
4612
- var import_jsx_runtime66 = require("react/jsx-runtime");
4509
+ var import_jsx_runtime65 = require("react/jsx-runtime");
4613
4510
  var MarketDetailsLoadingState = ({
4614
4511
  isOpened = marketDetailsDefaultIsOpened,
4615
4512
  ariaLabel,
4616
4513
  classNames
4617
4514
  }) => {
4618
- const labels = (0, import_hooks17.useLabels)();
4619
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
4515
+ const labels = (0, import_hooks16.useLabels)();
4516
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
4620
4517
  Skeleton,
4621
4518
  {
4622
4519
  view: isOpened ? "market-details-detailed" : "market-details-minified",
@@ -4629,16 +4526,16 @@ var MarketDetailsUnavailableState = ({
4629
4526
  ariaLabel,
4630
4527
  classNames
4631
4528
  }) => {
4632
- const labels = (0, import_hooks17.useLabels)();
4633
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
4529
+ const labels = (0, import_hooks16.useLabels)();
4530
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
4634
4531
  Card,
4635
4532
  {
4636
4533
  className: cn(marketDetailsBaseCardClassName, classNames == null ? void 0 : classNames.root),
4637
4534
  role: "status",
4638
4535
  "aria-label": ariaLabel != null ? ariaLabel : labels.marketDetails.unavailableAria,
4639
- children: /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex flex-col gap-1 p-5", children: [
4640
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Typography, { variant: "body-large-strong", children: labels.marketDetails.unavailableTitle }),
4641
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Typography, { variant: "label", className: "text-agg-muted-foreground", children: labels.marketDetails.unavailableDescription })
4536
+ children: /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "flex flex-col gap-1 p-5", children: [
4537
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Typography, { variant: "body-large-strong", children: labels.marketDetails.unavailableTitle }),
4538
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Typography, { variant: "label", className: "text-agg-muted-foreground", children: labels.marketDetails.unavailableDescription })
4642
4539
  ] })
4643
4540
  }
4644
4541
  );
@@ -4647,44 +4544,59 @@ var OrderBookRows = ({
4647
4544
  rows,
4648
4545
  title,
4649
4546
  formatNumber,
4650
- formatCurrency
4547
+ formatCurrency,
4548
+ visibleRows
4651
4549
  }) => {
4652
- const labels = (0, import_hooks17.useLabels)();
4550
+ const labels = (0, import_hooks16.useLabels)();
4653
4551
  const isAsks = title === labels.marketDetails.asks;
4654
4552
  const priceClassName = isAsks ? "text-agg-orderbook-ask" : "text-agg-orderbook-bid";
4655
4553
  const barClassName = isAsks ? "bg-agg-orderbook-ask/10" : "bg-agg-orderbook-bid/10";
4656
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex flex-col gap-2", children: [
4657
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Typography, { variant: "caption-caps", children: title }),
4658
- rows.map((row, index) => /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex flex-col gap-2", children: [
4659
- /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "grid grid-cols-[52px_1fr_1fr_52px] items-center gap-2 md:grid-cols-[88px_1fr_1fr_minmax(120px,220px)] md:gap-6", children: [
4660
- /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex items-center gap-1 md:gap-3", children: [
4661
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(VenueLogo, { venue: row.venue, size: "small" }),
4662
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
4663
- "span",
4664
- {
4665
- className: cn(
4666
- "text-agg-xs font-agg-bold leading-agg-4 md:text-agg-sm md:leading-agg-5",
4667
- priceClassName
4668
- ),
4669
- children: formatProbabilityCents(row.price)
4670
- }
4671
- )
4672
- ] }),
4673
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "truncate text-agg-xs leading-agg-4 text-center text-agg-foreground md:text-agg-sm md:leading-agg-5", children: formatNumber(row.size) }),
4674
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "truncate text-agg-xs leading-agg-4 text-center text-agg-foreground md:text-agg-sm md:leading-agg-5", children: formatCurrency(row.total) }),
4675
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "flex justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
4676
- "div",
4677
- {
4678
- "aria-hidden": "true",
4679
- className: cn("h-2 rounded-agg-full", barClassName),
4680
- style: {
4681
- width: `${Math.max(20, Math.round(row.barScale * 100))}%`
4682
- }
4683
- }
4684
- ) })
4685
- ] }),
4686
- index < rows.length - 1 ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "h-px w-full bg-agg-separator" }) : null
4687
- ] }, row.id))
4554
+ const maxVisibleRows = Math.max(1, visibleRows);
4555
+ const orderBookRowHeightPx = 28;
4556
+ const orderBookDividerHeightPx = 1;
4557
+ const orderBookRowGapPx = 8;
4558
+ const orderBookVisibleHeightPx = maxVisibleRows * orderBookRowHeightPx + Math.max(0, maxVisibleRows - 1) * (orderBookDividerHeightPx + orderBookRowGapPx);
4559
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "flex flex-col gap-2", children: [
4560
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Typography, { variant: "caption-caps", children: title }),
4561
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
4562
+ "div",
4563
+ {
4564
+ className: "overflow-y-auto pr-1 flex flex-col gap-2",
4565
+ style: { maxHeight: `${orderBookVisibleHeightPx}px` },
4566
+ role: "region",
4567
+ "aria-label": `${title} order book levels`,
4568
+ children: rows.map((row, index) => /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "flex flex-col gap-2", children: [
4569
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "grid grid-cols-[52px_1fr_1fr_52px] items-center gap-2 md:grid-cols-[88px_1fr_1fr_minmax(120px,220px)] md:gap-6", children: [
4570
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "flex items-center gap-1 md:gap-3", children: [
4571
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(VenueLogo, { venue: row.venue, size: "small" }),
4572
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
4573
+ "span",
4574
+ {
4575
+ className: cn(
4576
+ "text-agg-xs font-agg-bold leading-agg-4 md:text-agg-sm md:leading-agg-5",
4577
+ priceClassName
4578
+ ),
4579
+ children: formatProbabilityCents(row.price)
4580
+ }
4581
+ )
4582
+ ] }),
4583
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "truncate text-agg-xs leading-agg-4 text-center text-agg-foreground md:text-agg-sm md:leading-agg-5", children: formatNumber(row.size) }),
4584
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "truncate text-agg-xs leading-agg-4 text-center text-agg-foreground md:text-agg-sm md:leading-agg-5", children: formatCurrency(row.total) }),
4585
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "flex justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
4586
+ "div",
4587
+ {
4588
+ "aria-hidden": "true",
4589
+ className: cn("h-2 rounded-agg-full", barClassName),
4590
+ style: {
4591
+ width: `${Math.max(20, Math.round(row.barScale * 100))}%`
4592
+ }
4593
+ }
4594
+ ) })
4595
+ ] }),
4596
+ index < rows.length - 1 ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "h-px w-full bg-agg-separator" }) : null
4597
+ ] }, row.id))
4598
+ }
4599
+ )
4688
4600
  ] });
4689
4601
  };
4690
4602
  var getOutcomeButtonClassName = ({
@@ -4718,8 +4630,8 @@ var MarketDetailsContent = ({
4718
4630
  classNames,
4719
4631
  otherContent
4720
4632
  }) => {
4721
- const config = (0, import_hooks17.useSdkUiConfig)();
4722
- const labels = (0, import_hooks17.useLabels)();
4633
+ const config = (0, import_hooks16.useSdkUiConfig)();
4634
+ const labels = (0, import_hooks16.useLabels)();
4723
4635
  const detailsContentId = (0, import_react6.useId)();
4724
4636
  const model = (0, import_react6.useMemo)(() => {
4725
4637
  return buildMarketDetailsModel({
@@ -4802,10 +4714,11 @@ var MarketDetailsContent = ({
4802
4714
  });
4803
4715
  return [...uniqueOutcomesByVenueAndId.values()];
4804
4716
  }, [outcomesByLabel]);
4717
+ const canonicalMarketIdForHistory = model == null ? void 0 : model.market.id;
4805
4718
  const priceHistoryGroups = (0, import_react6.useMemo)(() => {
4806
- return buildPriceHistoryGroups(graphOutcomes);
4807
- }, [graphOutcomes]);
4808
- const { data: priceHistoryData, isLoading: isPriceHistoryLoading } = (0, import_hooks17.usePriceHistory)(__spreadProps(__spreadValues({
4719
+ return buildPriceHistoryGroups(graphOutcomes, canonicalMarketIdForHistory);
4720
+ }, [canonicalMarketIdForHistory, graphOutcomes]);
4721
+ const { data: priceHistoryData, isLoading: isPriceHistoryLoading } = (0, import_hooks16.usePriceHistory)(__spreadProps(__spreadValues({
4809
4722
  groups: priceHistoryGroups
4810
4723
  }, timeWindow), {
4811
4724
  enabled: isOpened && selectedTab === "graph" && priceHistoryGroups.length > 0
@@ -4817,24 +4730,22 @@ var MarketDetailsContent = ({
4817
4730
  liveUpdate: true
4818
4731
  }));
4819
4732
  }, [selectedOutcomesByVenue]);
4820
- const { data: orderBookData, isLoading: isOrderBookLoading } = (0, import_hooks17.useOrderBook)({
4733
+ const { data: orderBookData, isLoading: isOrderBookLoading } = (0, import_hooks16.useOrderBook)({
4821
4734
  orderbooks: orderBookInputs,
4822
4735
  enabled: isOpened && selectedTab === "order-book" && orderBookInputs.length > 0
4823
4736
  });
4824
4737
  const askRows = (0, import_react6.useMemo)(() => {
4825
4738
  return resolveOrderBookRows({
4826
4739
  data: orderBookData,
4827
- side: "asks",
4828
- depth: orderBookDepth
4740
+ side: "asks"
4829
4741
  });
4830
- }, [orderBookData, orderBookDepth]);
4742
+ }, [orderBookData]);
4831
4743
  const bidRows = (0, import_react6.useMemo)(() => {
4832
4744
  return resolveOrderBookRows({
4833
4745
  data: orderBookData,
4834
- side: "bids",
4835
- depth: orderBookDepth
4746
+ side: "bids"
4836
4747
  });
4837
- }, [orderBookData, orderBookDepth]);
4748
+ }, [orderBookData]);
4838
4749
  const priceHistoryByVenue = (0, import_react6.useMemo)(() => {
4839
4750
  const historyByVenue = /* @__PURE__ */ new Map();
4840
4751
  if (!(priceHistoryData == null ? void 0 : priceHistoryData.length)) {
@@ -4854,11 +4765,14 @@ var MarketDetailsContent = ({
4854
4765
  const graphSeriesByOutcomeLabel = (0, import_react6.useMemo)(() => {
4855
4766
  const seriesByOutcomeLabel = /* @__PURE__ */ new Map();
4856
4767
  const resolveOutcomeCandidateIds2 = (outcomeByVenue) => {
4857
- var _a;
4768
+ var _a, _b;
4769
+ const marketWithCanonicalId = outcomeByVenue.market;
4858
4770
  return [
4859
4771
  outcomeByVenue.outcome.id,
4860
4772
  (_a = outcomeByVenue.outcome.externalIdentifier) != null ? _a : void 0,
4861
- outcomeByVenue.market.externalIdentifier
4773
+ outcomeByVenue.market.externalIdentifier,
4774
+ (_b = marketWithCanonicalId.marketId) != null ? _b : void 0,
4775
+ canonicalMarketIdForHistory
4862
4776
  ].filter((value) => typeof value === "string" && value.trim().length > 0);
4863
4777
  };
4864
4778
  headerOutcomeItems.forEach((headerOutcomeItem) => {
@@ -4890,7 +4804,7 @@ var MarketDetailsContent = ({
4890
4804
  seriesByOutcomeLabel.set(headerOutcomeItem.label, graphSeries2);
4891
4805
  });
4892
4806
  return seriesByOutcomeLabel;
4893
- }, [headerOutcomeItems, outcomesByLabel, priceHistoryByVenue]);
4807
+ }, [canonicalMarketIdForHistory, headerOutcomeItems, outcomesByLabel, priceHistoryByVenue]);
4894
4808
  const graphSeries = (0, import_react6.useMemo)(() => {
4895
4809
  var _a;
4896
4810
  if (!selectedOutcomeLabel)
@@ -4948,35 +4862,36 @@ var MarketDetailsContent = ({
4948
4862
  setSelectedGraphVenue(null);
4949
4863
  }, [selectedGraphVenue, selectedOutcomesByVenue]);
4950
4864
  if (!model) {
4951
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(MarketDetailsUnavailableState, { ariaLabel, classNames });
4865
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(MarketDetailsUnavailableState, { ariaLabel, classNames });
4952
4866
  }
4953
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
4867
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
4954
4868
  Card,
4955
4869
  {
4956
4870
  className: cn(
4957
- "w-full cursor-pointer rounded-agg-2xl text-left outline-none",
4871
+ "w-full rounded-agg-2xl text-left outline-none",
4958
4872
  marketDetailsBaseCardClassName,
4959
4873
  classNames == null ? void 0 : classNames.root
4960
4874
  ),
4961
- "aria-expanded": isOpened,
4962
- "aria-controls": detailsContentId,
4963
- role: "button",
4964
- tabIndex: 0,
4965
- "aria-label": isOpened ? labels.marketDetails.toggleCloseDetailsAria(model.title) : labels.marketDetails.toggleOpenDetailsAria(model.title),
4966
- onClick: handleToggleExpanded,
4967
- onKeyDown: handleToggleExpanded,
4968
4875
  children: [
4969
- /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
4876
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
4970
4877
  "div",
4971
4878
  {
4972
4879
  className: cn(
4973
- "flex flex-row items-center justify-between gap-3 px-5 py-4",
4880
+ "cursor-pointer disabled:cursor-default",
4881
+ "flex flex-wrap flex-row items-center justify-between gap-3 px-5 py-4",
4974
4882
  isOpened && "pb-3",
4975
4883
  classNames == null ? void 0 : classNames.header
4976
4884
  ),
4885
+ "aria-expanded": isOpened,
4886
+ "aria-controls": detailsContentId,
4887
+ role: "button",
4888
+ tabIndex: 0,
4889
+ "aria-label": isOpened ? labels.marketDetails.toggleCloseDetailsAria(model.title) : labels.marketDetails.toggleOpenDetailsAria(model.title),
4890
+ onClick: handleToggleExpanded,
4891
+ onKeyDown: handleToggleExpanded,
4977
4892
  children: [
4978
- /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex min-w-0 items-center gap-3 md:gap-4", children: [
4979
- model.image ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
4893
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "flex min-w-52 items-center gap-3 md:gap-4", children: [
4894
+ model.image ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
4980
4895
  "img",
4981
4896
  {
4982
4897
  src: model.image,
@@ -4984,13 +4899,13 @@ var MarketDetailsContent = ({
4984
4899
  className: "size-12 rounded-agg-lg object-cover md:size-[60px]"
4985
4900
  }
4986
4901
  ) : null,
4987
- /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex min-w-0 flex-col", children: [
4988
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Typography, { as: "h3", variant: "body-large-strong", className: "truncate", children: model.title }),
4989
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Typography, { variant: "label", className: "truncate text-agg-muted-foreground", children: model.subtitle }) })
4902
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "flex min-w-0 flex-col", children: [
4903
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Typography, { as: "h3", variant: "body-large-strong", className: "truncate", children: model.title }),
4904
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Typography, { variant: "label", className: "truncate text-agg-muted-foreground", children: model.subtitle }) })
4990
4905
  ] })
4991
4906
  ] }),
4992
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Typography, { as: "div", variant: "heading", className: "shrink-0", children: formatProbabilityPercent(headlineProbability) }),
4993
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
4907
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Typography, { as: "div", variant: "heading", className: "shrink-0", children: formatProbabilityPercent(headlineProbability) }),
4908
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
4994
4909
  "div",
4995
4910
  {
4996
4911
  className: "flex gap-2",
@@ -5001,7 +4916,7 @@ var MarketDetailsContent = ({
5001
4916
  children: headerOutcomeItems.map((item) => {
5002
4917
  const isPositive = item.tone === "positive";
5003
4918
  const isActiveOutcome = item.label === selectedOutcomeLabel;
5004
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
4919
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5005
4920
  "button",
5006
4921
  {
5007
4922
  type: "button",
@@ -5018,8 +4933,8 @@ var MarketDetailsContent = ({
5018
4933
  e.stopPropagation();
5019
4934
  setSelectedOutcomeLabel(item.label);
5020
4935
  },
5021
- children: /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("span", { className: "inline-flex items-center gap-2", children: [
5022
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
4936
+ children: /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("span", { className: "inline-flex items-center gap-2", children: [
4937
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5023
4938
  VenueLogo,
5024
4939
  {
5025
4940
  venue: isPositive ? "polymarket" : "probable",
@@ -5027,7 +4942,7 @@ var MarketDetailsContent = ({
5027
4942
  color: isActiveOutcome ? "var(--agg-color-on-primary)" : void 0
5028
4943
  }
5029
4944
  ),
5030
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
4945
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5031
4946
  Typography,
5032
4947
  {
5033
4948
  variant: isActiveOutcome ? "body-strong" : "body",
@@ -5048,28 +4963,25 @@ var MarketDetailsContent = ({
5048
4963
  ]
5049
4964
  }
5050
4965
  ),
5051
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
4966
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5052
4967
  "div",
5053
4968
  {
5054
4969
  id: detailsContentId,
5055
4970
  className: cn(
5056
4971
  "grid overflow-hidden",
5057
- getMotionClassName(
5058
- config.enableAnimations,
5059
- "transition-all duration-500 ease-[cubic-bezier(0.4,0,0.2,1)]"
5060
- ),
4972
+ getMotionClassName(config.enableAnimations, "transition-all duration-500 ease-in-out"),
5061
4973
  isOpened ? "grid-rows-[1fr] opacity-100" : "pointer-events-none grid-rows-[0fr] opacity-0"
5062
4974
  ),
5063
4975
  "aria-hidden": !isOpened,
5064
- children: /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "min-h-0", children: [
5065
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "h-px w-full bg-agg-separator" }),
5066
- /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
4976
+ children: /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "min-h-0", children: [
4977
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "h-px w-full bg-agg-separator" }),
4978
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
5067
4979
  "div",
5068
4980
  {
5069
4981
  className: cn(
5070
4982
  getMotionClassName(
5071
4983
  config.enableAnimations,
5072
- "transition-all duration-500 ease-[cubic-bezier(0.4,0,0.2,1)]"
4984
+ "transition-all duration-500 ease-in-out"
5073
4985
  ),
5074
4986
  isOpened ? cn(
5075
4987
  "translate-y-0 opacity-100",
@@ -5077,7 +4989,7 @@ var MarketDetailsContent = ({
5077
4989
  ) : "translate-y-5 opacity-0"
5078
4990
  ),
5079
4991
  children: [
5080
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: cn("block", classNames == null ? void 0 : classNames.tabs), children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
4992
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: cn("block", classNames == null ? void 0 : classNames.tabs), children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5081
4993
  Tabs,
5082
4994
  {
5083
4995
  ariaLabel: labels.marketDetails.tabsAria,
@@ -5088,42 +5000,32 @@ var MarketDetailsContent = ({
5088
5000
  className: "w-full px-5"
5089
5001
  }
5090
5002
  ) }),
5091
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "h-px w-full bg-agg-separator" }),
5092
- /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: cn("p-5", classNames == null ? void 0 : classNames.content), children: [
5093
- selectedTab === "order-book" ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: cn("flex flex-col gap-5", classNames == null ? void 0 : classNames.orderBook), children: isOrderBookLoading ? /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
5094
- "div",
5095
- {
5096
- className: "flex flex-col gap-2 min-h-40 items-center justify-center",
5097
- role: "status",
5098
- "aria-label": labels.marketDetails.loadingOrderbookAria,
5099
- "aria-busy": true,
5100
- children: [
5101
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(LoadingIcon, {}),
5102
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Typography, { variant: "label", className: "text-agg-muted-foreground", children: labels.marketDetails.loadingOrderbookLabel })
5103
- ]
5104
- }
5105
- ) : /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_jsx_runtime66.Fragment, { children: [
5106
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5003
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "h-px w-full bg-agg-separator" }),
5004
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: cn("p-5", classNames == null ? void 0 : classNames.content), children: [
5005
+ selectedTab === "order-book" ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: cn("flex flex-col gap-5", classNames == null ? void 0 : classNames.orderBook), children: isOrderBookLoading ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(MarketDetailsOderbookSkeleton, {}) : /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_jsx_runtime65.Fragment, { children: [
5006
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5107
5007
  OrderBookRows,
5108
5008
  {
5109
5009
  rows: askRows,
5110
5010
  title: labels.marketDetails.asks,
5111
5011
  formatNumber: config.formatNumber,
5112
- formatCurrency: config.formatCurrency
5012
+ formatCurrency: config.formatCurrency,
5013
+ visibleRows: orderBookDepth
5113
5014
  }
5114
5015
  ),
5115
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5016
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5116
5017
  OrderBookRows,
5117
5018
  {
5118
5019
  rows: bidRows,
5119
5020
  title: labels.marketDetails.bids,
5120
5021
  formatNumber: config.formatNumber,
5121
- formatCurrency: config.formatCurrency
5022
+ formatCurrency: config.formatCurrency,
5023
+ visibleRows: orderBookDepth
5122
5024
  }
5123
5025
  )
5124
5026
  ] }) }) : null,
5125
- selectedTab === "graph" ? /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: cn("flex flex-col gap-5", classNames == null ? void 0 : classNames.graph), children: [
5126
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5027
+ selectedTab === "graph" ? /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: cn("flex flex-col gap-5", classNames == null ? void 0 : classNames.graph), children: [
5028
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5127
5029
  LineChart,
5128
5030
  {
5129
5031
  series: graphSeries,
@@ -5132,11 +5034,11 @@ var MarketDetailsContent = ({
5132
5034
  classNames: { root: "w-full" },
5133
5035
  showSeriesControls: selectedOutcomesByVenue.length > 0 || headerOutcomeItems.length > 0,
5134
5036
  renderSeriesControls: () => {
5135
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex flex-col gap-4 md:flex-row md:items-center md:justify-between", children: [
5136
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "flex flex-wrap gap-2", children: selectedOutcomesByVenue.map((item) => {
5037
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "flex flex-col gap-4 md:flex-row md:items-center md:justify-between", children: [
5038
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "flex flex-wrap gap-2", children: selectedOutcomesByVenue.map((item) => {
5137
5039
  const probability = formatProbabilityPercent(item.outcome.price);
5138
5040
  const isActiveVenue = selectedGraphVenue === item.venue;
5139
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
5041
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
5140
5042
  "button",
5141
5043
  {
5142
5044
  type: "button",
@@ -5153,14 +5055,14 @@ var MarketDetailsContent = ({
5153
5055
  handleGraphVenueToggle(item.venue);
5154
5056
  },
5155
5057
  children: [
5156
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(VenueLogo, { venue: item.venue, size: "small" }),
5157
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "text-agg-base leading-agg-6 text-agg-foreground", children: probability })
5058
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(VenueLogo, { venue: item.venue, size: "small" }),
5059
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "text-agg-base leading-agg-6 text-agg-foreground", children: probability })
5158
5060
  ]
5159
5061
  },
5160
5062
  `${item.market.id}-${item.outcome.id}`
5161
5063
  );
5162
5064
  }) }),
5163
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5065
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5164
5066
  SwitchButton,
5165
5067
  {
5166
5068
  ariaLabel: labels.marketDetails.outcomeSelectorAria,
@@ -5178,7 +5080,7 @@ var MarketDetailsContent = ({
5178
5080
  }
5179
5081
  }
5180
5082
  ),
5181
- /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
5083
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
5182
5084
  "div",
5183
5085
  {
5184
5086
  className: cn(
@@ -5186,10 +5088,10 @@ var MarketDetailsContent = ({
5186
5088
  classNames == null ? void 0 : classNames.footer
5187
5089
  ),
5188
5090
  children: [
5189
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { children: typeof model.market.volume === "number" ? `${config.formatCompactCurrency(model.market.volume)} ${labels.marketDetails.meta.volumeSuffix}` : labels.marketDetails.volumeUnavailable }),
5190
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "flex flex-wrap items-center gap-3 md:gap-4", children: eventListItemDetailsTimeRanges.map((timeRange) => {
5091
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { children: typeof model.market.volume === "number" ? `${config.formatCompactCurrency(model.market.volume)} ${labels.marketDetails.meta.volumeSuffix}` : labels.marketDetails.volumeUnavailable }),
5092
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "flex flex-wrap items-center gap-3 md:gap-4", children: eventListItemDetailsTimeRanges.map((timeRange) => {
5191
5093
  const isActive = selectedTimeRange === timeRange;
5192
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5094
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5193
5095
  "button",
5194
5096
  {
5195
5097
  type: "button",
@@ -5212,13 +5114,13 @@ var MarketDetailsContent = ({
5212
5114
  }
5213
5115
  )
5214
5116
  ] }) : null,
5215
- selectedTab === "other" ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "flex flex-col gap-4", children: otherContent != null ? otherContent : /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "grid grid-cols-1 gap-3", children: otherRows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
5117
+ selectedTab === "other" ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "flex flex-col gap-4", children: otherContent != null ? otherContent : /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "grid grid-cols-1 gap-3", children: otherRows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
5216
5118
  "div",
5217
5119
  {
5218
5120
  className: "flex items-center justify-between rounded-agg-xl bg-agg-secondary-hover px-4 py-3",
5219
5121
  children: [
5220
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Typography, { variant: "label", className: "text-agg-muted-foreground", children: row.label }),
5221
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Typography, { variant: "body", className: "text-right", children: row.value })
5122
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Typography, { variant: "label", className: "text-agg-muted-foreground", children: row.label }),
5123
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Typography, { variant: "body", className: "text-right", children: row.value })
5222
5124
  ]
5223
5125
  },
5224
5126
  row.label
@@ -5253,14 +5155,14 @@ var MarketDetails = (props) => {
5253
5155
  (_a2 = props.onOpenChange) == null ? void 0 : _a2.call(props, nextIsOpened);
5254
5156
  };
5255
5157
  const hasEventProp = "event" in props && !!props.event;
5256
- const { event: fetchedEvent, isLoading: isFetchingEvent } = (0, import_hooks17.useEvent)(
5158
+ const { event: fetchedEvent, isLoading: isFetchingEvent } = (0, import_hooks16.useEvent)(
5257
5159
  hasEventProp ? void 0 : props.eventId,
5258
5160
  {
5259
5161
  enabled: !props.isLoading && !hasEventProp && !!props.eventId
5260
5162
  }
5261
5163
  );
5262
5164
  if (props.isLoading) {
5263
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5165
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5264
5166
  MarketDetailsLoadingState,
5265
5167
  {
5266
5168
  isOpened: resolvedIsOpened,
@@ -5270,7 +5172,7 @@ var MarketDetails = (props) => {
5270
5172
  );
5271
5173
  }
5272
5174
  if ("event" in props && props.event) {
5273
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5175
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5274
5176
  MarketDetailsContent,
5275
5177
  __spreadProps(__spreadValues({}, props), {
5276
5178
  isOpened: resolvedIsOpened,
@@ -5280,7 +5182,7 @@ var MarketDetails = (props) => {
5280
5182
  );
5281
5183
  }
5282
5184
  if (isFetchingEvent) {
5283
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5185
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5284
5186
  MarketDetailsLoadingState,
5285
5187
  {
5286
5188
  isOpened: resolvedIsOpened,
@@ -5290,9 +5192,9 @@ var MarketDetails = (props) => {
5290
5192
  );
5291
5193
  }
5292
5194
  if (!fetchedEvent) {
5293
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(MarketDetailsUnavailableState, { ariaLabel: props.ariaLabel, classNames: props.classNames });
5195
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(MarketDetailsUnavailableState, { ariaLabel: props.ariaLabel, classNames: props.classNames });
5294
5196
  }
5295
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5197
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5296
5198
  MarketDetailsContent,
5297
5199
  __spreadProps(__spreadValues({}, props), {
5298
5200
  isOpened: resolvedIsOpened,
@@ -5305,12 +5207,12 @@ MarketDetails.displayName = "MarketDetails";
5305
5207
 
5306
5208
  // src/trading/place-order/index.tsx
5307
5209
  var import_react7 = require("react");
5308
- var import_hooks19 = require("@agg-market/hooks");
5210
+ var import_hooks18 = require("@agg-market/hooks");
5309
5211
 
5310
5212
  // src/trading/utils.ts
5311
- var import_hooks18 = require("@agg-market/hooks");
5213
+ var import_hooks17 = require("@agg-market/hooks");
5312
5214
  var import_dayjs4 = __toESM(require("dayjs"));
5313
- var defaultLabels = (0, import_hooks18.resolveAggUiLabels)("en-US");
5215
+ var defaultLabels = (0, import_hooks17.resolveAggUiLabels)("en-US");
5314
5216
  var defaultSettlementSectionLabel = defaultLabels.trading.settlementSection;
5315
5217
  var defaultSettlementDifferencesTitle = defaultLabels.trading.settlementDifferencesTitle;
5316
5218
  var defaultTradingDisclaimer = defaultLabels.trading.disclaimer;
@@ -5328,9 +5230,9 @@ var getTradingVenueLabel = (venue, label) => {
5328
5230
  };
5329
5231
 
5330
5232
  // src/trading/place-order/index.tsx
5331
- var import_jsx_runtime67 = require("react/jsx-runtime");
5233
+ var import_jsx_runtime66 = require("react/jsx-runtime");
5332
5234
  var WarningFilledIcon2 = ({ className }) => {
5333
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
5235
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
5334
5236
  "svg",
5335
5237
  {
5336
5238
  viewBox: "0 0 16 16",
@@ -5338,15 +5240,15 @@ var WarningFilledIcon2 = ({ className }) => {
5338
5240
  className: cn("text-agg-warning", className),
5339
5241
  "aria-hidden": "true",
5340
5242
  children: [
5341
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("path", { d: "M8 1.33301L15.3333 14.6663H0.666656L8 1.33301Z", fill: "currentColor" }),
5342
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("path", { d: "M8 5.33301V8.66634", stroke: "white", strokeWidth: "1.4", strokeLinecap: "round" }),
5343
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("circle", { cx: "8", cy: "11.1667", r: "0.833333", fill: "white" })
5243
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("path", { d: "M8 1.33301L15.3333 14.6663H0.666656L8 1.33301Z", fill: "currentColor" }),
5244
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("path", { d: "M8 5.33301V8.66634", stroke: "white", strokeWidth: "1.4", strokeLinecap: "round" }),
5245
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("circle", { cx: "8", cy: "11.1667", r: "0.833333", fill: "white" })
5344
5246
  ]
5345
5247
  }
5346
5248
  );
5347
5249
  };
5348
5250
  var ErrorFilledIcon = ({ className }) => {
5349
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
5251
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
5350
5252
  "svg",
5351
5253
  {
5352
5254
  viewBox: "0 0 16 16",
@@ -5354,9 +5256,9 @@ var ErrorFilledIcon = ({ className }) => {
5354
5256
  className: cn("text-agg-error", className),
5355
5257
  "aria-hidden": "true",
5356
5258
  children: [
5357
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("circle", { cx: "8", cy: "8", r: "8", fill: "currentColor" }),
5358
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("path", { d: "M8 4.16699V8.50033", stroke: "white", strokeWidth: "1.4", strokeLinecap: "round" }),
5359
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("circle", { cx: "8", cy: "11.167", r: "0.833333", fill: "white" })
5259
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("circle", { cx: "8", cy: "8", r: "8", fill: "currentColor" }),
5260
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("path", { d: "M8 4.16699V8.50033", stroke: "white", strokeWidth: "1.4", strokeLinecap: "round" }),
5261
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("circle", { cx: "8", cy: "11.167", r: "0.833333", fill: "white" })
5360
5262
  ]
5361
5263
  }
5362
5264
  );
@@ -5403,17 +5305,17 @@ var getStatusContent = ({
5403
5305
  if (!status || status.placement !== placement)
5404
5306
  return null;
5405
5307
  if (status.tone === "warning") {
5406
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex items-center justify-center gap-2", children: [
5407
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(WarningFilledIcon2, { className: "h-4 w-4 shrink-0" }),
5408
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: status.message })
5308
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex items-center justify-center gap-2", children: [
5309
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(WarningFilledIcon2, { className: "h-4 w-4 shrink-0" }),
5310
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: status.message })
5409
5311
  ] });
5410
5312
  }
5411
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex items-center gap-3 rounded-agg-lg bg-agg-status-error-surface px-3 py-2.5", children: [
5412
- /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
5413
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(ErrorFilledIcon, { className: "h-4 w-4 shrink-0" }),
5414
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("p", { className: "min-w-0 flex-1 text-agg-sm leading-agg-5 text-agg-foreground", children: status.message })
5313
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex items-center gap-3 rounded-agg-lg bg-agg-status-error-surface px-3 py-2.5", children: [
5314
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
5315
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(ErrorFilledIcon, { className: "h-4 w-4 shrink-0" }),
5316
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("p", { className: "min-w-0 flex-1 text-agg-sm leading-agg-5 text-agg-foreground", children: status.message })
5415
5317
  ] }),
5416
- status.actionLabel ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
5318
+ status.actionLabel ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5417
5319
  "button",
5418
5320
  {
5419
5321
  type: "button",
@@ -5451,11 +5353,11 @@ var PlaceOrder = ({
5451
5353
  onStatusAction,
5452
5354
  onTabChange
5453
5355
  }) => {
5454
- const { enableAnimations } = (0, import_hooks19.useSdkUiConfig)();
5455
- const labels = (0, import_hooks19.useLabels)();
5356
+ const { enableAnimations } = (0, import_hooks18.useSdkUiConfig)();
5357
+ const labels = (0, import_hooks18.useLabels)();
5456
5358
  const resolvedDisclaimer = disclaimer === defaultTradingDisclaimer ? labels.trading.disclaimer : disclaimer;
5457
5359
  if (isLoading) {
5458
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
5360
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5459
5361
  Skeleton,
5460
5362
  {
5461
5363
  ariaLabel: labels.common.loading,
@@ -5494,7 +5396,7 @@ var PlaceOrder = ({
5494
5396
  }
5495
5397
  onOutcomeChange == null ? void 0 : onOutcomeChange(nextOutcomeId);
5496
5398
  };
5497
- const actionButton = /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
5399
+ const actionButton = /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5498
5400
  Button,
5499
5401
  {
5500
5402
  size: "large",
@@ -5506,11 +5408,11 @@ var PlaceOrder = ({
5506
5408
  children: actionLabel
5507
5409
  }
5508
5410
  );
5509
- const contentBody = /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex flex-col gap-6 p-5", children: [
5510
- /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex flex-col gap-2", children: [
5511
- /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex items-start justify-between gap-5", children: [
5512
- /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-3", children: [
5513
- marketImageUrl ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
5411
+ const contentBody = /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex flex-col gap-6 p-5", children: [
5412
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex flex-col gap-2", children: [
5413
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex items-start justify-between gap-5", children: [
5414
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-3", children: [
5415
+ marketImageUrl ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5514
5416
  "img",
5515
5417
  {
5516
5418
  src: marketImageUrl,
@@ -5518,16 +5420,16 @@ var PlaceOrder = ({
5518
5420
  className: "h-12 w-12 shrink-0 rounded-agg-lg object-cover"
5519
5421
  }
5520
5422
  ) : null,
5521
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("p", { className: "min-w-0 text-agg-base font-agg-bold leading-agg-6 text-agg-foreground", children: title })
5423
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("p", { className: "min-w-0 text-agg-base font-agg-bold leading-agg-6 text-agg-foreground", children: title })
5522
5424
  ] }),
5523
- isDismissible ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
5425
+ isDismissible ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5524
5426
  "button",
5525
5427
  {
5526
5428
  type: "button",
5527
5429
  "aria-label": labels.common.close,
5528
5430
  className: "shrink-0 text-agg-foreground",
5529
5431
  onClick: onClose,
5530
- children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
5432
+ children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5531
5433
  Icon,
5532
5434
  {
5533
5435
  name: "close",
@@ -5539,9 +5441,9 @@ var PlaceOrder = ({
5539
5441
  }
5540
5442
  ) : null
5541
5443
  ] }),
5542
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("p", { className: "text-agg-base leading-agg-6 text-agg-foreground", children: dateLabel })
5444
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("p", { className: "text-agg-base leading-agg-6 text-agg-foreground", children: dateLabel })
5543
5445
  ] }),
5544
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
5446
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5545
5447
  Tabs,
5546
5448
  {
5547
5449
  ariaLabel: labels.common.tabsAria,
@@ -5557,11 +5459,11 @@ var PlaceOrder = ({
5557
5459
  }
5558
5460
  }
5559
5461
  ),
5560
- /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex flex-col gap-4", children: [
5561
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "flex w-full gap-2", children: outcomes.map((outcome, index) => {
5462
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex flex-col gap-4", children: [
5463
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "flex w-full gap-2", children: outcomes.map((outcome, index) => {
5562
5464
  const isActive = outcome.id === resolvedOutcomeId;
5563
5465
  const isPositive = resolveIsPositiveOutcome(outcome, index);
5564
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
5466
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5565
5467
  "button",
5566
5468
  {
5567
5469
  type: "button",
@@ -5578,16 +5480,16 @@ var PlaceOrder = ({
5578
5480
  outcome.id
5579
5481
  );
5580
5482
  }) }),
5581
- /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
5582
- /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex flex-col", children: [
5583
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("p", { className: "text-agg-base font-agg-bold leading-agg-6 text-agg-foreground", children: primaryMetric.label }),
5584
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-muted-foreground", children: primaryMetric.hint })
5483
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
5484
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex flex-col", children: [
5485
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("p", { className: "text-agg-base font-agg-bold leading-agg-6 text-agg-foreground", children: primaryMetric.label }),
5486
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-muted-foreground", children: primaryMetric.hint })
5585
5487
  ] }),
5586
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("p", { className: "text-agg-3xl font-agg-bold leading-agg-9 text-agg-foreground", children: primaryMetric.value })
5488
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("p", { className: "text-agg-3xl font-agg-bold leading-agg-9 text-agg-foreground", children: primaryMetric.value })
5587
5489
  ] })
5588
5490
  ] }),
5589
- /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex flex-col gap-2", children: [
5590
- /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
5491
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex flex-col gap-2", children: [
5492
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
5591
5493
  "div",
5592
5494
  {
5593
5495
  className: cn(
@@ -5595,7 +5497,7 @@ var PlaceOrder = ({
5595
5497
  getRoutingCardClassName(hasHighlightedRouting)
5596
5498
  ),
5597
5499
  children: [
5598
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
5500
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5599
5501
  "div",
5600
5502
  {
5601
5503
  className: cn(
@@ -5604,11 +5506,11 @@ var PlaceOrder = ({
5604
5506
  )
5605
5507
  }
5606
5508
  ),
5607
- /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "relative flex flex-col gap-3", children: [
5608
- routing.rows.map((row, index) => /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex flex-col gap-3", children: [
5609
- /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
5610
- /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex min-w-0 items-center gap-2", children: [
5611
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
5509
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "relative flex flex-col gap-3", children: [
5510
+ routing.rows.map((row, index) => /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex flex-col gap-3", children: [
5511
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
5512
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex min-w-0 items-center gap-2", children: [
5513
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5612
5514
  VenueLogo,
5613
5515
  {
5614
5516
  venue: row.venue,
@@ -5616,11 +5518,11 @@ var PlaceOrder = ({
5616
5518
  ariaLabel: getTradingVenueLabel(row.venue)
5617
5519
  }
5618
5520
  ),
5619
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("p", { className: "truncate text-agg-base leading-agg-6 text-agg-foreground", children: row.label })
5521
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("p", { className: "truncate text-agg-base leading-agg-6 text-agg-foreground", children: row.label })
5620
5522
  ] }),
5621
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("p", { className: "shrink-0 text-agg-base leading-agg-6 text-agg-foreground", children: row.priceLabel })
5523
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("p", { className: "shrink-0 text-agg-base leading-agg-6 text-agg-foreground", children: row.priceLabel })
5622
5524
  ] }),
5623
- index < routing.rows.length - 1 ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
5525
+ index < routing.rows.length - 1 ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5624
5526
  "div",
5625
5527
  {
5626
5528
  className: cn(
@@ -5630,19 +5532,19 @@ var PlaceOrder = ({
5630
5532
  }
5631
5533
  ) : null
5632
5534
  ] }, `${row.venue}-${row.label}`)),
5633
- routing.highlightLabel ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("p", { className: "text-center text-agg-sm font-agg-bold leading-agg-5 uppercase text-agg-trade-highlight-accent", children: routing.highlightLabel }) : null
5535
+ routing.highlightLabel ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("p", { className: "text-center text-agg-sm font-agg-bold leading-agg-5 uppercase text-agg-trade-highlight-accent", children: routing.highlightLabel }) : null
5634
5536
  ] })
5635
5537
  ]
5636
5538
  }
5637
5539
  ),
5638
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-muted-foreground", children: routing.helperLabel })
5540
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-muted-foreground", children: routing.helperLabel })
5639
5541
  ] }),
5640
- /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
5641
- /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex flex-col", children: [
5642
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("p", { className: "text-agg-base font-agg-bold leading-agg-6 text-agg-foreground", children: result.label }),
5643
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-muted-foreground", children: result.hint })
5542
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
5543
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex flex-col", children: [
5544
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("p", { className: "text-agg-base font-agg-bold leading-agg-6 text-agg-foreground", children: result.label }),
5545
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-muted-foreground", children: result.hint })
5644
5546
  ] }),
5645
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
5547
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5646
5548
  "p",
5647
5549
  {
5648
5550
  className: cn(
@@ -5653,7 +5555,7 @@ var PlaceOrder = ({
5653
5555
  }
5654
5556
  )
5655
5557
  ] }),
5656
- /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_jsx_runtime67.Fragment, { children: [
5558
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_jsx_runtime66.Fragment, { children: [
5657
5559
  getStatusContent({
5658
5560
  placement: "above-action",
5659
5561
  status,
@@ -5666,16 +5568,16 @@ var PlaceOrder = ({
5666
5568
  onStatusAction
5667
5569
  })
5668
5570
  ] }),
5669
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("p", { className: "text-center text-agg-xs leading-agg-4 text-agg-muted-foreground", children: resolvedDisclaimer })
5571
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("p", { className: "text-center text-agg-xs leading-agg-4 text-agg-muted-foreground", children: resolvedDisclaimer })
5670
5572
  ] });
5671
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Card, { className: cn(getPlaceOrderContainerClassName(), className), children: contentBody });
5573
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Card, { className: cn(getPlaceOrderContainerClassName(), className), children: contentBody });
5672
5574
  };
5673
5575
  PlaceOrder.displayName = "PlaceOrder";
5674
5576
 
5675
5577
  // src/trading/settlement/index.tsx
5676
5578
  var import_react8 = require("react");
5677
- var import_hooks20 = require("@agg-market/hooks");
5678
- var import_jsx_runtime68 = require("react/jsx-runtime");
5579
+ var import_hooks19 = require("@agg-market/hooks");
5580
+ var import_jsx_runtime67 = require("react/jsx-runtime");
5679
5581
  var getSettlementHeaderClassName = () => {
5680
5582
  return "flex items-center justify-between gap-4";
5681
5583
  };
@@ -5693,8 +5595,8 @@ var Settlement = ({
5693
5595
  className
5694
5596
  }) => {
5695
5597
  var _a, _b;
5696
- const labels = (0, import_hooks20.useLabels)();
5697
- const { enableAnimations } = (0, import_hooks20.useSdkUiConfig)();
5598
+ const labels = (0, import_hooks19.useLabels)();
5599
+ const { enableAnimations } = (0, import_hooks19.useSdkUiConfig)();
5698
5600
  const resolvedSectionLabel = sectionLabel === defaultSettlementSectionLabel ? labels.trading.settlementSection : sectionLabel;
5699
5601
  const resolvedDifferencesTitle = differencesTitle === defaultSettlementDifferencesTitle ? labels.trading.settlementDifferencesTitle : differencesTitle;
5700
5602
  const [internalExpandedVenue, setInternalExpandedVenue] = (0, import_react8.useState)(
@@ -5867,7 +5769,7 @@ var Settlement = ({
5867
5769
  onShowMore == null ? void 0 : onShowMore(venue);
5868
5770
  };
5869
5771
  if (isLoading) {
5870
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
5772
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
5871
5773
  Skeleton,
5872
5774
  {
5873
5775
  ariaLabel: labels.trading.settlementLoading,
@@ -5876,7 +5778,7 @@ var Settlement = ({
5876
5778
  }
5877
5779
  );
5878
5780
  }
5879
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
5781
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
5880
5782
  Card,
5881
5783
  {
5882
5784
  className: cn(
@@ -5884,16 +5786,16 @@ var Settlement = ({
5884
5786
  className
5885
5787
  ),
5886
5788
  children: [
5887
- /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: getSettlementHeaderClassName(), children: [
5888
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("p", { className: "text-agg-xs font-agg-bold leading-agg-4 uppercase text-agg-muted-foreground", children: resolvedSectionLabel }),
5889
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("p", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: question })
5789
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: getSettlementHeaderClassName(), children: [
5790
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("p", { className: "text-agg-xs font-agg-bold leading-agg-4 uppercase text-agg-muted-foreground", children: resolvedSectionLabel }),
5791
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("p", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: question })
5890
5792
  ] }),
5891
- /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "flex flex-col gap-2", children: [
5892
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("p", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: resolvedDifferencesTitle }),
5893
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("ul", { className: "list-disc pl-5 text-agg-sm leading-agg-5 text-agg-foreground", children: differences.map((difference) => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("li", { children: difference }, difference)) })
5793
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex flex-col gap-2", children: [
5794
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("p", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: resolvedDifferencesTitle }),
5795
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("ul", { className: "list-disc pl-5 text-agg-sm leading-agg-5 text-agg-foreground", children: differences.map((difference) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("li", { children: difference }, difference)) })
5894
5796
  ] }),
5895
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "h-px w-full bg-agg-separator" }),
5896
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "flex flex-col gap-3", children: venues.map((venue) => {
5797
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "h-px w-full bg-agg-separator" }),
5798
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "flex flex-col gap-3", children: venues.map((venue) => {
5897
5799
  var _a2, _b2;
5898
5800
  const venueLabel = getTradingVenueLabel(venue.venue, venue.label);
5899
5801
  const isExpanded = resolvedExpandedVenue === venue.venue;
@@ -5901,8 +5803,8 @@ var Settlement = ({
5901
5803
  const isDescriptionOverflowing = !!overflowingDescriptionByVenue[venue.venue];
5902
5804
  const shouldShowDescriptionCta = isExpanded && isDescriptionOverflowing && !isDescriptionExpanded;
5903
5805
  const resolvedShowMoreLabel = (_a2 = venue.showMoreLabel) != null ? _a2 : "Show more";
5904
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "flex flex-col", children: [
5905
- /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
5806
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex flex-col", children: [
5807
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
5906
5808
  "button",
5907
5809
  {
5908
5810
  type: "button",
@@ -5918,7 +5820,7 @@ var Settlement = ({
5918
5820
  "aria-label": labels.trading.settlementDetailsAria(venueLabel),
5919
5821
  onClick: () => handleVenueClick(venue.venue),
5920
5822
  children: [
5921
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
5823
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
5922
5824
  VenueLogo,
5923
5825
  {
5924
5826
  venue: venue.venue,
@@ -5926,7 +5828,7 @@ var Settlement = ({
5926
5828
  ariaLabel: venueLabel
5927
5829
  }
5928
5830
  ),
5929
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
5831
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
5930
5832
  "span",
5931
5833
  {
5932
5834
  className: cn(
@@ -5936,7 +5838,7 @@ var Settlement = ({
5936
5838
  children: venueLabel
5937
5839
  }
5938
5840
  ),
5939
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
5841
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
5940
5842
  Icon,
5941
5843
  {
5942
5844
  name: isExpanded ? "chevron-up" : "chevron-down",
@@ -5948,7 +5850,7 @@ var Settlement = ({
5948
5850
  ]
5949
5851
  }
5950
5852
  ),
5951
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
5853
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
5952
5854
  "div",
5953
5855
  {
5954
5856
  "aria-hidden": !isExpanded,
@@ -5961,17 +5863,17 @@ var Settlement = ({
5961
5863
  "transition-[grid-template-rows,opacity,margin-top] duration-300 ease-in-out"
5962
5864
  )
5963
5865
  ),
5964
- children: /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
5866
+ children: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
5965
5867
  "div",
5966
5868
  {
5967
5869
  ref: (element) => handleDescriptionWrapperRef(venue.venue, element),
5968
5870
  className: "relative min-h-0",
5969
5871
  children: [
5970
- /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("p", { className: "min-h-0 text-agg-sm leading-agg-5 text-agg-foreground", children: [
5872
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("p", { className: "min-h-0 text-agg-sm leading-agg-5 text-agg-foreground", children: [
5971
5873
  isDescriptionExpanded || !isDescriptionOverflowing ? venue.description : (_b2 = collapsedDescriptionByVenue[venue.venue]) != null ? _b2 : venue.description,
5972
- shouldShowDescriptionCta ? /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_jsx_runtime68.Fragment, { children: [
5874
+ shouldShowDescriptionCta ? /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_jsx_runtime67.Fragment, { children: [
5973
5875
  "... ",
5974
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
5876
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
5975
5877
  "button",
5976
5878
  {
5977
5879
  type: "button",
@@ -5994,7 +5896,7 @@ var Settlement = ({
5994
5896
  )
5995
5897
  ] }) : null
5996
5898
  ] }),
5997
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
5899
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
5998
5900
  "p",
5999
5901
  {
6000
5902
  ref: (element) => handleDescriptionMeasureRef(venue.venue, element),
@@ -6016,7 +5918,7 @@ var Settlement = ({
6016
5918
  Settlement.displayName = "Settlement";
6017
5919
 
6018
5920
  // src/pages/event-market/index.tsx
6019
- var import_jsx_runtime69 = require("react/jsx-runtime");
5921
+ var import_jsx_runtime68 = require("react/jsx-runtime");
6020
5922
  var getMarketDateValue = (market, fallbackIndex) => {
6021
5923
  var _a, _b, _c;
6022
5924
  const candidateDate = (_c = (_b = (_a = market.endDate) != null ? _a : market.startDate) != null ? _b : market.creationDate) != null ? _c : null;
@@ -6075,16 +5977,16 @@ var resolveInitialExpandedMarketId = (detailedMarkets, defaultExpandedMarketId)
6075
5977
  var EventMarketPageUnavailableState = ({
6076
5978
  ariaLabel
6077
5979
  }) => {
6078
- const labels = (0, import_hooks21.useLabels)();
6079
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
5980
+ const labels = (0, import_hooks20.useLabels)();
5981
+ return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
6080
5982
  Card,
6081
5983
  {
6082
5984
  className: "rounded-agg-xl border border-agg-separator bg-agg-secondary p-6 shadow-none hover:shadow-none",
6083
5985
  role: "status",
6084
5986
  "aria-label": ariaLabel != null ? ariaLabel : labels.eventMarketPage.unavailableAria,
6085
- children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "flex flex-col gap-1", children: [
6086
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Typography, { variant: "body-large-strong", children: labels.eventMarketPage.unavailableTitle }),
6087
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Typography, { variant: "label", className: "text-agg-muted-foreground", children: labels.eventMarketPage.unavailableDescription })
5987
+ children: /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "flex flex-col gap-1", children: [
5988
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Typography, { variant: "body-large-strong", children: labels.eventMarketPage.unavailableTitle }),
5989
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Typography, { variant: "label", className: "text-agg-muted-foreground", children: labels.eventMarketPage.unavailableDescription })
6088
5990
  ] })
6089
5991
  }
6090
5992
  );
@@ -6094,7 +5996,7 @@ var EventMarketPageLoadingState = ({
6094
5996
  settlement,
6095
5997
  classNames
6096
5998
  }) => {
6097
- const labels = (0, import_hooks21.useLabels)();
5999
+ const labels = (0, import_hooks20.useLabels)();
6098
6000
  const fallbackSettlement = settlement != null ? settlement : {
6099
6001
  sectionLabel: labels.trading.settlementSection,
6100
6002
  question: labels.eventMarketPage.loadingSettlementQuestion,
@@ -6107,7 +6009,7 @@ var EventMarketPageLoadingState = ({
6107
6009
  }
6108
6010
  ]
6109
6011
  };
6110
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("section", { className: cn("w-full", classNames == null ? void 0 : classNames.root), children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
6012
+ return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("section", { className: cn("w-full", classNames == null ? void 0 : classNames.root), children: /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
6111
6013
  "div",
6112
6014
  {
6113
6015
  className: cn(
@@ -6115,8 +6017,8 @@ var EventMarketPageLoadingState = ({
6115
6017
  classNames == null ? void 0 : classNames.content
6116
6018
  ),
6117
6019
  children: [
6118
- /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: cn("flex min-w-0 flex-1 flex-col gap-6", classNames == null ? void 0 : classNames.main), children: [
6119
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
6020
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: cn("flex min-w-0 flex-1 flex-col gap-6", classNames == null ? void 0 : classNames.main), children: [
6021
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
6120
6022
  EventListItemDetails,
6121
6023
  {
6122
6024
  isLoading: true,
@@ -6125,23 +6027,23 @@ var EventMarketPageLoadingState = ({
6125
6027
  }
6126
6028
  }
6127
6029
  ),
6128
- /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: cn("flex flex-col gap-3", classNames == null ? void 0 : classNames.markets), children: [
6129
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(MarketDetails, { isLoading: true, isOpened: true, classNames: { root: "w-full" } }),
6130
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(MarketDetails, { isLoading: true, isOpened: false, classNames: { root: "w-full" } }),
6131
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(MarketDetails, { isLoading: true, isOpened: false, classNames: { root: "w-full" } })
6030
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: cn("flex flex-col gap-3", classNames == null ? void 0 : classNames.markets), children: [
6031
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(MarketDetails, { isLoading: true, isOpened: true, classNames: { root: "w-full" } }),
6032
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(MarketDetails, { isLoading: true, isOpened: false, classNames: { root: "w-full" } }),
6033
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(MarketDetails, { isLoading: true, isOpened: false, classNames: { root: "w-full" } })
6132
6034
  ] }),
6133
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "md:hidden", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Settlement, __spreadProps(__spreadValues({}, fallbackSettlement), { isLoading: true, className: classNames == null ? void 0 : classNames.settlement })) }),
6134
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "hidden md:block", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Settlement, __spreadProps(__spreadValues({}, fallbackSettlement), { isLoading: true, className: classNames == null ? void 0 : classNames.settlement })) }),
6135
- placeOrder ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "md:hidden", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(PlaceOrder, __spreadProps(__spreadValues({}, placeOrder), { isLoading: true, className: classNames == null ? void 0 : classNames.mobileTrade })) }) : null
6035
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "md:hidden", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Settlement, __spreadProps(__spreadValues({}, fallbackSettlement), { isLoading: true, className: classNames == null ? void 0 : classNames.settlement })) }),
6036
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "hidden md:block", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Settlement, __spreadProps(__spreadValues({}, fallbackSettlement), { isLoading: true, className: classNames == null ? void 0 : classNames.settlement })) }),
6037
+ placeOrder ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "md:hidden", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(PlaceOrder, __spreadProps(__spreadValues({}, placeOrder), { isLoading: true, className: classNames == null ? void 0 : classNames.mobileTrade })) }) : null
6136
6038
  ] }),
6137
- placeOrder ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
6039
+ placeOrder ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
6138
6040
  "aside",
6139
6041
  {
6140
6042
  className: cn(
6141
6043
  "hidden w-full shrink-0 lg:sticky lg:top-6 lg:block lg:w-[343px]",
6142
6044
  classNames == null ? void 0 : classNames.sidebar
6143
6045
  ),
6144
- children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(PlaceOrder, __spreadProps(__spreadValues({}, placeOrder), { isLoading: true, className: classNames == null ? void 0 : classNames.trade }))
6046
+ children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(PlaceOrder, __spreadProps(__spreadValues({}, placeOrder), { isLoading: true, className: classNames == null ? void 0 : classNames.trade }))
6145
6047
  }
6146
6048
  ) : null
6147
6049
  ]
@@ -6160,7 +6062,7 @@ var EventMarketPageContent = ({
6160
6062
  classNames,
6161
6063
  ariaLabel
6162
6064
  }) => {
6163
- const labels = (0, import_hooks21.useLabels)();
6065
+ const labels = (0, import_hooks20.useLabels)();
6164
6066
  const resolvedHeroMarketId = (0, import_react9.useMemo)(() => {
6165
6067
  return resolveHeroMarketId(event, heroMarketId);
6166
6068
  }, [event, heroMarketId]);
@@ -6197,9 +6099,9 @@ var EventMarketPageContent = ({
6197
6099
  onExpandedMarketChange == null ? void 0 : onExpandedMarketChange(nextExpandedMarketId);
6198
6100
  };
6199
6101
  if (!heroEvent || !event.markets.length) {
6200
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(EventMarketPageUnavailableState, { ariaLabel });
6102
+ return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(EventMarketPageUnavailableState, { ariaLabel });
6201
6103
  }
6202
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("section", { className: cn("w-full", classNames == null ? void 0 : classNames.root), "aria-label": ariaLabel != null ? ariaLabel : event.title, children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
6104
+ return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("section", { className: cn("w-full", classNames == null ? void 0 : classNames.root), "aria-label": ariaLabel != null ? ariaLabel : event.title, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
6203
6105
  "div",
6204
6106
  {
6205
6107
  className: cn(
@@ -6207,8 +6109,8 @@ var EventMarketPageContent = ({
6207
6109
  classNames == null ? void 0 : classNames.content
6208
6110
  ),
6209
6111
  children: [
6210
- /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: cn("flex min-w-0 flex-1 flex-col gap-6", classNames == null ? void 0 : classNames.main), children: [
6211
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
6112
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: cn("flex min-w-0 flex-1 flex-col gap-6", classNames == null ? void 0 : classNames.main), children: [
6113
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
6212
6114
  EventListItemDetails,
6213
6115
  {
6214
6116
  event: heroEvent,
@@ -6218,9 +6120,9 @@ var EventMarketPageContent = ({
6218
6120
  }
6219
6121
  }
6220
6122
  ),
6221
- detailedMarkets.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: cn("flex flex-col gap-3", classNames == null ? void 0 : classNames.markets), children: detailedMarkets.map((market) => {
6123
+ detailedMarkets.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: cn("flex flex-col gap-3", classNames == null ? void 0 : classNames.markets), children: detailedMarkets.map((market) => {
6222
6124
  const isOpened = resolvedExpandedMarketId === market.id;
6223
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
6125
+ return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
6224
6126
  MarketDetails,
6225
6127
  {
6226
6128
  event,
@@ -6235,30 +6137,30 @@ var EventMarketPageContent = ({
6235
6137
  market.id
6236
6138
  );
6237
6139
  }) }) : null,
6238
- settlement ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "md:hidden", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Settlement, __spreadProps(__spreadValues({}, settlement), { className: classNames == null ? void 0 : classNames.settlement })) }) : null,
6239
- settlement ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "hidden md:block", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Settlement, __spreadProps(__spreadValues({}, settlement), { className: classNames == null ? void 0 : classNames.settlement })) }) : null
6140
+ settlement ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "md:hidden", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Settlement, __spreadProps(__spreadValues({}, settlement), { className: classNames == null ? void 0 : classNames.settlement })) }) : null,
6141
+ settlement ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "hidden md:block", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Settlement, __spreadProps(__spreadValues({}, settlement), { className: classNames == null ? void 0 : classNames.settlement })) }) : null
6240
6142
  ] }),
6241
- placeOrder ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("aside", { className: cn("w-full lg:block lg:max-w-[360px]", classNames == null ? void 0 : classNames.sidebar), children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(PlaceOrder, __spreadProps(__spreadValues({}, placeOrder), { className: classNames == null ? void 0 : classNames.trade })) }) : null
6143
+ placeOrder ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("aside", { className: cn("w-full lg:block lg:max-w-[360px]", classNames == null ? void 0 : classNames.sidebar), children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(PlaceOrder, __spreadProps(__spreadValues({}, placeOrder), { className: classNames == null ? void 0 : classNames.trade })) }) : null
6242
6144
  ]
6243
6145
  }
6244
6146
  ) });
6245
6147
  };
6246
6148
  var EventMarketPage = (props) => {
6247
6149
  const hasEventProp = "event" in props && !!props.event;
6248
- const { event: fetchedEvent, isLoading: isFetchingEvent } = (0, import_hooks21.useEvent)(
6150
+ const { event: fetchedEvent, isLoading: isFetchingEvent } = (0, import_hooks20.useEvent)(
6249
6151
  hasEventProp ? void 0 : props.eventId,
6250
6152
  {
6251
6153
  enabled: !props.isLoading && !hasEventProp && !!props.eventId
6252
6154
  }
6253
6155
  );
6254
6156
  if (props.isLoading) {
6255
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(EventMarketPageLoadingState, { placeOrder: props.placeOrder, settlement: props.settlement });
6157
+ return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(EventMarketPageLoadingState, { placeOrder: props.placeOrder, settlement: props.settlement });
6256
6158
  }
6257
6159
  if ("event" in props && props.event) {
6258
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(EventMarketPageContent, __spreadProps(__spreadValues({}, props), { event: props.event }));
6160
+ return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(EventMarketPageContent, __spreadProps(__spreadValues({}, props), { event: props.event }));
6259
6161
  }
6260
6162
  if (isFetchingEvent) {
6261
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
6163
+ return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
6262
6164
  EventMarketPageLoadingState,
6263
6165
  {
6264
6166
  placeOrder: props.placeOrder,
@@ -6268,9 +6170,9 @@ var EventMarketPage = (props) => {
6268
6170
  );
6269
6171
  }
6270
6172
  if (!fetchedEvent) {
6271
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(EventMarketPageUnavailableState, { ariaLabel: props.ariaLabel });
6173
+ return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(EventMarketPageUnavailableState, { ariaLabel: props.ariaLabel });
6272
6174
  }
6273
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(EventMarketPageContent, __spreadProps(__spreadValues({}, props), { event: fetchedEvent }));
6175
+ return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(EventMarketPageContent, __spreadProps(__spreadValues({}, props), { event: fetchedEvent }));
6274
6176
  };
6275
6177
  EventMarketPage.displayName = "EventMarketPage";
6276
6178
  // Annotate the CommonJS export names for ESM import in node: