Spaces:
Sleeping
Sleeping
Update index.html
Browse files78 unmodified lines7980818283848542 unmodified lines1281291301311321331349 unmodified lines14414514614714814915073 unmodified lines2242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293302 unmodified lines333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437133 unmodified lines571572573574575576577578579580581582583584585586115 unmodified lines70270370470570670770870971071171297 unmodified lines81081181281381481581681738 unmodified lines85685785885986086186286386486514 unmodified lines88088188288388488588635 unmodified lines92292392492592692792892978 unmodified lines<script type="text/babel">const { useState, useMemo, useCallback, useEffect } = React;// ββ Design tokens ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββconst F = {bg: '#0A0C0F',border: 'rgba(255,107,43,0.11)',42 unmodified linesif (r.includes('contraband')) return 'Contraband';return (item.rarity || '').replace(/ Weapon/gi,'').replace(/_/g,' ');}// ββ Shared tiny components βββββββββββββββββββββββββββββββββββββββββββββββββββfunction Spinner({ size=18 }) {return (<div style={{width:size,height:size,border:`2px solid rgba(255,107,43,0.15)`,9 unmodified lines</span>);}// ββ NEW 24H Flow Chart β Smooth Area Line Graph ββββββββββββββββββββββfunction MiniLineChart({ data }) {const W = 280, H = 110;const [hovered, setHovered] = React.useState(null);73 unmodified lines{/* Header */}<div style={{display:'flex',justifyContent:'space-between',alignItems:'flex-end',marginBottom:8}}><div style={{display:'flex',flexDirection:'column',gap:1}}><span style={{fontSize:9,color:'rgba(74,222,128,0.65)',letterSpacing:'0.09em',textTransform:'uppercase'}}>Gained</span><span style={{fontSize:20,fontWeight:700,lineHeight:1,fontFamily:"'Bebas Neue',Impact,sans-serif",letterSpacing:'0.04em',color: hovData ? (hovData.gained>0?F.green:'rgba(74,222,128,0.35)') : (totalGained>0?F.green:'rgba(74,222,128,0.35)')}}>+{hovData ? hovData.gained : totalGained}</span></div>{hovData && (<div style={{fontSize:9,color:F.accent,letterSpacing:'0.06em',paddingBottom:2,background:'rgba(255,107,43,0.08)',padding:'2px 8px',borderRadius:10,border:'1px solid rgba(255,107,43,0.2)'}}>{23 - hovered === 0 ? 'Just now' : `${23 - hovered}h ago`}</div>)}<div style={{display:'flex',flexDirection:'column',gap:1,alignItems:'flex-end'}}><span style={{fontSize:9,color:'rgba(248,113,113,0.65)',letterSpacing:'0.09em',textTransform:'uppercase'}}>Lost</span><span style={{fontSize:20,fontWeight:700,lineHeight:1,fontFamily:"'Bebas Neue',Impact,sans-serif",letterSpacing:'0.04em',color: hovData ? (hovData.lost>0?F.red:'rgba(248,113,113,0.35)') : (totalLost>0?F.red:'rgba(248,113,113,0.35)')}}>-{hovData ? hovData.lost : totalLost}</span></div></div>{/* SVG Graafi */}<svg viewBox={`0 0 ${W} ${H}`} style={{width:'100%',height:H,display:'block',overflow:'visible'}}><defs><linearGradient id="fxFG" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stopColor="#4ADE80" stopOpacity="0.3"/><stop offset="100%" stopColor="#4ADE80" stopOpacity="0.0"/></linearGradient><linearGradient id="fxFL" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stopColor="#F87171" stopOpacity="0.3"/><stop offset="100%" stopColor="#F87171" stopOpacity="0.0"/></linearGradient><filter id="fxGlowG" x="-30%" y="-30%" width="160%" height="160%"><feGaussianBlur stdDeviation="1.5" result="b"/><feMerge><feMergeNode in="b"/><feMergeNode in="SourceGraphic"/></feMerge></filter><filter id="fxGlowR" x="-30%" y="-30%" width="160%" height="160%"><feGaussianBlur stdDeviation="1.5" result="b"/><feMerge><feMergeNode in="b"/><feMergeNode in="SourceGraphic"/></feMerge></filter></defs>{/* Taustaviivat */}{[0.25,0.5,0.75].map((f,i) => (<line key={i} x1={0} y1={(PAD_T + chartH*f).toFixed(1)} x2={W} y2={(PAD_T + chartH*f).toFixed(1)}stroke="rgba(255,255,255,0.03)" strokeWidth="1" strokeDasharray="3,5"/>))}{/* VΓ€rjΓ€tyt alueet pohjalla */}<path d={gainedFill} fill="url(#fxFG)"/><path d={lostFill} fill="url(#fxFL)" style={{mixBlendMode: 'screen'}}/>{/* PehmeΓ€t hehkuvat viivat */}<path d={gainedLine} fill="none" stroke="#4ADE80" strokeWidth="1.5" strokeLinejoin="round" strokeLinecap="round" filter="url(#fxGlowG)"/><path d={lostLine} fill="none" stroke="#F87171" strokeWidth="1.5" strokeLinejoin="round" strokeLinecap="round" filter="url(#fxGlowR)"/>{/* Hover-elementit (pystyviiva ja pallot) */}{hovered !== null && (<><line x1={(toCX(hovered)).toFixed(1)} y1={PAD_T - 5} x2={(toCX(hovered)).toFixed(1)} y2={PAD_T + chartH}stroke="rgba(255,107,43,0.3)" strokeWidth="1" strokeDasharray="2,3" />{data[hovered].gained > 0 && (<circle cx={toCX(hovered).toFixed(1)} cy={toCY(data[hovered].gained).toFixed(1)}r="4" fill="#4ADE80" stroke="#0A0C0F" strokeWidth="2"/>)}{data[hovered].lost > 0 && (<circle cx={toCX(hovered).toFixed(1)} cy={toCY(data[hovered].lost).toFixed(1)}r="4" fill="#F87171" stroke="#0A0C0F" strokeWidth="2"/>)}</>)}{/* X-akseli */}<line x1={0} y1={(PAD_T+chartH+0.5).toFixed(1)} x2={W} y2={(PAD_T+chartH+0.5).toFixed(1)} stroke="rgba(255,255,255,0.06)" strokeWidth="1"/>{/* Aika-labelit */}{HOUR_LABELS.map(t => (<text key={t.label} x={toCX(t.idx).toFixed(1)} y={H - 3} textAnchor={t.idx === 0 ? "start" : t.idx === 23 ? "end" : "middle"}fontSize="8" fill={hovered===t.idx ? F.accent : 'rgba(107,117,133,0.65)'} fontFamily="'Inter',sans-serif">{t.label}</text>))}{/* NΓ€kymΓ€ttΓΆmΓ€t, leveΓ€t alueet hiiren tunnistamiseen (paljon saumattomampi hover!) */}{data.map((d, i) => {const areaWidth = (i === 0 || i === data.length - 1) ? STEP / 2 : STEP;const startX = i === 0 ? 0 : toCX(i) - STEP / 2;return (<rect key={`hz${i}`} x={startX} y={0} width={areaWidth} height={H}fill="transparent" style={{cursor: 'crosshair'}} onMouseEnter={() => setHovered(i)} />);})}</svg></div>2 unmodified lines// ββ Account Activity Panel βββββββββββββββββββββββββββββββββββββββββββββββββββfunction AccountChangesPanel({ changes, loading, hasScanned }) {if (!hasScanned) {return (<div style={{padding:'18px 0',textAlign:'center',color:F.dim,fontSize:12}}>Scan an account to see its activity</div>);}if (loading) {return (<div style={{padding:'20px 0',textAlign:'center'}}><Spinner size={16}/></div>);}const hasData = changes.gained.length > 0 || changes.lost.length > 0;if (!hasData) {return (<div style={{padding:'16px 0',textAlign:'center',color:F.dim,fontSize:12}}>No changes in this period</div>);}return (<div style={{display:'flex',flexDirection:'column',gap:10}}><div style={{display:'flex',gap:6,flexWrap:'wrap'}}>{changes.total_gained > 0 && (<span style={{fontSize:11,background:F.greenDim,color:F.green,padding:'2px 8px',borderRadius:4,fontWeight:700,border:`1px solid ${F.greenBorder}`}}>+{changes.total_gained} gained</span>)}{changes.total_lost > 0 && (<span style={{fontSize:11,background:F.redDim,color:F.red,padding:'2px 8px',borderRadius:4,fontWeight:700,border:`1px solid ${F.redBorder}`}}>-{changes.total_lost} lost</span>)}</div>{changes.gained.length > 0 && (<div><div style={{fontSize:9,color:F.green,textTransform:'uppercase',letterSpacing:'0.1em',marginBottom:5,display:'flex',alignItems:'center',gap:5}}><span style={{width:5,height:5,borderRadius:'50%',background:F.green,display:'inline-block'}}/>Gained</div><div style={{display:'flex',flexDirection:'column',gap:3}}>{changes.gained.slice(0,7).map((item, idx) => (<div key={idx} style={{display:'flex',justifyContent:'space-between',alignItems:'center',padding:'5px 8px',background:'rgba(74,222,128,0.04)',borderRadius:5,border:`1px solid rgba(74,222,128,0.09)`}}><span style={{fontSize:11,color:F.text,whiteSpace:'nowrap',overflow:'hidden',textOverflow:'ellipsis',marginRight:6}} title={item.name}>{item.name}</span><span style={{fontSize:11,fontWeight:700,color:F.green,flexShrink:0}}>+{item.amount}</span></div>))}{changes.gained.length > 7 && (<div style={{fontSize:10,color:F.dim,textAlign:'center',paddingTop:2}}>+{changes.gained.length - 7} more itemsβ¦</div>)}</div></div>)}{changes.lost.length > 0 && (<div style={{marginTop: changes.gained.length > 0 ? 4 : 0}}><div style={{fontSize:9,color:F.red,textTransform:'uppercase',letterSpacing:'0.1em',marginBottom:5,display:'flex',alignItems:'center',gap:5}}><span style={{width:5,height:5,borderRadius:'50%',background:F.red,display:'inline-block'}}/>Lost / Sold</div><div style={{display:'flex',flexDirection:'column',gap:3}}>{changes.lost.slice(0,7).map((item, idx) => (<div key={idx} style={{display:'flex',justifyContent:'space-between',alignItems:'center',padding:'5px 8px',background:'rgba(248,113,113,0.04)',borderRadius:5,border:`1px solid rgba(248,113,113,0.09)`}}><span style={{fontSize:11,color:F.text,whiteSpace:'nowrap',overflow:'hidden',textOverflow:'ellipsis',marginRight:6}} title={item.name}>{item.name}</span><span style={{fontSize:11,fontWeight:700,color:F.red,flexShrink:0}}>-{item.amount}</span></div>))}{changes.lost.length > 7 && (<div style={{fontSize:10,color:F.dim,textAlign:'center',paddingTop:2}}>+{changes.lost.length - 7} more itemsβ¦</div>)}</div></div>)}</div>);}// REST OF APP BELOW β see index_rest.html// ββ YouTube icon SVG βββββββββββββββββββββββββββββββββββββββββββββββββββββββββconst YTIcon = () => (<svg width="13" height="13" viewBox="0 0 24 24" fill="currentColor"><path d="M23.5 6.19a3.02 3.02 0 0 0-2.13-2.14C19.5 3.67 12 3.67 12 3.67s-7.5 0-9.37.38A3.02 3.02 0 0 0 .5 6.19C.12 8.07 0 10 0 12s.12 3.93.5 5.81A3.02 3.02 0 0 0 2.63 19.95C4.5 20.33 12 20.33 12 20.33s7.5 0 9.37-.38a3.02 3.02 0 0 0 2.13-2.14C23.88 15.93 24 14 24 12s-.12-3.93-.5-5.81zM9.75 15.02V8.98L15.5 12l-5.75 3.02z"/></svg>);// ββ Main App βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββconst PAGE_SIZE = 20;function App() {const [view, setView] = useState('tracker');133 unmodified linesreturn list;}, [items, search, fType, sortCfg]);// ββ FILTERΓITY TΓSSΓ: NΓ€ytetÀÀn vain rivit joissa oikeasti muutoksia ββconst sortedChanges = useMemo(() => {let list = recentChanges.filter(c => c.total_gained > 0 || c.total_lost > 0);if (changesFilter === 'Most Gained') {list.sort((a,b) => b.total_gained - a.total_gained);}if (changesFilter === 'Most Lost') {list.sort((a,b) => b.total_lost - a.total_lost);}return list;}, [recentChanges, changesFilter]);115 unmodified linesalignItems:'center',gap:10,padding:'10px 14px',borderRadius:7,borderBottom:`1px solid rgba(255,255,255,0.022)`}}><div style={{fontSize:11,color:F.dim,textAlign:'right'}}>{(page-1)*PAGE_SIZE+i+1}</div><div style={{display:'flex',alignItems:'center',gap:7}}><span style={{width:6,height:6,borderRadius:'50%',background:rc(rName),flexShrink:0,boxShadow:`0 0 5px ${rc(rName)}66`}}/><span style={{fontSize:13,color:F.text,whiteSpace:'nowrap',overflow:'hidden',textOverflow:'ellipsis'}}>{item.name}</span></div><div><Badge color={rc(rName)}>{rName}</Badge></div><div style={{fontSize:12,color:F.muted}}>{item.weaponType}</div>97 unmodified lines<div key={b.name} style={{display:'flex',justifyContent:'space-between',alignItems:'center',background:'rgba(255,255,255,0.025)',padding:'6px 10px',borderRadius:5,border:`1px solid ${F.border}`}}><span style={{fontSize:11,color:F.text,whiteSpace:'nowrap',overflow:'hidden',textOverflow:'ellipsis',marginRight:6}} title={b.name}>{b.name}</span><span style={{fontSize:10,fontWeight:700,color:F.accent,background:F.accentGlow,padding:'2px 5px',borderRadius:3,flexShrink:0}}>{b.count}Γ</span></div>38 unmodified lines</div><div style={{fontSize:11,color:F.dim,display:'flex',flexDirection:'column',gap:3}}>{c.gained.slice(0,2).map((item,idx)=>(<span key={'g'+idx} style={{color:F.green}}>+{item.amount} {item.name}</span>))}{c.lost.slice(0,2).map((item,idx)=>(<span key={'l'+idx} style={{color:F.red}}>-{item.amount} {item.name}</span>))}</div></div>14 unmodified lines{hotItems.map(item=>(<div key={item.name} style={{display:'flex',justifyContent:'space-between',alignItems:'center',padding:'7px 0',borderTop:`1px solid rgba(248,113,113,0.1)`}}><span style={{fontSize:13,color:F.text}}>{item.name}</span><div style={{display:'flex',gap:12,alignItems:'center'}}><span style={{fontSize:11,color:F.muted}}>{item.accounts} accounts</span><span style={{fontSize:13,fontWeight:700,color:F.red}}>{item.amount}Γ</span>35 unmodified lines<div style={{fontSize:11,color:F.dim,textAlign:'right'}}>{i+1}</div><div style={{display:'flex',alignItems:'center',gap:7,minWidth:0}}>{isHot && <span style={{fontSize:13,flexShrink:0}}>π¨</span>}<span style={{fontSize:13,color:F.text,whiteSpace:'nowrap',overflow:'hidden',textOverflow:'ellipsis'}}>{item.name}</span></div><div style={{textAlign:'center',fontSize:13,fontWeight:700,color:isHot?F.red:F.green}}>{item.amount}Γ</div>78 unmodified lines7980818283848542 unmodified lines1281291301311321331349 unmodified lines14414514614714814915015115215315415515615715815916016116216316416516616716816973 unmodified lines2432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123132 unmodified lines316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369133 unmodified lines503504505506507508509510511512115 unmodified lines62862963063163263363463563663797 unmodified lines73573673773873974074138 unmodified lines78078178278378478578678778878914 unmodified lines80480580680780880981035 unmodified lines84684784884985085185278 unmodified lines<script type="text/babel">const { useState, useMemo, useCallback, useEffect } = React;const F = {bg: '#0A0C0F',border: 'rgba(255,107,43,0.11)',42 unmodified linesif (r.includes('contraband')) return 'Contraband';return (item.rarity || '').replace(/ Weapon/gi,'').replace(/_/g,' ');}function Spinner({ size=18 }) {return (<div style={{width:size,height:size,border:`2px solid rgba(255,107,43,0.15)`,9 unmodified lines</span>);}// ββ UUSI: Apukomponentti, joka tekee nimestΓ€ klikattavan linkin ββfunction ItemLink({ name, style, defaultColor = F.text }) {const targetUrl = `https://cs2invest-by-fenixs.vercel.app/?search=${encodeURIComponent('https://www.steamdt.com/en/cs2/' + name)}`;return (<ahref={targetUrl}target="_blank"rel="noopener noreferrer"style={{ textDecoration: 'none', transition: 'color 0.15s', color: defaultColor, ...style }}title={`Analyze ${name} in FenixS Engine`}onMouseEnter={e => e.currentTarget.style.color = F.accent}onMouseLeave={e => e.currentTarget.style.color = defaultColor}>{name}</a>);}// ββ NEW 24H Flow Chart ββfunction MiniLineChart({ data }) {const W = 280, H = 110;const [hovered, setHovered] = React.useState(null);73 unmodified lines{/* Header */}<div style={{display:'flex',justifyContent:'space-between',alignItems:'flex-end',marginBottom:8}}><div style={{display:'flex',flexDirection:'column',gap:1}}><span style={{fontSize:9,color:'rgba(74,222,128,0.65)',letterSpacing:'0.09em',textTransform:'uppercase'}}>Gained</span><span style={{fontSize:20,fontWeight:700,lineHeight:1,fontFamily:"'Bebas Neue',Impact,sans-serif",letterSpacing:'0.04em',color: hovData ? (hovData.gained>0?F.green:'rgba(74,222,128,0.35)') : (totalGained>0?F.green:'rgba(74,222,128,0.35)')}}>+{hovData ? hovData.gained : totalGained}</span></div>{hovData && (<div style={{fontSize:9,color:F.accent,letterSpacing:'0.06em',paddingBottom:2,background:'rgba(255,107,43,0.08)',padding:'2px 8px',borderRadius:10,border:'1px solid rgba(255,107,43,0.2)'}}>{23 - hovered === 0 ? 'Just now' : `${23 - hovered}h ago`}</div>)}<div style={{display:'flex',flexDirection:'column',gap:1,alignItems:'flex-end'}}><span style={{fontSize:9,color:'rgba(248,113,113,0.65)',letterSpacing:'0.09em',textTransform:'uppercase'}}>Lost</span><span style={{fontSize:20,fontWeight:700,lineHeight:1,fontFamily:"'Bebas Neue',Impact,sans-serif",letterSpacing:'0.04em',color: hovData ? (hovData.lost>0?F.red:'rgba(248,113,113,0.35)') : (totalLost>0?F.red:'rgba(248,113,113,0.35)')}}>-{hovData ? hovData.lost : totalLost}</span></div></div><svg viewBox={`0 0 ${W} ${H}`} style={{width:'100%',height:H,display:'block',overflow:'visible'}}><defs><linearGradient id="fxFG" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stopColor="#4ADE80" stopOpacity="0.3"/><stop offset="100%" stopColor="#4ADE80" stopOpacity="0.0"/></linearGradient><linearGradient id="fxFL" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stopColor="#F87171" stopOpacity="0.3"/><stop offset="100%" stopColor="#F87171" stopOpacity="0.0"/></linearGradient><filter id="fxGlowG" x="-30%" y="-30%" width="160%" height="160%"><feGaussianBlur stdDeviation="1.5" result="b"/><feMerge><feMergeNode in="b"/><feMergeNode in="SourceGraphic"/></feMerge></filter><filter id="fxGlowR" x="-30%" y="-30%" width="160%" height="160%"><feGaussianBlur stdDeviation="1.5" result="b"/><feMerge><feMergeNode in="b"/><feMergeNode in="SourceGraphic"/></feMerge></filter></defs>{[0.25,0.5,0.75].map((f,i) => (<line key={i} x1={0} y1={(PAD_T + chartH*f).toFixed(1)} x2={W} y2={(PAD_T + chartH*f).toFixed(1)} stroke="rgba(255,255,255,0.03)" strokeWidth="1" strokeDasharray="3,5"/>))}<path d={gainedFill} fill="url(#fxFG)"/><path d={lostFill} fill="url(#fxFL)" style={{mixBlendMode: 'screen'}}/><path d={gainedLine} fill="none" stroke="#4ADE80" strokeWidth="1.5" strokeLinejoin="round" strokeLinecap="round" filter="url(#fxGlowG)"/><path d={lostLine} fill="none" stroke="#F87171" strokeWidth="1.5" strokeLinejoin="round" strokeLinecap="round" filter="url(#fxGlowR)"/>{hovered !== null && (<><line x1={(toCX(hovered)).toFixed(1)} y1={PAD_T - 5} x2={(toCX(hovered)).toFixed(1)} y2={PAD_T + chartH} stroke="rgba(255,107,43,0.3)" strokeWidth="1" strokeDasharray="2,3" />{data[hovered].gained > 0 && <circle cx={toCX(hovered).toFixed(1)} cy={toCY(data[hovered].gained).toFixed(1)} r="4" fill="#4ADE80" stroke="#0A0C0F" strokeWidth="2"/>}{data[hovered].lost > 0 && <circle cx={toCX(hovered).toFixed(1)} cy={toCY(data[hovered].lost).toFixed(1)} r="4" fill="#F87171" stroke="#0A0C0F" strokeWidth="2"/>}</>)}<line x1={0} y1={(PAD_T+chartH+0.5).toFixed(1)} x2={W} y2={(PAD_T+chartH+0.5).toFixed(1)} stroke="rgba(255,255,255,0.06)" strokeWidth="1"/>{HOUR_LABELS.map(t => (<text key={t.label} x={toCX(t.idx).toFixed(1)} y={H - 3} textAnchor={t.idx === 0 ? "start" : t.idx === 23 ? "end" : "middle"} fontSize="8" fill={hovered===t.idx ? F.accent : 'rgba(107,117,133,0.65)'} fontFamily="'Inter',sans-serif">{t.label}</text>))}{data.map((d, i) => {const areaWidth = (i === 0 || i === data.length - 1) ? STEP / 2 : STEP;const startX = i === 0 ? 0 : toCX(i) - STEP / 2;return <rect key={`hz${i}`} x={startX} y={0} width={areaWidth} height={H} fill="transparent" style={{cursor: 'crosshair'}} onMouseEnter={() => setHovered(i)} />;})}</svg></div>2 unmodified lines// ββ Account Activity Panel βββββββββββββββββββββββββββββββββββββββββββββββββββfunction AccountChangesPanel({ changes, loading, hasScanned }) {if (!hasScanned) return <div style={{padding:'18px 0',textAlign:'center',color:F.dim,fontSize:12}}>Scan an account to see its activity</div>;if (loading) return <div style={{padding:'20px 0',textAlign:'center'}}><Spinner size={16}/></div>;if (changes.gained.length === 0 && changes.lost.length === 0) return <div style={{padding:'16px 0',textAlign:'center',color:F.dim,fontSize:12}}>No changes in this period</div>;return (<div style={{display:'flex',flexDirection:'column',gap:10}}><div style={{display:'flex',gap:6,flexWrap:'wrap'}}>{changes.total_gained > 0 && <span style={{fontSize:11,background:F.greenDim,color:F.green,padding:'2px 8px',borderRadius:4,fontWeight:700,border:`1px solid ${F.greenBorder}`}}>+{changes.total_gained} gained</span>}{changes.total_lost > 0 && <span style={{fontSize:11,background:F.redDim,color:F.red,padding:'2px 8px',borderRadius:4,fontWeight:700,border:`1px solid ${F.redBorder}`}}>-{changes.total_lost} lost</span>}</div>{changes.gained.length > 0 && (<div><div style={{fontSize:9,color:F.green,textTransform:'uppercase',letterSpacing:'0.1em',marginBottom:5,display:'flex',alignItems:'center',gap:5}}><span style={{width:5,height:5,borderRadius:'50%',background:F.green,display:'inline-block'}}/>Gained</div><div style={{display:'flex',flexDirection:'column',gap:3}}>{changes.gained.slice(0,7).map((item, idx) => (<div key={idx} style={{display:'flex',justifyContent:'space-between',alignItems:'center',padding:'5px 8px',background:'rgba(74,222,128,0.04)',borderRadius:5,border:`1px solid rgba(74,222,128,0.09)`}}><ItemLink name={item.name} defaultColor={F.text} style={{fontSize:11, whiteSpace:'nowrap', overflow:'hidden', textOverflow:'ellipsis', marginRight:6}} /><span style={{fontSize:11,fontWeight:700,color:F.green,flexShrink:0}}>+{item.amount}</span></div>))}{changes.gained.length > 7 && <div style={{fontSize:10,color:F.dim,textAlign:'center',paddingTop:2}}>+{changes.gained.length - 7} more itemsβ¦</div>}</div></div>)}{changes.lost.length > 0 && (<div style={{marginTop: changes.gained.length > 0 ? 4 : 0}}><div style={{fontSize:9,color:F.red,textTransform:'uppercase',letterSpacing:'0.1em',marginBottom:5,display:'flex',alignItems:'center',gap:5}}><span style={{width:5,height:5,borderRadius:'50%',background:F.red,display:'inline-block'}}/>Lost / Sold</div><div style={{display:'flex',flexDirection:'column',gap:3}}>{changes.lost.slice(0,7).map((item, idx) => (<div key={idx} style={{display:'flex',justifyContent:'space-between',alignItems:'center',padding:'5px 8px',background:'rgba(248,113,113,0.04)',borderRadius:5,border:`1px solid rgba(248,113,113,0.09)`}}><ItemLink name={item.name} defaultColor={F.text} style={{fontSize:11, whiteSpace:'nowrap', overflow:'hidden', textOverflow:'ellipsis', marginRight:6}} /><span style={{fontSize:11,fontWeight:700,color:F.red,flexShrink:0}}>-{item.amount}</span></div>))}{changes.lost.length > 7 && <div style={{fontSize:10,color:F.dim,textAlign:'center',paddingTop:2}}>+{changes.lost.length - 7} more itemsβ¦</div>}</div></div>)}</div>);}const YTIcon = () => (<svg width="13" height="13" viewBox="0 0 24 24" fill="currentColor"><path d="M23.5 6.19a3.02 3.02 0 0 0-2.13-2.14C19.5 3.67 12 3.67 12 3.67s-7.5 0-9.37.38A3.02 3.02 0 0 0 .5 6.19C.12 8.07 0 10 0 12s.12 3.93.5 5.81A3.02 3.02 0 0 0 2.63 19.95C4.5 20.33 12 20.33 12 20.33s7.5 0 9.37-.38a3.02 3.02 0 0 0 2.13-2.14C23.88 15.93 24 14 24 12s-.12-3.93-.5-5.81zM9.75 15.02V8.98L15.5 12l-5.75 3.02z"/></svg>);const PAGE_SIZE = 20;function App() {const [view, setView] = useState('tracker');133 unmodified linesreturn list;}, [items, search, fType, sortCfg]);const sortedChanges = useMemo(() => {let list = recentChanges.filter(c => c.total_gained > 0 || c.total_lost > 0);if (changesFilter === 'Most Gained') { list.sort((a,b) => b.total_gained - a.total_gained); }if (changesFilter === 'Most Lost') { list.sort((a,b) => b.total_lost - a.total_lost); }return list;}, [recentChanges, changesFilter]);115 unmodified linesalignItems:'center',gap:10,padding:'10px 14px',borderRadius:7,borderBottom:`1px solid rgba(255,255,255,0.022)`}}><div style={{fontSize:11,color:F.dim,textAlign:'right'}}>{(page-1)*PAGE_SIZE+i+1}</div><div style={{display:'flex',alignItems:'center',gap:7,minWidth:0}}><span style={{width:6,height:6,borderRadius:'50%',background:rc(rName),flexShrink:0,boxShadow:`0 0 5px ${rc(rName)}66`}}/><ItemLink name={item.name} defaultColor={F.text} style={{fontSize:13, whiteSpace:'nowrap', overflow:'hidden', textOverflow:'ellipsis'}} /></div><div><Badge color={rc(rName)}>{rName}</Badge></div><div style={{fontSize:12,color:F.muted}}>{item.weaponType}</div>97 unmodified lines<div key={b.name} style={{display:'flex',justifyContent:'space-between',alignItems:'center',background:'rgba(255,255,255,0.025)',padding:'6px 10px',borderRadius:5,border:`1px solid ${F.border}`}}><ItemLink name={b.name} defaultColor={F.text} style={{fontSize:11, whiteSpace:'nowrap', overflow:'hidden', textOverflow:'ellipsis', marginRight:6}} /><span style={{fontSize:10,fontWeight:700,color:F.accent,background:F.accentGlow,padding:'2px 5px',borderRadius:3,flexShrink:0}}>{b.count}Γ</span></div>38 unmodified lines</div><div style={{fontSize:11,color:F.dim,display:'flex',flexDirection:'column',gap:3}}>{c.gained.slice(0,2).map((item,idx)=>(<span key={'g'+idx} style={{color:F.green}}>+{item.amount} <ItemLink name={item.name} defaultColor={F.green} /></span>))}{c.lost.slice(0,2).map((item,idx)=>(<span key={'l'+idx} style={{color:F.red}}>-{item.amount} <ItemLink name={item.name} defaultColor={F.red} /></span>))}</div></div>14 unmodified lines{hotItems.map(item=>(<div key={item.name} style={{display:'flex',justifyContent:'space-between',alignItems:'center',padding:'7px 0',borderTop:`1px solid rgba(248,113,113,0.1)`}}><ItemLink name={item.name} defaultColor={F.text} style={{fontSize:13}} /><div style={{display:'flex',gap:12,alignItems:'center'}}><span style={{fontSize:11,color:F.muted}}>{item.accounts} accounts</span><span style={{fontSize:13,fontWeight:700,color:F.red}}>{item.amount}Γ</span>35 unmodified lines<div style={{fontSize:11,color:F.dim,textAlign:'right'}}>{i+1}</div><div style={{display:'flex',alignItems:'center',gap:7,minWidth:0}}>{isHot && <span style={{fontSize:13,flexShrink:0}}>π¨</span>}<ItemLink name={item.name} defaultColor={F.text} style={{fontSize:13, whiteSpace:'nowrap', overflow:'hidden', textOverflow:'ellipsis'}} /></div><div style={{textAlign:'center',fontSize:13,fontWeight:700,color:isHot?F.red:F.green}}>{item.amount}Γ</div>
index.html+64-141