PageSourceSearch

https://caged1.com/assets/FanFavoritesBoardSection-CX1VWlNn.js

js caged1.com collected 2026-10-10 00:00:23 UTC 39,331 bytes, 1 lines download raw bytes

1import{r as l,j as t}from"./vendor-react-Do9pIo1N.js";import{L as Re}from"./vendor-router-jaaI7m1E.js";import{a as xe}from"./PublicAuthFlow-BFva8KO4.js";import{X as Ge,z as ge,u as me,bk as Fe,aZ as je,T as He,J as Ke,x as Ie,m as Oe,S as Me,aS as Ye}from"./vendor-lucide-CgZbIGMS.js";import"./vendor-firebase-CoVnURx1.js";function _e(r){if(!r)return"CA";const j=r.trim().split(/\s+/);return j.length===1?j[0].slice(0,2).toUpperCase():(j[0][0]+j[j.length-1][0]).toUpperCase()}function pe({name:r,photoUrl:j}){const[T,G]=l.useState(!1);return j&&!T?t.jsx("img",{src:j,alt:r,onError:()=>G(!0),className:"h-11 w-11 rounded-full object-cover border-2 border-zinc-700 shadow"}):t.jsx("div",{className:"flex h-11 w-11 items-center justify-center rounded-full border-2 border-zinc-700 bg-gradient-to-br from-red-950 to-zinc-900 text-xs font-black text-red-400",children:_e(r)})}function qe({fighter:r,onClose:j}){const T=l.useRef(null),[G,re]=l.useState(null),[ue,K]=l.useState(!0),[we,ae]=l.useState(!1);l.useEffect(()=>{let h=!0;const E=T.current;if(!E)return;const e=E.getContext("2d");E.width=1080,E.height=1920;const I=(c,d,p,x,w,A=0)=>{if(c.beginPath(),typeof c.roundRect=="function")c.roundRect(d,p,x,w,A);else{const y=Math.min(A,x/2,w/2);c.moveTo(d+y,p),c.lineTo(d+x-y,p),c.quadraticCurveTo(d+x,p,d+x,p+y),c.lineTo(d+x,p+w-y),c.quadraticCurveTo(d+x,p+w,d+x-y,p+w),c.lineTo(d+y,p+w),c.quadraticCurveTo(d,p+w,d,p+w-y),c.lineTo(d,p+y),c.quadraticCurveTo(d,p,d+y,p),c.closePath()}};return(async()=>{try{K(!0);const c=e.createLinearGradient(0,0,1080,1920);c.addColorStop(0,"#0a0303"),c.addColorStop(.18,"#140505"),c.addColorStop(.5,"#070709"),c.addColorStop(.85,"#0d0404"),c.addColorStop(1,"#050507"),e.fillStyle=c,e.fillRect(0,0,1080,1920),e.save(),e.strokeStyle="rgba(239, 68, 68, 0.04)",e.lineWidth=14;for(let a=-400;a<1500;a+=110)e.beginPath(),e.moveTo(a,0),e.lineTo(a+500,1920),e.stroke();e.restore(),e.save(),e.fillStyle="rgba(255, 255, 255, 0.02)",e.font='900 130px "Arial Black", sans-serif',e.textAlign="center",e.fillText("CAGED AGGRESSION",540,480),e.fillText("FIGHTER BACKING",540,1180),e.fillText("MIDWEST MMA",540,1680),e.restore();const d=e.createRadialGradient(540,520,40,540,520,520);d.addColorStop(0,"rgba(239, 68, 68, 0.45)"),d.addColorStop(.35,"rgba(220, 38, 38, 0.22)"),d.addColorStop(.7,"rgba(234, 179, 8, 0.08)"),d.addColorStop(1,"rgba(0, 0, 0, 0)"),e.fillStyle=d,e.fillRect(0,80,1080,950);const p=e.createRadialGradient(540,1420,80,540,1420,550);p.addColorStop(0,"rgba(234, 179, 8, 0.20)"),p.addColorStop(.6,"rgba(185, 28, 28, 0.12)"),p.addColorStop(1,"rgba(0, 0, 0, 0)"),e.fillStyle=p,e.fillRect(0,1050,1080,870);const x=26,w=26,A=1028,y=1868,O=20,M=e.createLinearGradient(0,0,1080,1920);M.addColorStop(0,"#2d1e0a"),M.addColorStop(.2,"#5e4319"),M.addColorStop(.5,"#916d2b"),M.addColorStop(.8,"#4a3311"),M.addColorStop(1,"#1f1305"),e.save(),e.strokeStyle=M,e.lineWidth=O,e.strokeRect(x+O/2,w+O/2,A-O,y-O),e.strokeStyle="#120d08",e.lineWidth=3,e.strokeRect(x+O+2,w+O+2,A-O*2-4,y-O*2-4),e.lineWidth=1.5;const ye=[[60,30,140,48],[400,32,490,42],[800,28,870,45],[30,200,44,290],[32,700,46,780],[30,1400,44,1490],[1040,300,1054,380],[1038,900,1056,970],[1042,1500,1054,1590],[150,1880,260,1892],[600,1878,710,1890],[820,1882,910,1892]];for(const[a,i,f,u]of ye)e.strokeStyle="rgba(18, 12, 5, 0.85)",e.beginPath(),e.moveTo(a,i),e.lineTo(f,u),e.stroke(),e.strokeStyle="rgba(234, 195, 120, 0.45)",e.beginPath(),e.moveTo(a+1,i+1),e.lineTo(f+1,u+1),e.stroke();const k=(a,i)=>{e.save(),e.shadowColor="rgba(0,0,0,0.9)",e.shadowBlur=6,e.fillStyle="#5c4117",e.beginPath(),e.arc(a,i,9,0,Math.PI*2),e.fill(),e.fillStyle="#b89445",e.beginPath(),e.arc(a-2,i-2,4.5,0,Math.PI*2),e.fill(),e.restore()};k(x+16,w+16),k(x+A-16,w+16),k(x+16,w+y-16),k(x+A-16,w+y-16),k(540,w+12),k(540,w+y-12),k(x+12,960),k(x+A-12,960),e.restore();const v=(a,i,f,{maxWidth:u=860,maxFontSize:S=76,minFontSize:b=20,fontFamily:C='"Bebas Neue", "Oswald", "Teko", "Impact", sans-serif',fontWeight:X="900",strokeWidth:W=7,strokeColor:H="#000000",topColor:$e="#ffffff",botColor:Be="#cbd5e1",align:Ue="center",shadow:Ve=!0,letterSpacing:De="1px"}={})=>{const de=String(a??"").trim();if(!de)return b;e.save();let Q=S;for(e.font=`${X} ${Q}px ${C}`;e.measureText(de).width>u&&Q>b;)Q-=2,e.font=`${X} ${Q}px ${C}`;e.textAlign=Ue;try{"letterSpacing"in e&&(e.letterSpacing=De)}catch{}Ve&&(e.save(),e.fillStyle="rgba(0, 0, 0, 0.95)",e.fillText(de,i+3,f+5),e.restore(
1)),W>0&&(e.save(),e.strokeStyle=H,e.lineWidth=W,e.lineJoin="miter",e.miterLimit=2,e.strokeText(de,i,f),e.restore());const fe=e.createLinearGradient(i,f-Q*.8,i,f+Q*.2);return fe.addColorStop(0,$e),fe.addColorStop(.55,"#f8fafc"),fe.addColorStop(1,Be),e.fillStyle=fe,e.fillText(de,i,f),e.restore(),Q};v("CAGED AGGRESSION MMA",540,125,{maxFontSize:44,maxWidth:820,strokeWidth:6,topColor:"#ffffff",botColor:"#e2e8f0",letterSpacing:"3px"}),e.save();const ne=560,oe=38,le=540-ne/2,U=145;e.fillStyle="rgba(74, 8, 8, 0.7)",e.strokeStyle="#8c6828",e.lineWidth=2,I(e,le,U,ne,oe,6),e.fill(),e.stroke(),e.fillStyle="#fef08a",e.font='700 20px "Bebas Neue", "Oswald", sans-serif';try{"letterSpacing"in e&&(e.letterSpacing="2px")}catch{}e.textAlign="center",e.fillText("⚔️ OFFICIAL FIGHTER BACKING CARD ⚔️",540,U+26),e.restore();const g=480,J=540-g/2,z=230;let L=!1;if(r.photo_url)try{const a=String(r.photo_url).trim(),i=a.startsWith("http://")||a.startsWith("https://"),f=i?`/api/fan-favorites/proxy-image?url=${encodeURIComponent(a)}`:a,u=await new Promise(S=>{const b=new Image;b.crossOrigin="anonymous",b.onload=()=>S(b),b.onerror=()=>{if(i){const C=new Image;C.crossOrigin="anonymous",C.onload=()=>S(C),C.onerror=()=>S(null),C.src=a}else S(null)},b.src=f});if(u&&h&&(u.naturalWidth||u.width)>0){e.save(),e.imageSmoothingEnabled=!0,e.imageSmoothingQuality="high",e.beginPath(),e.arc(540,z+g/2,g/2,0,Math.PI*2),e.closePath(),e.clip();const S=u.naturalWidth||u.width,b=u.naturalHeight||u.height;let C=0,X=0,W=S,H=b;S>b?(W=b,C=(S-b)/2):b>S&&(H=S,X=Math.max(0,Math.min(b-S,(b-S)*.1))),e.drawImage(u,C,X,W,H,J,z,g,g),e.restore(),L=!0}}catch(a){console.warn("Avatar image loading error:",a),L=!1}if(!L&&h){const a=e.createLinearGradient(J,z,J+g,z+g);a.addColorStop(0,"#7f1d1d"),a.addColorStop(.5,"#991b1b"),a.addColorStop(1,"#1c1917"),e.fillStyle=a,e.beginPath(),e.arc(540,z+g/2,g/2,0,Math.PI*2),e.fill(),e.fillStyle="#fef08a",e.font='900 170px "Arial Black", sans-serif',e.textAlign="center",e.textBaseline="middle",e.fillText(_e(r.name),540,z+g/2)}e.textBaseline="alphabetic",e.save(),e.shadowColor="#ef4444",e.shadowBlur=24,e.strokeStyle="#dc2626",e.lineWidth=8,e.beginPath(),e.arc(540,z+g/2,g/2+5,0,Math.PI*2),e.stroke(),e.restore(),e.save(),e.shadowColor="#eab308",e.shadowBlur=16,e.strokeStyle="#f59e0b",e.lineWidth=4,e.beginPath(),e.arc(540,z+g/2,g/2+16,0,Math.PI*2),e.stroke(),e.restore();const q=a=>{const i=g/2+22,f=g/2+42,u=540+Math.cos(a)*i,S=z+g/2+Math.sin(a)*i,b=540+Math.cos(a)*f,C=z+g/2+Math.sin(a)*f;e.strokeStyle="#fbbf24",e.lineWidth=5,e.beginPath(),e.moveTo(u,S),e.lineTo(b,C),e.stroke()};q(Math.PI*.25),q(Math.PI*.75),q(Math.PI*1.25),q(Math.PI*1.75);let $=780;const s=r.nickname?String(r.nickname).trim():"";if(s){e.save(),e.fillStyle="#ff3333",e.font='700 32px "Bebas Neue", "Oswald", sans-serif';try{"letterSpacing"in e&&(e.letterSpacing="2px")}catch{}e.shadowColor="rgba(239, 68, 68, 0.8)",e.shadowBlur=10,e.textAlign="center",e.fillText(`///  "${s.toUpperCase()}"  ///`,540,$),e.restore(),$+=66}else $+=30;const o=String(r.name||r.display_name||"FIGHTER").trim();
1v(o.toUpperCase(),540,$,{maxWidth:860,maxFontSize:72,minFontSize:46,strokeWidth:9,strokeColor:"#000000",topColor:"#ffffff",botColor:"#cbd5e1"}),$+=52;const n=String(r.gym||r.gym_name||"INDEPENDENT").toUpperCase(),m=String(r.weight_class||"MMA").toUpperCase();e.save(),e.fillStyle="#f59e0b",e.font='700 24px "Bebas Neue", "Oswald", sans-serif';try{"letterSpacing"in e&&(e.letterSpacing="2px")}catch{}e.textAlign="center",e.fillText(`${n}   //   ${m}`,540,$),e.restore();const V=970,_=r.record||{},R=Number(_.wins??r.record_wins??0),Se=Number(_.losses??r.record_losses??0),Pe=`${R} - ${Se}`,Ce=Number(r.current_streak||0),Z=Number(r.wins_ko||0),ee=Number(r.wins_sub||0);let D=Number(r.finish_rate||0);D>0&&D<=1&&(D=Math.round(D*100)),D===0&&R>0&&Z+ee>0&&(D=Math.round((Z+ee)/R*100));const ke=R>0&&Z>0?Math.round(Z/R*100):0,ze=R>0&&ee>0?Math.round(ee/R*100):0;let P={label:"DIVISION STATUS",text:`🥊 ${(r.fighter_level||"PRO").toUpperCase()} CONTENDER`,topColor:"#ffffff",botColor:"#94a3b8",accentColor:"rgba(234, 179, 8, 0.5)",glowColor:"rgba(234, 179, 8, 0.2)"};Ce>=3?P={label:"WIN STREAK",text:`🔥 ${Ce}-FIGHT STREAK`,topColor:"#ff6666",botColor:"#dc2626",accentColor:"rgba(239, 68, 68, 0.7)",glowColor:"rgba(239, 68, 68, 0.35)"}:D>=50&&(R>=2||Z+ee>=2)?P={label:"FINISH THREAT",text:`⚡ ${D}% FINISH RATE`,topColor:"#fef08a",botColor:"#eab308",accentColor:"rgba(234, 179, 8, 0.7)",glowColor:"rgba(234, 179, 8, 0.35)"}:ke>=40&&Z>=2?P={label:"KNOCKOUT RATE",text:`💥 ${ke}% KO RATE`,topColor:"#fef08a",botColor:"#f59e0b",accentColor:"rgba(245, 158, 11, 0.7)",glowColor:"rgba(245, 158, 11, 0.35)"}:ze>=40&&ee>=2?P={label:"SUBMISSION RATE",text:`🥋 ${ze}% SUB RATE`,topColor:"#c084fc",botColor:"#9333ea",accentColor:"rgba(168, 85, 247, 0.7)",glowColor:"rgba(168, 85, 247, 0.35)"}:R>=2&&Se===0?P={label:"CAGE STATUS",text:"👑 UNDEFEATED",topColor:"#fef08a",botColor:"#d97706",accentColor:"rgba(245, 158, 11, 0.7)",glowColor:"rgba(245, 158, 11, 0.35)"}:R>=4&&(P={label:"CAGE EXPERIENCE",text:`🎯 ${R} CAREER WINS`,topColor:"#ffffff",botColor:"#94a3b8",accentColor:"rgba(148, 163, 184, 0.6)",glowColor:"rgba(148, 163, 184, 0.25)"});const Te=(a,i,f,u,S,b,C,X)=>{e.save();const W=e.createLinearGradient(a,i,a+f,i+u);W.addColorStop(0,"#1c1917"),W.addColorStop(.5,"#12100e"),W.addColorStop(1,"#09090b"),e.fillStyle=W,e.strokeStyle=C,e.lineWidth=2.5,e.shadowColor=X,e.shadowBlur=12,I(e,a,i,f,u,14),e.fill(),e.stroke(),e.restore(),e.fillStyle="#a1a1aa",e.font='700 18px "Bebas Neue", "Oswald", sans-serif';try{"letterSpacing"in e&&(e.letterSpacing="1px")}catch{}e.textAlign="center",e.fillText(S,a+f/2,i+42);const H=typeof b=="object"&&b!==null?b:{text:String(b??"")};v(String(H.text??""),a+f/2,i+104,{maxWidth:f-30,maxFontSize:44,minFontSize:28,strokeWidth:6,topColor:H.topColor||"#ffffff",botColor:H.botColor||"#94a3b8"})};Te(100,V,415,135,"PRO / AM RECORD",{text:Pe,topColor:"#fef08a",botColor:"#eab308"},"rgba(234, 179, 8, 0.6)","rgba(234, 179, 8, 0.25)"),Te(565,V,415,135,P.label,P,P.accentColor,P.glowColor);const ie=1140;e.save();const Ne=e.createLinearGradient(100,ie,980,ie+90);Ne.addColorStop(0,"rgba(30, 27, 26, 0.95)"),Ne.addColorStop(1,"rgba(15, 14, 14, 0.95)"),e.fillStyle=Ne,e.strokeStyle="rgba(234, 179, 8, 0.45)",e.lineWidth=2,I(e,100,ie,880,90,14),e.fill(),e.stroke();const ve=Number(r.rank||0),Ee=Number(r.votes||r.vote_count||r.backs_this_week||0);let te="⭐ OFFICIAL COMMUNITY PULSE",se="FAN FAVORITES CONTENDER";Array.isArray(r.awards)&&r.awards.length>0?(te="🏆 CAGED AGGRESSION HONORS",se=String(r.awards[0]).toUpperCase()):ve>0&&ve<=10?(te="⭐ OFFICIAL COMMUNITY PULSE",se=`RANK #${ve} POWER RANKED CONTENDER`):r.fighting_style?(te="⚡ COMBAT PROFILE",se=`${r.fighting_style.toUpperCase()}  //  ALL-ACTION THREAT`):Ee>0?(te="⭐ OFFICIAL COMMUNITY PULSE",se=`${Ee} TOTAL FAN BACKING VOTES`):(te="⚔️ CAGED AGGRESSION MMA",se="COMMUNITY PULSE POWER RANKINGS CONTENDER"),e.fillStyle="#f59e0b",e.font='700 18px "Bebas Neue", "Oswald", sans-serif';try{"letterSpacing"in e&&(e.letterSpacing="1px")}catch{}e.textAlign="center",e.fillText(te,540,ie+32),v(se,540,ie+70,{maxWidth:820,maxFontSize:28,minFontSize:18,strokeWidth:5,topColor:"#ffffff",botColor:"#e2e8f0"}
1),e.restore();const N=1270,Ae=340;e.save();const ce=e.createLinearGradient(100,N,980,N+Ae);ce.addColorStop(0,"#2b0505"),ce.addColorStop(.25,"#450909"),ce.addColorStop(.7,"#330505"),ce.addColorStop(1,"#180202"),e.fillStyle=ce,e.strokeStyle="#8c6828",e.lineWidth=3.5,e.shadowColor="rgba(0, 0, 0, 0.9)",e.shadowBlur=18,I(e,100,N,880,Ae,16),e.fill(),e.stroke(),e.lineWidth=1.5;const We=[[130,N+40,240,N+70],[180,N+180,310,N+230],[720,N+50,840,N+95],[680,N+220,810,N+270],[400,N+280,520,N+310],[300,N+90,410,N+115]];for(const[a,i,f,u]of We)e.strokeStyle="rgba(0, 0, 0, 0.7)",e.beginPath(),e.moveTo(a,i),e.lineTo(f,u),e.stroke(),e.strokeStyle="rgba(255, 140, 140, 0.22)",e.beginPath(),e.moveTo(a+1,i+1),e.lineTo(f+1,u+1),e.stroke();e.restore(),e.fillStyle="#fef08a",e.font='700 22px "Bebas Neue", "Oswald", sans-serif';try{"letterSpacing"in e&&(e.letterSpacing="2px")}catch{}e.textAlign="center",e.fillText("⚡ BACK YOUR FIGHTER ON CAGED AGGRESSION ⚡",540,N+58),v("VOTE TO BOOST POWER RANKINGS",540,N+124,{maxWidth:820,maxFontSize:48,minFontSize:30,fontFamily:'"Bebas Neue", "Oswald", sans-serif',strokeWidth:6,topColor:"#ffffff",botColor:"#f1f5f9",letterSpacing:"2px"}),e.save(),e.fillStyle="#080605",e.strokeStyle="#6b4f1f",e.lineWidth=2,I(e,150,N+165,780,75,12),e.fill(),e.stroke();const Le=`caged1.com/fighters/${r.slug||r.fighter_id||r.id}`;v(Le,540,N+212,{maxWidth:720,maxFontSize:28,minFontSize:18,fontFamily:"monospace",strokeWidth:0,topColor:"#ffffff",botColor:"#e2e8f0",shadow:!1}),e.restore(),e.fillStyle="#fee2e2",e.font="bold 20px sans-serif",e.textAlign="center",e.fillText("Free Daily Fan Votes  •  Midwest Fight Camp Wars",540,N+290),e.fillStyle="#71717a",e.font='bold 20px "Arial Black", sans-serif',e.textAlign="center",e.fillText("CAGED AGGRESSION MMA  •  OFFICIAL COMMUNITY PULSE",540,1720),e.fillStyle="#eab308",e.font='900 22px "Arial Black", sans-serif',e.fillText("WATCH LIVE & VOTE AT CAGED1.COM",540,1760),h&&(re(E.toDataURL("image/png")),K(!1))}catch(c){console.error("Canvas render error:",c),K(!1)}})(),()=>{h=!1}},[r]),l.useEffect(()=>{const h=e=>{e.key==="Escape"&&j()};window.addEventListener("keydown",h);const E=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{window.removeEventListener("keydown",h),document.body.style.overflow=E}},[j]);const he=async()=>{if(G)try{const h=await(await fetch(G)).blob(),E=new File([h],`${r.name}-vote-story.png`,{type:"image/png"});navigator.canShare&&navigator.canShare({files:[E]})?await navigator.share({title:`Vote for ${r.name} on Caged Aggression`,text:`Vote for ${r.name} on the Caged Aggression Fan Favorites Board!`,files:[E]}):B()}catch{B()}},B=()=>{if(!G)return;const h=document.createElement("a");h.href=G,h.download=`${r.name.replace(/\s+/g,"-").toLowerCase()}-vote-story.png`,h.click()},be=()=>{const h=`https://caged1.com/fighters/${r.slug||r.fighter_id}`;navigator.clipboard.writeText(h),ae(!0),setTimeout(()=>ae(!1),2e3)};return t.jsx("div",{className:"fixed inset-0 z-[100] flex flex-col items-center justify-start sm:justify-center overflow-y-auto overscroll-contain bg-black/85 p-3 sm:p-6 backdrop-blur-md",onClick:h=>{h.target===h.currentTarget&&j()},children:t.jsxs("div",{className:"relative my-auto w-full max-w-md rounded-2xl border border-yellow-600/40 bg-zinc-950 p-4 sm:p-6 shadow-2xl",children:[t.jsxs("div",{className:"mb-3 flex items-center justify-between gap-2 border-b border-zinc-800/80 pb-3",children:[t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[t.jsx(Me,{className:"h-4 w-4 text-yellow-400 shrink-0"}),t.jsx("h3",{className:"text-sm sm:text-base font-black uppercase tracking-wider text-white truncate",children:"Fighter Story Card"})]}),t.jsxs("button",{type:"button",onClick:j,className:"flex items-center gap-1 rounded-lg border border-zinc-800 bg-zinc-900/90 px-2.5 py-1 text-xs font-bold text-zinc-300 transition hover:bg-zinc-800 hover:text-white shrink-0","aria-label":"Close",children:[t.jsx(Ge,{className:"h-4 w-4"}),t.jsx("span",{children:"Close"})]})]}),t.jsx("canvas",{ref:T,className:"hidden"}),t.jsx("div",{className:"relative mx-auto aspect-[9/16] w-full max-w-[220px] sm:max-w-[260px] max-h-[46vh] sm:max-h-[52vh] overflow-hidden rounded-xl border-2 border-zinc-800 bg-zinc-900 shadow-inner",children:ue?t.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-3 text-zinc-400 p-4 text-center",children:[t.jsx(ge,{className:"h-6 w-6 animate-spin text-yellow-400"}),t.jsx("span",{className:"text-[11px] font-bold uppercase tracking-wider",children:"Generating HD Graphic..."})]}):G?t.jsx("img",{src:G,alt:"Story Card",className:"h-full w-full object-contain"}):null}),t.jsx("p",{className:"mt-3 text-center text-xs text-zinc-300 leading-relaxed px-1",children:"HD Story Graphic ready to share. Post directly to your Instagram Story, TikTok, Facebook, or group chats to rally votes for your fighter!"}),t.jsxs("div",{className:"mt-4 grid grid-cols-2 gap-2.5",children:[t.jsxs("button",{type:"button",onClick:he,className:"flex items-center justify-center gap-1.5 rounded-xl bg-red-600 px-3 py-2.5 text-xs font-black uppercase tracking-wider text-white shadow-lg transition hover:bg-red-500 active:scale-95",children:[t.jsx(me,{className:"h-3.5 w-3.5"})," Share to Story"]}),t.jsxs("button",{type:"button",onClick:B,className:"flex items-center justify-center gap-1.5 rounded-xl border border-zinc-700 bg-zinc-900 px-3 py-2.5 text-xs font-black uppercase tracking-wider text-white transition hover:bg-zinc-800 active:scale-95",children:[t.jsx(Ye,{className:"h-3.5 w-3.5"})," Save Image (.PNG)"]})]}),t.jsx("button",{type:"button",onClick:be,className:"mt-2.5 flex w-full items-center justify-center gap-2 rounded-xl border border-zinc-800/80 bg-zinc-900/60 py-2 text-xs font-bold text-zinc-300 transition hover:bg-zinc-800 hover:text-white",children:we?"✓ Fighter Vote Link Copied!":"Copy Fighter Vote Link"}),t.jsx("button",{type:"button",onClick:j,className:"mt-2 flex w-full items-center justify-center gap-1.5 rounded-xl py-2 text-xs font-bold text-zinc-400 hover:text-white transition",children:"✕ Return to Board"})]})})}let F=null;function tt(){var $;const[r,j]=l.useState("merit"),[T,G]=l.useState(()=>(F==null?void 0:F.merit)||null),[re,ue]=l.useState(()=>(F==null?void 0:F.weekly)||null),[K,we]=l.useState(()=>
1(F==null?void 0:F.gyms)||null),[ae,he]=l.useState(()=>!F),[B,be]=l.useState(null),[h,E]=l.useState({}),[e,I]=l.useState(null),[Y,c]=l.useState(!1),[d,p]=l.useState(!1),[x,w]=l.useState(""),[A,y]=l.useState([]),[O,M]=l.useState(!1),[ye,k]=l.useState(!1),[v,ne]=l.useState(null),oe=l.useRef(null),le=l.useCallback(async()=>{try{F||he(!0);const[s,o,n]=await Promise.all([xe.getFanFavoritesBoard({limit:10}).catch(()=>null),xe.getFanFavoritesLeaderboard({limit:15}).catch(()=>null),xe.getGymStandings({limit:10}).catch(()=>null)]);(s||o||n)&&(F={merit:s,weekly:o,gyms:n},s&&G(s),o&&ue(o),n&&we(n))}finally{he(!1)}},[]);l.useEffect(()=>{le()},[le]),l.useEffect(()=>{const s=x.trim();if(s.length<2){y([]),M(!1);return}let o=!1;M(!0);const n=setTimeout(async()=>{try{const m=await xe.searchFanFavoriteCandidates({q:s});o||y((m==null?void 0:m.candidates)||[])}catch{o||y([])}finally{o||M(!1)}},200);return()=>{o=!0,clearTimeout(n)}},[x]),l.useEffect(()=>{const s=o=>{oe.current&&!oe.current.contains(o.target)&&k(!1)};return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[]);const U=async s=>{const o=s.fighter_id||s.id;try{be(o);const n=await xe.castFanFavoriteVote({fighter_id:o,fighter_name:s.name,slug:s.slug});E(m=>({...m,[o]:{success:!0,message:`Backed! (${n.backs_this_week||1} this week)`}})),v&&(v.id===o||v.fighter_id===o)&&ne(m=>({...m,backs_this_week:(m.backs_this_week||0)+1,votes:(m.votes||0)+1})),le()}catch(n){E(m=>({...m,[o]:{error:!0,message:(n==null?void 0:n.message)||"Vote limit reached for today"}}))}finally{be(null)}},g=s=>s===1?t.jsx("span",{className:"flex h-7 w-7 items-center justify-center rounded-full bg-gradient-to-br from-yellow-300 to-amber-600 text-xs font-black text-black shadow-md",children:"1"}):s===2?t.jsx("span",{className:"flex h-7 w-7 items-center justify-center rounded-full bg-gradient-to-br from-slate-200 to-slate-400 text-xs font-black text-black shadow-md",children:"2"}):s===3?t.jsx("span",{className:"flex h-7 w-7 items-center justify-center rounded-full bg-gradient-to-br from-amber-600 to-amber-800 text-xs font-black text-white shadow-md",children:"3"}):t.jsxs("span",{className:"flex h-7 w-7 items-center justify-center rounded-full bg-zinc-800 text-xs font-bold text-zinc-400",children:["#",s]}),J=(T==null?void 0:T.entries)||[],z=(re==null?void 0:re.entries)||[],L=(K==null?void 0:K.entries)||[],q=z.slice(0,d?10:6);return t.jsxs("section",{className:"relative mx-auto my-10 max-w-7xl px-4 sm:px-6",children:[t.jsxs("div",{className:"mb-10 rounded-2xl border border-zinc-800/80 bg-zinc-950/80 p-5 sm:p-7 shadow-2xl backdrop-blur-sm",children:[t.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[t.jsx("span",{className:"flex h-5 w-5 items-center justify-center rounded-full bg-red-600/20 text-xs text-red-500",children:"🥊"}),t.jsx("span",{className:"text-[11px] font-black uppercase tracking-widest text-red-500",children:"Community Pulse"})]}),t.jsx("h2",{className:"mb-1 text-xl font-black uppercase tracking-tight text-white sm:text-2xl md:text-3xl",children:"FIGHTER FAN VOTE / COMMUNITY PULSE"}),t.jsx("p",{className:"mb-5 text-xs text-zinc-400 sm:text-sm",children:"Vote for your favorite Caged Aggression fighters to elevate them on the community leaderboard and generate promotional story cards."}),t.jsxs("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-12",children:[t.jsxs("div",{ref:oe,className:"flex flex-col justify-between rounded-xl border border-zinc-800/90 bg-zinc-900/60 p-4 sm:p-5 lg:col-span-5",children:[t.jsxs("div",{children:[t.jsx("h3",{className:"text-xs font-black uppercase tracking-wider text-zinc-200",children:"Type Your Favorite"}),t.jsx("p",{className:"mt-1 text-xs leading-relaxed text-zinc-400",children:"Type a Caged Aggression fighter name. The matcher will cross-check and confirm before counting the vote."}),t.jsxs("div",{className:"relative mt-4 flex gap-2",children:[t.jsxs("div",{className:"relative flex-1",children:[t.jsx("input",{type:"text",value:x,onChange:s=>{w(s.target.value),k(!0)},onFocus:()=>k(!0),placeholder:"Type a fighter name...",className:"w-full rounded-lg border border-zinc-700/80 bg-zinc-950/90 py-2 pl-3 pr-8 text-xs font-medium text-white placeholder-zinc-500 shadow-inner focus:border-red-500 focus:outline-none"}),x&&t.jsx("button",{type:"button",onClick:()=>{w(""),y([]),k(!1)},className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-zinc-400 hover:text-white",children:t.jsx(Ge,{className:"h-3.5 w-3.5"})})]}),t.jsx("button",{type:"button",onClick:()=>{A.length>0&&U(A[0])},className:"rounded-lg bg-gradient-to-r from-red-700 to-red-600 px-4 py-2 text-xs font-black uppercase tracking-wider text-white shadow-md transition hover:brightness-110",children:"Search"})]}),ye&&x.trim().length>=2&&t.jsx("div",{className:"absolute left-4 right-4 z-40 mt-1 max-h-60 overflow-y-auto rounded-xl border border-zinc-700 bg-zinc-950 p-1.5 shadow-2xl sm:left-6 sm:right-auto sm:w-80",children:O?t.jsxs("div",{className:"flex items-center justify-center gap-2 py-4 text-xs text-zinc-400",children:[t.jsx(ge,{className:"h-3.5 w-3.5 animate-spin text-red-500"})," Searching..."]}):A.length===0?t.jsxs("div",{className:"py-3 text-center text-xs text-zinc-500",children:['No fighters matching "',x,'"']}):t.jsx("div",{className:"flex flex-col gap-1",children:A.map(s=>{var m;const o=s.id,n=(m=h[o])==null?void 0:m.success;return t.jsxs("div",{className:"flex items-center justify-between gap-2 rounded-lg p-2 transition hover:bg-zinc-900",children:[t.jsxs("div",{onClick:()=>{ne(s),k(!1)},className:"flex flex-1 cursor-pointer items-center gap-2",children:[t.jsx(pe,{name:s.name,photoUrl:s.photo_url}),t.jsxs("div",{className:"min-w-0",children:[t.jsx("div",{className:"text-xs font-bold text-white",children:s.name}),t.jsxs("div",{className:"text-[10px] text-zinc-400",children:[s.gym||"Independent"," • ",s.votes||s.backs_this_week||0," votes"]})]})]}),t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx("button",{type:"button",onClick:()=>I(s),className:"flex h-7 w-7 items-center justify-center rounded border border-zinc-700 bg-zinc-900 text-zinc-300 transition hover:border-yellow-500/50 hover:text-yellow-400",title:"Instagram Story Card",children:t.jsx(me,{className:"h-3 w-3"})}),t.jsx("button",{type:"button",onClick:()=>U(s),disabled:B===o,className:`rounded px-2.5 py-1 text-[11px] font-black uppercase transition ${n?"bg-green-600 text-white":"bg-red-600 text-white hover:bg-red-500"}`,children:n?"Voted":"Vote"})]})]},o)})})}),v&&t.jsxs("div",{className:"mt-3 flex items-center justify-between rounded-lg border border-red-500/40 bg-zinc-950/80 p-2.5",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(pe,{name:v.name,photoUrl:v.photo_url}),t.jsxs("div",{children:[t.jsx("div",{className:"text-xs font-bold text-white",children:v.name}),t.jsxs("div",{className:"text-[10px] text-zinc-400",children:[v.votes||0," votes recorded"]})]})]}),t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx("button",{type:"button",onClick:()=>I(v),className:"flex h-7 w-7 items-center justify-center rounded border border-zinc-700 bg-zinc-900 text-zinc-300 transition hover:border-yellow-500/50 hover:text-yellow-400",title:"Instagram Story Card",children:t.jsx(me,{className:"h-3 w-3"})}),t.jsx("button",{type:"button",onClick:()=>U(v),disabled:B===v.id,className:"rounded bg-red-600 px-3 py-1 text-xs font-black uppercase text-white hover:bg-red-500",children:($=h[v.id])!=null&&$.success?"✓ Voted":"Vote Now"})]})]})]}),t.jsx("p",{className:"mt-4 text-[10.5px] leading-tight text-zinc-500",children:"Select only Fighters that have previously fought for Caged Aggression. Misspelled names will be corrected and verified before submission."})]}),t.jsxs("div",{className:"rounded-xl border border-zinc-800/90 bg-zinc-900/60 p-4 sm:p-5 lg:col-span-7",children:[t.jsxs("div",{className:"mb-3 flex items-center justify-between border-b border-zinc-800/80 pb-2",children:[t.jsx("h3",{className:"text-xs font-black uppercase tracking-wider text-zinc-200",children:"Top Results"}),t.jsx("button",{type:"button",onClick:()=>p(!d),className:"text-[10.5px] font-bold uppercase tracking-wider text-zinc-400 transition hover:text-yellow-400",children:d?"Show Top 6":"Show Top 10"})]}),ae?t.jsxs("div",{className:"flex h-36 items-center justify-center gap-2 text-xs text-zinc-400",children:[t.jsx(ge,{className:"h-4 w-4 animate-spin text-red-500"})," Loading fan favorites..."]}):q.length===0?t.jsx("div",{className:"py-8 text-center text-xs text-zinc-500",children:"No fan votes recorded yet. Be the first to vote!"}):t.jsx("div",{className:"grid grid-cols-2 gap-2.5 sm:grid-cols-3",children:q.map((s,o)=>{var V;const n=s.fighter_id||s.id,m=(V=h[n])==null?void 0:V.success;return t.jsxs("div",{className:`group relative flex flex-col justify-between rounded-xl border p-2.5 transition ${m?"border-green-500/50 bg-green-950/20":"border-zinc-800 bg-zinc-950/70 hover:border-zinc-700 hover:bg-zinc-900/80"}`,children:[t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("span",{className:"flex h-5 w-5 items-center justify-center rounded-full bg-zinc-800 text-[10px] font-black text-yellow-400",children:["#",o+1]}),t.jsxs("span",{className:"text-[10.5px] font-bold text-zinc-400",children:[s.vote_count||s.votes||0," ",Number(s.vote_count||s.votes||0)===1?"vote":"votes"]})]}),t.jsxs("div",{className:"my-1.5 flex items-center gap-2",children:[t.jsx(pe,{name:s.name,photoUrl:s.photo_url}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("div",{className:"truncate text-xs font-bold text-white group-hover:text-yellow-400",children:s.name}),t.jsx("div",{className:"truncate text-[10px] text-zinc-400",children:s.gym||"Independent"})]})]})]}),t.jsxs("div",{className:"mt-2 flex items-center justify-between gap-1.5 border-t border-zinc-800/80 pt-2",children:[t.jsx("button",{type:"button",onClick:_=>{_.stopPropagation(),I(s)},className:"flex h-7 w-7 items-center justify-center rounded-lg border border-zinc-700 bg-zinc-900 text-zinc-300 transition hover:border-yellow-500/50 hover:bg-zinc-800 hover:text-yellow-400",title:"Generate Instagram Story Share Card",children:t.jsx(me,{className:"h-3.5 w-3.5"})}),t.jsxs("button",{type:"button",onClick:_=>{_.stopPropagation(),U(s)},disabled:B===n,className:`flex flex-1 items-center justify-center gap-1 rounded-lg px-2 py-1 text-[10.5px] font-black uppercase transition ${m?"border border-green-500/50 bg-green-950/40 text-green-400":"border border-yellow-500/40 bg-yellow-500/10 text-yellow-400 hover:bg-yellow-500 hover:text-black"}`,children:[t.jsx(Fe,{className:"h-2.5 w-2.5 fill-current"}),t.jsx("span",{children:m?"Voted":"Vote"})]})]})]},n||o)})})]})]})]}),t.jsxs("div",{className:"mb-6 flex flex-col items-start justify-between gap-4 md:flex-row md:items-end",children:[t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(je,{className:"h-6 w-6 text-red-500 animate-pulse"}),t.jsx("span",{className:"text-xs font-black uppercase tracking-widest text-red-500",children:"Official Fight Metrics"})]}),t.jsx("h2",{className:"mt-1 text-2xl font-black uppercase tracking-tight text-white sm:text-3xl",children:"OFFICIAL POWER RANKINGS OF CAGED AGGRESSION FIGHTERS"}),t.jsx("p",{className:"mt-1 text-xs text-zinc-400 sm:text-sm",children:"Ranked by active fight streaks, in-cage performance, finish rates, and merit in the Caged Aggression cage."})]}),t.jsxs("div",{className:"flex items-center rounded-xl border border-zinc-800 bg-zinc-950 p-1",children:[t.jsxs("button",{type:"button",onClick:()=>j("merit"),className:`flex items-center gap-1.5 rounded-lg px-3.5 py-2 text-xs font-bold uppercase tracking-wider transition ${r==="merit"?"bg-red-600 text-white shadow-md":"text-zinc-400 hover:text-white"}`,children:[t.jsx(je,{className:"h-3.5 w-3.5"})," Hot Streaks"]}),t.jsxs("button",{type:"button",onClick:()=>j("weekly"),className:`flex items-center gap-1.5 rounded-lg px-3.5 py-2 text-xs font-bold uppercase tracking-wider transition ${r==="weekly"?"bg-yellow-500 text-black shadow-md":"text-zinc-400 hover:text-white"}`,children:[t.jsx(He,{className:"h-3.5 w-3.5"})," Fan Votes"]}),t.jsxs("button",{type:"button",onClick:()=>j("gyms"),className:`flex items-center gap-1.5 rounded-lg px-3.5 py-2 text-xs font-bold uppercase tracking-wider transition ${r==="gyms"?"bg-zinc-800 text-yellow-400 shadow-md":"text-zinc-400 hover:text-white"}`,children:[t.jsx(Ke,{className:"h-3.5 w-3.5"}
1)," Gym Standings"]})]})]}),t.jsx("div",{className:"rounded-2xl border border-zinc-800 bg-gradient-to-b from-zinc-900/90 to-zinc-950 p-4 sm:p-6 shadow-2xl",children:ae?t.jsxs("div",{className:"flex h-64 items-center justify-center gap-2 text-sm text-zinc-400",children:[t.jsx(ge,{className:"h-5 w-5 animate-spin text-yellow-400"})," Loading rankings & backing data..."]}):r==="gyms"?t.jsxs("div",{children:[t.jsxs("div",{className:"mb-4 flex items-center justify-between border-b border-zinc-800 pb-3",children:[t.jsxs("div",{children:[t.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-yellow-400",children:"Midwest Fight Camp Rivalry Standings"}),t.jsx("p",{className:"text-xs text-zinc-400",children:"Total fan votes aggregated by gym camp this week. Resets every Monday at 00:00 UTC."})]}),t.jsxs("span",{className:"rounded-full border border-yellow-500/30 bg-yellow-500/10 px-2.5 py-1 text-[11px] font-bold text-yellow-400",children:[L.length," Active Camps"]})]}),L.length===0?t.jsx("div",{className:"py-12 text-center text-sm text-zinc-500",children:"No gym backs recorded this week yet. Be the first to back a fighter from your local gym!"}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:L.map((s,o)=>t.jsxs("div",{className:`${o>=4&&!Y?"hidden sm:flex":"flex"} flex-col justify-between rounded-xl border border-zinc-800/80 bg-zinc-950/60 p-4 transition hover:border-yellow-500/40`,children:[t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between",children:[g(s.rank),t.jsxs("span",{className:"rounded-md bg-zinc-900 px-2 py-0.5 text-xs font-black text-yellow-400",children:[s.total_votes," ",s.total_votes===1?"Vote":"Votes"]})]}),t.jsx("h4",{className:"mt-3 text-base font-black uppercase text-white",children:s.gym_name}),t.jsx("p",{className:"text-xs text-zinc-400",children:[s.city,s.state].filter(Boolean).join(", ")||"Midwest"})]}),t.jsxs("div",{className:"mt-4 border-t border-zinc-800/60 pt-3",children:[t.jsx("div",{className:"text-[10px] font-bold uppercase tracking-wider text-zinc-500",children:"Top Backed Fighters"}),t.jsx("div",{className:"mt-1.5 flex flex-wrap gap-2",children:s.top_fighters.map(n=>t.jsxs(Re,{to:`/fighters/${n.slug||n.fighter_id}`,className:"inline-flex items-center gap-1.5 rounded-full border border-zinc-800 bg-zinc-900 px-2 py-0.5 text-xs text-zinc-300 transition hover:border-zinc-600 hover:text-white",children:[t.jsx("span",{className:"font-semibold",children:n.name}),t.jsxs("span",{className:"text-[10px] text-yellow-400 font-bold",children:["(",n.votes,")"]})]},n.fighter_id))})]})]},s.gym_id))}),L.length>4&&t.jsx("div",{className:"mt-4 flex justify-center sm:hidden",children:t.jsx("button",{type:"button",onClick:()=>c(!Y),className:"inline-flex items-center gap-1.5 rounded-xl border border-zinc-800 bg-zinc-900 px-4 py-2 text-xs font-bold text-zinc-300 shadow-sm transition hover:border-zinc-700 hover:text-white active:scale-95",children:Y?t.jsxs(t.Fragment,{children:["Show Less ",t.jsx(Ie,{className:"h-3.5 w-3.5"})]}):t.jsxs(t.Fragment,{children:["Show More (",L.length-4," More) ",t.jsx(Oe,{className:"h-3.5 w-3.5"})]})})})]})]}):t.jsxs("div",{children:[t.jsxs("div",{className:"mb-4 flex items-center justify-between border-b border-zinc-800 pb-3",children:[t.jsxs("div",{children:[t.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-white",children:r==="merit"?"🔥 Top Active Hot Streaks":"👑 Weekly Community Fan Favorites"}),t.jsx("p",{className:"text-xs text-zinc-400",children:r==="merit"?"Ranked strictly by active win streak, finish rate, and competitive recency (100% merit-based).":"Ranked by fan backing votes cast this week. Resets every Monday at 00:00 UTC."})]}),(T==null?void 0:T.most_backed)&&r==="merit"&&t.jsxs("div",{className:"hidden sm:flex items-center gap-2 rounded-xl border border-yellow-600/30 bg-yellow-500/10 px-3 py-1.5",children:[t.jsx(Me,{className:"h-4 w-4 text-yellow-400"}),t.jsxs("div",{className:"text-xs",children:[t.jsx("span",{className:"text-zinc-400",children:"Week Backing Leader: "}),t.jsx("span",{className:"font-black text-yellow-300",children:T.most_backed.name}),t.jsxs("span",{className:"ml-1 font-bold text-yellow-500",children:["(",T.most_backed.backs," backs)"]})]})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full text-left",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"border-b border-zinc-800/80 text-[11px] font-bold uppercase tracking-wider text-zinc-500",children:[t.jsx("th",{className:"pb-3 pl-2",children:"Rank"}),t.jsx("th",{className:"pb-3",children:"Fighter"}),t.jsx("th",{className:"pb-3 hidden sm:table-cell",children:"Gym / Camp"}),t.jsx("th",{className:"pb-3 text-center",children:"Record"}),t.jsx("th",{className:"pb-3 text-center",children:"Streak"}),t.jsx("th",{className:"pb-3 text-center hidden md:table-cell",children:"Finish Rate"}),t.jsx("th",{className:"pb-3 text-right pr-2",children:"Vote / Share"})]})}),t.jsx("tbody",{className:"divide-y divide-zinc-900",children:(r==="merit"?J:z).map((s,o)=>{const n=s.fighter_id||s.id,m=h[n],V=s.record||{},_=s.ca_record||{},R=o>
1=5&&!Y;return t.jsxs("tr",{className:`group transition hover:bg-zinc-900/50 ${R?"hidden sm:table-row":""}`,children:[t.jsx("td",{className:"py-3.5 pl-2 align-middle",children:g(s.rank)}),t.jsx("td",{className:"py-3.5 align-middle",children:t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(pe,{name:s.name,photoUrl:s.photo_url}),t.jsxs("div",{children:[t.jsx(Re,{to:`/fighters/${s.slug||n}`,className:"font-bold text-white transition hover:text-yellow-400 group-hover:underline",children:s.name}),s.nickname&&t.jsx("span",{className:"ml-1.5 text-xs italic text-zinc-500",children:`"${s.nickname}"`}),t.jsx("div",{className:"text-[11px] text-zinc-400",children:s.weight_class||"Catchweight"})]})]})}),t.jsx("td",{className:"py-3.5 align-middle hidden sm:table-cell",children:t.jsx("span",{className:"text-xs text-zinc-300 font-medium",children:s.gym||"Independent"})}),t.jsxs("td",{className:"py-3.5 text-center align-middle",children:[t.jsxs("div",{className:"text-xs font-black text-white",children:[V.wins||0,"-",V.losses||0]}),_.wins!=null&&t.jsxs("div",{className:"text-[10px] text-zinc-500",title:"Caged Aggression Record",children:["CA: ",_.wins,"-",_.losses]})]}),t.jsx("td",{className:"py-3.5 text-center align-middle",children:s.current_streak>0?t.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-red-600/40 bg-red-600/10 px-2.5 py-0.5 text-xs font-black text-red-400",children:[t.jsx(je,{className:"h-3 w-3"})," ",s.current_streak,"W"]}):t.jsx("span",{className:"text-xs text-zinc-500",children:"—"})}),t.jsx("td",{className:"py-3.5 text-center align-middle hidden md:table-cell",children:t.jsx("span",{className:"text-xs font-bold text-zinc-300",children:s.finish_rate?`${Math.round(s.finish_rate)}%`:"—"})}),t.jsxs("td",{className:"py-3.5 pr-2 text-right align-middle",children:[t.jsxs("div",{className:"flex items-center justify-end gap-2",children:[t.jsx("button",{type:"button",onClick:()=>I(s),className:"flex h-8 w-8 items-center justify-center rounded-lg border border-zinc-700 bg-zinc-900 text-zinc-300 transition hover:border-yellow-500/50 hover:bg-zinc-800 hover:text-yellow-400",title:"Generate Instagram Story Campaign Card",children:t.jsx(me,{className:"h-3.5 w-3.5"})}),t.jsxs("button",{type:"button",onClick:()=>U(s),disabled:B===n,className:"inline-flex items-center gap-1.5 rounded-lg border border-yellow-500/40 bg-yellow-500/10 px-3 py-1.5 text-xs font-black uppercase text-yellow-400 transition hover:bg-yellow-500 hover:text-black active:scale-95 disabled:opacity-50",children:[t.jsx(Fe,{className:"h-3 w-3 fill-current"}),t.jsxs("span",{className:"hidden sm:inline",children:["Vote (",s.backs_this_week||s.votes||0,")"]}),t.jsx("span",{className:"sm:hidden",children:s.backs_this_week||s.votes||0})]})]}),m&&t.jsx("div",{className:`mt-1 text-[10px] font-bold ${m.error?"text-red-400":"text-green-400"}`,children:m.message})]})]},n)})})]})}),(r==="merit"?J:z).length>5&&t.jsx("div",{className:"mt-4 flex justify-center sm:hidden",children:t.jsx("button",{type:"button",onClick:()=>c(!Y),className:"inline-flex items-center gap-1.5 rounded-xl border border-zinc-800 bg-zinc-900 px-4 py-2 text-xs font-bold text-zinc-300 shadow-sm transition hover:border-zinc-700 hover:text-white active:scale-95",children:Y?t.jsxs(t.Fragment,{children:["Show Top 5 Only ",t.jsx(Ie,{className:"h-3.5 w-3.5"})]}):t.jsxs(t.Fragment,{children:["Show More (Top 10) ",t.jsx(Oe,{className:"h-3.5 w-3.5"})]})})})]})}),e&&t.jsx(qe,{fighter:e,onClose:()=>I(null)})]})}export{tt as FanFavoritesBoardSection,tt as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.