@loafmarkets/ui 0.1.89 → 0.1.91

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as React5 from 'react';
2
- import React5__default, { createContext, useState, useEffect, useCallback, useContext, useMemo, useRef } from 'react';
2
+ import React5__default, { createContext, useState, useRef, useCallback, useEffect, useMemo, useContext } from 'react';
3
3
  import { Slot } from '@radix-ui/react-slot';
4
4
  import { cva } from 'class-variance-authority';
5
5
  import { clsx } from 'clsx';
@@ -7,7 +7,7 @@ import { twMerge } from 'tailwind-merge';
7
7
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
8
8
  import styled25, { keyframes, css } from 'styled-components';
9
9
  import * as ReactDOM from 'react-dom';
10
- import { Newspaper, BedDouble, Bath, CarFront } from 'lucide-react';
10
+ import { Newspaper } from 'lucide-react';
11
11
  import * as LightweightCharts from 'lightweight-charts';
12
12
  import { BiChevronUp, BiChevronDown, BiX, BiCoin, BiWallet, BiCreditCard, BiCalendar, BiInfoCircle, BiPencil, BiImages, BiVideo, BiMap } from 'react-icons/bi';
13
13
  import { FaChartLine, FaBitcoin } from 'react-icons/fa';
@@ -1770,6 +1770,11 @@ function useViewportCompact(breakpoint) {
1770
1770
  return isCompact;
1771
1771
  }
1772
1772
  var formatNumber = (value, precision) => value.toFixed(precision);
1773
+ var formatTradeTime = (time) => {
1774
+ const d = new Date(time);
1775
+ if (Number.isNaN(d.getTime())) return time;
1776
+ return d.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", second: "2-digit", hour12: false });
1777
+ };
1773
1778
  var FLASH_DURATION_MS = 450;
1774
1779
  var FLASH_UP_COLOR = "rgba(14, 203, 129, 0.35)";
1775
1780
  var FLASH_DOWN_COLOR = "rgba(246, 70, 93, 0.35)";
@@ -1839,14 +1844,12 @@ function TradeRow({
1839
1844
  {
1840
1845
  ref: rowRef,
1841
1846
  className: "grid items-center",
1842
- style: { gridTemplateColumns: "1.2fr 0.8fr", padding: "0.2rem 0", fontSize: "0.8rem" },
1847
+ style: { gridTemplateColumns: "1fr 1fr 1fr", padding: "0.2rem 0", fontSize: "0.8rem" },
1843
1848
  children: [
1844
- /* @__PURE__ */ jsxs("div", { style: { color: trade.type === "buy" ? "#0ecb81" : "#f6465d", fontWeight: 500 }, children: [
1845
- "$",
1846
- formatNumber(trade.price, precision)
1847
- ] }),
1848
- /* @__PURE__ */ jsxs("div", { style: { textAlign: "right", paddingRight: "0.5rem", display: "flex", alignItems: "center", justifyContent: "flex-end", gap: "4px" }, children: [
1849
- formatNumber(trade.amount, amountPrecision),
1849
+ /* @__PURE__ */ jsx("div", { style: { color: trade.type === "buy" ? "#0ecb81" : "#f6465d" }, className: "tabular-nums", children: formatNumber(trade.price, precision) }),
1850
+ /* @__PURE__ */ jsx("div", { style: { textAlign: "right" }, className: "tabular-nums text-white/90", children: formatNumber(trade.amount, amountPrecision) }),
1851
+ /* @__PURE__ */ jsxs("div", { style: { textAlign: "right", paddingRight: "0.5rem", display: "flex", alignItems: "center", justifyContent: "flex-end", gap: "4px" }, className: "tabular-nums text-white/50", children: [
1852
+ trade.time != null && /* @__PURE__ */ jsx("span", { children: formatTradeTime(trade.time) }),
1850
1853
  explorerUrl && /* @__PURE__ */ jsx(
1851
1854
  "a",
1852
1855
  {
@@ -1867,24 +1870,22 @@ function TradeRow({
1867
1870
  "div",
1868
1871
  {
1869
1872
  ref: rowRef,
1870
- className: "grid grid-cols-3 items-center gap-3 px-3 py-1.5",
1873
+ className: "relative grid grid-cols-3 items-center gap-3 px-3 text-[0.8rem]",
1874
+ style: { height: `${DEPTH_ROW_HEIGHT_PX}px` },
1871
1875
  children: [
1872
- /* @__PURE__ */ jsxs(
1876
+ /* @__PURE__ */ jsx(
1873
1877
  "div",
1874
1878
  {
1875
1879
  className: cn(
1876
1880
  "tabular-nums",
1877
1881
  trade.type === "buy" ? "text-[#0ecb81]" : "text-[#f6465d]"
1878
1882
  ),
1879
- children: [
1880
- "$",
1881
- formatNumber(trade.price, precision)
1882
- ]
1883
+ children: formatNumber(trade.price, precision)
1883
1884
  }
1884
1885
  ),
1885
1886
  /* @__PURE__ */ jsx("div", { className: "text-right tabular-nums text-white/90", children: formatNumber(trade.amount, amountPrecision) }),
1886
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-end gap-1.5", children: [
1887
- trade.time != null && /* @__PURE__ */ jsx("span", { className: "tabular-nums text-white/50 text-xs", children: trade.time }),
1887
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-end gap-1.5 tabular-nums text-white/50", children: [
1888
+ trade.time != null && /* @__PURE__ */ jsx("span", { children: trade.time }),
1888
1889
  explorerUrl && /* @__PURE__ */ jsx(
1889
1890
  "a",
1890
1891
  {
@@ -1952,8 +1953,8 @@ function DepthRow({
1952
1953
  );
1953
1954
  }
1954
1955
  var clamp3 = (value, min, max) => Math.min(max, Math.max(min, value));
1955
- var LEVEL_ROWS_VISIBLE = 6;
1956
- var DEPTH_ROW_HEIGHT_PX = 26;
1956
+ var LEVEL_ROWS_VISIBLE = 5;
1957
+ var DEPTH_ROW_HEIGHT_PX = 28;
1957
1958
  var COMPACT_ROWS_VISIBLE = 5;
1958
1959
  var COMPACT_ROW_HEIGHT_PX = 30;
1959
1960
  var COMPACT_BREAKPOINT_PX = 1024;
@@ -1977,6 +1978,7 @@ var Orderbook = React5.forwardRef(
1977
1978
  onPriceClick,
1978
1979
  onLoafLiquidityClick,
1979
1980
  tradeExplorerUrl,
1981
+ maxLevels,
1980
1982
  className,
1981
1983
  ...props
1982
1984
  }, ref) => {
@@ -2021,8 +2023,10 @@ var Orderbook = React5.forwardRef(
2021
2023
  onTabChange?.(next);
2022
2024
  };
2023
2025
  const isCompact = variant === "compact" || variant === "auto" && viewportCompact;
2024
- const sectionHeight = isCompact ? COMPACT_ROWS_VISIBLE * COMPACT_ROW_HEIGHT_PX : LEVEL_ROWS_VISIBLE * DEPTH_ROW_HEIGHT_PX;
2025
- const rowCount = isCompact ? COMPACT_ROWS_VISIBLE : LEVEL_ROWS_VISIBLE;
2026
+ const effectiveLevels = maxLevels ?? LEVEL_ROWS_VISIBLE;
2027
+ const effectiveCompactLevels = maxLevels ?? COMPACT_ROWS_VISIBLE;
2028
+ const sectionHeight = isCompact ? effectiveCompactLevels * COMPACT_ROW_HEIGHT_PX : effectiveLevels * DEPTH_ROW_HEIGHT_PX;
2029
+ const rowCount = isCompact ? effectiveCompactLevels : effectiveLevels;
2026
2030
  const askVisibleLevels = asks.slice(-rowCount);
2027
2031
  const bidVisibleLevels = bids.slice(0, rowCount);
2028
2032
  const askCumDepths = new Array(askVisibleLevels.length);
@@ -2041,7 +2045,8 @@ var Orderbook = React5.forwardRef(
2041
2045
  bidCumDepths[i] = acc;
2042
2046
  }
2043
2047
  }
2044
- const combinedMaxCumDepth = Math.max(1, ...askCumDepths, ...bidCumDepths);
2048
+ const askMaxCumDepth = Math.max(1, ...askCumDepths);
2049
+ const bidMaxCumDepth = Math.max(1, ...bidCumDepths);
2045
2050
  const midClass = midChangePercent == null ? "text-white" : midChangePercent >= 0 ? "text-[#0ecb81]" : "text-[#f6465d]";
2046
2051
  const tradeFiltered = trades.filter((t) => tradeFilter === "all" || t.type === tradeFilter);
2047
2052
  const layoutProps = {
@@ -2061,7 +2066,8 @@ var Orderbook = React5.forwardRef(
2061
2066
  bidVisibleLevels,
2062
2067
  askCumDepths,
2063
2068
  bidCumDepths,
2064
- combinedMaxCumDepth,
2069
+ askMaxCumDepth,
2070
+ bidMaxCumDepth,
2065
2071
  midPrice,
2066
2072
  midChangePercent,
2067
2073
  midClass,
@@ -2071,14 +2077,16 @@ var Orderbook = React5.forwardRef(
2071
2077
  isLoading,
2072
2078
  seenTradeKeysRef,
2073
2079
  tradeExplorerUrl,
2074
- onPriceClick
2080
+ onPriceClick,
2081
+ levelCount: effectiveLevels,
2082
+ compactLevelCount: effectiveCompactLevels
2075
2083
  };
2076
2084
  return /* @__PURE__ */ jsx(
2077
2085
  Card,
2078
2086
  {
2079
2087
  ref,
2080
2088
  className: cn(
2081
- "w-full max-w-[520px] overflow-hidden rounded-[12px] border border-white/10 bg-[#111111] text-white shadow-md flex flex-col h-full",
2089
+ "w-full max-w-[520px] overflow-hidden rounded-[12px] border border-white/10 bg-[#111111] text-white shadow-md flex flex-col",
2082
2090
  isCompact && "max-w-none",
2083
2091
  className
2084
2092
  ),
@@ -2128,7 +2136,8 @@ function DesktopOrderbookLayout({
2128
2136
  bidVisibleLevels,
2129
2137
  askCumDepths,
2130
2138
  bidCumDepths,
2131
- combinedMaxCumDepth,
2139
+ askMaxCumDepth,
2140
+ bidMaxCumDepth,
2132
2141
  midPrice,
2133
2142
  midChangePercent,
2134
2143
  midClass,
@@ -2138,7 +2147,9 @@ function DesktopOrderbookLayout({
2138
2147
  isLoading,
2139
2148
  seenTradeKeysRef,
2140
2149
  tradeExplorerUrl,
2141
- onPriceClick
2150
+ onPriceClick,
2151
+ levelCount: effectiveLevels,
2152
+ compactLevelCount: _compactLevelCount
2142
2153
  }) {
2143
2154
  const midRef = React5.useRef(null);
2144
2155
  useMidPriceFlash(midRef, midPrice, "#0b1a24");
@@ -2226,7 +2237,7 @@ function DesktopOrderbookLayout({
2226
2237
  {
2227
2238
  className: "max-h-[380px] overflow-y-auto overflow-x-hidden",
2228
2239
  style: { scrollbarGutter: "stable" },
2229
- children: isLoading && tradeFiltered.length === 0 ? /* @__PURE__ */ jsx("div", { className: "divide-y divide-white/5", children: Array.from({ length: LEVEL_ROWS_VISIBLE }).map((_, i) => /* @__PURE__ */ jsx(SkeletonRow, {}, `trade-skel-${i}`)) }) : tradeFiltered.length === 0 ? /* @__PURE__ */ jsx("div", { className: "px-3 py-10 text-center text-sm text-white/50", children: "No trades" }) : /* @__PURE__ */ jsx("div", { className: "divide-y divide-white/5", children: tradeFiltered.map((trade, i) => {
2240
+ children: isLoading && tradeFiltered.length === 0 ? /* @__PURE__ */ jsx("div", { children: Array.from({ length: effectiveLevels }).map((_, i) => /* @__PURE__ */ jsx(SkeletonRow, {}, `trade-skel-${i}`)) }) : tradeFiltered.length === 0 ? /* @__PURE__ */ jsx("div", { className: "px-3 py-10 text-center text-sm text-white/50", children: "No trades" }) : /* @__PURE__ */ jsx("div", { children: tradeFiltered.map((trade, i) => {
2230
2241
  const tradeKey = getTradeKey(trade, i);
2231
2242
  const explorerUrl = trade.txHash && tradeExplorerUrl ? tradeExplorerUrl(trade.txHash) : trade.txHash ? `https://sepolia.etherscan.io/tx/${trade.txHash}` : void 0;
2232
2243
  return /* @__PURE__ */ jsx(
@@ -2243,20 +2254,20 @@ function DesktopOrderbookLayout({
2243
2254
  );
2244
2255
  }) })
2245
2256
  }
2246
- ) : /* @__PURE__ */ jsxs("div", { className: "flex flex-1 flex-col min-h-0", children: [
2257
+ ) : /* @__PURE__ */ jsxs("div", { className: "flex flex-col min-h-0 overflow-hidden", children: [
2247
2258
  /* @__PURE__ */ jsx(
2248
2259
  "div",
2249
2260
  {
2250
- className: "flex flex-col justify-end divide-y divide-white/5 overflow-hidden",
2261
+ className: "flex flex-col justify-end overflow-hidden flex-shrink-0",
2251
2262
  style: { height: `${sectionHeight}px` },
2252
- children: isLoading ? Array.from({ length: LEVEL_ROWS_VISIBLE }).map((_, i) => /* @__PURE__ */ jsx(SkeletonRow, {}, `ask-skel-${i}`)) : askVisibleLevels.length === 0 ? /* @__PURE__ */ jsx("div", { className: "flex h-full items-center justify-center px-3 text-xs text-white/40", children: "No asks" }) : askVisibleLevels.map((l, i) => /* @__PURE__ */ jsx(
2263
+ children: isLoading ? Array.from({ length: effectiveLevels }).map((_, i) => /* @__PURE__ */ jsx(SkeletonRow, {}, `ask-skel-${i}`)) : askVisibleLevels.length === 0 ? /* @__PURE__ */ jsx("div", { className: "flex h-full items-center justify-center px-3 text-xs text-white/40", children: "No asks" }) : askVisibleLevels.map((l, i) => /* @__PURE__ */ jsx(
2253
2264
  DepthRow,
2254
2265
  {
2255
2266
  side: "ask",
2256
2267
  price: l.price,
2257
2268
  amount: l.amount,
2258
2269
  cumDepth: askCumDepths[i],
2259
- depthPct: askCumDepths[i] / combinedMaxCumDepth * 100,
2270
+ depthPct: askCumDepths[i] / askMaxCumDepth * 100,
2260
2271
  precision,
2261
2272
  amountPrecision,
2262
2273
  hasUserOrder: userAskPrices.has(l.price),
@@ -2270,7 +2281,7 @@ function DesktopOrderbookLayout({
2270
2281
  "div",
2271
2282
  {
2272
2283
  ref: midRef,
2273
- className: "grid grid-cols-2 items-center gap-3 bg-[#0b1a24] px-3 py-2",
2284
+ className: "grid grid-cols-2 items-center gap-3 bg-[#0b1a24] px-3 py-2 flex-shrink-0",
2274
2285
  children: [
2275
2286
  /* @__PURE__ */ jsx("div", { className: cn("text-lg font-semibold tabular-nums", midClass), children: isLoading ? /* @__PURE__ */ jsx(Skeleton, { width: 110, height: 20 }) : /* @__PURE__ */ jsxs(Fragment, { children: [
2276
2287
  "$",
@@ -2288,16 +2299,16 @@ function DesktopOrderbookLayout({
2288
2299
  /* @__PURE__ */ jsx(
2289
2300
  "div",
2290
2301
  {
2291
- className: "divide-y divide-white/5 overflow-hidden",
2302
+ className: "flex flex-col overflow-hidden flex-shrink-0",
2292
2303
  style: { height: `${sectionHeight}px` },
2293
- children: isLoading ? Array.from({ length: LEVEL_ROWS_VISIBLE }).map((_, i) => /* @__PURE__ */ jsx(SkeletonRow, {}, `bid-skel-${i}`)) : bidVisibleLevels.length === 0 ? /* @__PURE__ */ jsx("div", { className: "flex h-full items-center justify-center px-3 text-xs text-white/40", children: "No bids" }) : bidVisibleLevels.map((l, i) => /* @__PURE__ */ jsx(
2304
+ children: isLoading ? Array.from({ length: effectiveLevels }).map((_, i) => /* @__PURE__ */ jsx(SkeletonRow, {}, `bid-skel-${i}`)) : bidVisibleLevels.length === 0 ? /* @__PURE__ */ jsx("div", { className: "flex h-full items-center justify-center px-3 text-xs text-white/40", children: "No bids" }) : bidVisibleLevels.map((l, i) => /* @__PURE__ */ jsx(
2294
2305
  DepthRow,
2295
2306
  {
2296
2307
  side: "bid",
2297
2308
  price: l.price,
2298
2309
  amount: l.amount,
2299
2310
  cumDepth: bidCumDepths[i],
2300
- depthPct: bidCumDepths[i] / combinedMaxCumDepth * 100,
2311
+ depthPct: bidCumDepths[i] / bidMaxCumDepth * 100,
2301
2312
  precision,
2302
2313
  amountPrecision,
2303
2314
  hasUserOrder: userBidPrices.has(l.price),
@@ -2326,7 +2337,8 @@ function MobileOrderbookLayout({
2326
2337
  bidVisibleLevels: visibleBids,
2327
2338
  askCumDepths,
2328
2339
  bidCumDepths,
2329
- combinedMaxCumDepth,
2340
+ askMaxCumDepth,
2341
+ bidMaxCumDepth,
2330
2342
  midPrice,
2331
2343
  midChangePercent,
2332
2344
  midClass,
@@ -2336,7 +2348,9 @@ function MobileOrderbookLayout({
2336
2348
  isLoading,
2337
2349
  seenTradeKeysRef,
2338
2350
  tradeExplorerUrl,
2339
- onPriceClick
2351
+ onPriceClick,
2352
+ levelCount: _levelCount,
2353
+ compactLevelCount: effectiveCompactLevels
2340
2354
  }) {
2341
2355
  const midRef = React5.useRef(null);
2342
2356
  useMidPriceFlash(midRef, midPrice, "transparent");
@@ -2408,13 +2422,13 @@ function MobileOrderbookLayout({
2408
2422
  ]
2409
2423
  }
2410
2424
  ),
2411
- /* @__PURE__ */ jsx("div", { style: { display: "flex", flexDirection: "column" }, children: isLoading ? Array.from({ length: COMPACT_ROWS_VISIBLE }).map((_, i) => /* @__PURE__ */ jsx(SkeletonRow, { compact: true }, `m-ask-skel-${i}`)) : visibleAsks.length === 0 ? /* @__PURE__ */ jsx("div", { style: { padding: "0.75rem 0", textAlign: "center", color: "rgba(255,255,255,0.4)", fontSize: "0.72rem" }, children: "No asks" }) : visibleAsks.map((l, i) => /* @__PURE__ */ jsx(
2425
+ /* @__PURE__ */ jsx("div", { style: { display: "flex", flexDirection: "column", height: `${effectiveCompactLevels * COMPACT_ROW_HEIGHT_PX}px`, justifyContent: "flex-end", overflow: "hidden" }, children: isLoading ? Array.from({ length: effectiveCompactLevels }).map((_, i) => /* @__PURE__ */ jsx(SkeletonRow, { compact: true }, `m-ask-skel-${i}`)) : visibleAsks.length === 0 ? /* @__PURE__ */ jsx("div", { style: { padding: "0.75rem 0", textAlign: "center", color: "rgba(255,255,255,0.4)", fontSize: "0.72rem" }, children: "No asks" }) : visibleAsks.map((l, i) => /* @__PURE__ */ jsx(
2412
2426
  MobileDepthRow,
2413
2427
  {
2414
2428
  side: "ask",
2415
2429
  price: l.price,
2416
2430
  amount: l.amount,
2417
- depthPct: askCumDepths[i] / combinedMaxCumDepth * 100,
2431
+ depthPct: askCumDepths[i] / askMaxCumDepth * 100,
2418
2432
  precision,
2419
2433
  amountPrecision,
2420
2434
  hasUserOrder: userAskPrices.has(l.price),
@@ -2455,13 +2469,13 @@ function MobileOrderbookLayout({
2455
2469
  ]
2456
2470
  }
2457
2471
  ),
2458
- /* @__PURE__ */ jsx("div", { style: { display: "flex", flexDirection: "column" }, children: isLoading ? Array.from({ length: COMPACT_ROWS_VISIBLE }).map((_, i) => /* @__PURE__ */ jsx(SkeletonRow, { compact: true }, `m-bid-skel-${i}`)) : visibleBids.length === 0 ? /* @__PURE__ */ jsx("div", { style: { padding: "0.75rem 0", textAlign: "center", color: "rgba(255,255,255,0.4)", fontSize: "0.72rem" }, children: "No bids" }) : visibleBids.map((l, i) => /* @__PURE__ */ jsx(
2472
+ /* @__PURE__ */ jsx("div", { style: { display: "flex", flexDirection: "column", height: `${effectiveCompactLevels * COMPACT_ROW_HEIGHT_PX}px`, overflow: "hidden" }, children: isLoading ? Array.from({ length: effectiveCompactLevels }).map((_, i) => /* @__PURE__ */ jsx(SkeletonRow, { compact: true }, `m-bid-skel-${i}`)) : visibleBids.length === 0 ? /* @__PURE__ */ jsx("div", { style: { padding: "0.75rem 0", textAlign: "center", color: "rgba(255,255,255,0.4)", fontSize: "0.72rem" }, children: "No bids" }) : visibleBids.map((l, i) => /* @__PURE__ */ jsx(
2459
2473
  MobileDepthRow,
2460
2474
  {
2461
2475
  side: "bid",
2462
2476
  price: l.price,
2463
2477
  amount: l.amount,
2464
- depthPct: bidCumDepths[i] / combinedMaxCumDepth * 100,
2478
+ depthPct: bidCumDepths[i] / bidMaxCumDepth * 100,
2465
2479
  precision,
2466
2480
  amountPrecision,
2467
2481
  hasUserOrder: userBidPrices.has(l.price),
@@ -2481,7 +2495,7 @@ function MobileOrderbookLayout({
2481
2495
  ]
2482
2496
  }
2483
2497
  ),
2484
- /* @__PURE__ */ jsx("div", { style: { flex: 1, overflowY: "auto", minHeight: 0 }, children: isLoading && tradeFiltered.length === 0 ? Array.from({ length: COMPACT_ROWS_VISIBLE }).map((_, i) => /* @__PURE__ */ jsx(SkeletonRow, { compact: true }, `m-trade-skel-${i}`)) : tradeFiltered.length === 0 ? /* @__PURE__ */ jsx("div", { className: "py-6 text-center text-[0.7rem] text-white/50", children: "No trades" }) : tradeFiltered.map((trade, i) => {
2498
+ /* @__PURE__ */ jsx("div", { style: { flex: 1, overflowY: "auto", minHeight: 0 }, children: isLoading && tradeFiltered.length === 0 ? Array.from({ length: effectiveCompactLevels }).map((_, i) => /* @__PURE__ */ jsx(SkeletonRow, { compact: true }, `m-trade-skel-${i}`)) : tradeFiltered.length === 0 ? /* @__PURE__ */ jsx("div", { className: "py-6 text-center text-[0.7rem] text-white/50", children: "No trades" }) : tradeFiltered.map((trade, i) => {
2485
2499
  const tradeKey = getTradeKey(trade, i);
2486
2500
  const explorerUrl = trade.txHash && tradeExplorerUrl ? tradeExplorerUrl(trade.txHash) : trade.txHash ? `https://sepolia.etherscan.io/tx/${trade.txHash}` : void 0;
2487
2501
  return /* @__PURE__ */ jsx(
@@ -2521,7 +2535,8 @@ function MobileDepthRow({
2521
2535
  style: {
2522
2536
  display: "grid",
2523
2537
  gridTemplateColumns: "1.2fr 0.8fr",
2524
- padding: "0.2rem 0",
2538
+ height: `${COMPACT_ROW_HEIGHT_PX}px`,
2539
+ alignItems: "center",
2525
2540
  fontSize: "0.8rem",
2526
2541
  position: "relative",
2527
2542
  cursor: onPriceClick ? "pointer" : void 0
@@ -2664,7 +2679,7 @@ var PropertyTour = React5.forwardRef(
2664
2679
  }
2665
2680
  );
2666
2681
  PropertyTour.displayName = "PropertyTour";
2667
- var ITEMS_PER_PAGE = 4;
2682
+ var ITEMS_PER_PAGE = 6;
2668
2683
  var ensureAnimationsInjected = () => {
2669
2684
  if (typeof document === "undefined") return;
2670
2685
  if (document.getElementById("property-news-updates-animations")) return;
@@ -2709,6 +2724,21 @@ var formatDate = (value) => {
2709
2724
  if (!(value instanceof Date) || Number.isNaN(value.getTime())) return "";
2710
2725
  return value.toLocaleDateString(void 0, { month: "short", day: "numeric", year: "numeric" });
2711
2726
  };
2727
+ var formatDateShort = (value) => {
2728
+ const d = typeof value === "string" ? new Date(value) : value;
2729
+ if (!(d instanceof Date) || Number.isNaN(d.getTime())) {
2730
+ if (typeof value === "string") {
2731
+ return value.replace(/\s*\d{4}\s*$/, "");
2732
+ }
2733
+ return "";
2734
+ }
2735
+ const diffMs = Date.now() - d.getTime();
2736
+ const diffS = diffMs / 1e3;
2737
+ if (diffS < 60) return "Just now";
2738
+ if (diffS < 3600) return `${Math.floor(diffS / 60)}m ago`;
2739
+ if (diffS < 86400) return `${Math.floor(diffS / 3600)}h ago`;
2740
+ return d.toLocaleDateString(void 0, { month: "short", day: "numeric" });
2741
+ };
2712
2742
  var formatTimeAgo = (timestamp) => {
2713
2743
  const diff = (Date.now() - new Date(timestamp).getTime()) / 1e3;
2714
2744
  if (diff < 60) return `${Math.floor(diff)}s ago`;
@@ -2719,7 +2749,7 @@ function getSentimentInfo(score) {
2719
2749
  if (score == null) return null;
2720
2750
  if (score > 0.15) return { arrow: "\u25B2", label: "Bullish", color: "#0ecb81" };
2721
2751
  if (score < -0.15) return { arrow: "\u25BC", label: "Bearish", color: "#f6465d" };
2722
- return { arrow: "\u2014", label: "Neutral", color: "#848e9c" };
2752
+ return { arrow: "", label: "Neutral", color: "#848e9c" };
2723
2753
  }
2724
2754
  function NewsArticleModal({ item, onClose }) {
2725
2755
  const sentimentInfo = getSentimentInfo(item.sentimentScore);
@@ -2801,8 +2831,7 @@ function NewsArticleModal({ item, onClose }) {
2801
2831
  border: `1px solid ${sentimentInfo.color}40`
2802
2832
  },
2803
2833
  children: [
2804
- sentimentInfo.arrow,
2805
- " ",
2834
+ sentimentInfo.arrow ? `${sentimentInfo.arrow} ` : "",
2806
2835
  sentimentInfo.label
2807
2836
  ]
2808
2837
  }
@@ -2842,7 +2871,35 @@ function NewsArticleModal({ item, onClose }) {
2842
2871
  )
2843
2872
  ] }),
2844
2873
  /* @__PURE__ */ jsx("div", { style: { height: "1px", background: "rgba(255,255,255,0.08)", marginBottom: "1.25rem" } }),
2845
- item.summary ? /* @__PURE__ */ jsx("p", { style: { fontSize: "0.875rem", color: "rgba(255,255,255,0.8)", lineHeight: 1.75, margin: 0 }, children: item.summary }) : /* @__PURE__ */ jsx("p", { style: { fontSize: "0.8rem", color: "rgba(255,255,255,0.35)", fontStyle: "italic", margin: 0 }, children: "Summary not available for this article." })
2874
+ item.summary ? /* @__PURE__ */ jsx("p", { style: { fontSize: "0.875rem", color: "rgba(255,255,255,0.8)", lineHeight: 1.75, margin: 0 }, children: item.summary }) : /* @__PURE__ */ jsx("p", { style: { fontSize: "0.8rem", color: "rgba(255,255,255,0.35)", fontStyle: "italic", margin: 0 }, children: "Summary not available for this article." }),
2875
+ item.url && /* @__PURE__ */ jsx("div", { style: { marginTop: "1.25rem", paddingTop: "1rem", borderTop: "1px solid rgba(255,255,255,0.08)" }, children: /* @__PURE__ */ jsxs(
2876
+ "a",
2877
+ {
2878
+ href: item.url,
2879
+ target: "_blank",
2880
+ rel: "noopener noreferrer",
2881
+ style: {
2882
+ display: "inline-flex",
2883
+ alignItems: "center",
2884
+ gap: "0.4rem",
2885
+ fontSize: "0.8rem",
2886
+ fontWeight: 600,
2887
+ color: "var(--color-accent, #f0b90b)",
2888
+ textDecoration: "none",
2889
+ transition: "opacity 0.15s"
2890
+ },
2891
+ onMouseEnter: (e) => {
2892
+ e.currentTarget.style.opacity = "0.8";
2893
+ },
2894
+ onMouseLeave: (e) => {
2895
+ e.currentTarget.style.opacity = "1";
2896
+ },
2897
+ children: [
2898
+ "Read full article",
2899
+ /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M19 19H5V5h7V3H5a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z" }) })
2900
+ ]
2901
+ }
2902
+ ) })
2846
2903
  ]
2847
2904
  }
2848
2905
  )
@@ -2912,10 +2969,10 @@ var PropertyNewsUpdates = React5.forwardRef(
2912
2969
  children: [
2913
2970
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
2914
2971
  /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem" }, children: [
2915
- isHomeVariant && /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 24 24", fill: "currentColor", style: { color: "var(--color-text, #fff)" }, children: /* @__PURE__ */ jsx("path", { d: "M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-5 14H4v-4h11v4zm0-5H4V9h11v4zm5 5h-4V9h4v9z" }) }),
2972
+ isHomeVariant && /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", style: { color: "var(--color-text, #fff)", flexShrink: 0, display: "block" }, children: /* @__PURE__ */ jsx("path", { d: "M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-5 14H4v-4h11v4zm0-5H4V9h11v4zm5 5h-4V9h4v9z" }) }),
2916
2973
  isPurchaseVariant && /* @__PURE__ */ jsx("span", { style: { display: "inline-block", width: "8px", height: "8px", borderRadius: "50%", backgroundColor: "#0ecb81", boxShadow: "0 0 8px rgba(14,203,129,0.8)", animation: "propertyNewsPulse 1.5s infinite" } }),
2917
2974
  /* @__PURE__ */ jsxs("div", { children: [
2918
- /* @__PURE__ */ jsx("p", { className: isHomeVariant ? "text-base font-semibold text-white" : "text-lg font-semibold text-white", children: resolvedHeading }),
2975
+ /* @__PURE__ */ jsx("p", { className: isHomeVariant ? "text-base font-semibold text-white" : "text-lg font-semibold text-white", style: { margin: 0 }, children: resolvedHeading }),
2919
2976
  subheading ? /* @__PURE__ */ jsx("p", { className: "text-sm text-white/60", children: subheading }) : null
2920
2977
  ] })
2921
2978
  ] }),
@@ -2930,7 +2987,7 @@ var PropertyNewsUpdates = React5.forwardRef(
2930
2987
  "LIVE"
2931
2988
  ] }) : null
2932
2989
  ] }),
2933
- isHomeVariant && /* @__PURE__ */ jsx("div", { style: { display: "flex", gap: 0, marginTop: "0.75rem", marginBottom: "0.25rem" }, children: ["all", "property", "market"].map((tab) => /* @__PURE__ */ jsx(
2990
+ isHomeVariant && /* @__PURE__ */ jsx("div", { style: { display: "flex", gap: "1.5rem", marginTop: "0.75rem", marginBottom: "0.5rem", borderBottom: "1px solid rgba(255, 255, 255, 0.08)", paddingBottom: "0.5rem" }, children: ["all", "property", "market"].map((tab) => /* @__PURE__ */ jsx(
2934
2991
  "button",
2935
2992
  {
2936
2993
  type: "button",
@@ -2939,7 +2996,8 @@ var PropertyNewsUpdates = React5.forwardRef(
2939
2996
  background: "transparent",
2940
2997
  border: "none",
2941
2998
  borderBottom: homeTab === tab ? "2px solid var(--color-accent, #f0b90b)" : "2px solid transparent",
2942
- padding: "0.5rem 0.75rem",
2999
+ padding: "0 0 0.5rem 0",
3000
+ marginBottom: "-1px",
2943
3001
  fontSize: "0.75rem",
2944
3002
  fontWeight: homeTab === tab ? 600 : 400,
2945
3003
  color: homeTab === tab ? "var(--color-text, #fff)" : "var(--color-text-secondary, #848e9c)",
@@ -2953,7 +3011,7 @@ var PropertyNewsUpdates = React5.forwardRef(
2953
3011
  /* @__PURE__ */ jsx(
2954
3012
  "div",
2955
3013
  {
2956
- className: "mt-4 flex flex-1 flex-col gap-3 overflow-hidden",
3014
+ className: cn("flex flex-1 flex-col overflow-hidden", isHomeVariant ? "mt-2 gap-0" : "mt-4 gap-3"),
2957
3015
  style: !isPurchaseVariant && !isHomeVariant ? { minHeight: `${ITEMS_PER_PAGE * 86}px` } : void 0,
2958
3016
  children: isPurchaseVariant ? purchaseItems.length > 0 ? purchaseItems.slice(0, 7).map((purchase, index) => {
2959
3017
  const maxAmount = 6e4;
@@ -2992,7 +3050,7 @@ var PropertyNewsUpdates = React5.forwardRef(
2992
3050
  style: {
2993
3051
  width: "100%",
2994
3052
  textAlign: "left",
2995
- background: "transparent",
3053
+ backgroundColor: "transparent",
2996
3054
  border: "none",
2997
3055
  cursor: "pointer",
2998
3056
  padding: "0.75rem 0",
@@ -3001,18 +3059,28 @@ var PropertyNewsUpdates = React5.forwardRef(
3001
3059
  justifyContent: "space-between",
3002
3060
  alignItems: "flex-start",
3003
3061
  gap: "0.5rem",
3004
- color: "inherit"
3062
+ color: "inherit",
3063
+ transition: "background-color 0.15s"
3064
+ },
3065
+ onMouseEnter: (e) => {
3066
+ e.currentTarget.style.backgroundColor = "rgba(255,255,255,0.04)";
3067
+ const title = e.currentTarget.querySelector("h3");
3068
+ if (title) title.style.color = "var(--color-accent, #E6C87E)";
3069
+ },
3070
+ onMouseLeave: (e) => {
3071
+ e.currentTarget.style.backgroundColor = "transparent";
3072
+ const title = e.currentTarget.querySelector("h3");
3073
+ if (title) title.style.color = "#f8f9fa";
3005
3074
  },
3006
3075
  children: [
3007
3076
  /* @__PURE__ */ jsxs("div", { style: { flex: 1 }, children: [
3008
- /* @__PURE__ */ jsx("h3", { style: { fontSize: "0.85rem", fontWeight: 400, marginBottom: "0.25rem", color: "#f8f9fa", lineHeight: 1.4 }, children: item.title }),
3077
+ /* @__PURE__ */ jsx("h3", { style: { fontSize: "0.95rem", fontWeight: 500, marginBottom: "0.35rem", color: "#f8f9fa", lineHeight: 1.45, transition: "color 0.15s" }, children: item.title }),
3009
3078
  /* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: "0.5rem", alignItems: "center", flexWrap: "wrap" }, children: [
3010
- /* @__PURE__ */ jsx("span", { style: { color: "#848e9c", fontSize: "0.7rem" }, children: typeof item.date === "string" ? item.date : formatDate(item.date) }),
3079
+ /* @__PURE__ */ jsx("span", { style: { color: "#848e9c", fontSize: "0.7rem" }, children: formatDateShort(item.date) }),
3011
3080
  item.source && /* @__PURE__ */ jsx("span", { style: { padding: "0.1rem 0.4rem", borderRadius: "3px", fontSize: "0.62rem", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.07)", color: "#848e9c", whiteSpace: "nowrap" }, children: item.source }),
3012
3081
  /* @__PURE__ */ jsx("span", { style: { padding: "0.15rem 0.4rem", borderRadius: "2px", fontSize: "0.65rem", fontWeight: 500, backgroundColor: isProperty ? "rgba(14,203,129,0.1)" : "rgba(240,185,11,0.1)", color: isProperty ? "#0ecb81" : "#f0b90b" }, children: isProperty ? "Property Update" : "Market News" }),
3013
3082
  sentimentInfo && /* @__PURE__ */ jsxs("span", { style: { fontSize: "0.65rem", fontWeight: 600, color: sentimentInfo.color }, children: [
3014
- sentimentInfo.arrow,
3015
- " ",
3083
+ sentimentInfo.arrow ? `${sentimentInfo.arrow} ` : "",
3016
3084
  sentimentInfo.label
3017
3085
  ] })
3018
3086
  ] })
@@ -3069,8 +3137,7 @@ var PropertyNewsUpdates = React5.forwardRef(
3069
3137
  ] }),
3070
3138
  /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", alignItems: "flex-end", gap: "0.3rem", flexShrink: 0 }, children: [
3071
3139
  sentimentInfo && /* @__PURE__ */ jsxs("span", { style: { fontSize: "0.65rem", fontWeight: 700, color: sentimentInfo.color, whiteSpace: "nowrap" }, children: [
3072
- sentimentInfo.arrow,
3073
- " ",
3140
+ sentimentInfo.arrow ? `${sentimentInfo.arrow} ` : "",
3074
3141
  sentimentInfo.label
3075
3142
  ] }),
3076
3143
  /* @__PURE__ */ jsx("span", { style: { padding: "0.25rem 0.6rem", borderRadius: "4px", border: `1px solid ${catStyle.borderColor}`, backgroundColor: catStyle.backgroundColor, color: catStyle.color, fontSize: "0.68rem", fontWeight: 600, textTransform: "uppercase", whiteSpace: "nowrap" }, children: item.type === "property" ? catStyle.label : "Market News" })
@@ -3095,8 +3162,8 @@ var PropertyNewsUpdates = React5.forwardRef(
3095
3162
  type: "button",
3096
3163
  onClick: () => setHomePage((p) => Math.max(0, p - 1)),
3097
3164
  disabled: homePage === 0,
3098
- style: { background: "transparent", border: "1px solid rgba(255,255,255,0.15)", borderRadius: "999px", padding: "0.2rem 0.75rem", fontSize: "0.7rem", textTransform: "uppercase", letterSpacing: "0.15em", cursor: homePage === 0 ? "not-allowed" : "pointer", opacity: homePage === 0 ? 0.4 : 1, color: "rgba(255,255,255,0.6)" },
3099
- children: "Prev"
3165
+ style: { background: "transparent", border: "1px solid rgba(255,255,255,0.15)", borderRadius: "50%", width: "28px", height: "28px", display: "flex", alignItems: "center", justifyContent: "center", padding: 0, cursor: homePage === 0 ? "not-allowed" : "pointer", opacity: homePage === 0 ? 0.4 : 1, color: "rgba(255,255,255,0.6)" },
3166
+ children: /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z" }) })
3100
3167
  }
3101
3168
  ),
3102
3169
  /* @__PURE__ */ jsxs("span", { style: { fontSize: "0.7rem", color: "rgba(255,255,255,0.5)" }, children: [
@@ -3110,8 +3177,8 @@ var PropertyNewsUpdates = React5.forwardRef(
3110
3177
  type: "button",
3111
3178
  onClick: () => setHomePage((p) => Math.min(homeTotalPages - 1, p + 1)),
3112
3179
  disabled: homePage >= homeTotalPages - 1,
3113
- style: { background: "transparent", border: "1px solid rgba(255,255,255,0.15)", borderRadius: "999px", padding: "0.2rem 0.75rem", fontSize: "0.7rem", textTransform: "uppercase", letterSpacing: "0.15em", cursor: homePage >= homeTotalPages - 1 ? "not-allowed" : "pointer", opacity: homePage >= homeTotalPages - 1 ? 0.4 : 1, color: "rgba(255,255,255,0.6)" },
3114
- children: "Next"
3180
+ style: { background: "transparent", border: "1px solid rgba(255,255,255,0.15)", borderRadius: "50%", width: "28px", height: "28px", display: "flex", alignItems: "center", justifyContent: "center", padding: 0, cursor: homePage >= homeTotalPages - 1 ? "not-allowed" : "pointer", opacity: homePage >= homeTotalPages - 1 ? 0.4 : 1, color: "rgba(255,255,255,0.6)" },
3181
+ children: /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }) })
3115
3182
  }
3116
3183
  )
3117
3184
  ] }),
@@ -3122,8 +3189,9 @@ var PropertyNewsUpdates = React5.forwardRef(
3122
3189
  type: "button",
3123
3190
  onClick: () => setPage((p) => Math.max(0, p - 1)),
3124
3191
  disabled: page === 0,
3125
- className: cn("rounded-full border border-white/15 px-3 py-1 uppercase tracking-[0.2em]", page === 0 ? "opacity-40 cursor-not-allowed" : "hover:border-white/40"),
3126
- children: "Prev"
3192
+ className: cn("rounded-full border border-white/15 flex items-center justify-center", page === 0 ? "opacity-40 cursor-not-allowed" : "hover:border-white/40"),
3193
+ style: { width: "28px", height: "28px", padding: 0, background: "transparent", color: "rgba(255,255,255,0.6)" },
3194
+ children: /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z" }) })
3127
3195
  }
3128
3196
  ),
3129
3197
  /* @__PURE__ */ jsxs("span", { className: "font-medium text-white/70", children: [
@@ -3138,8 +3206,9 @@ var PropertyNewsUpdates = React5.forwardRef(
3138
3206
  type: "button",
3139
3207
  onClick: () => setPage((p) => Math.min(totalPages - 1, p + 1)),
3140
3208
  disabled: page >= totalPages - 1,
3141
- className: cn("rounded-full border border-white/15 px-3 py-1 uppercase tracking-[0.2em]", page >= totalPages - 1 ? "opacity-40 cursor-not-allowed" : "hover:border-white/40"),
3142
- children: "Next"
3209
+ className: cn("rounded-full border border-white/15 flex items-center justify-center", page >= totalPages - 1 ? "opacity-40 cursor-not-allowed" : "hover:border-white/40"),
3210
+ style: { width: "28px", height: "28px", padding: 0, background: "transparent", color: "rgba(255,255,255,0.6)" },
3211
+ children: /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }) })
3143
3212
  }
3144
3213
  )
3145
3214
  ] }),
@@ -4642,14 +4711,16 @@ var PropertyHeroHeader = React5.forwardRef(
4642
4711
  imageUrl,
4643
4712
  imageAlt,
4644
4713
  name,
4714
+ address,
4645
4715
  location,
4646
4716
  price,
4647
4717
  currencySymbol = "$",
4648
4718
  changePercent,
4649
- beds,
4650
- baths,
4651
- cars,
4652
- propertyTypeLabel,
4719
+ priceChange,
4720
+ beds: _beds,
4721
+ baths: _baths,
4722
+ cars: _cars,
4723
+ propertyTypeLabel: _propertyTypeLabel,
4653
4724
  onTrade,
4654
4725
  onMakeOffer,
4655
4726
  tradeButtonLabel = "Trade",
@@ -4665,7 +4736,6 @@ var PropertyHeroHeader = React5.forwardRef(
4665
4736
  const tradeHoverColor = "#f5dd9a";
4666
4737
  const [isTradeInteracting, setIsTradeInteracting] = React5.useState(false);
4667
4738
  const [isOfferInteracting, setIsOfferInteracting] = React5.useState(false);
4668
- const hasAmenities = isLoading || beds != null || baths != null || cars != null || propertyTypeLabel != null;
4669
4739
  const isTradeDisabled = !onTrade;
4670
4740
  const isMakeOfferButtonDisabled = makeOfferDisabled || !onMakeOffer;
4671
4741
  const showMakeOfferButton = !hideMakeOfferButton;
@@ -4678,201 +4748,112 @@ var PropertyHeroHeader = React5.forwardRef(
4678
4748
  setIsOfferInteracting(state);
4679
4749
  };
4680
4750
  const headingStyle = {
4681
- fontSize: "clamp(1.6rem, 4vw, 2.5rem)",
4682
- marginBottom: "0.5rem",
4751
+ fontSize: "clamp(1.3rem, 3vw, 1.8rem)",
4752
+ marginBottom: "0",
4683
4753
  color: "#ffffff",
4684
4754
  textShadow: "0 2px 4px rgba(0, 0, 0, 0.3)",
4685
4755
  fontWeight: 600,
4686
4756
  lineHeight: 1.2
4687
4757
  };
4688
- return /* @__PURE__ */ jsxs(OuterWrapper, { ref, className: cn(className), ...props, children: [
4689
- /* @__PURE__ */ jsxs(HeroContainer, { children: [
4690
- /* @__PURE__ */ jsx(
4691
- HeroImage,
4692
- {
4693
- src: imageUrl,
4694
- alt: imageAlt ?? name
4695
- }
4696
- ),
4697
- statusBadge ? /* @__PURE__ */ jsxs(StatusBadge, { $isLive: statusBadge.variant === "live", children: [
4698
- statusBadge.variant === "live" ? /* @__PURE__ */ jsx(PulsingDot, {}) : null,
4699
- statusBadge.label
4700
- ] }) : null,
4701
- /* @__PURE__ */ jsx(HeroGradient, { "aria-hidden": "true" }),
4702
- /* @__PURE__ */ jsx("div", { className: "absolute bottom-0 left-0 right-0 z-10 flex w-full items-end justify-center", children: /* @__PURE__ */ jsxs("div", { className: "flex w-full max-w-[1800px] flex-wrap items-end justify-between gap-4 p-8 max-[768px]:flex-col max-[768px]:items-start max-[768px]:gap-4 max-[768px]:p-6 max-[480px]:p-4", children: [
4703
- /* @__PURE__ */ jsxs(InfoCard, { children: [
4704
- /* @__PURE__ */ jsxs("div", { className: "min-w-0 space-y-2", children: [
4705
- /* @__PURE__ */ jsx("h1", { style: headingStyle, className: "break-words", children: name }),
4706
- /* @__PURE__ */ jsxs(InfoRow, { className: "mb-3 max-[768px]:mb-[0.6rem] max-[480px]:mb-[0.5rem]", children: [
4707
- /* @__PURE__ */ jsx(LocationText, { children: location }),
4708
- isLoading ? /* @__PURE__ */ jsx(PriceBlock, { children: /* @__PURE__ */ jsx(Skeleton, { width: 110, height: 18 }) }) : price == null ? null : /* @__PURE__ */ jsxs(PriceBlock, { children: [
4709
- formatPrice3(price, currencySymbol),
4710
- changePercent == null ? null : /* @__PURE__ */ jsxs(
4711
- "span",
4712
- {
4713
- className: cn(
4714
- "ml-2 flex items-center text-[0.875rem] font-medium",
4715
- isPositive ? "text-[#0ecb81]" : "text-[#f6465d]"
4716
- ),
4717
- children: [
4718
- /* @__PURE__ */ jsx(
4719
- "svg",
4720
- {
4721
- xmlns: "http://www.w3.org/2000/svg",
4722
- width: "12",
4723
- height: "12",
4724
- viewBox: "0 0 24 24",
4725
- fill: "currentColor",
4726
- className: "mr-[0.15rem]",
4727
- children: /* @__PURE__ */ jsx("path", { d: isPositive ? "M7 14l5-5 5 5H7z" : "M7 10l5 5 5-5H7z" })
4728
- }
4729
- ),
4730
- Math.abs(changePercent).toFixed(2),
4731
- "%"
4732
- ]
4733
- }
4734
- )
4735
- ] })
4736
- ] })
4737
- ] }),
4738
- /* @__PURE__ */ jsx("div", { className: "flex items-center gap-6 text-[0.95rem] text-white/90 max-[768px]:hidden", children: isLoading ? /* @__PURE__ */ jsxs(Fragment, { children: [
4739
- /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
4740
- /* @__PURE__ */ jsx(BedDouble, { className: "mr-2 h-[18px] w-[18px] opacity-60" }),
4741
- /* @__PURE__ */ jsx(Skeleton, { width: 52, height: 14 })
4742
- ] }),
4743
- /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
4744
- /* @__PURE__ */ jsx(Bath, { className: "mr-2 h-[18px] w-[18px] opacity-60" }),
4745
- /* @__PURE__ */ jsx(Skeleton, { width: 56, height: 14 })
4746
- ] }),
4747
- /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
4748
- /* @__PURE__ */ jsx(CarFront, { className: "mr-2 h-[18px] w-[18px] opacity-60" }),
4749
- /* @__PURE__ */ jsx(Skeleton, { width: 50, height: 14 })
4750
- ] }),
4751
- /* @__PURE__ */ jsx(Skeleton, { width: 60, height: 14 })
4752
- ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
4753
- beds == null ? null : /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
4754
- /* @__PURE__ */ jsx(BedDouble, { className: "mr-2 h-[18px] w-[18px]" }),
4755
- /* @__PURE__ */ jsxs("span", { children: [
4756
- beds,
4757
- " Beds"
4758
- ] })
4759
- ] }),
4760
- baths == null ? null : /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
4761
- /* @__PURE__ */ jsx(Bath, { className: "mr-2 h-[18px] w-[18px]" }),
4762
- /* @__PURE__ */ jsxs("span", { children: [
4763
- baths,
4764
- " Baths"
4765
- ] })
4758
+ return /* @__PURE__ */ jsx(OuterWrapper, { ref, className: cn(className), ...props, children: /* @__PURE__ */ jsxs(HeroContainer, { children: [
4759
+ /* @__PURE__ */ jsx(
4760
+ HeroImage,
4761
+ {
4762
+ src: imageUrl,
4763
+ alt: imageAlt ?? name
4764
+ }
4765
+ ),
4766
+ statusBadge ? /* @__PURE__ */ jsxs(StatusBadge, { $isLive: statusBadge.variant === "live", children: [
4767
+ statusBadge.variant === "live" ? /* @__PURE__ */ jsx(PulsingDot, {}) : null,
4768
+ statusBadge.label
4769
+ ] }) : null,
4770
+ /* @__PURE__ */ jsx("div", { className: "absolute bottom-0 left-0 right-0 z-10 flex w-full items-end justify-center", style: { background: "linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%)" }, children: /* @__PURE__ */ jsxs("div", { className: "flex w-full max-w-[1800px] flex-wrap items-end justify-between gap-4 p-8 max-[768px]:flex-col max-[768px]:items-start max-[768px]:gap-4 max-[768px]:p-6 max-[480px]:p-4", children: [
4771
+ /* @__PURE__ */ jsx(InfoCard, { children: /* @__PURE__ */ jsxs(CardLayout, { children: [
4772
+ /* @__PURE__ */ jsx(Thumbnail, { src: imageUrl, alt: imageAlt ?? name }),
4773
+ /* @__PURE__ */ jsx(CardContent2, { children: /* @__PURE__ */ jsxs(InfoRow, { children: [
4774
+ /* @__PURE__ */ jsx(NameGroup, { children: /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column" }, children: [
4775
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem", flexWrap: "wrap" }, children: [
4776
+ /* @__PURE__ */ jsx("h1", { style: headingStyle, className: "break-words", children: name }),
4777
+ location ? /* @__PURE__ */ jsx(TypeBadge, { children: location }) : null
4766
4778
  ] }),
4767
- cars == null ? null : /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
4768
- /* @__PURE__ */ jsx(CarFront, { className: "mr-2 h-[18px] w-[18px]" }),
4769
- /* @__PURE__ */ jsxs("span", { children: [
4770
- cars,
4771
- " Cars"
4772
- ] })
4779
+ address ? /* @__PURE__ */ jsx(AddressText, { children: address }) : null
4780
+ ] }) }),
4781
+ /* @__PURE__ */ jsxs(PriceGroup, { children: [
4782
+ isLoading ? /* @__PURE__ */ jsx(Skeleton, { width: 110, height: 24 }) : price == null ? null : /* @__PURE__ */ jsxs(PriceRow, { children: [
4783
+ /* @__PURE__ */ jsx(CurrencyLabel, { children: "USD" }),
4784
+ changePercent != null ? /* @__PURE__ */ jsx(PriceArrow, { $isPositive: isPositive, children: isPositive ? "\u25B2" : "\u25BC" }) : null,
4785
+ formatPrice3(price, "")
4773
4786
  ] }),
4774
- propertyTypeLabel == null ? null : /* @__PURE__ */ jsx("div", { children: propertyTypeLabel })
4775
- ] }) })
4776
- ] }),
4777
- /* @__PURE__ */ jsxs(ActionButtons, { children: [
4778
- /* @__PURE__ */ jsx(
4779
- "button",
4780
- {
4781
- type: "button",
4782
- onClick: isTradeDisabled ? void 0 : onTrade,
4783
- className: "flex items-center justify-center rounded border font-semibold transition-all duration-200 hover:-translate-y-0.5 hover:shadow-[0_4px_8px_rgba(0,0,0,0.2)] active:translate-y-0 active:shadow-[0_2px_4px_rgba(0,0,0,0.1)] text-[0.95rem] max-[480px]:text-[0.9rem]",
4784
- style: {
4785
- backgroundColor: isTradeInteracting ? tradeHoverColor : accentColor,
4786
- color: "black",
4787
- padding: "0.75rem 1.5rem",
4788
- borderColor: isTradeInteracting ? accentColor : "transparent",
4789
- boxShadow: isTradeInteracting ? `0 0 0 2px rgba(0,0,0,0.4), 0 0 0 4px ${accentColor}` : "none",
4790
- opacity: isTradeDisabled ? 0.5 : 1,
4791
- cursor: isTradeDisabled ? "not-allowed" : "pointer"
4792
- },
4793
- onMouseEnter: () => setTradeInteraction(true),
4794
- onMouseLeave: () => setTradeInteraction(false),
4795
- onMouseDown: () => setTradeInteraction(true),
4796
- onMouseUp: () => setTradeInteraction(false),
4797
- onFocus: () => setTradeInteraction(true),
4798
- onBlur: () => setTradeInteraction(false),
4799
- onTouchStart: () => setTradeInteraction(true),
4800
- onTouchEnd: () => setTradeInteraction(false),
4801
- disabled: isTradeDisabled,
4802
- "aria-disabled": isTradeDisabled,
4803
- children: tradeButtonLabel
4804
- }
4805
- ),
4806
- showMakeOfferButton ? /* @__PURE__ */ jsx(
4807
- "button",
4808
- {
4809
- type: "button",
4810
- onClick: isMakeOfferButtonDisabled ? void 0 : onMakeOffer,
4811
- className: "flex items-center justify-center rounded border font-semibold transition-all duration-200 hover:-translate-y-0.5 hover:shadow-[0_4px_8px_rgba(0,0,0,0.2)] active:translate-y-0 active:shadow-[0_2px_4px_rgba(0,0,0,0.1)] text-[0.95rem] max-[480px]:text-[0.9rem]",
4812
- style: {
4813
- backgroundColor: isOfferInteracting ? accentColor : "transparent",
4814
- borderColor: accentColor,
4815
- color: isOfferInteracting ? "black" : accentColor,
4816
- padding: "0.75rem 1.5rem",
4817
- boxShadow: isOfferInteracting ? `0 0 0 2px rgba(0,0,0,0.4), 0 0 0 4px ${accentColor}` : "none",
4818
- opacity: isMakeOfferButtonDisabled ? 0.5 : 1,
4819
- cursor: isMakeOfferButtonDisabled ? "not-allowed" : "pointer"
4820
- },
4821
- onMouseEnter: () => setOfferInteraction(true),
4822
- onMouseLeave: () => setOfferInteraction(false),
4823
- onMouseDown: () => setOfferInteraction(true),
4824
- onMouseUp: () => setOfferInteraction(false),
4825
- onFocus: () => setOfferInteraction(true),
4826
- onBlur: () => setOfferInteraction(false),
4827
- onTouchStart: () => setOfferInteraction(true),
4828
- onTouchEnd: () => setOfferInteraction(false),
4829
- disabled: isMakeOfferButtonDisabled,
4830
- "aria-disabled": isMakeOfferButtonDisabled,
4831
- children: makeOfferButtonLabel
4832
- }
4833
- ) : null
4834
- ] })
4835
- ] }) })
4836
- ] }),
4837
- hasAmenities ? /* @__PURE__ */ jsx(MobileAmenities, { children: isLoading ? /* @__PURE__ */ jsxs(Fragment, { children: [
4838
- /* @__PURE__ */ jsxs(MobileAmenity, { children: [
4839
- /* @__PURE__ */ jsx(BedDouble, { className: "h-4 w-4 opacity-60" }),
4840
- /* @__PURE__ */ jsx(Skeleton, { width: 40, height: 12 })
4841
- ] }),
4842
- /* @__PURE__ */ jsxs(MobileAmenity, { children: [
4843
- /* @__PURE__ */ jsx(Bath, { className: "h-4 w-4 opacity-60" }),
4844
- /* @__PURE__ */ jsx(Skeleton, { width: 44, height: 12 })
4845
- ] }),
4846
- /* @__PURE__ */ jsxs(MobileAmenity, { children: [
4847
- /* @__PURE__ */ jsx(CarFront, { className: "h-4 w-4 opacity-60" }),
4848
- /* @__PURE__ */ jsx(Skeleton, { width: 42, height: 12 })
4849
- ] }),
4850
- /* @__PURE__ */ jsx(MobileAmenity, { children: /* @__PURE__ */ jsx(Skeleton, { width: 52, height: 12 }) })
4851
- ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
4852
- beds == null ? null : /* @__PURE__ */ jsxs(MobileAmenity, { children: [
4853
- /* @__PURE__ */ jsx(BedDouble, { className: "h-4 w-4" }),
4854
- /* @__PURE__ */ jsxs("span", { children: [
4855
- beds,
4856
- " Beds"
4857
- ] })
4858
- ] }),
4859
- baths == null ? null : /* @__PURE__ */ jsxs(MobileAmenity, { children: [
4860
- /* @__PURE__ */ jsx(Bath, { className: "h-4 w-4" }),
4861
- /* @__PURE__ */ jsxs("span", { children: [
4862
- baths,
4863
- " Baths"
4864
- ] })
4865
- ] }),
4866
- cars == null ? null : /* @__PURE__ */ jsxs(MobileAmenity, { children: [
4867
- /* @__PURE__ */ jsx(CarFront, { className: "h-4 w-4" }),
4868
- /* @__PURE__ */ jsxs("span", { children: [
4869
- cars,
4870
- " Cars"
4871
- ] })
4872
- ] }),
4873
- propertyTypeLabel == null ? null : /* @__PURE__ */ jsx(MobileAmenity, { children: propertyTypeLabel })
4874
- ] }) }) : null
4875
- ] });
4787
+ changePercent != null ? /* @__PURE__ */ jsxs(PriceChangeRow, { $isPositive: isPositive, children: [
4788
+ priceChange != null ? `${isPositive ? "+" : ""}${priceChange.toFixed(2)} ` : null,
4789
+ "(",
4790
+ isPositive ? "+" : "",
4791
+ Math.abs(changePercent).toFixed(2),
4792
+ "%)"
4793
+ ] }) : null
4794
+ ] })
4795
+ ] }) })
4796
+ ] }) }),
4797
+ /* @__PURE__ */ jsxs(ActionButtons, { children: [
4798
+ /* @__PURE__ */ jsx(
4799
+ "button",
4800
+ {
4801
+ type: "button",
4802
+ onClick: isTradeDisabled ? void 0 : onTrade,
4803
+ className: "flex items-center justify-center rounded border font-semibold transition-all duration-200 hover:-translate-y-0.5 hover:shadow-[0_4px_8px_rgba(0,0,0,0.2)] active:translate-y-0 active:shadow-[0_2px_4px_rgba(0,0,0,0.1)] text-[0.95rem] max-[480px]:text-[0.9rem]",
4804
+ style: {
4805
+ backgroundColor: isTradeInteracting ? tradeHoverColor : accentColor,
4806
+ color: "black",
4807
+ padding: "0.75rem 1.5rem",
4808
+ borderColor: isTradeInteracting ? accentColor : "transparent",
4809
+ boxShadow: isTradeInteracting ? `0 0 0 2px rgba(0,0,0,0.4), 0 0 0 4px ${accentColor}` : "none",
4810
+ opacity: isTradeDisabled ? 0.5 : 1,
4811
+ cursor: isTradeDisabled ? "not-allowed" : "pointer"
4812
+ },
4813
+ onMouseEnter: () => setTradeInteraction(true),
4814
+ onMouseLeave: () => setTradeInteraction(false),
4815
+ onMouseDown: () => setTradeInteraction(true),
4816
+ onMouseUp: () => setTradeInteraction(false),
4817
+ onFocus: () => setTradeInteraction(true),
4818
+ onBlur: () => setTradeInteraction(false),
4819
+ onTouchStart: () => setTradeInteraction(true),
4820
+ onTouchEnd: () => setTradeInteraction(false),
4821
+ disabled: isTradeDisabled,
4822
+ "aria-disabled": isTradeDisabled,
4823
+ children: tradeButtonLabel
4824
+ }
4825
+ ),
4826
+ showMakeOfferButton ? /* @__PURE__ */ jsx(
4827
+ "button",
4828
+ {
4829
+ type: "button",
4830
+ onClick: isMakeOfferButtonDisabled ? void 0 : onMakeOffer,
4831
+ className: "flex items-center justify-center rounded border font-semibold transition-all duration-200 hover:-translate-y-0.5 hover:shadow-[0_4px_8px_rgba(0,0,0,0.2)] active:translate-y-0 active:shadow-[0_2px_4px_rgba(0,0,0,0.1)] text-[0.95rem] max-[480px]:text-[0.9rem]",
4832
+ style: {
4833
+ backgroundColor: isOfferInteracting ? accentColor : "transparent",
4834
+ borderColor: accentColor,
4835
+ color: isOfferInteracting ? "black" : accentColor,
4836
+ padding: "0.75rem 1.5rem",
4837
+ boxShadow: isOfferInteracting ? `0 0 0 2px rgba(0,0,0,0.4), 0 0 0 4px ${accentColor}` : "none",
4838
+ opacity: isMakeOfferButtonDisabled ? 0.5 : 1,
4839
+ cursor: isMakeOfferButtonDisabled ? "not-allowed" : "pointer"
4840
+ },
4841
+ onMouseEnter: () => setOfferInteraction(true),
4842
+ onMouseLeave: () => setOfferInteraction(false),
4843
+ onMouseDown: () => setOfferInteraction(true),
4844
+ onMouseUp: () => setOfferInteraction(false),
4845
+ onFocus: () => setOfferInteraction(true),
4846
+ onBlur: () => setOfferInteraction(false),
4847
+ onTouchStart: () => setOfferInteraction(true),
4848
+ onTouchEnd: () => setOfferInteraction(false),
4849
+ disabled: isMakeOfferButtonDisabled,
4850
+ "aria-disabled": isMakeOfferButtonDisabled,
4851
+ children: makeOfferButtonLabel
4852
+ }
4853
+ ) : null
4854
+ ] })
4855
+ ] }) })
4856
+ ] }) });
4876
4857
  }
4877
4858
  );
4878
4859
  PropertyHeroHeader.displayName = "PropertyHeroHeader";
@@ -4915,32 +4896,6 @@ var HeroContainer = styled25.div`
4915
4896
  border-radius: 6px;
4916
4897
  }
4917
4898
  `;
4918
- var MobileAmenities = styled25.div`
4919
- display: none;
4920
- align-items: center;
4921
- justify-content: space-between;
4922
- gap: 0.5rem;
4923
- padding: 0.5rem 0.75rem;
4924
- background: rgba(8, 8, 12, 0.85);
4925
- border-radius: 12px;
4926
- border: 1px solid rgba(255, 255, 255, 0.1);
4927
- color: rgba(255, 255, 255, 0.85);
4928
- font-size: 0.85rem;
4929
-
4930
- @media (max-width: 768px) {
4931
- display: flex;
4932
- flex-wrap: wrap;
4933
- }
4934
- `;
4935
- var MobileAmenity = styled25.span`
4936
- display: inline-flex;
4937
- align-items: center;
4938
- gap: 0.35rem;
4939
- padding: 0.35rem 0.5rem;
4940
- border-radius: 999px;
4941
- background: rgba(255, 255, 255, 0.08);
4942
- font-weight: 500;
4943
- `;
4944
4899
  var HeroImage = styled25.img`
4945
4900
  width: 100%;
4946
4901
  height: 100%;
@@ -4955,15 +4910,6 @@ var HeroImage = styled25.img`
4955
4910
  transform: scale(1.0);
4956
4911
  transform-origin: center;
4957
4912
  `;
4958
- var HeroGradient = styled25.div`
4959
- position: absolute;
4960
- bottom: 0;
4961
- left: 0;
4962
- right: 0;
4963
- width: 100%;
4964
- z-index: 1;
4965
- background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%);
4966
- `;
4967
4913
  var ActionButtons = styled25.div`
4968
4914
  display: flex;
4969
4915
  flex-wrap: wrap;
@@ -4979,13 +4925,42 @@ var ActionButtons = styled25.div`
4979
4925
  display: none;
4980
4926
  }
4981
4927
  `;
4928
+ var CardLayout = styled25.div`
4929
+ display: flex;
4930
+ align-items: center;
4931
+ gap: 1rem;
4932
+
4933
+ @media (max-width: 480px) {
4934
+ gap: 0.75rem;
4935
+ }
4936
+ `;
4937
+ var Thumbnail = styled25.img`
4938
+ width: 72px;
4939
+ height: 72px;
4940
+ border-radius: 8px;
4941
+ object-fit: cover;
4942
+ flex-shrink: 0;
4943
+ border: 1px solid rgba(255, 255, 255, 0.15);
4944
+
4945
+ @media (max-width: 768px) {
4946
+ width: 56px;
4947
+ height: 56px;
4948
+ border-radius: 6px;
4949
+ }
4950
+
4951
+ @media (max-width: 480px) {
4952
+ width: 48px;
4953
+ height: 48px;
4954
+ }
4955
+ `;
4956
+ var CardContent2 = styled25.div`
4957
+ min-width: 0;
4958
+ flex: 1;
4959
+ `;
4982
4960
  var InfoCard = styled25.div`
4983
- display: inline-block;
4984
- width: fit-content;
4985
- max-width: 70%;
4986
4961
  border-radius: 12px;
4987
- background: rgba(0, 0, 0, 0.12);
4988
- padding: 0.75rem 1rem;
4962
+ background: rgba(0, 0, 0, 0.15);
4963
+ padding: 1rem 1.5rem;
4989
4964
  color: #fff;
4990
4965
  backdrop-filter: blur(6px);
4991
4966
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
@@ -4993,45 +4968,92 @@ var InfoCard = styled25.div`
4993
4968
  min-width: 0;
4994
4969
 
4995
4970
  @media (max-width: 768px) {
4996
- max-width: 85%;
4997
- }
4998
-
4999
- @media (max-width: 640px) {
5000
- max-width: 92%;
4971
+ padding: 0.85rem 1.15rem;
5001
4972
  }
5002
4973
 
5003
4974
  @media (max-width: 480px) {
5004
- max-width: 95%;
4975
+ padding: 0.65rem 0.85rem;
5005
4976
  }
5006
4977
  `;
5007
- var InfoRow = styled25.div`
5008
- display: grid;
5009
- grid-template-columns: minmax(0, 1fr) auto;
4978
+ var NameGroup = styled25.div`
4979
+ display: flex;
5010
4980
  align-items: center;
5011
4981
  gap: 0.75rem;
5012
- width: 100%;
5013
-
5014
- @media (max-width: 640px) {
5015
- gap: 0.5rem;
5016
- }
4982
+ min-width: 0;
4983
+ flex-wrap: wrap;
5017
4984
  `;
5018
- var LocationText = styled25.span`
5019
- font-size: clamp(1rem, 2.6vw, 1.25rem);
5020
- color: rgba(255, 255, 255, 0.9);
5021
- font-weight: 500;
5022
- overflow: hidden;
5023
- text-overflow: ellipsis;
4985
+ var TypeBadge = styled25.span`
4986
+ display: inline-flex;
4987
+ align-items: center;
4988
+ padding: 0.2rem 0.5rem;
4989
+ border-radius: 4px;
4990
+ font-size: 0.7rem;
4991
+ font-weight: 600;
4992
+ letter-spacing: 0.03em;
4993
+ text-transform: uppercase;
4994
+ line-height: 1;
4995
+ color: #E6C87E;
4996
+ background: rgba(230, 200, 126, 0.12);
5024
4997
  white-space: nowrap;
4998
+ flex-shrink: 0;
5025
4999
  `;
5026
- var PriceBlock = styled25.span`
5000
+ var InfoRow = styled25.div`
5027
5001
  display: flex;
5028
- align-items: center;
5029
- font-size: clamp(1rem, 2.2vw, 1.25rem);
5002
+ align-items: baseline;
5003
+ justify-content: space-between;
5004
+ gap: 1rem;
5005
+ `;
5006
+ var PriceGroup = styled25.div`
5007
+ display: flex;
5008
+ flex-direction: column;
5009
+ align-items: flex-end;
5010
+ flex-shrink: 0;
5011
+ `;
5012
+ var PriceRow = styled25.span`
5013
+ display: inline-flex;
5014
+ align-items: baseline;
5015
+ font-size: clamp(1.3rem, 3vw, 1.8rem);
5030
5016
  font-weight: 600;
5031
- color: var(--color-accent, #f0b90b);
5032
- padding-left: 1rem;
5033
- border-left: 1px solid rgba(255, 255, 255, 0.25);
5034
- min-height: 1.5rem;
5017
+ color: #fff;
5018
+ font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'JetBrains Mono', ui-monospace, monospace;
5019
+ font-variant-numeric: tabular-nums;
5020
+ white-space: nowrap;
5021
+ flex-shrink: 0;
5022
+ `;
5023
+ var CurrencyLabel = styled25.span`
5024
+ font-size: 0.55em;
5025
+ font-weight: 500;
5026
+ color: rgba(255, 255, 255, 0.4);
5027
+ margin-right: 0.3em;
5028
+ `;
5029
+ var PriceArrow = styled25.span`
5030
+ color: ${({ $isPositive }) => $isPositive ? "#0ecb81" : "#f6465d"};
5031
+ font-size: 0.65em;
5032
+ margin: 0 0.1em;
5033
+ `;
5034
+ var AddressText = styled25.p`
5035
+ font-size: 1.1rem;
5036
+ color: rgba(255, 255, 255, 0.7);
5037
+ font-weight: 400;
5038
+ margin: 0.1rem 0 0;
5039
+
5040
+ @media (max-width: 768px) {
5041
+ font-size: 1rem;
5042
+ }
5043
+
5044
+ @media (max-width: 480px) {
5045
+ font-size: 0.9rem;
5046
+ }
5047
+ `;
5048
+ var PriceChangeRow = styled25.span`
5049
+ display: inline-flex;
5050
+ align-items: center;
5051
+ white-space: nowrap;
5052
+ flex-shrink: 0;
5053
+ font-size: 0.85rem;
5054
+ font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'JetBrains Mono', ui-monospace, monospace;
5055
+ font-variant-numeric: tabular-nums;
5056
+ color: ${({ $isPositive }) => $isPositive ? "#0ecb81" : "#f6465d"};
5035
5057
  `;
5036
5058
  var StatusBadge = styled25.div`
5037
5059
  position: absolute;
@@ -5108,13 +5130,45 @@ var Header = ({
5108
5130
  onProfileNavigate: _onProfileNavigate,
5109
5131
  onOrdersNavigate: _onOrdersNavigate,
5110
5132
  onWalletNavigate: _onWalletNavigate,
5111
- showTradeTab = true
5133
+ showTradeTab = true,
5134
+ portfolioSummary
5112
5135
  }) => {
5113
5136
  const [isUserMenuOpen, setIsUserMenuOpen] = useState(false);
5114
5137
  const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false);
5115
5138
  const [isMoreMenuOpen, setIsMoreMenuOpen] = useState(false);
5116
5139
  const [showLoginPopup, setShowLoginPopup] = useState(false);
5117
5140
  const [loginPopupInitialView, setLoginPopupInitialView] = useState(void 0);
5141
+ const [isPortfolioBarVisible, setIsPortfolioBarVisible] = useState(() => {
5142
+ if (typeof localStorage === "undefined") return false;
5143
+ return localStorage.getItem("portfolioBarVisible") !== "false";
5144
+ });
5145
+ const portfolioPillRef = useRef(null);
5146
+ const [portfolioArrowLeft, setPortfolioArrowLeft] = useState(null);
5147
+ const togglePortfolioBar = useCallback(() => {
5148
+ setIsPortfolioBarVisible((prev) => {
5149
+ const next = !prev;
5150
+ try {
5151
+ localStorage.setItem("portfolioBarVisible", String(next));
5152
+ } catch {
5153
+ }
5154
+ return next;
5155
+ });
5156
+ }, []);
5157
+ const updatePortfolioArrow = useCallback(() => {
5158
+ const eye = document.getElementById("portfolio-eye-toggle");
5159
+ const pill = portfolioPillRef.current;
5160
+ if (!eye || !pill) return;
5161
+ const eyeRect = eye.getBoundingClientRect();
5162
+ const pillRect = pill.getBoundingClientRect();
5163
+ const offset = eyeRect.left + eyeRect.width / 2 - pillRect.left - 7;
5164
+ setPortfolioArrowLeft(offset);
5165
+ }, []);
5166
+ useEffect(() => {
5167
+ if (!isPortfolioBarVisible || !portfolioSummary) return;
5168
+ updatePortfolioArrow();
5169
+ window.addEventListener("resize", updatePortfolioArrow);
5170
+ return () => window.removeEventListener("resize", updatePortfolioArrow);
5171
+ }, [isPortfolioBarVisible, portfolioSummary, updatePortfolioArrow]);
5118
5172
  useEffect(() => {
5119
5173
  if (typeof window === "undefined") return;
5120
5174
  const ua = navigator.userAgent;
@@ -5492,6 +5546,17 @@ var Header = ({
5492
5546
  }
5493
5547
  ),
5494
5548
  isAuthenticated ? /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center" }, children: [
5549
+ portfolioSummary && /* @__PURE__ */ jsx(
5550
+ PortfolioEyeButton,
5551
+ {
5552
+ id: "portfolio-eye-toggle",
5553
+ type: "button",
5554
+ onClick: togglePortfolioBar,
5555
+ $active: isPortfolioBarVisible,
5556
+ title: isPortfolioBarVisible ? "Hide portfolio" : "Show portfolio",
5557
+ children: isPortfolioBarVisible ? /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z" }) }) : /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46A11.804 11.804 0 001 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z" }) })
5558
+ }
5559
+ ),
5495
5560
  /* @__PURE__ */ jsxs(UserMenu, { children: [
5496
5561
  /* @__PURE__ */ jsxs(
5497
5562
  UserButton,
@@ -5563,7 +5628,52 @@ var Header = ({
5563
5628
  ] })
5564
5629
  ] }),
5565
5630
  /* @__PURE__ */ jsx(HeaderSpacer, {}),
5566
- LoginPopupComponent && showLoginPopup && /* @__PURE__ */ jsx(
5631
+ isAuthenticated && portfolioSummary && isPortfolioBarVisible && (() => {
5632
+ const fmt = (n) => n.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 });
5633
+ const isPLPositive = portfolioSummary.pnl >= 0;
5634
+ return /* @__PURE__ */ jsx(PortfolioBarContainer, { children: /* @__PURE__ */ jsxs(PortfolioBarPill, { ref: portfolioPillRef, children: [
5635
+ portfolioArrowLeft !== null && /* @__PURE__ */ jsx(PortfolioBarArrow, { style: { left: `${portfolioArrowLeft}px` } }),
5636
+ /* @__PURE__ */ jsxs(PBMetric, { children: [
5637
+ /* @__PURE__ */ jsx(PBMetricLabel, { children: "Holdings" }),
5638
+ /* @__PURE__ */ jsxs(PBMetricValue, { children: [
5639
+ "$",
5640
+ fmt(portfolioSummary.holdings)
5641
+ ] })
5642
+ ] }),
5643
+ /* @__PURE__ */ jsx(PBOperator, { children: "+" }),
5644
+ /* @__PURE__ */ jsxs(PBMetric, { children: [
5645
+ /* @__PURE__ */ jsx(PBMetricLabel, { children: "Cash" }),
5646
+ /* @__PURE__ */ jsxs(PBMetricValue, { children: [
5647
+ "$",
5648
+ fmt(portfolioSummary.cash)
5649
+ ] })
5650
+ ] }),
5651
+ /* @__PURE__ */ jsx(PBOperator, { children: "=" }),
5652
+ /* @__PURE__ */ jsxs(PBMetric, { children: [
5653
+ /* @__PURE__ */ jsx(PBMetricLabel, { children: "Portfolio" }),
5654
+ /* @__PURE__ */ jsxs(PBMetricValue, { style: { color: "#D4AF37", fontWeight: 700 }, children: [
5655
+ "$",
5656
+ fmt(portfolioSummary.portfolioValue)
5657
+ ] })
5658
+ ] }),
5659
+ /* @__PURE__ */ jsx(PBDot, {}),
5660
+ /* @__PURE__ */ jsxs(PBMetric, { children: [
5661
+ /* @__PURE__ */ jsx(PBMetricLabel, { children: "P&L" }),
5662
+ /* @__PURE__ */ jsxs(PBMetricValue, { $positive: isPLPositive, $negative: !isPLPositive, children: [
5663
+ isPLPositive ? "+" : "",
5664
+ "$",
5665
+ fmt(Math.abs(portfolioSummary.pnl)),
5666
+ /* @__PURE__ */ jsxs("span", { style: { fontSize: "0.6rem", marginLeft: "2px", opacity: 0.7 }, children: [
5667
+ "(",
5668
+ isPLPositive ? "+" : "",
5669
+ portfolioSummary.pnlPercent.toFixed(2),
5670
+ "%)"
5671
+ ] })
5672
+ ] })
5673
+ ] })
5674
+ ] }) });
5675
+ })(),
5676
+ LoginPopupComponent && showLoginPopup && /* @__PURE__ */ jsx(
5567
5677
  LoginPopupComponent,
5568
5678
  {
5569
5679
  onClose: handleLoginPopupClose,
@@ -5648,8 +5758,19 @@ var HeaderContainer = styled25.header`
5648
5758
  box-sizing: border-box;
5649
5759
 
5650
5760
  @media (max-width: 768px) {
5651
- padding: 0 1rem;
5652
- padding-top: max(env(safe-area-inset-top, 0px), var(--telegram-safe-top, 0px));
5761
+ top: 0.5rem;
5762
+ left: 0.75rem;
5763
+ right: 0.75rem;
5764
+ width: calc(100% - 1.5rem);
5765
+ height: 46px;
5766
+ min-height: 46px;
5767
+ padding: 0 0.75rem;
5768
+ border-radius: 12px;
5769
+ background-color: rgba(13, 17, 23, 0.92);
5770
+ backdrop-filter: blur(12px);
5771
+ border: 1px solid rgba(255, 255, 255, 0.08);
5772
+ border-bottom: 1px solid rgba(255, 255, 255, 0.08);
5773
+ box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
5653
5774
  }
5654
5775
  `;
5655
5776
  var HeaderSpacer = styled25.div`
@@ -5657,6 +5778,10 @@ var HeaderSpacer = styled25.div`
5657
5778
  min-height: 56px;
5658
5779
  min-height: calc(56px + max(env(safe-area-inset-top, 0px), var(--telegram-safe-top, 0px)));
5659
5780
  flex-shrink: 0;
5781
+
5782
+ @media (max-width: 768px) {
5783
+ min-height: calc(46px + 0.5rem);
5784
+ }
5660
5785
  `;
5661
5786
  var Logo = styled25.div`
5662
5787
  display: flex;
@@ -5990,6 +6115,151 @@ var MobileNavItem = styled25.div`
5990
6115
  padding-left: 24px;
5991
6116
  }
5992
6117
  `;
6118
+ var pbShimmer = keyframes`
6119
+ 0% { background-position: -200% 0; }
6120
+ 100% { background-position: 200% 0; }
6121
+ `;
6122
+ var PortfolioEyeButton = styled25.button`
6123
+ background: ${(p) => p.$active ? "rgba(212, 175, 55, 0.15)" : "transparent"};
6124
+ border: none;
6125
+ border-radius: 6px;
6126
+ cursor: pointer;
6127
+ padding: 6px;
6128
+ display: flex;
6129
+ align-items: center;
6130
+ justify-content: center;
6131
+ color: ${(p) => p.$active ? "#D4AF37" : "rgba(255,255,255,0.5)"};
6132
+ transition: all 0.2s ease;
6133
+ margin-right: 4px;
6134
+
6135
+ &:hover {
6136
+ background: rgba(212, 175, 55, 0.2);
6137
+ color: #D4AF37;
6138
+ }
6139
+
6140
+ @media (max-width: 768px) {
6141
+ padding: 4px;
6142
+ margin-right: 2px;
6143
+ }
6144
+ `;
6145
+ var PortfolioBarContainer = styled25.div`
6146
+ position: fixed;
6147
+ top: 56px;
6148
+ top: calc(56px + max(env(safe-area-inset-top, 0px), var(--telegram-safe-top, 0px)));
6149
+ left: 0;
6150
+ right: 0;
6151
+ z-index: 999;
6152
+ display: flex;
6153
+ justify-content: flex-end;
6154
+ align-items: flex-start;
6155
+ padding: 0 5%;
6156
+ pointer-events: none;
6157
+ overflow: visible;
6158
+
6159
+ &::before {
6160
+ content: '';
6161
+ position: absolute;
6162
+ top: 0;
6163
+ left: 40%;
6164
+ right: 0;
6165
+ height: 2px;
6166
+ background: linear-gradient(90deg, transparent 0%, rgba(212, 175, 55, 0.25) 100%);
6167
+ pointer-events: none;
6168
+ }
6169
+
6170
+ @media (max-width: 768px) {
6171
+ top: calc(46px + 0.5rem);
6172
+ padding: 0 0.75rem;
6173
+ justify-content: center;
6174
+
6175
+ &::before {
6176
+ left: 0;
6177
+ right: 0;
6178
+ background: linear-gradient(90deg, transparent 0%, rgba(212, 175, 55, 0.4) 30%, rgba(212, 175, 55, 0.4) 70%, transparent 100%);
6179
+ }
6180
+ }
6181
+ `;
6182
+ var PortfolioBarPill = styled25.div`
6183
+ pointer-events: auto;
6184
+ display: flex;
6185
+ align-items: center;
6186
+ gap: 1.25rem;
6187
+ padding: 0.5rem 1.5rem;
6188
+ border-radius: 0 0 20px 20px;
6189
+ background: linear-gradient(135deg, rgba(24, 26, 34, 0.98) 0%, rgba(32, 34, 42, 0.97) 100%);
6190
+ backdrop-filter: blur(16px);
6191
+ border: 1px solid rgba(212, 175, 55, 0.25);
6192
+ border-top: none;
6193
+ box-shadow:
6194
+ 0 4px 16px rgba(0, 0, 0, 0.3),
6195
+ 0 0 0 1px rgba(255, 255, 255, 0.03) inset,
6196
+ 0 1px 0 rgba(212, 175, 55, 0.06) inset;
6197
+ position: relative;
6198
+ overflow: visible;
6199
+
6200
+ &::before {
6201
+ content: '';
6202
+ position: absolute;
6203
+ top: 0;
6204
+ left: 0;
6205
+ right: 0;
6206
+ height: 1px;
6207
+ background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.3), transparent);
6208
+ background-size: 200% 100%;
6209
+ animation: ${pbShimmer} 4s linear infinite;
6210
+ }
6211
+
6212
+ @media (max-width: 768px) {
6213
+ gap: 0.75rem;
6214
+ padding: 0.4rem 1rem;
6215
+ border-radius: 0 0 16px 16px;
6216
+ }
6217
+ `;
6218
+ var PortfolioBarArrow = styled25.div`
6219
+ position: absolute;
6220
+ top: -7px;
6221
+ width: 14px;
6222
+ height: 14px;
6223
+ background: linear-gradient(135deg, rgba(26, 28, 36, 1) 0%, rgba(30, 32, 40, 1) 100%);
6224
+ border-left: 1px solid rgba(212, 175, 55, 0.3);
6225
+ border-top: 1px solid rgba(212, 175, 55, 0.3);
6226
+ transform: rotate(45deg);
6227
+ box-shadow: -2px -2px 6px rgba(0, 0, 0, 0.25);
6228
+ pointer-events: none;
6229
+ `;
6230
+ var PBMetric = styled25.div`
6231
+ display: flex;
6232
+ flex-direction: column;
6233
+ align-items: center;
6234
+ gap: 1px;
6235
+ white-space: nowrap;
6236
+ `;
6237
+ var PBMetricLabel = styled25.span`
6238
+ font-size: 0.55rem;
6239
+ color: rgba(255, 255, 255, 0.6);
6240
+ text-transform: uppercase;
6241
+ letter-spacing: 0.5px;
6242
+ font-weight: 500;
6243
+ `;
6244
+ var PBMetricValue = styled25.span`
6245
+ font-size: 0.75rem;
6246
+ font-weight: 600;
6247
+ color: ${(p) => p.$positive ? "#0ecb81" : p.$negative ? "#f6465d" : "#eaecef"};
6248
+ font-variant-numeric: tabular-nums;
6249
+ `;
6250
+ var PBDot = styled25.div`
6251
+ width: 3px;
6252
+ height: 3px;
6253
+ border-radius: 50%;
6254
+ background: rgba(212, 175, 55, 0.25);
6255
+ flex-shrink: 0;
6256
+ `;
6257
+ var PBOperator = styled25.span`
6258
+ font-size: 0.7rem;
6259
+ font-weight: 500;
6260
+ color: rgba(255, 255, 255, 0.35);
6261
+ flex-shrink: 0;
6262
+ `;
5993
6263
  var PropertySubheader = React5.forwardRef(
5994
6264
  ({ className, tabs, activeTabId, onTabChange, actions, ...props }, ref) => {
5995
6265
  const tabsContainerRef = React5.useRef(null);
@@ -6019,287 +6289,102 @@ var PropertySubheader = React5.forwardRef(
6019
6289
  "flex flex-col-reverse gap-3",
6020
6290
  "md:flex-row md:items-center md:justify-between",
6021
6291
  className
6022
- ),
6023
- ...props,
6024
- children: [
6025
- /* @__PURE__ */ jsx(
6026
- "div",
6027
- {
6028
- ref: tabsContainerRef,
6029
- className: cn(
6030
- "flex items-center border-b border-white/10",
6031
- "overflow-x-auto md:overflow-visible",
6032
- "[-webkit-overflow-scrolling:touch]",
6033
- "[scroll-behavior:smooth]",
6034
- "[touch-action:pan-x]",
6035
- "md:border-b-0"
6036
- ),
6037
- style: { WebkitTapHighlightColor: "transparent" },
6038
- children: /* @__PURE__ */ jsx("div", { className: "flex min-w-max", children: tabs.map((tab) => {
6039
- const active = tab.id === activeTabId;
6040
- return /* @__PURE__ */ jsxs(
6041
- "button",
6042
- {
6043
- type: "button",
6044
- onClick: () => onTabChange?.(tab.id),
6045
- className: cn(
6046
- "relative whitespace-nowrap",
6047
- "px-6 py-4",
6048
- "font-normal",
6049
- "transition-colors",
6050
- "max-[768px]:px-[1.2rem] max-[768px]:py-[0.8rem]",
6051
- "max-[480px]:px-4 max-[480px]:py-[0.7rem] max-[480px]:text-[0.9rem]",
6052
- active ? "font-semibold text-[var(--color-accent,#e6c87e)]" : "text-white/60 hover:text-white"
6053
- ),
6054
- style: {
6055
- borderBottom: active ? "2px solid var(--color-accent, #e6c87e)" : "2px solid transparent",
6056
- minWidth: "80px",
6057
- touchAction: "manipulation"
6058
- },
6059
- children: [
6060
- tab.label,
6061
- tab.hasNotification ? /* @__PURE__ */ jsx(
6062
- "span",
6063
- {
6064
- className: "absolute right-[10px] top-[10px] h-2 w-2 rounded-full animate-pulse",
6065
- style: {
6066
- backgroundColor: tab.notificationColor ?? "#f6465d",
6067
- boxShadow: "0 0 0 0 rgba(246, 70, 93, 0.7)"
6068
- }
6069
- }
6070
- ) : null
6071
- ]
6072
- },
6073
- tab.id
6074
- );
6075
- }) })
6076
- }
6077
- ),
6078
- actions != null && actions.length > 0 ? /* @__PURE__ */ jsx(
6079
- "div",
6080
- {
6081
- className: cn(
6082
- "flex items-center gap-[10px]",
6083
- "overflow-x-auto md:overflow-visible",
6084
- "[scrollbar-width:none]",
6085
- "md:justify-end",
6086
- "max-[768px]:w-full max-[768px]:justify-center max-[768px]:pb-2 max-[768px]:mb-4"
6087
- ),
6088
- children: actions.map((action) => /* @__PURE__ */ jsxs(
6089
- "button",
6090
- {
6091
- type: "button",
6092
- onClick: action.onClick,
6093
- className: cn(
6094
- "flex shrink-0 items-center gap-[5px] whitespace-nowrap",
6095
- "rounded",
6096
- "border border-white/10",
6097
- "bg-transparent",
6098
- "px-3 py-1.5 text-[14px] font-normal",
6099
- "transition-all",
6100
- "max-[768px]:px-2.5 max-[768px]:py-[5px] max-[768px]:text-[13px]",
6101
- "hover:bg-white/5 hover:border-[var(--color-accent,#e6c87e)] hover:text-[var(--color-accent,#e6c87e)]"
6102
- ),
6103
- children: [
6104
- action.icon,
6105
- action.label
6106
- ]
6107
- },
6108
- action.id
6109
- ))
6110
- }
6111
- ) : null
6112
- ]
6113
- }
6114
- );
6115
- }
6116
- );
6117
- PropertySubheader.displayName = "PropertySubheader";
6118
- var slideIn = keyframes`
6119
- from { transform: translateX(110%); opacity: 0; }
6120
- to { transform: translateX(0); opacity: 1; }
6121
- `;
6122
- var slideOut = keyframes`
6123
- from { transform: translateX(0); opacity: 1; }
6124
- to { transform: translateX(110%); opacity: 0; }
6125
- `;
6126
- var progressShrink = keyframes`
6127
- from { width: 100%; }
6128
- to { width: 0%; }
6129
- `;
6130
- var VARIANT_COLORS = {
6131
- success: { accent: "#0ecb81", icon: "\u2713" },
6132
- error: { accent: "#f6465d", icon: "\u2715" },
6133
- info: { accent: "#E6C656", icon: "\u2139" },
6134
- pending: { accent: "#7EB3E6", icon: "\u25CC" }
6135
- };
6136
- var Wrapper = styled25.div`
6137
- position: relative;
6138
- display: flex;
6139
- flex-direction: column;
6140
- gap: 0;
6141
- width: 340px;
6142
- background: #0d0f1a;
6143
- border: 1px solid rgba(255, 255, 255, 0.08);
6144
- border-radius: 10px;
6145
- overflow: hidden;
6146
- box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.04);
6147
- animation: ${({ $exiting }) => $exiting ? css`${slideOut} 0.28s cubic-bezier(0.4,0,1,1) forwards` : css`${slideIn} 0.32s cubic-bezier(0,0,0.2,1) forwards`};
6148
- pointer-events: all;
6149
- `;
6150
- var Body = styled25.div`
6151
- display: flex;
6152
- align-items: flex-start;
6153
- gap: 12px;
6154
- padding: 14px 16px 12px;
6155
- `;
6156
- var IconDot = styled25.div`
6157
- flex-shrink: 0;
6158
- width: 28px;
6159
- height: 28px;
6160
- border-radius: 50%;
6161
- background: ${({ $color }) => $color}1a;
6162
- border: 1px solid ${({ $color }) => $color}55;
6163
- display: flex;
6164
- align-items: center;
6165
- justify-content: center;
6166
- font-size: 0.75rem;
6167
- font-weight: 700;
6168
- color: ${({ $color }) => $color};
6169
- margin-top: 1px;
6170
- `;
6171
- var Content = styled25.div`
6172
- flex: 1;
6173
- min-width: 0;
6174
- `;
6175
- var Title = styled25.p`
6176
- margin: 0 0 2px;
6177
- font-size: 0.8rem;
6178
- font-weight: 600;
6179
- color: #fff;
6180
- letter-spacing: 0.01em;
6181
- `;
6182
- var Amount = styled25.p`
6183
- margin: 0 0 6px;
6184
- font-size: 1.05rem;
6185
- font-weight: 700;
6186
- color: #E6C656;
6187
- letter-spacing: -0.01em;
6188
- `;
6189
- var TxRow = styled25.a`
6190
- display: inline-flex;
6191
- align-items: center;
6192
- gap: 5px;
6193
- font-family: 'IBM Plex Mono', 'Space Mono', monospace;
6194
- font-size: 0.68rem;
6195
- color: rgba(255, 255, 255, 0.4);
6196
- text-decoration: none;
6197
- transition: color 0.15s;
6198
- &:hover {
6199
- color: #7EB3E6;
6200
- }
6201
- `;
6202
- var TxArrow = styled25.span`
6203
- font-size: 0.6rem;
6204
- opacity: 0.6;
6205
- `;
6206
- var CloseBtn = styled25.button`
6207
- flex-shrink: 0;
6208
- background: none;
6209
- border: none;
6210
- padding: 2px 4px;
6211
- cursor: pointer;
6212
- color: rgba(255, 255, 255, 0.25);
6213
- font-size: 0.9rem;
6214
- line-height: 1;
6215
- transition: color 0.15s;
6216
- &:hover { color: rgba(255, 255, 255, 0.7); }
6217
- `;
6218
- var ProgressBar = styled25.div`
6219
- height: 2px;
6220
- background: rgba(255, 255, 255, 0.06);
6221
- position: relative;
6222
- &::after {
6223
- content: '';
6224
- position: absolute;
6225
- left: 0;
6226
- top: 0;
6227
- height: 100%;
6228
- background: ${({ $color }) => $color};
6229
- animation: ${css`${progressShrink} ${({ $duration }) => $duration}ms linear forwards`};
6292
+ ),
6293
+ ...props,
6294
+ children: [
6295
+ /* @__PURE__ */ jsx(
6296
+ "div",
6297
+ {
6298
+ ref: tabsContainerRef,
6299
+ className: cn(
6300
+ "flex items-center border-b border-white/10",
6301
+ "overflow-x-auto md:overflow-visible",
6302
+ "[-webkit-overflow-scrolling:touch]",
6303
+ "[scroll-behavior:smooth]",
6304
+ "[touch-action:pan-x]",
6305
+ "md:border-b-0"
6306
+ ),
6307
+ style: { WebkitTapHighlightColor: "transparent" },
6308
+ children: /* @__PURE__ */ jsx("div", { className: "flex min-w-max", children: tabs.map((tab) => {
6309
+ const active = tab.id === activeTabId;
6310
+ return /* @__PURE__ */ jsxs(
6311
+ "button",
6312
+ {
6313
+ type: "button",
6314
+ onClick: () => onTabChange?.(tab.id),
6315
+ className: cn(
6316
+ "relative whitespace-nowrap",
6317
+ "px-6 py-4",
6318
+ "font-normal",
6319
+ "transition-colors",
6320
+ "max-[768px]:px-[1.2rem] max-[768px]:py-[0.8rem]",
6321
+ "max-[480px]:px-4 max-[480px]:py-[0.7rem] max-[480px]:text-[0.9rem]",
6322
+ active ? "font-semibold text-[var(--color-accent,#e6c87e)]" : "text-white/60 hover:text-white"
6323
+ ),
6324
+ style: {
6325
+ borderBottom: active ? "2px solid var(--color-accent, #e6c87e)" : "2px solid transparent",
6326
+ minWidth: "80px",
6327
+ touchAction: "manipulation"
6328
+ },
6329
+ children: [
6330
+ tab.label,
6331
+ tab.hasNotification ? /* @__PURE__ */ jsx(
6332
+ "span",
6333
+ {
6334
+ className: "absolute right-[10px] top-[10px] h-2 w-2 rounded-full animate-pulse",
6335
+ style: {
6336
+ backgroundColor: tab.notificationColor ?? "#f6465d",
6337
+ boxShadow: "0 0 0 0 rgba(246, 70, 93, 0.7)"
6338
+ }
6339
+ }
6340
+ ) : null
6341
+ ]
6342
+ },
6343
+ tab.id
6344
+ );
6345
+ }) })
6346
+ }
6347
+ ),
6348
+ actions != null && actions.length > 0 ? /* @__PURE__ */ jsx(
6349
+ "div",
6350
+ {
6351
+ className: cn(
6352
+ "flex items-center gap-[10px]",
6353
+ "overflow-x-auto md:overflow-visible",
6354
+ "[scrollbar-width:none]",
6355
+ "md:justify-end",
6356
+ "max-[768px]:w-full max-[768px]:justify-center max-[768px]:pb-2 max-[768px]:mb-4"
6357
+ ),
6358
+ children: actions.map((action) => /* @__PURE__ */ jsxs(
6359
+ "button",
6360
+ {
6361
+ type: "button",
6362
+ onClick: action.onClick,
6363
+ className: cn(
6364
+ "flex shrink-0 items-center gap-[5px] whitespace-nowrap",
6365
+ "rounded",
6366
+ "border border-white/10",
6367
+ "bg-transparent",
6368
+ "px-3 py-1.5 text-[14px] font-normal",
6369
+ "transition-all",
6370
+ "max-[768px]:px-2.5 max-[768px]:py-[5px] max-[768px]:text-[13px]",
6371
+ "hover:bg-white/5 hover:border-[var(--color-accent,#e6c87e)] hover:text-[var(--color-accent,#e6c87e)]"
6372
+ ),
6373
+ children: [
6374
+ action.icon,
6375
+ action.label
6376
+ ]
6377
+ },
6378
+ action.id
6379
+ ))
6380
+ }
6381
+ ) : null
6382
+ ]
6383
+ }
6384
+ );
6230
6385
  }
6231
- `;
6232
- var Container = styled25.div`
6233
- position: fixed;
6234
- bottom: 24px;
6235
- right: 24px;
6236
- z-index: 9999;
6237
- display: flex;
6238
- flex-direction: column-reverse;
6239
- gap: 10px;
6240
- pointer-events: none;
6241
- `;
6242
- var DEFAULT_EXPLORER = "https://sepolia.basescan.org/tx/";
6243
- function truncateHash(hash) {
6244
- return `${hash.slice(0, 6)}\u2026${hash.slice(-4)}`;
6245
- }
6246
- function ToastItem({ toast, onDismiss }) {
6247
- const [exiting, setExiting] = useState(false);
6248
- const timerRef = useRef(null);
6249
- const dismiss = useCallback(() => {
6250
- setExiting(true);
6251
- setTimeout(() => onDismiss(toast.id), 280);
6252
- }, [onDismiss, toast.id]);
6253
- useEffect(() => {
6254
- const duration2 = toast.duration ?? 6e3;
6255
- if (duration2 > 0) {
6256
- timerRef.current = setTimeout(dismiss, duration2);
6257
- }
6258
- return () => {
6259
- if (timerRef.current) clearTimeout(timerRef.current);
6260
- };
6261
- }, [dismiss, toast.duration]);
6262
- const { accent, icon } = VARIANT_COLORS[toast.variant];
6263
- const duration = toast.duration ?? 6e3;
6264
- const explorerBase = toast.explorerUrl ?? DEFAULT_EXPLORER;
6265
- const txUrl = toast.txHash ? `${explorerBase}${toast.txHash}` : void 0;
6266
- return /* @__PURE__ */ jsxs(Wrapper, { $exiting: exiting, children: [
6267
- /* @__PURE__ */ jsxs(Body, { children: [
6268
- /* @__PURE__ */ jsx(IconDot, { $color: accent, children: icon }),
6269
- /* @__PURE__ */ jsxs(Content, { children: [
6270
- /* @__PURE__ */ jsx(Title, { children: toast.title }),
6271
- toast.amount && /* @__PURE__ */ jsx(Amount, { children: toast.amount }),
6272
- toast.txHash && txUrl && /* @__PURE__ */ jsxs(TxRow, { href: txUrl, target: "_blank", rel: "noopener noreferrer", children: [
6273
- truncateHash(toast.txHash),
6274
- /* @__PURE__ */ jsx(TxArrow, { children: "\u2197" })
6275
- ] })
6276
- ] }),
6277
- /* @__PURE__ */ jsx(CloseBtn, { type: "button", onClick: dismiss, "aria-label": "Dismiss", children: "\u2715" })
6278
- ] }),
6279
- duration > 0 && /* @__PURE__ */ jsx(ProgressBar, { $color: accent, $duration: duration })
6280
- ] });
6281
- }
6282
- var ToastContext = createContext(null);
6283
- function ToastProvider({ children }) {
6284
- const [toasts, setToasts] = useState([]);
6285
- const addToast = useCallback((data) => {
6286
- const id = `toast-${Date.now()}-${Math.random().toString(36).slice(2, 7)}`;
6287
- setToasts((prev) => [...prev, { ...data, id }]);
6288
- return id;
6289
- }, []);
6290
- const dismiss = useCallback((id) => {
6291
- setToasts((prev) => prev.filter((t) => t.id !== id));
6292
- }, []);
6293
- return /* @__PURE__ */ jsxs(ToastContext.Provider, { value: { toast: addToast, dismiss }, children: [
6294
- children,
6295
- /* @__PURE__ */ jsx(Container, { children: toasts.map((t) => /* @__PURE__ */ jsx(ToastItem, { toast: t, onDismiss: dismiss }, t.id)) })
6296
- ] });
6297
- }
6298
- function useToast() {
6299
- const ctx = useContext(ToastContext);
6300
- if (!ctx) throw new Error("useToast must be used within a ToastProvider");
6301
- return ctx;
6302
- }
6386
+ );
6387
+ PropertySubheader.displayName = "PropertySubheader";
6303
6388
  var DEFAULT_LOGO_SRC = Loaf_logo_Banner_default;
6304
6389
  var DEFAULT_LOGO_ALT = "Loaf";
6305
6390
  var OTP_INPUT_LENGTH = 6;
@@ -6327,7 +6412,6 @@ var LoginPopup = ({
6327
6412
  const [error, setError] = useState("");
6328
6413
  const [loading, setLoading] = useState(false);
6329
6414
  const [isSignUp, setIsSignUp] = useState(false);
6330
- const { toast } = useToast();
6331
6415
  const [fundingAmount] = useState("");
6332
6416
  const [kycLoading, setKycLoading] = useState(false);
6333
6417
  const [showKycWidget, setShowKycWidget] = useState(false);
@@ -6341,11 +6425,6 @@ var LoginPopup = ({
6341
6425
  setView(initialView);
6342
6426
  }
6343
6427
  }, [initialView]);
6344
- useEffect(() => {
6345
- if (view === "kyc" && renderKycWidget) {
6346
- setShowKycWidget(true);
6347
- }
6348
- }, [view, renderKycWidget]);
6349
6428
  useEffect(() => {
6350
6429
  if (!transakWidgetUrl) return;
6351
6430
  const handleTransakMessage = (event) => {
@@ -6548,19 +6627,10 @@ var LoginPopup = ({
6548
6627
  };
6549
6628
  const handleKycWidgetResult = (result) => {
6550
6629
  setShowKycWidget(false);
6551
- onClose();
6552
6630
  if (result.passed) {
6553
- toast({
6554
- variant: "success",
6555
- title: "KYC submitted \u2014 pending review",
6556
- amount: "Your documents are under review. Please check back in a few minutes."
6557
- });
6631
+ setView("kyc-success");
6558
6632
  } else {
6559
- toast({
6560
- variant: "error",
6561
- title: "Verification unsuccessful",
6562
- amount: "Your identity check didn't pass. Please contact support if you believe this is an error."
6563
- });
6633
+ setView("kyc-failed");
6564
6634
  }
6565
6635
  };
6566
6636
  const handleKycWidgetClose = () => {
@@ -6651,7 +6721,7 @@ var LoginPopup = ({
6651
6721
  if (view === "main") {
6652
6722
  return /* @__PURE__ */ jsx(Overlay2, { onClick: onClose, children: /* @__PURE__ */ jsxs(PopupContainer, { onClick: (event) => event.stopPropagation(), children: [
6653
6723
  /* @__PURE__ */ jsx(CloseButton, { onClick: onClose, "aria-label": "Close login popup", children: /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }) }) }),
6654
- /* @__PURE__ */ jsxs(Title2, { children: [
6724
+ /* @__PURE__ */ jsxs(Title, { children: [
6655
6725
  /* @__PURE__ */ jsx(LogoContainer3, { children: /* @__PURE__ */ jsx(LogoImage, { src: logoSrc, alt: logoAlt }) }),
6656
6726
  "Welcome to Loaf"
6657
6727
  ] }),
@@ -6712,7 +6782,7 @@ var LoginPopup = ({
6712
6782
  /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" }) }),
6713
6783
  "Back"
6714
6784
  ] }),
6715
- /* @__PURE__ */ jsxs(Title2, { children: [
6785
+ /* @__PURE__ */ jsxs(Title, { children: [
6716
6786
  /* @__PURE__ */ jsx(LogoContainer3, { children: /* @__PURE__ */ jsx(LogoImage, { src: logoSrc, alt: logoAlt }) }),
6717
6787
  isSignUp ? "Sign up with Email" : "Sign in with Email"
6718
6788
  ] }),
@@ -6751,7 +6821,7 @@ var LoginPopup = ({
6751
6821
  /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" }) }),
6752
6822
  "Back"
6753
6823
  ] }),
6754
- /* @__PURE__ */ jsxs(Title2, { children: [
6824
+ /* @__PURE__ */ jsxs(Title, { children: [
6755
6825
  /* @__PURE__ */ jsx(LogoContainer3, { children: /* @__PURE__ */ jsx(LogoImage, { src: logoSrc, alt: logoAlt }) }),
6756
6826
  "Enter Verification Code"
6757
6827
  ] }),
@@ -6867,7 +6937,7 @@ var LoginPopup = ({
6867
6937
  ] }) });
6868
6938
  }
6869
6939
  if (view === "funding") {
6870
- return /* @__PURE__ */ jsx(Overlay2, { onClick: onClose, children: /* @__PURE__ */ jsxs(
6940
+ return /* @__PURE__ */ jsx(Overlay2, { children: /* @__PURE__ */ jsxs(
6871
6941
  FundingPopupContainer,
6872
6942
  {
6873
6943
  onClick: (event) => event.stopPropagation(),
@@ -6937,6 +7007,16 @@ var Overlay2 = styled25.div`
6937
7007
  justify-content: center;
6938
7008
  align-items: center;
6939
7009
  z-index: 10000;
7010
+ animation: fadeIn 0.2s ease-in-out;
7011
+
7012
+ @keyframes fadeIn {
7013
+ from {
7014
+ opacity: 0;
7015
+ }
7016
+ to {
7017
+ opacity: 1;
7018
+ }
7019
+ }
6940
7020
  `;
6941
7021
  var PopupContainer = styled25.div`
6942
7022
  background-color: var(--color-background, #0a0a0a);
@@ -6946,8 +7026,20 @@ var PopupContainer = styled25.div`
6946
7026
  max-width: 440px;
6947
7027
  width: 90%;
6948
7028
  position: relative;
7029
+ animation: slideUp 0.3s ease-out;
6949
7030
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
6950
7031
 
7032
+ @keyframes slideUp {
7033
+ from {
7034
+ transform: translateY(20px);
7035
+ opacity: 0;
7036
+ }
7037
+ to {
7038
+ transform: translateY(0);
7039
+ opacity: 1;
7040
+ }
7041
+ }
7042
+
6951
7043
  @media (max-width: 768px) {
6952
7044
  padding: 2rem;
6953
7045
  max-width: 90%;
@@ -6961,9 +7053,21 @@ var KycPopupContainer = styled25.div`
6961
7053
  max-width: ${(props) => props.$expanded ? "680px" : "440px"};
6962
7054
  width: 90%;
6963
7055
  position: relative;
7056
+ animation: slideUp 0.3s ease-out;
6964
7057
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
6965
7058
  transition: max-width 0.3s ease;
6966
7059
 
7060
+ @keyframes slideUp {
7061
+ from {
7062
+ transform: translateY(20px);
7063
+ opacity: 0;
7064
+ }
7065
+ to {
7066
+ transform: translateY(0);
7067
+ opacity: 1;
7068
+ }
7069
+ }
7070
+
6967
7071
  @media (max-width: 768px) {
6968
7072
  padding: 1.5rem;
6969
7073
  max-width: 95%;
@@ -7022,7 +7126,7 @@ var CloseButton = styled25.button`
7022
7126
  color: var(--color-accent, #e6c656);
7023
7127
  }
7024
7128
  `;
7025
- var Title2 = styled25.h2`
7129
+ var Title = styled25.h2`
7026
7130
  font-size: 1.75rem;
7027
7131
  font-weight: 600;
7028
7132
  color: var(--color-text, #eaecef);
@@ -7291,9 +7395,21 @@ var FundingPopupContainer = styled25.div`
7291
7395
  max-width: ${(props) => props.$hasWidget ? "900px" : "440px"};
7292
7396
  width: 90%;
7293
7397
  position: relative;
7398
+ animation: slideUp 0.3s ease-out;
7294
7399
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
7295
7400
  overflow: hidden;
7296
7401
 
7402
+ @keyframes slideUp {
7403
+ from {
7404
+ transform: translateY(20px);
7405
+ opacity: 0;
7406
+ }
7407
+ to {
7408
+ transform: translateY(0);
7409
+ opacity: 1;
7410
+ }
7411
+ }
7412
+
7297
7413
  @media (max-width: 768px) {
7298
7414
  padding: ${(props) => props.$hasWidget ? "0" : "2rem"};
7299
7415
  max-width: 95%;
@@ -7582,7 +7698,7 @@ var PropertyCompareBar = React5.forwardRef(
7582
7698
  void 0,
7583
7699
  pricePercentFormat
7584
7700
  )}%`;
7585
- const priceContent = formattedPriceValue && propertyValueVariant === "pill" ? /* @__PURE__ */ jsxs(PriceBlock2, { $variant: propertyValueVariant, children: [
7701
+ const priceContent = formattedPriceValue && propertyValueVariant === "pill" ? /* @__PURE__ */ jsxs(PriceBlock, { $variant: propertyValueVariant, children: [
7586
7702
  /* @__PURE__ */ jsx(PriceAmount, { children: formattedPriceValue }),
7587
7703
  formattedPriceChange || formattedPricePercent ? /* @__PURE__ */ jsxs(
7588
7704
  PriceChange,
@@ -7895,7 +8011,7 @@ var PropertyValueChange = styled25.span`
7895
8011
  font-size: 0.65rem;
7896
8012
  }
7897
8013
  `;
7898
- var PriceBlock2 = styled25.div`
8014
+ var PriceBlock = styled25.div`
7899
8015
  display: none;
7900
8016
 
7901
8017
  ${({ $variant }) => $variant === "pill" && css`
@@ -7989,7 +8105,7 @@ function GalleryMapSection({
7989
8105
  /* @__PURE__ */ jsxs(ThumbStrip, { children: [
7990
8106
  /* @__PURE__ */ jsx(ThumbScroll, { children: images.filter((img) => img.category !== "Floorplan").map((img) => {
7991
8107
  const actualIndex = images.indexOf(img);
7992
- return /* @__PURE__ */ jsx(Thumbnail, { "data-active": !showVideo && carouselIndex === actualIndex, onClick: () => {
8108
+ return /* @__PURE__ */ jsx(Thumbnail2, { "data-active": !showVideo && carouselIndex === actualIndex, onClick: () => {
7993
8109
  stopAutoPlay();
7994
8110
  setShowVideo(false);
7995
8111
  setCarouselIndex(actualIndex);
@@ -8129,7 +8245,7 @@ var ThumbScroll = styled25.div`
8129
8245
  scrollbar-width: none;
8130
8246
  &::-webkit-scrollbar { display: none; }
8131
8247
  `;
8132
- var Thumbnail = styled25.div`
8248
+ var Thumbnail2 = styled25.div`
8133
8249
  min-width: 60px; height: 45px; border-radius: 4px; overflow: hidden;
8134
8250
  cursor: pointer; border: 2px solid transparent; opacity: 0.6;
8135
8251
  transition: all 0.2s ease; flex-shrink: 0;
@@ -8660,7 +8776,7 @@ function PropertyHistory() {
8660
8776
  /* @__PURE__ */ jsx("span", { className: "text-[0.9rem] font-normal ml-3 opacity-80", children: loafListing.date.replace(/\d+,\s|\s\d+$/, "") })
8661
8777
  ] }) }),
8662
8778
  /* @__PURE__ */ jsx(SalesTable, { children: /* @__PURE__ */ jsx("tbody", { children: /* @__PURE__ */ jsxs(HistoryRow, { $isOwnershipStart: true, children: [
8663
- /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(TypeBadge, { $type: loafListing.type, children: loafListing.type === "Sale" ? "Sold" : loafListing.type }) }),
8779
+ /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(TypeBadge2, { $type: loafListing.type, children: loafListing.type === "Sale" ? "Sold" : loafListing.type }) }),
8664
8780
  /* @__PURE__ */ jsx("td", { children: loafListing.saleType ?? "-" }),
8665
8781
  /* @__PURE__ */ jsx("td", { children: loafListing.agent })
8666
8782
  ] }) }) }),
@@ -8722,7 +8838,7 @@ function PropertyHistory() {
8722
8838
  /* @__PURE__ */ jsx("span", { className: "text-[0.9rem] font-normal ml-3 opacity-80", children: ownershipSale.date.replace(/\d+,\s|\s\d+$/, "") })
8723
8839
  ] }) }),
8724
8840
  ownershipSale && (historyFilter === "all" || historyFilter === "sales") && /* @__PURE__ */ jsx(SalesTable, { children: /* @__PURE__ */ jsx("tbody", { children: /* @__PURE__ */ jsxs(HistoryRow, { $isOwnershipStart: true, children: [
8725
- /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(TypeBadge, { $type: ownershipSale.type, children: ownershipSale.type === "Sale" ? "Sold" : ownershipSale.type }) }),
8841
+ /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(TypeBadge2, { $type: ownershipSale.type, children: ownershipSale.type === "Sale" ? "Sold" : ownershipSale.type }) }),
8726
8842
  /* @__PURE__ */ jsx("td", { children: ownershipSale.saleType ?? "-" }),
8727
8843
  /* @__PURE__ */ jsx("td", { children: ownershipSale.agent })
8728
8844
  ] }) }) }),
@@ -8731,7 +8847,7 @@ function PropertyHistory() {
8731
8847
  /* @__PURE__ */ jsx("div", { className: "py-2", children: events.map((event) => /* @__PURE__ */ jsx("div", { className: "mb-2", children: /* @__PURE__ */ jsx(EventDetails, { event }) }, event.id)) })
8732
8848
  ] }),
8733
8849
  otherSales.length > 0 && (historyFilter === "all" || historyFilter === "sales") && /* @__PURE__ */ jsx(SalesTable, { children: /* @__PURE__ */ jsx("tbody", { children: otherSales.map((sale) => /* @__PURE__ */ jsxs(HistoryRow, { children: [
8734
- /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(TypeBadge, { $type: sale.type, children: sale.type === "Sale" ? "Sold" : sale.type }) }),
8850
+ /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(TypeBadge2, { $type: sale.type, children: sale.type === "Sale" ? "Sold" : sale.type }) }),
8735
8851
  /* @__PURE__ */ jsx("td", { children: sale.saleType ?? "-" }),
8736
8852
  /* @__PURE__ */ jsx("td", { children: sale.agent })
8737
8853
  ] }, sale.id)) }) })
@@ -8874,7 +8990,7 @@ function EventDetails({ event }) {
8874
8990
  onClick: toggleExpand,
8875
8991
  children: [
8876
8992
  /* @__PURE__ */ jsx("div", { className: "flex justify-between items-center flex-1 gap-4", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
8877
- /* @__PURE__ */ jsx(TypeBadge, { $type: event.type, children: event.type === "Sale" ? "Sold" : event.type }),
8993
+ /* @__PURE__ */ jsx(TypeBadge2, { $type: event.type, children: event.type === "Sale" ? "Sold" : event.type }),
8878
8994
  /* @__PURE__ */ jsx("span", { className: "ml-2", children: event.date })
8879
8995
  ] }) }),
8880
8996
  /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center text-[var(--color-text-secondary)] w-6 h-6 rounded-full transition-colors duration-200 hover:bg-white/10", children: expanded ? /* @__PURE__ */ jsx(BiChevronUp, { size: 20 }) : /* @__PURE__ */ jsx(BiChevronDown, { size: 20 }) })
@@ -9118,7 +9234,7 @@ var HistoryRow = styled25.tr`
9118
9234
  background-color: rgba(255, 255, 255, 0.08);
9119
9235
  }
9120
9236
  `;
9121
- var TypeBadge = styled25.span`
9237
+ var TypeBadge2 = styled25.span`
9122
9238
  display: inline-block;
9123
9239
  padding: 0.25rem 0.5rem;
9124
9240
  border-radius: 4px;
@@ -9528,7 +9644,8 @@ function AssetSelectorBar({
9528
9644
  metrics: metricsProp,
9529
9645
  currentTokenName,
9530
9646
  selectorItems,
9531
- onSelect
9647
+ onSelect,
9648
+ trailing
9532
9649
  }) {
9533
9650
  const [isDropdownOpen, setIsDropdownOpen] = useState(false);
9534
9651
  const hasItems = selectorItems && selectorItems.length > 0;
@@ -9557,7 +9674,7 @@ function AssetSelectorBar({
9557
9674
  /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem" }, children: [
9558
9675
  /* @__PURE__ */ jsxs("div", { children: [
9559
9676
  /* @__PURE__ */ jsx(MetricLabel2, { children: m.label }),
9560
- /* @__PURE__ */ jsx(MetricValue, { $accent: !!m.accent, children: m.value })
9677
+ /* @__PURE__ */ jsx(MetricValue, { $accent: !!m.accent, $secondary: !!m.secondary, children: m.value })
9561
9678
  ] }),
9562
9679
  m.change != null && /* @__PURE__ */ jsxs(MetricChange, { $positive: m.change >= 0, children: [
9563
9680
  m.change >= 0 ? "\u2191" : "\u2193",
@@ -9566,6 +9683,7 @@ function AssetSelectorBar({
9566
9683
  ] })
9567
9684
  ] })
9568
9685
  ] }, m.label)) }),
9686
+ trailing,
9569
9687
  isDropdownOpen && hasItems && /* @__PURE__ */ jsx(IPODropdown, { children: selectorItems.map((item) => {
9570
9688
  const isCurrent = item.tokenName === currentTokenName;
9571
9689
  const status = item.status?.toUpperCase();
@@ -9692,16 +9810,16 @@ var MetricLabel2 = styled25.span`
9692
9810
  }
9693
9811
  `;
9694
9812
  var MetricValue = styled25.span`
9695
- font-size: 1.25rem;
9696
- font-weight: 700;
9697
- color: ${(p) => p.$accent ? "#D4AF37" : "#fff"};
9813
+ font-size: ${(p) => p.$secondary ? "0.95rem" : "1.25rem"};
9814
+ font-weight: ${(p) => p.$secondary ? "600" : "700"};
9815
+ color: ${(p) => p.$accent ? "#D4AF37" : p.$secondary ? "rgba(255,255,255,0.7)" : "#fff"};
9698
9816
 
9699
9817
  @media (max-width: 768px) {
9700
- font-size: 1.05rem;
9818
+ font-size: ${(p) => p.$secondary ? "0.85rem" : "1.05rem"};
9701
9819
  }
9702
9820
 
9703
9821
  @media (max-width: 480px) {
9704
- font-size: 0.95rem;
9822
+ font-size: ${(p) => p.$secondary ? "0.8rem" : "0.95rem"};
9705
9823
  }
9706
9824
  `;
9707
9825
  var MetricChange = styled25.span`
@@ -9798,6 +9916,7 @@ function OfferingProgressCard({
9798
9916
  raisedAmount,
9799
9917
  targetAmount,
9800
9918
  isPrivateClient = false,
9919
+ variant = "default",
9801
9920
  style,
9802
9921
  className
9803
9922
  }) {
@@ -9829,7 +9948,109 @@ function OfferingProgressCard({
9829
9948
  const interval = setInterval(() => setCountdown(calculateCountdown()), 1e3);
9830
9949
  return () => clearInterval(interval);
9831
9950
  }, [opensAt]);
9832
- return /* @__PURE__ */ jsxs(Container2, { style, className, children: [
9951
+ if (variant === "compact") {
9952
+ return /* @__PURE__ */ jsxs(CompactContainer, { style, className, children: [
9953
+ /* @__PURE__ */ jsx(ProgressBarOuter, { children: /* @__PURE__ */ jsx(ProgressBarInner, { style: { width: `${Math.min(percentSold, 100)}%` } }) }),
9954
+ /* @__PURE__ */ jsxs(ProgressInfo, { children: [
9955
+ /* @__PURE__ */ jsxs(ProgressSubscribers, { children: [
9956
+ "Subscribers: ",
9957
+ subscriberCount.toLocaleString()
9958
+ ] }),
9959
+ /* @__PURE__ */ jsxs(ProgressAmounts, { children: [
9960
+ /* @__PURE__ */ jsx("span", { className: "raised", children: formatCurrency3(computedRaised) }),
9961
+ /* @__PURE__ */ jsxs("span", { className: "target", children: [
9962
+ " / ",
9963
+ formatCurrency3(computedTarget)
9964
+ ] })
9965
+ ] })
9966
+ ] })
9967
+ ] });
9968
+ }
9969
+ if (variant === "home") {
9970
+ const isPreLive = !ipoStarted && ipoStatus !== "CLOSED" && ipoStatus !== "CANCELLED";
9971
+ return /* @__PURE__ */ jsxs(Container, { style, className, children: [
9972
+ /* @__PURE__ */ jsxs(Header2, { children: [
9973
+ /* @__PURE__ */ jsxs("h3", { children: [
9974
+ /* @__PURE__ */ jsx(FaChartLine, {}),
9975
+ " Offering Progress"
9976
+ ] }),
9977
+ /* @__PURE__ */ jsx("div", { style: { display: "flex", alignItems: "center", gap: "0.4rem" }, children: ipoStarted ? /* @__PURE__ */ jsxs(StatusSpan, { $color: "#0ecb81", children: [
9978
+ /* @__PURE__ */ jsx(StatusDot, { $color: "#0ecb81", $pulse: true }),
9979
+ "LIVE"
9980
+ ] }) : /* @__PURE__ */ jsxs(StatusSpan, { $color: statusColor || "#D4AF37", children: [
9981
+ /* @__PURE__ */ jsx(StatusDot, { $color: statusColor || "#D4AF37" }),
9982
+ statusLabel || "Preparing"
9983
+ ] }) })
9984
+ ] }),
9985
+ isPreLive ? /* @__PURE__ */ jsxs(HomePreLiveRow, { children: [
9986
+ countdown ? /* @__PURE__ */ jsxs(HomeCountdownSide, { children: [
9987
+ /* @__PURE__ */ jsx(CountdownLabel, { children: "Opens In" }),
9988
+ /* @__PURE__ */ jsxs(CountdownDigits, { children: [
9989
+ /* @__PURE__ */ jsx(CountdownNumber, { children: String(countdown.days).padStart(2, "0") }),
9990
+ /* @__PURE__ */ jsx(CountdownUnitLabel, { children: "D" }),
9991
+ /* @__PURE__ */ jsx(CountdownSeparator, { children: ":" }),
9992
+ /* @__PURE__ */ jsx(CountdownNumber, { children: String(countdown.hours).padStart(2, "0") }),
9993
+ /* @__PURE__ */ jsx(CountdownUnitLabel, { children: "H" }),
9994
+ /* @__PURE__ */ jsx(CountdownSeparator, { children: ":" }),
9995
+ /* @__PURE__ */ jsx(CountdownNumber, { children: String(countdown.minutes).padStart(2, "0") }),
9996
+ /* @__PURE__ */ jsx(CountdownUnitLabel, { children: "M" }),
9997
+ /* @__PURE__ */ jsx(CountdownSeparator, { children: ":" }),
9998
+ /* @__PURE__ */ jsx(CountdownNumber, { children: String(countdown.seconds).padStart(2, "0") }),
9999
+ /* @__PURE__ */ jsx(CountdownUnitLabel, { children: "S" })
10000
+ ] })
10001
+ ] }) : /* @__PURE__ */ jsx(HomeCountdownSide, { children: /* @__PURE__ */ jsx(PreLiveStatus, { $statusColor: statusColor, children: "Sale Not Yet Open" }) }),
10002
+ /* @__PURE__ */ jsxs(HomeUnitsSide, { children: [
10003
+ /* @__PURE__ */ jsx(HomeUnitsLabel, { children: "Units Subscribed" }),
10004
+ /* @__PURE__ */ jsxs(HomeUnitsValue, { children: [
10005
+ /* @__PURE__ */ jsx(HomeSpinner, {}),
10006
+ /* @__PURE__ */ jsxs("span", { children: [
10007
+ " / ",
10008
+ supplyToSell.toLocaleString()
10009
+ ] })
10010
+ ] })
10011
+ ] })
10012
+ ] }) : /* @__PURE__ */ jsxs(LiveBody, { children: [
10013
+ /* @__PURE__ */ jsxs(LiveTopRow, { children: [
10014
+ /* @__PURE__ */ jsxs("div", { children: [
10015
+ /* @__PURE__ */ jsxs(LiveLabel, { children: [
10016
+ "Offering Subscribed ",
10017
+ /* @__PURE__ */ jsx("span", { children: "\u24D8" })
10018
+ ] }),
10019
+ /* @__PURE__ */ jsxs(LivePercent, { children: [
10020
+ percentSold.toFixed(1),
10021
+ "%",
10022
+ /* @__PURE__ */ jsx("span", { className: "arrow", children: "\u2191" })
10023
+ ] })
10024
+ ] }),
10025
+ /* @__PURE__ */ jsxs("div", { style: { textAlign: "right" }, children: [
10026
+ /* @__PURE__ */ jsx(LiveLabel, { children: "Units Subscribed" }),
10027
+ /* @__PURE__ */ jsxs(UnitsValue, { children: [
10028
+ /* @__PURE__ */ jsx("span", { children: totalSold.toLocaleString() }),
10029
+ /* @__PURE__ */ jsxs("small", { children: [
10030
+ "/ ",
10031
+ supplyToSell.toLocaleString()
10032
+ ] })
10033
+ ] })
10034
+ ] })
10035
+ ] }),
10036
+ /* @__PURE__ */ jsx(ProgressBarOuter, { children: /* @__PURE__ */ jsx(ProgressBarInner, { style: { width: `${Math.min(percentSold, 100)}%` } }) }),
10037
+ /* @__PURE__ */ jsxs(ProgressInfo, { children: [
10038
+ /* @__PURE__ */ jsxs(ProgressSubscribers, { children: [
10039
+ "Subscribers: ",
10040
+ subscriberCount.toLocaleString()
10041
+ ] }),
10042
+ /* @__PURE__ */ jsxs(ProgressAmounts, { children: [
10043
+ /* @__PURE__ */ jsx("span", { className: "raised", children: formatCurrency3(computedRaised) }),
10044
+ /* @__PURE__ */ jsxs("span", { className: "target", children: [
10045
+ " / ",
10046
+ formatCurrency3(computedTarget)
10047
+ ] })
10048
+ ] })
10049
+ ] })
10050
+ ] })
10051
+ ] });
10052
+ }
10053
+ return /* @__PURE__ */ jsxs(Container, { style, className, children: [
9833
10054
  /* @__PURE__ */ jsxs(Header2, { children: [
9834
10055
  /* @__PURE__ */ jsxs("h3", { children: [
9835
10056
  /* @__PURE__ */ jsx(FaChartLine, {}),
@@ -9897,7 +10118,7 @@ function OfferingProgressCard({
9897
10118
  /* @__PURE__ */ jsx("span", { children: "\u24D8" })
9898
10119
  ] }),
9899
10120
  /* @__PURE__ */ jsxs(LivePercent, { children: [
9900
- percentSold < 0.1 && percentSold > 0 ? percentSold.toFixed(3) : percentSold.toFixed(1),
10121
+ percentSold.toFixed(1),
9901
10122
  "%",
9902
10123
  /* @__PURE__ */ jsx("span", { className: "arrow", children: "\u2191" })
9903
10124
  ] })
@@ -9930,7 +10151,7 @@ function OfferingProgressCard({
9930
10151
  ] })
9931
10152
  ] });
9932
10153
  }
9933
- var Container2 = styled25.div`
10154
+ var Container = styled25.div`
9934
10155
  background-color: var(--color-card-darker, #111);
9935
10156
  border-radius: 8px;
9936
10157
  padding: 1.5rem;
@@ -10130,6 +10351,59 @@ var ProgressAmounts = styled25.div`
10130
10351
  .raised { color: #D4AF37; }
10131
10352
  .target { color: rgba(255,255,255,0.3); }
10132
10353
  `;
10354
+ var CompactContainer = styled25.div`
10355
+ width: 100%;
10356
+ margin: 1.5rem 0;
10357
+ display: flex;
10358
+ flex-direction: column;
10359
+ gap: 0.5rem;
10360
+ `;
10361
+ var HomePreLiveRow = styled25.div`
10362
+ display: flex;
10363
+ align-items: center;
10364
+ justify-content: space-between;
10365
+ padding-top: 1rem;
10366
+ `;
10367
+ var HomeCountdownSide = styled25.div`
10368
+ display: flex;
10369
+ flex-direction: column;
10370
+ align-items: center;
10371
+ flex: 1;
10372
+ `;
10373
+ var HomeUnitsSide = styled25.div`
10374
+ text-align: center;
10375
+ flex-shrink: 0;
10376
+ `;
10377
+ var HomeUnitsLabel = styled25.div`
10378
+ font-size: 0.6rem;
10379
+ color: var(--color-text-secondary);
10380
+ text-transform: uppercase;
10381
+ letter-spacing: 0.1em;
10382
+ margin-bottom: 0.2rem;
10383
+ `;
10384
+ var HomeUnitsValue = styled25.div`
10385
+ font-size: 1.1rem;
10386
+ font-weight: 700;
10387
+ font-family: monospace;
10388
+ span {
10389
+ color: var(--color-text-secondary);
10390
+ font-weight: 400;
10391
+ }
10392
+ `;
10393
+ var HomeSpinner = styled25.span`
10394
+ display: inline-block;
10395
+ width: 14px;
10396
+ height: 14px;
10397
+ border: 2px solid rgba(255, 255, 255, 0.1);
10398
+ border-top-color: var(--color-accent, #f0b90b);
10399
+ border-radius: 50%;
10400
+ animation: homeSpin 1s linear infinite;
10401
+ vertical-align: middle;
10402
+ margin-right: 0.15rem;
10403
+ @keyframes homeSpin {
10404
+ to { transform: rotate(360deg); }
10405
+ }
10406
+ `;
10133
10407
  var MAX_DISPLAY_AMOUNT = 6e4;
10134
10408
  var formatCurrency4 = (amount) => {
10135
10409
  if (amount >= 1e6) return `$${(amount / 1e6).toFixed(2)}M`;
@@ -10466,6 +10740,191 @@ var LiveIndicatorDot = styled25.span`
10466
10740
  100% { box-shadow: 0 0 0 0 rgba(14,203,129,0); }
10467
10741
  }
10468
10742
  `;
10743
+ var slideIn = keyframes`
10744
+ from { transform: translateX(110%); opacity: 0; }
10745
+ to { transform: translateX(0); opacity: 1; }
10746
+ `;
10747
+ var slideOut = keyframes`
10748
+ from { transform: translateX(0); opacity: 1; }
10749
+ to { transform: translateX(110%); opacity: 0; }
10750
+ `;
10751
+ var progressShrink = keyframes`
10752
+ from { width: 100%; }
10753
+ to { width: 0%; }
10754
+ `;
10755
+ var VARIANT_COLORS = {
10756
+ success: { accent: "#0ecb81", icon: "\u2713" },
10757
+ error: { accent: "#f6465d", icon: "\u2715" },
10758
+ info: { accent: "#E6C656", icon: "\u2139" },
10759
+ pending: { accent: "#7EB3E6", icon: "\u25CC" }
10760
+ };
10761
+ var Wrapper = styled25.div`
10762
+ position: relative;
10763
+ display: flex;
10764
+ flex-direction: column;
10765
+ gap: 0;
10766
+ width: 340px;
10767
+ background: #0d0f1a;
10768
+ border: 1px solid rgba(255, 255, 255, 0.08);
10769
+ border-radius: 10px;
10770
+ overflow: hidden;
10771
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.04);
10772
+ animation: ${({ $exiting }) => $exiting ? css`${slideOut} 0.28s cubic-bezier(0.4,0,1,1) forwards` : css`${slideIn} 0.32s cubic-bezier(0,0,0.2,1) forwards`};
10773
+ pointer-events: all;
10774
+ `;
10775
+ var Body = styled25.div`
10776
+ display: flex;
10777
+ align-items: flex-start;
10778
+ gap: 12px;
10779
+ padding: 14px 16px 12px;
10780
+ `;
10781
+ var IconDot = styled25.div`
10782
+ flex-shrink: 0;
10783
+ width: 28px;
10784
+ height: 28px;
10785
+ border-radius: 50%;
10786
+ background: ${({ $color }) => $color}1a;
10787
+ border: 1px solid ${({ $color }) => $color}55;
10788
+ display: flex;
10789
+ align-items: center;
10790
+ justify-content: center;
10791
+ font-size: 0.75rem;
10792
+ font-weight: 700;
10793
+ color: ${({ $color }) => $color};
10794
+ margin-top: 1px;
10795
+ `;
10796
+ var Content = styled25.div`
10797
+ flex: 1;
10798
+ min-width: 0;
10799
+ `;
10800
+ var Title2 = styled25.p`
10801
+ margin: 0 0 2px;
10802
+ font-size: 0.8rem;
10803
+ font-weight: 600;
10804
+ color: #fff;
10805
+ letter-spacing: 0.01em;
10806
+ `;
10807
+ var Amount = styled25.p`
10808
+ margin: 0 0 6px;
10809
+ font-size: 1.05rem;
10810
+ font-weight: 700;
10811
+ color: #E6C656;
10812
+ letter-spacing: -0.01em;
10813
+ `;
10814
+ var TxRow = styled25.a`
10815
+ display: inline-flex;
10816
+ align-items: center;
10817
+ gap: 5px;
10818
+ font-family: 'IBM Plex Mono', 'Space Mono', monospace;
10819
+ font-size: 0.68rem;
10820
+ color: rgba(255, 255, 255, 0.4);
10821
+ text-decoration: none;
10822
+ transition: color 0.15s;
10823
+ &:hover {
10824
+ color: #7EB3E6;
10825
+ }
10826
+ `;
10827
+ var TxArrow = styled25.span`
10828
+ font-size: 0.6rem;
10829
+ opacity: 0.6;
10830
+ `;
10831
+ var CloseBtn = styled25.button`
10832
+ flex-shrink: 0;
10833
+ background: none;
10834
+ border: none;
10835
+ padding: 2px 4px;
10836
+ cursor: pointer;
10837
+ color: rgba(255, 255, 255, 0.25);
10838
+ font-size: 0.9rem;
10839
+ line-height: 1;
10840
+ transition: color 0.15s;
10841
+ &:hover { color: rgba(255, 255, 255, 0.7); }
10842
+ `;
10843
+ var ProgressBar = styled25.div`
10844
+ height: 2px;
10845
+ background: rgba(255, 255, 255, 0.06);
10846
+ position: relative;
10847
+ &::after {
10848
+ content: '';
10849
+ position: absolute;
10850
+ left: 0;
10851
+ top: 0;
10852
+ height: 100%;
10853
+ background: ${({ $color }) => $color};
10854
+ animation: ${css`${progressShrink} ${({ $duration }) => $duration}ms linear forwards`};
10855
+ }
10856
+ `;
10857
+ var Container2 = styled25.div`
10858
+ position: fixed;
10859
+ bottom: 24px;
10860
+ right: 24px;
10861
+ z-index: 9999;
10862
+ display: flex;
10863
+ flex-direction: column-reverse;
10864
+ gap: 10px;
10865
+ pointer-events: none;
10866
+ `;
10867
+ var DEFAULT_EXPLORER = "https://sepolia.basescan.org/tx/";
10868
+ function truncateHash(hash) {
10869
+ return `${hash.slice(0, 6)}\u2026${hash.slice(-4)}`;
10870
+ }
10871
+ function ToastItem({ toast, onDismiss }) {
10872
+ const [exiting, setExiting] = useState(false);
10873
+ const timerRef = useRef(null);
10874
+ const dismiss = useCallback(() => {
10875
+ setExiting(true);
10876
+ setTimeout(() => onDismiss(toast.id), 280);
10877
+ }, [onDismiss, toast.id]);
10878
+ useEffect(() => {
10879
+ const duration2 = toast.duration ?? 6e3;
10880
+ if (duration2 > 0) {
10881
+ timerRef.current = setTimeout(dismiss, duration2);
10882
+ }
10883
+ return () => {
10884
+ if (timerRef.current) clearTimeout(timerRef.current);
10885
+ };
10886
+ }, [dismiss, toast.duration]);
10887
+ const { accent, icon } = VARIANT_COLORS[toast.variant];
10888
+ const duration = toast.duration ?? 6e3;
10889
+ const explorerBase = toast.explorerUrl ?? DEFAULT_EXPLORER;
10890
+ const txUrl = toast.txHash ? `${explorerBase}${toast.txHash}` : void 0;
10891
+ return /* @__PURE__ */ jsxs(Wrapper, { $exiting: exiting, children: [
10892
+ /* @__PURE__ */ jsxs(Body, { children: [
10893
+ /* @__PURE__ */ jsx(IconDot, { $color: accent, children: icon }),
10894
+ /* @__PURE__ */ jsxs(Content, { children: [
10895
+ /* @__PURE__ */ jsx(Title2, { children: toast.title }),
10896
+ toast.amount && /* @__PURE__ */ jsx(Amount, { children: toast.amount }),
10897
+ toast.txHash && txUrl && /* @__PURE__ */ jsxs(TxRow, { href: txUrl, target: "_blank", rel: "noopener noreferrer", children: [
10898
+ truncateHash(toast.txHash),
10899
+ /* @__PURE__ */ jsx(TxArrow, { children: "\u2197" })
10900
+ ] })
10901
+ ] }),
10902
+ /* @__PURE__ */ jsx(CloseBtn, { type: "button", onClick: dismiss, "aria-label": "Dismiss", children: "\u2715" })
10903
+ ] }),
10904
+ duration > 0 && /* @__PURE__ */ jsx(ProgressBar, { $color: accent, $duration: duration })
10905
+ ] });
10906
+ }
10907
+ var ToastContext = createContext(null);
10908
+ function ToastProvider({ children }) {
10909
+ const [toasts, setToasts] = useState([]);
10910
+ const addToast = useCallback((data) => {
10911
+ const id = `toast-${Date.now()}-${Math.random().toString(36).slice(2, 7)}`;
10912
+ setToasts((prev) => [...prev, { ...data, id }]);
10913
+ return id;
10914
+ }, []);
10915
+ const dismiss = useCallback((id) => {
10916
+ setToasts((prev) => prev.filter((t) => t.id !== id));
10917
+ }, []);
10918
+ return /* @__PURE__ */ jsxs(ToastContext.Provider, { value: { toast: addToast, dismiss }, children: [
10919
+ children,
10920
+ /* @__PURE__ */ jsx(Container2, { children: toasts.map((t) => /* @__PURE__ */ jsx(ToastItem, { toast: t, onDismiss: dismiss }, t.id)) })
10921
+ ] });
10922
+ }
10923
+ function useToast() {
10924
+ const ctx = useContext(ToastContext);
10925
+ if (!ctx) throw new Error("useToast must be used within a ToastProvider");
10926
+ return ctx;
10927
+ }
10469
10928
  function OrderPanel({
10470
10929
  statusLabel,
10471
10930
  statusColor,
@@ -11622,7 +12081,14 @@ function PortfolioActivityPanel({
11622
12081
  formatTimestamp(trade.executedAt)
11623
12082
  ] })
11624
12083
  ] }),
11625
- trade.status === "SETTLEMENT_FAILED" ? /* @__PURE__ */ jsx(ActivityTag, { $color: "#f6465d", $bg: "rgba(246,70,93,0.12)", children: "Failed" }) : trade.status === "SETTLED" ? /* @__PURE__ */ jsx(ActivityTag, { $color: "#0ecb81", $bg: "rgba(14,203,129,0.12)", children: "Settled" }) : /* @__PURE__ */ jsx(ActivityTag, { $color: "#f0b90b", $bg: "rgba(240,185,11,0.15)", children: "Settling" }),
12084
+ /* @__PURE__ */ jsx(
12085
+ ActivityTag,
12086
+ {
12087
+ $color: trade.side === "SELL" ? "#f6465d" : "#0ecb81",
12088
+ $bg: trade.side === "SELL" ? "rgba(246,70,93,0.12)" : "rgba(14,203,129,0.12)",
12089
+ children: sideLabel(trade.side)
12090
+ }
12091
+ ),
11626
12092
  /* @__PURE__ */ jsx(ActivityAmount, { children: formatCurrency5(trade.price * trade.quantity) })
11627
12093
  ] }, trade.tradeId))
11628
12094
  ] }),
@@ -13694,7 +14160,7 @@ function PropertyValuation({
13694
14160
  /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "0.5rem" }, children: [
13695
14161
  /* @__PURE__ */ jsxs(PricingModelDetail, { children: [
13696
14162
  /* @__PURE__ */ jsx(PropertyDetailLabel, { children: "Last Price" }),
13697
- /* @__PURE__ */ jsx(PricingDetailValue, { children: formatCompact(lastPrice) })
14163
+ /* @__PURE__ */ jsx(PricingDetailValue, { children: formatCurrency6(lastPrice) })
13698
14164
  ] }),
13699
14165
  /* @__PURE__ */ jsxs(PricingModelDetail, { children: [
13700
14166
  /* @__PURE__ */ jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", width: "100%" }, children: [
@@ -13705,11 +14171,11 @@ function PropertyValuation({
13705
14171
  ] })
13706
14172
  ] }),
13707
14173
  /* @__PURE__ */ jsxs(PricingDetailValue, { style: { color: "var(--color-accent)", fontWeight: "bold" }, children: [
13708
- formatCompact(fairValue),
14174
+ formatCurrency6(fairValue),
13709
14175
  " ",
13710
14176
  /* @__PURE__ */ jsxs("span", { style: { fontSize: "0.85em", fontWeight: "normal", opacity: 0.8 }, children: [
13711
14177
  "(",
13712
- formatCompact(fairValue * tokensOutstanding),
14178
+ formatCurrency6(fairValue * tokensOutstanding, { maximumFractionDigits: 0 }),
13713
14179
  ")"
13714
14180
  ] })
13715
14181
  ] })
@@ -13726,7 +14192,7 @@ function PropertyValuation({
13726
14192
  /* @__PURE__ */ jsx(GaugeIndicator, { type: "fairValue", position: 50 }),
13727
14193
  /* @__PURE__ */ jsxs(GaugePriceTag, { position: gaugePosition, children: [
13728
14194
  /* @__PURE__ */ jsx("span", { children: "Last Price" }),
13729
- /* @__PURE__ */ jsx("span", { children: formatCompact(lastPrice) })
14195
+ /* @__PURE__ */ jsx("span", { children: formatCurrency6(lastPrice) })
13730
14196
  ] }),
13731
14197
  /* @__PURE__ */ jsx(GaugeIndicator, { type: "lastPrice", position: gaugePosition })
13732
14198
  ] }),
@@ -13734,36 +14200,36 @@ function PropertyValuation({
13734
14200
  /* @__PURE__ */ jsx(ValuationItem, { children: /* @__PURE__ */ jsxs(ValuationValue, { style: { color: "#4CAF50" }, children: [
13735
14201
  /* @__PURE__ */ jsxs("span", { children: [
13736
14202
  "< ",
13737
- formatCompact(undervaluedThreshold)
14203
+ formatCurrency6(undervaluedThreshold)
13738
14204
  ] }),
13739
14205
  /* @__PURE__ */ jsxs("span", { className: "valuation-amount-span", style: { fontSize: "0.8rem", fontWeight: "normal" }, children: [
13740
14206
  "(",
13741
- formatCompact(undervaluedThreshold * tokensOutstanding),
14207
+ formatMillions(undervaluedThreshold * tokensOutstanding),
13742
14208
  ")"
13743
14209
  ] })
13744
14210
  ] }) }),
13745
14211
  /* @__PURE__ */ jsx(ValuationItem, { children: /* @__PURE__ */ jsxs(ValuationValue, { style: { color: "var(--color-accent)" }, children: [
13746
- /* @__PURE__ */ jsx("span", { children: formatCompact(fairValue) }),
14212
+ /* @__PURE__ */ jsx("span", { children: formatCurrency6(fairValue) }),
13747
14213
  /* @__PURE__ */ jsxs("span", { className: "valuation-amount-span", style: { fontSize: "0.8rem", fontWeight: "normal" }, children: [
13748
14214
  "(",
13749
- formatCompact(fairValue * tokensOutstanding),
14215
+ formatMillions(fairValue * tokensOutstanding),
13750
14216
  ")"
13751
14217
  ] })
13752
14218
  ] }) }),
13753
14219
  /* @__PURE__ */ jsx(ValuationItem, { children: /* @__PURE__ */ jsxs(ValuationValue, { style: { color: "#F44336" }, children: [
13754
14220
  /* @__PURE__ */ jsxs("span", { children: [
13755
14221
  "> ",
13756
- formatCompact(overvaluedThreshold)
14222
+ formatCurrency6(overvaluedThreshold)
13757
14223
  ] }),
13758
14224
  /* @__PURE__ */ jsxs("span", { className: "valuation-amount-span", style: { fontSize: "0.8rem", fontWeight: "normal" }, children: [
13759
14225
  "(",
13760
- formatCompact(overvaluedThreshold * tokensOutstanding),
14226
+ formatMillions(overvaluedThreshold * tokensOutstanding),
13761
14227
  ")"
13762
14228
  ] })
13763
14229
  ] }) })
13764
14230
  ] })
13765
14231
  ] }),
13766
- /* @__PURE__ */ jsxs("div", { children: [
14232
+ /* @__PURE__ */ jsxs(HiddenMobileChart, { children: [
13767
14233
  /* @__PURE__ */ jsx("h3", { style: { marginBottom: "1rem", fontSize: "1.1rem", color: "#fff" }, children: "Historical Valuation" }),
13768
14234
  /* @__PURE__ */ jsx(ChartContainer, { children: /* @__PURE__ */ jsxs(ChartBackground, { children: [
13769
14235
  axisLabels.map((label, index) => /* @__PURE__ */ jsx(YAxisLabel, { style: { top: `${10 + index * 22}%` }, children: label }, `${label}-${index}`)),
@@ -13882,7 +14348,15 @@ function PropertyValuation({
13882
14348
  ] })
13883
14349
  ] }) })
13884
14350
  ] })
13885
- ] })
14351
+ ] }),
14352
+ /* @__PURE__ */ jsx("h3", { className: "desktop-only-historical-chart", style: { marginBottom: "1rem", fontSize: "1.1rem", color: "#fff" }, children: "Historical Valuation" }),
14353
+ /* @__PURE__ */ jsx(ChartContainer, { className: "desktop-only-historical-chart", children: /* @__PURE__ */ jsxs(ChartBackground, { children: [
14354
+ axisLabels.map((label, index) => /* @__PURE__ */ jsx(YAxisLabel, { style: { top: `${10 + index * 22}%` }, children: label }, `${label}-${index}`)),
14355
+ /* @__PURE__ */ jsxs(ValuationSvg, { viewBox: `0 0 ${CHART_WIDTH} ${CHART_HEIGHT}`, preserveAspectRatio: "none", children: [
14356
+ valuationPath ? /* @__PURE__ */ jsx("path", { d: valuationPath, fill: "none", stroke: "#D4AF37", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", vectorEffect: "non-scaling-stroke" }) : null,
14357
+ fairValuePath ? /* @__PURE__ */ jsx("path", { d: fairValuePath, fill: "none", stroke: "#FFFFFF", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", vectorEffect: "non-scaling-stroke" }) : null
14358
+ ] })
14359
+ ] }) })
13886
14360
  ] })
13887
14361
  ] }),
13888
14362
  /* @__PURE__ */ jsxs(RecentSalesSection, { children: [
@@ -13956,14 +14430,6 @@ function formatMillions(value) {
13956
14430
  }
13957
14431
  return `$${(value / 1e6).toFixed(2)}m`;
13958
14432
  }
13959
- function formatCompact(value) {
13960
- if (value == null || !Number.isFinite(value)) return "\u2014";
13961
- const abs = Math.abs(value);
13962
- if (abs >= 1e9) return `$${(value / 1e9).toFixed(2)}B`;
13963
- if (abs >= 1e6) return `$${(value / 1e6).toFixed(2)}M`;
13964
- if (abs >= 1e3) return `$${(value / 1e3).toFixed(1)}K`;
13965
- return formatCurrency6(value);
13966
- }
13967
14433
  function formatBedroomLabel(bedrooms) {
13968
14434
  if (!Number.isFinite(bedrooms)) return "\u2014";
13969
14435
  return `${bedrooms} Bed`;
@@ -14087,6 +14553,12 @@ var GaugePriceTag = styled25.div`
14087
14553
  color: var(--color-accent);
14088
14554
  }
14089
14555
  `;
14556
+ var HiddenMobileChart = styled25.div`
14557
+ display: none;
14558
+ @media (max-width: 480px) {
14559
+ display: block;
14560
+ }
14561
+ `;
14090
14562
  var ValuationWrapper = styled25.div`
14091
14563
  display: flex;
14092
14564
  flex-direction: column;
@@ -14138,10 +14610,9 @@ var PricingModelCard = styled25.div`
14138
14610
  var PricingModelHeader = styled25.div`
14139
14611
  display: flex;
14140
14612
  justify-content: space-between;
14141
- align-items: flex-start;
14613
+ align-items: center;
14142
14614
  margin-bottom: 1.5rem;
14143
14615
  gap: 1rem;
14144
- flex-wrap: wrap;
14145
14616
 
14146
14617
  .valuation-info {
14147
14618
  display: flex;
@@ -14149,7 +14620,6 @@ var PricingModelHeader = styled25.div`
14149
14620
  gap: 0.25rem;
14150
14621
  font-size: 0.85rem;
14151
14622
  color: rgba(255, 255, 255, 0.75);
14152
- flex-shrink: 0;
14153
14623
  }
14154
14624
  `;
14155
14625
  var PricingModelTitle = styled25.h3`
@@ -14216,31 +14686,15 @@ var ValuationDetails = styled25.div`
14216
14686
  display: flex;
14217
14687
  justify-content: space-between;
14218
14688
  margin-top: 1rem;
14219
- gap: 0.25rem;
14220
14689
  `;
14221
14690
  var ValuationItem = styled25.div`
14222
14691
  display: flex;
14223
14692
  flex-direction: column;
14224
- min-width: 0;
14225
- overflow: hidden;
14226
14693
  `;
14227
14694
  var ValuationValue = styled25.div`
14228
14695
  font-size: 1rem;
14229
14696
  font-weight: 600;
14230
14697
  color: #fff;
14231
- display: flex;
14232
- flex-direction: column;
14233
- gap: 2px;
14234
- overflow-wrap: break-word;
14235
- word-break: break-word;
14236
-
14237
- @media (max-width: 480px) {
14238
- font-size: 0.72rem;
14239
-
14240
- .valuation-amount-span {
14241
- display: none;
14242
- }
14243
- }
14244
14698
  `;
14245
14699
  var ChartContainer = styled25.div`
14246
14700
  width: 100%;
@@ -14653,7 +15107,7 @@ var ThumbnailStrip = styled25.div`
14653
15107
  display: none;
14654
15108
  }
14655
15109
  `;
14656
- var Thumbnail2 = styled25.button`
15110
+ var Thumbnail3 = styled25.button`
14657
15111
  width: 86px;
14658
15112
  height: 64px;
14659
15113
  border-radius: 6px;
@@ -14989,7 +15443,7 @@ function GalleryContent({ galleryImages, startIndex, title, subtitle, onClose })
14989
15443
  ]
14990
15444
  }
14991
15445
  ),
14992
- /* @__PURE__ */ jsx(ThumbnailStrip, { onClick: (event) => event.stopPropagation(), children: galleryImages.map((image, idx) => /* @__PURE__ */ jsx(Thumbnail2, { $active: idx === currentIndex, onClick: () => setCurrentIndex(idx), "aria-label": `Preview ${image.label}`, children: /* @__PURE__ */ jsx("img", { src: image.src, alt: image.alt }) }, image.alt)) })
15446
+ /* @__PURE__ */ jsx(ThumbnailStrip, { onClick: (event) => event.stopPropagation(), children: galleryImages.map((image, idx) => /* @__PURE__ */ jsx(Thumbnail3, { $active: idx === currentIndex, onClick: () => setCurrentIndex(idx), "aria-label": `Preview ${image.label}`, children: /* @__PURE__ */ jsx("img", { src: image.src, alt: image.alt }) }, image.alt)) })
14993
15447
  ]
14994
15448
  }
14995
15449
  );