/* Snipe.Run — mock data */
const TRADERS = [
  { id: 'polyshark', name: 'PolyShark', addr: '0x7f3a91c4e2b8d05f6a1c9e7b3d4f8a2c1b6e0a91', roi: 412.8, win: 81.2, pnl: 1284000, trades: 1842, copiers: 2841, sharpe: 3.4, avgHold: '6h', tags: ['Politics', 'Sports'], vol: 18.2e6, streak: 9, badge: 'top' },
  { id: 'mevking', name: 'MevKing', addr: '0x2177de91a3c4f8b2e6d05a1c9b7e3f4a8c2b1d6e', roi: 318.4, win: 76.5, pnl: 904000, trades: 3120, copiers: 1980, sharpe: 2.9, avgHold: '2h', tags: ['Crypto', 'Macro'], vol: 31.0e6, streak: 6, badge: 'top' },
  { id: 'oraclehand', name: 'OracleHand', addr: '0x9c2b40f8a1c3e6d05b7a9e4f2c8b1d6e3a4f8c2b', roi: 264.1, win: 74.0, pnl: 712000, trades: 980, copiers: 1442, sharpe: 2.7, avgHold: '1d', tags: ['Politics'], vol: 12.4e6, streak: 4, badge: 'top' },
  { id: 'degen_alpha', name: 'degen_alpha', addr: '0x4491fa8c2b1d6e3a4f8c05b7a9e4f2c8b1d6e3a4', roi: 201.7, win: 69.8, pnl: 498000, trades: 5420, copiers: 920, sharpe: 2.1, avgHold: '40m', tags: ['Crypto', 'Memes'], vol: 8.9e6, streak: 3, badge: null },
  { id: 'nancyp', name: 'NancyP', addr: '0x08ce12a4f8c2b1d6e3a9e4f2c8b05b7a1d6e3a4f', roi: 176.3, win: 71.1, pnl: 351000, trades: 642, copiers: 1120, sharpe: 2.4, avgHold: '3d', tags: ['Politics', 'Macro'], vol: 6.1e6, streak: 5, badge: null },
  { id: 'coldstorage', name: 'cold_storage', addr: '0x55a1c9e7b3d4f8a2c1b6e0a91f3a91c4e2b8d05f', roi: 142.9, win: 67.4, pnl: 288000, trades: 410, copiers: 760, sharpe: 2.2, avgHold: '5d', tags: ['Macro'], vol: 4.4e6, streak: 2, badge: null },
  { id: 'vega', name: 'Vega.eth', addr: '0x31f4a8c2b1d6e3a9e4f2c8b05b7a1d6e3a4f08ce', roi: 128.5, win: 65.9, pnl: 241000, trades: 1290, copiers: 540, sharpe: 1.9, avgHold: '8h', tags: ['Sports', 'Crypto'], vol: 5.7e6, streak: 1, badge: null },
  { id: 'tide', name: 'TideTurner', addr: '0x6e3a4f8c2b1d05b7a9e4f2c8b1d6e3a4f8c2b1d6', roi: 119.2, win: 64.1, pnl: 198000, trades: 880, copiers: 420, sharpe: 1.8, avgHold: '12h', tags: ['Politics'], vol: 3.9e6, streak: 4, badge: null },

  /* internal Snipe.Run profiles — registered users you can follow & copy (eToro-style) */
  { id: 'snipe_ai', name: 'Snipe AI', handle: 'snipe_ai', kind: 'snipe', verified: true, addr: '0x5a17e9b2c4f8a1d05f6a1c9e7b3d4f8a2c1b6e0a', roi: 96.4, win: 79.0, pnl: 512000, trades: 9120, copiers: 6240, sharpe: 3.1, avgHold: '3h', tags: ['Macro', 'Crypto', 'Politics'], vol: 22.0e6, streak: 7, badge: 'top', risk: 4, copierEarn: 14800, bio: 'The official Snipe.Run AI engine — scans 40+ markets continuously and trades the edge. Copy the machine.' },
  { id: 'maya_macro', name: 'Maya Okafor', handle: 'mayamacro', kind: 'snipe', verified: true, addr: '0x4d2a91c4e2b8d05f6a1c9e7b3d4f8a2c1b6e0a91', roi: 188.2, win: 73.5, pnl: 402000, trades: 740, copiers: 3120, sharpe: 2.8, avgHold: '2d', tags: ['Macro', 'Politics'], vol: 9.4e6, streak: 5, badge: 'top', risk: 3, copierEarn: 7300, bio: 'Macro & politics specialist. Slow, high-conviction positions. 6 years trading prediction markets.' },
  { id: 'cathy_flip', name: 'Cathy Lin', handle: 'coinflip_cathy', kind: 'snipe', verified: true, addr: '0x7b3d4f8a2c1b6e0a91f3a91c4e2b8d05f6a1c9e7', roi: 152.7, win: 70.2, pnl: 266000, trades: 1980, copiers: 1840, sharpe: 2.3, avgHold: '9h', tags: ['Crypto', 'Sports'], vol: 7.1e6, streak: 4, badge: null, risk: 6, copierEarn: 3900, bio: 'Crypto + sports momentum trader. Higher risk, higher reward. Not financial advice 😉' },
  { id: 'prophet_pete', name: 'Pete Vance', handle: 'prophet_pete', kind: 'snipe', verified: false, addr: '0x1c9e7b3d4f8a2c1b6e0a91f3a91c4e2b8d05f6a1', roi: 134.0, win: 68.0, pnl: 181000, trades: 560, copiers: 760, sharpe: 2.0, avgHold: '1d', tags: ['Politics'], vol: 4.2e6, streak: 3, badge: null, risk: 5, copierEarn: 1450, bio: 'Ex-pollster reading the politics book. Building a public track record — follow along.' },
];

const MARKETS = [
  { id: 'fed-june', q: 'Will the Fed cut rates in June 2026?', cat: 'Macro', ico: '🏦', yes: 68, vol: 4.2e6, close: 'Jun 18', days: 11, chg: +4 },
  { id: 'btc-120', q: 'Bitcoin above $120,000 by July 1?', cat: 'Crypto', ico: '₿', yes: 41, vol: 8.9e6, close: 'Jul 01', days: 24, chg: -3 },
  { id: 'rmcl', q: 'Will Real Madrid win the Champions League?', cat: 'Sports', ico: '🏆', yes: 54, vol: 2.1e6, close: 'May 30', days: 4, chg: +2 },
  { id: 'gta6', q: 'GTA 6 released in 2026?', cat: 'Culture', ico: '🎮', yes: 33, vol: 1.6e6, close: 'Dec 31', days: 208, chg: +1 },
  { id: 'oai-ipo', q: 'OpenAI files for IPO in 2026?', cat: 'Tech', ico: '🤖', yes: 22, vol: 3.4e6, close: 'Dec 31', days: 208, chg: -2 },
  { id: 'eth-5k', q: 'Ethereum above $5,000 by August?', cat: 'Crypto', ico: 'Ξ', yes: 47, vol: 5.8e6, close: 'Aug 01', days: 55, chg: +6 },
  { id: 'lakers', q: 'Lakers to win the 2026 NBA Finals?', cat: 'Sports', ico: '🏀', yes: 18, vol: 2.9e6, close: 'Jun 22', days: 15, chg: -1 },
  { id: 'recession', q: 'US recession declared in 2026?', cat: 'Macro', ico: '📉', yes: 29, vol: 4.7e6, close: 'Dec 31', days: 208, chg: +3 },
  { id: 'spacex', q: 'SpaceX Starship reaches orbit by Q3?', cat: 'Tech', ico: '🚀', yes: 61, vol: 1.9e6, close: 'Sep 30', days: 115, chg: +5 },

  { id: 'us-pres', q: 'Will the incumbent party win the 2028 US presidency?', cat: 'Politics', ico: '🗳️', yes: 44, vol: 18.4e6, close: 'Nov 07', days: 153, chg: +2 },
  { id: 'gov-shutdown', q: 'US government shutdown before October?', cat: 'Politics', ico: '🏛️', yes: 37, vol: 3.1e6, close: 'Oct 01', days: 116, chg: +7 },
  { id: 'uk-election', q: 'UK general election called in 2026?', cat: 'Politics', ico: '🌍', yes: 26, vol: 1.4e6, close: 'Dec 31', days: 208, chg: -1 },
  { id: 'powell-out', q: 'Jerome Powell out as Fed Chair before 2027?', cat: 'Politics', ico: '🦅', yes: 31, vol: 2.2e6, close: 'Dec 31', days: 208, chg: +4 },

  { id: 'btc-150', q: 'Bitcoin above $150,000 in 2026?', cat: 'Crypto', ico: '₿', yes: 28, vol: 12.1e6, close: 'Dec 31', days: 208, chg: +3 },
  { id: 'sol-300', q: 'Solana above $300 by September?', cat: 'Crypto', ico: '🟣', yes: 39, vol: 4.6e6, close: 'Sep 01', days: 86, chg: +5 },
  { id: 'eth-flip', q: 'Will ETH/BTC ratio rise above 0.06 in 2026?', cat: 'Crypto', ico: '🔷', yes: 35, vol: 2.7e6, close: 'Dec 31', days: 208, chg: -2 },
  { id: 'doge-1', q: 'Dogecoin above $1 in 2026?', cat: 'Crypto', ico: '🐕', yes: 12, vol: 6.3e6, close: 'Dec 31', days: 208, chg: +1 },
  { id: 'etf-sol', q: 'Spot Solana ETF approved by year-end?', cat: 'Crypto', ico: '📈', yes: 58, vol: 5.1e6, close: 'Dec 31', days: 208, chg: +8 },

  { id: 'spx-7k', q: 'S&P 500 closes above 7,000 in 2026?', cat: 'Macro', ico: '📊', yes: 52, vol: 3.8e6, close: 'Dec 31', days: 208, chg: +2 },
  { id: 'oil-100', q: 'Oil (WTI) above $100 before September?', cat: 'Macro', ico: '🛢️', yes: 23, vol: 2.4e6, close: 'Sep 01', days: 86, chg: -4 },
  { id: 'cpi-3', q: 'US CPI back above 3% this year?', cat: 'Macro', ico: '💵', yes: 46, vol: 1.7e6, close: 'Dec 31', days: 208, chg: +1 },
  { id: 'gold-3k', q: 'Gold above $3,000/oz at year-end?', cat: 'Macro', ico: '🥇', yes: 64, vol: 2.0e6, close: 'Dec 31', days: 208, chg: +3 },

  { id: 'wc-final', q: 'Will Brazil reach the 2026 World Cup final?', cat: 'Sports', ico: '⚽', yes: 31, vol: 7.2e6, close: 'Jul 19', days: 42, chg: +2 },
  { id: 'wimbledon', q: 'Will Alcaraz win Wimbledon 2026?', cat: 'Sports', ico: '🎾', yes: 42, vol: 1.3e6, close: 'Jul 12', days: 35, chg: +6 },
  { id: 'superbowl', q: 'Chiefs to reach Super Bowl LXI?', cat: 'Sports', ico: '🏈', yes: 27, vol: 4.4e6, close: 'Feb 08', days: 246, chg: -1 },
  { id: 'f1-title', q: 'Verstappen wins the 2026 F1 title?', cat: 'Sports', ico: '🏎️', yes: 48, vol: 2.6e6, close: 'Nov 22', days: 168, chg: +3 },
  { id: 'ufc-main', q: 'Will the title change hands at UFC 320?', cat: 'Sports', ico: '🥊', yes: 55, vol: 0.9e6, close: 'Jun 14', days: 7, chg: +4 },

  { id: 'apple-ai', q: 'Apple ships an AI Siri overhaul in 2026?', cat: 'Tech', ico: '📱', yes: 59, vol: 2.3e6, close: 'Dec 31', days: 208, chg: +2 },
  { id: 'agi-claim', q: 'A major lab claims AGI before 2027?', cat: 'Tech', ico: '🧠', yes: 17, vol: 5.5e6, close: 'Dec 31', days: 208, chg: +5 },
  { id: 'starlink-ipo', q: 'Starlink IPO announced in 2026?', cat: 'Tech', ico: '🛰️', yes: 34, vol: 1.8e6, close: 'Dec 31', days: 208, chg: -2 },
  { id: 'nvda-5t', q: 'Nvidia hits a $5T market cap in 2026?', cat: 'Tech', ico: '💻', yes: 43, vol: 3.9e6, close: 'Dec 31', days: 208, chg: +4 },

  { id: 'oscars', q: 'Will a sci-fi film win Best Picture 2027?', cat: 'Culture', ico: '🎬', yes: 21, vol: 1.1e6, close: 'Mar 14', days: 280, chg: +1 },
  { id: 'taylor', q: 'Taylor Swift announces a 2027 world tour?', cat: 'Culture', ico: '🎵', yes: 67, vol: 1.5e6, close: 'Dec 31', days: 208, chg: +2 },
  { id: 'gta-delay', q: 'GTA 6 slips to 2027?', cat: 'Culture', ico: '🕹️', yes: 56, vol: 2.8e6, close: 'Dec 31', days: 208, chg: +3 },
  { id: 'nobel', q: 'Will an AI researcher win a 2026 Nobel?', cat: 'Culture', ico: '👑', yes: 14, vol: 0.7e6, close: 'Oct 12', days: 127, chg: -1 },

  { id: 'msft-4t', q: 'Microsoft above a $4T market cap in 2026?', cat: 'Tech', ico: '🪟', yes: 38, vol: 2.1e6, close: 'Dec 31', days: 208, chg: +2 },
  { id: 'btc-etf-flow', q: 'Bitcoin ETFs net-positive flows in Q3?', cat: 'Crypto', ico: '📈', yes: 62, vol: 3.3e6, close: 'Sep 30', days: 115, chg: +3 },
  { id: 'mlb-ws', q: 'Will the Dodgers repeat as World Series champs?', cat: 'Sports', ico: '⚾', yes: 24, vol: 1.7e6, close: 'Oct 28', days: 143, chg: -1 },
  { id: 'fr-election', q: 'Will France hold snap elections in 2026?', cat: 'Politics', ico: '🇫🇷', yes: 19, vol: 1.2e6, close: 'Dec 31', days: 208, chg: +1 },
  { id: 'heat-record', q: '2026 to be the hottest year on record?', cat: 'Macro', ico: '🌡️', yes: 57, vol: 0.9e6, close: 'Dec 31', days: 208, chg: +2 },
];

const POSITIONS = [
  { mkt: 'Fed cut rates June 2026', side: 'YES', via: 'PolyShark', entry: 0.62, cur: 0.68, size: 12400, pnl: 1200, pnlPct: 9.7 },
  { mkt: 'Ethereum above $5,000 by Aug', side: 'YES', via: 'MevKing', entry: 0.39, cur: 0.47, size: 8600, pnl: 1762, pnlPct: 20.5 },
  { mkt: 'Real Madrid win UCL', side: 'YES', via: 'OracleHand', entry: 0.51, cur: 0.54, size: 5200, pnl: 306, pnlPct: 5.9 },
  { mkt: 'BTC above $120k by Jul 1', side: 'NO', via: 'PolyShark', entry: 0.62, cur: 0.59, size: 9800, pnl: 474, pnlPct: 4.8 },
  { mkt: 'SpaceX Starship orbit Q3', side: 'YES', via: 'degen_alpha', entry: 0.55, cur: 0.61, size: 4100, pnl: 447, pnlPct: 10.9 },
  { mkt: 'US recession in 2026', side: 'NO', via: 'NancyP', entry: 0.74, cur: 0.71, size: 6300, pnl: -255, pnlPct: -4.0 },
];

const WALLETS = [
  { id: 'w1', label: 'Main Sniper', addr: '0x8a2c1b6e0a91f3a91c4e2b8d05f7f3a91c4e2b8d', bal: 84210.55, usdc: 62100, eth: 6.42, primary: true, chain: 'Polygon', bot: true },
  { id: 'w2', label: 'High-Roller', addr: '0x1d6e3a4f8c2b05b7a9e4f2c8b1d6e3a4f8c2b1d6', bal: 152800.00, usdc: 140000, eth: 4.1, primary: false, chain: 'Polygon', bot: true },
  { id: 'w3', label: 'Test Bench', addr: '0x4f2c8b1d6e3a9e4f08ce12a4f8c2b1d6e3a4f8c2', bal: 5120.30, usdc: 5120, eth: 0, primary: false, chain: 'Polygon', bot: false },
];

const LOG_TEMPLATES = [
  { lvl: 'ok', msg: (t, m) => `COPY FILLED · ${t} → BUY ${m} · 1,240 shares @ 0.68`, ms: () => (Math.random() * 8 + 6).toFixed(0) },
  { lvl: 'info', msg: (t, m) => `SIGNAL detected · ${t} placed order on "${m}"`, ms: () => (Math.random() * 4 + 2).toFixed(0) },
  { lvl: 'ok', msg: (t, m) => `MIRRORED · ${t} → SELL ${m} · realized +$${(Math.random() * 900 + 80).toFixed(0)}`, ms: () => (Math.random() * 9 + 5).toFixed(0) },
  { lvl: 'warn', msg: (t, m) => `SLIPPAGE guard · ${m} moved 2.1%, resized order to fit max-slippage`, ms: () => (Math.random() * 12 + 8).toFixed(0) },
  { lvl: 'info', msg: (t, m) => `RPC heartbeat · block synced · mempool watch active`, ms: () => (Math.random() * 3 + 1).toFixed(0) },
  { lvl: 'ok', msg: (t, m) => `RISK check passed · position within ${(Math.random() * 5 + 5).toFixed(0)}% cap`, ms: () => (Math.random() * 5 + 2).toFixed(0) },
  { lvl: 'err', msg: (t, m) => `SKIPPED · ${m} liquidity below threshold, no fill`, ms: () => (Math.random() * 20 + 10).toFixed(0) },
];

const NOTIFS = [
  { ico: 'check', kind: 'up', title: 'Copy filled', body: 'Mirrored PolyShark → BUY Fed cut · +$1,200 unrealized', t: '2m' },
  { ico: 'trophy', kind: 'amber', title: 'New #1 on leaderboard', body: 'PolyShark overtook MevKing with +412% 30d ROI', t: '18m' },
  { ico: 'arrowUp', kind: 'up', title: 'Take-profit hit', body: 'Ethereum $5k position closed at +20.5%', t: '1h' },
  { ico: 'bolt', kind: 'up', title: 'Engine latency improved', body: 'Median copy latency dropped to 9ms on your lane', t: '3h' },
];

const COMMENTS = [
  { name: 'whale.eth', side: 'YES', text: 'Smart money piled in after the CPI print. PolyShark added 40k an hour ago — following.', likes: 142, time: '14m', badge: 'Top holder' },
  { name: 'MevKing', side: 'YES', text: 'Liquidity is deep here and the spread is tight. Copying this through Snipe at 9ms, filled instantly.', likes: 98, time: '38m', badge: 'Verified' },
  { name: 'fade_the_news', side: 'NO', text: 'Everyone is way too confident. The resolution criteria are stricter than people think — read the rules.', likes: 76, time: '1h', badge: null },
  { name: 'OracleHand', side: 'YES', text: 'My model has this at 71%, market is underpricing. Loaded up.', likes: 211, time: '2h', badge: 'Top holder' },
  { name: 'degen_alpha', side: 'YES', text: 'in at 0.62, out half at 0.68. ms execution is unfair lol', likes: 54, time: '3h', badge: null },
  { name: 'paperhands', side: 'NO', text: 'Sold my position, too much headline risk into the weekend.', likes: 23, time: '5h', badge: null },
  { name: 'cold_storage', side: 'YES', text: 'Volume doubled in the last hour. Something is brewing.', likes: 67, time: '6h', badge: 'Verified' },
];
const COMMENTER_NAMES = ['satoshi_jr', 'liq_hunter', '0xVega', 'mrs_market', 'tape_reader', 'gm_ser', 'edge_lord', 'thesis_gang', 'no_chill', 'block_by_block'];

const ACTIVITY = [
  { type: 'fill', side: 'BUY', trader: 'PolyShark', market: 'Fed cut rates in June 2026', amt: 12400, price: 68, ms: 9, t: 'just now' },
  { type: 'tp', trader: 'MevKing', market: 'Ethereum above $5,000 by Aug', pnl: 1762, t: '2m' },
  { type: 'fill', side: 'BUY', trader: 'OracleHand', market: 'Real Madrid win UCL', amt: 5200, price: 54, ms: 11, t: '4m' },
  { type: 'rank', trader: 'PolyShark', detail: 'climbed to #1 on the 30d leaderboard', t: '12m' },
  { type: 'fill', side: 'SELL', trader: 'degen_alpha', market: 'SpaceX Starship orbit Q3', amt: 4100, price: 61, ms: 8, t: '18m' },
  { type: 'deposit', detail: 'Deposited 25,000 USDC to High-Roller wallet', t: '26m' },
  { type: 'sl', trader: 'NancyP', market: 'US recession in 2026', pnl: -255, t: '34m' },
  { type: 'fill', side: 'BUY', trader: 'PolyShark', market: 'BTC above $120k by Jul 1', amt: 9800, price: 41, ms: 10, t: '41m' },
  { type: 'resolve', market: 'Will it rain in NYC on May 1?', detail: 'resolved YES · position settled +$640', t: '1h' },
  { type: 'fill', side: 'BUY', trader: 'MevKing', market: 'OpenAI files for IPO in 2026', amt: 3400, price: 22, ms: 9, t: '1h' },
];

Object.assign(window, { TRADERS, MARKETS, POSITIONS, WALLETS, LOG_TEMPLATES, NOTIFS, COMMENTS, COMMENTER_NAMES, ACTIVITY });
