/* AGYST — shared components & data */ const { useState, useEffect, useRef, useMemo } = React; /* ——— Logo: actual brand mark ——— */ function Mark({ size = 22 }) { return ( AGYST ); } function Wordmark({ size = 14, color = "currentColor" }) { return ( AGYST ); } /* ——— small icons ——— */ const Icon = { discord: (p) => ( ), telegram: (p) => ( ), arrow: (p) => ( ), bolt: (p) => ( ), shield: (p) => ( ), trophy: (p) => ( ), flame: (p) => ( ), }; /* ——— Mock market data ——— */ const MARKETS = [ { sym: "NVDA", name: "NVIDIA Corp.", px: 142.86, chg: +2.34, vol: "284.1M", spark: 22 }, { sym: "TSLA", name: "Tesla, Inc.", px: 248.71, chg: -1.12, vol: "172.6M", spark: 18 }, { sym: "SPY", name: "SPDR S&P 500", px: 583.42, chg: +0.41, vol: "92.3M", spark: 14 }, { sym: "AAPL", name: "Apple Inc.", px: 221.18, chg: +0.86, vol: "118.4M", spark: 17 }, { sym: "META", name: "Meta Platforms", px: 612.04, chg: +1.94, vol: "44.8M", spark: 24 }, { sym: "MSFT", name: "Microsoft Corp.", px: 428.50, chg: +0.22, vol: "38.1M", spark: 12 }, { sym: "COIN", name: "Coinbase Global", px: 274.66, chg: +4.12, vol: "26.7M", spark: 28 }, { sym: "MSTR", name: "MicroStrategy", px: 348.92, chg: +6.47, vol: "32.9M", spark: 30 }, { sym: "GOOG", name: "Alphabet Inc.", px: 176.40, chg: -0.34, vol: "29.5M", spark: 15 }, { sym: "AMZN", name: "Amazon.com", px: 216.78, chg: +1.18, vol: "41.2M", spark: 19 }, { sym: "AMD", name: "Advanced Micro Dev.", px: 138.22, chg: +2.92, vol: "62.3M", spark: 26 }, { sym: "PLTR", name: "Palantir Tech.", px: 78.31, chg: +3.74, vol: "55.8M", spark: 27 }, ]; const TICKER = [ ["NVDA", 142.86, +1.66], ["TSLA", 248.71, -0.45], ["SPY", 583.42, +0.41], ["AAPL", 221.18, +0.39], ["MSFT", 428.50, +0.22], ["META", 612.04, +0.32], ["GOOG", 176.40, -0.34], ["AMZN", 216.78, +1.18], ["COIN", 274.66, +4.12], ["MSTR", 348.92, +6.47], ["AMD", 138.22, +2.92], ["PLTR", 78.31, +3.74], ["QQQ", 502.18, +0.62], ["IWM", 220.91, -0.18], ["NFLX", 712.55, +1.04], ["AVGO", 1684.20,+2.18], ["BABA", 98.42, -0.92], ["UBER", 72.18, +0.55], ]; /* ——— Sparkline ——— */ function Sparkline({ seed = 1, color = "#0E2542", w = 160, h = 36, up = true }) { const pts = useMemo(() => { const n = 32; let v = 50; const out = []; let s = seed * 9301 + 49297; const rand = () => { s = (s * 9301 + 49297) % 233280; return s / 233280; }; for (let i = 0; i < n; i++) { v += (rand() - 0.5 + (up ? 0.18 : -0.18)) * 8; v = Math.max(10, Math.min(90, v)); out.push(v); } return out; }, [seed, up]); const path = pts.map((p, i) => `${i === 0 ? "M" : "L"}${(i / (pts.length - 1)) * w},${h - (p / 100) * h}`).join(" "); const area = `${path} L${w},${h} L0,${h} Z`; return ( ); } /* ——— Mini embed chart for the chat embed ——— */ function MiniChart({ color = "#6FA6CC", w = 320, h = 60 }) { const pts = [62,58,56,60,55,52,48,50,46,42,44,40,38,42,38,34,36,32,28,30,26,28,22,20,18,22,18,14,16,12]; const path = pts.map((p, i) => `${i === 0 ? "M" : "L"}${(i / (pts.length - 1)) * w},${(p / 80) * h}`).join(" "); const area = `${path} L${w},${h} L0,${h} Z`; return ( ); } /* ——— Ticker tape ——— */ function TickerTape() { const items = [...TICKER, ...TICKER]; return (
{items.map((t, i) => { const [sym, px, chg] = t; const up = chg >= 0; return ( {sym} {px.toFixed(2)} {up ? "+" : ""}{chg.toFixed(2)}% ); })}
); } /* ——— Chat demo (animated) ——— */ function ChatDemo({ platform = "discord" }) { const isTg = platform === "telegram"; const handle = isTg ? "@vince_h" : "vince"; const botName = "AGYST"; const sequence = useMemo(() => ([ { type: "user", name: handle, ts: "9:42 AM", body: <>/price NVDA }, { type: "bot", name: botName, ts: "9:42 AM", body: (
NVDA · NVIDIA Corp.
HIP-3 · NVDA-USDC PERP
HYPERLIQUID
$142.86 +2.34% · 24h
24h Vol
$284.1M
Open Interest
$58.4M
Funding (8h)
+0.0124%
Spread
0.02 bps
/buy /sell /watch /chart 1H
), }, { type: "user", name: handle, ts: "9:43 AM", body: <>/buy NVDA size:500 type:market }, { type: "bot", name: botName, ts: "9:43 AM", body: (
✓ Filled · LONG NVDA
Settled on Hyperliquid · 8.2s
0xA4..91F
Size
500 NVDA
Avg. Fill
$142.88
Notional
$71,440
Fee
$3.21
+12.4 XP → CLAN.RONIN
), }, ]), [platform]); const [shown, setShown] = useState(1); const [typing, setTyping] = useState(false); useEffect(() => { setShown(1); setTyping(false); let cancelled = false; const tick = async (i) => { if (cancelled) return; await new Promise(r => setTimeout(r, i === 0 ? 700 : 1200)); if (cancelled) return; if (sequence[i].type === "bot") { setTyping(true); await new Promise(r => setTimeout(r, 900)); if (cancelled) return; setTyping(false); } setShown(s => Math.min(sequence.length, s + 1)); }; const run = async () => { for (let i = 1; i < sequence.length; i++) { await tick(i); } await new Promise(r => setTimeout(r, 4200)); if (!cancelled) { setShown(1); run(); } }; const t = setTimeout(run, 300); return () => { cancelled = true; clearTimeout(t); }; }, [sequence]); const channel = isTg ? "@agystbot · private chat" : "# trading-floor · agyst"; return (
{isTg ? "TELEGRAM" : "DISCORD"} SLASH COMMANDS
{channel}
{sequence.slice(0, shown).map((m, i) => (
{m.type === "user" ? "V" : }
{m.name} {m.type === "bot" && BOT} {m.ts}
{m.body}
))} {typing && (
{botName} BOT
)} {!typing && shown === sequence.length && (
)}
); } function Dot({ delay }) { return ( ); } (function injectTypingKeyframes() { if (document.getElementById("__agyst_kf")) return; const s = document.createElement("style"); s.id = "__agyst_kf"; s.textContent = `@keyframes tdot { 0%,100% { opacity: 0.25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-2px); } }`; document.head.appendChild(s); })(); Object.assign(window, { Mark, Wordmark, Icon, MARKETS, TICKER, Sparkline, MiniChart, TickerTape, ChatDemo, });