PageSourceSearch

https://faf.co.ao/assets/Players-CnGJOl0o.js

js faf.co.ao collected 2026-10-02 19:10:53 UTC 15,552 bytes, 1 lines download raw bytes

1import{r as m,b as H,R as I,j as e,L as J}from"./vendor-react-core-_0sZDOLQ.js";import{c as B,B as M,b as Q}from"./index-j07E1qHv.js";import{I as Y}from"./input-rti45mgP.js";import{C as g,a as h}from"./card-DHmBnTdH.js";import{B as k}from"./badge-BXqwvh8U.js";import{S as K}from"./skeleton-ClHfYp06.js";import{T as V,a as O,b as o}from"./tabs-BUF6w8PE.js";import{m as W}from"./playerPhotoCatalog-C6wr02i9.js";import{C as X}from"./CleanHero-B9_2ARuE.js";import{U as T,Q as Z,i as L,t as z,w as ee,u as se,h as ae,a2 as te,al as le}from"./vendor-lucide-Ddz0eB7N.js";import{m as re}from"./vendor-framer-motion-C1oRD-X5.js";import"./vendor-radix-CFmJ1img.js";import"./vendor-utils-BRu4i-LD.js";import"./vendor-supabase-Ca6cp8v2.js";const D=[{rank:1,name:"Akwá",goals:39,caps:78},{rank:2,name:"Flávio",goals:34,caps:91},{rank:3,name:"Gelson Dala",goals:23,caps:57,active:!0},{rank:4,name:"Manucho",goals:22,caps:53},{rank:5,name:"Vata",goals:20,caps:65},{rank:6,name:"Paulão",goals:19,caps:52},{rank:7,name:"Jesus",goals:18,caps:48},{rank:8,name:"Depú",goals:15,caps:18,active:!0},{rank:9,name:"Mateus Galiano",goals:14,caps:70},{rank:10,name:"Mabululu",goals:14,caps:42,active:!0}],R=[{rank:1,name:"Flávio",caps:91,goals:34},{rank:2,name:"Gilberto",caps:89,goals:10},{rank:3,name:"Love Cabungula",caps:79,goals:11},{rank:4,name:"Akwá",caps:78,goals:39},{rank:5,name:"Yamba Asha",caps:77,goals:1},{rank:6,name:"Kali",caps:73,goals:0},{rank:7,name:"André Macanga",caps:70,goals:2},{rank:8,name:"Mateus Galiano",caps:70,goals:14},{rank:9,name:"Fredy",caps:69,goals:4,active:!0},{rank:10,name:"Job",caps:64,goals:7}],ne="Jogadores assinalados com * continuam ao serviço das Palancas Negras.",ie={"Guarda-Redes":"bg-yellow-100 text-yellow-700",Defesa:"bg-blue-100 text-blue-700",Médio:"bg-green-100 text-green-700",Avançado:"bg-red-100 text-red-700",Ala:"bg-cyan-100 text-cyan-700",Pivô:"bg-violet-100 text-violet-700",Jogador:"bg-red-100 text-red-700"},$={masculino:"Seleção Principal",feminina:"Seleção Feminina (arquivo)",feminino:"Seleção Feminina",sub21:"Sub-21",sub20:"Sub-20",sub17:"Sub-17",feminina_sub20:"Feminina Sub-20",feminina_sub17:"Feminina Sub-17",futsal:"Futsal (arquivo)",futsal_masculino:"Futsal Masculino",futsal_feminino:"Futsal Feminino"},_=12,oe={red:{badge:"bg-red-600",value:"text-red-600"},blue:{badge:"bg-blue-600",value:"text-blue-600"}};function G({record:l,accent:N,metric:n,player:x}){const i=oe[N],f=n==="goals"?l.goals:l.caps,c=n==="goals"?`${l.caps} jogos`:`${l.goals} ${l.goals===1?"golo":"golos"}`,p=e.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg hover:bg-gray-50 transition-colors",children:[e.jsx("div",{className:`w-8 h-8 ${i.badge} text-white rounded-full flex items-center justify-center font-bold text-sm`,children:l.rank}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("p",{className:"font-semibold text-gray-900 truncate",children:[l.name,l.active&&e.jsx("span",{className:`ml-1 ${i.value}`,title:"Jogador no ativo",children:"*"})]}),e.jsx("p",{className:"text-xs text-gray-500",children:c})]}),e.jsxs("div",{className:"text-right",children:[e.jsx("p",{className:`text-xl font-bold ${i.value}`,children:f}),e.jsx("p",{className:"text-xs text-gray-500",children:n==="goals"?"golos":"jogos"})]})]});return x!=null&&x.id?e.jsx(J,{to:B(`PlayerDetail?id=${x.id}`),children:p}):p}function we(){const[l,N]=m.useState(""),[n,x]=m.useState("all"),[i,f]=m.useState("all"),[c,p]=m.useState("all"),[u,v]=m.useState(1),{data:j,isLoading:E}=H({queryKey:["players"],queryFn:async()=>{let s=[];try{s=await Q.entities.Player.list("name",200)}catch(a){console.warn("A carregar jogadores locais por indisponibilidade do backend.",a)}return W(s).sort((a,t)=>{const r=a.status==="retired"?1:0,d=t.status==="retired"?1:0;return(a.jersey_number||999)!==(t.jersey_number||999)?(a.jersey_number||999)-(t.jersey_number||999):r!==d?r-d:(a.name||"").localeCompare(t.name||"")})},initialData:[]}),y=j.filter(s=>{var F,A;const a=((F=s.name)==null?void 0:F.toLowerCase().includes(l.toLowerCase()))||((A=s.current_club)==null?void 0:A.toLowerCase().includes(l.toLowerCase())),t=n==="all"||s.team_type===n,r=i==="all"||s.position===i,d=c==="all"||c==="active"&&(!s.status||s.status==="active")||c==="retired"&&(s.status==="retired"||s.status==="historical");return a&&t&&r&&d}),b=Math.ceil(y.length/_),q=y.slice((u-1)*_,u*_);m.useEffect(()=>
1{v(1)},[l,n,i,c]);const w=s=>(s||"").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().trim(),C=I.useMemo(()=>{const s=new Map;return j.forEach(a=>{const t=w(a.name);t&&!s.has(t)&&s.set(t,a)}),s},[j]),P=D[0],S=R[0],U=s=>{if(!s)return null;const a=new Date,t=new Date(s);let r=a.getFullYear()-t.getFullYear();const d=a.getMonth()-t.getMonth();return(d<0||d===0&&a.getDate()<t.getDate())&&r--,r};return e.jsxs("main",{className:"min-h-screen bg-gray-50",children:[e.jsx(X,{eyebrow:"Plantel Nacional",title:"Jogadores das Seleções",description:"Plantéis publicados de Angola, com fontes identificadas e fotografias reservadas aos perfis dos atletas.",icon:T}),e.jsx("section",{className:"py-6 bg-zinc-950 border-y border-zinc-800",children:e.jsx("div",{className:"container mx-auto px-4",children:e.jsxs("div",{className:"flex flex-col md:flex-row items-center gap-6",children:[e.jsxs("div",{className:"flex items-center gap-3 bg-white/10 p-3 rounded-2xl border border-white/10",children:[e.jsx(Z,{className:"w-8 h-8 text-red-400"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-zinc-300 text-xs font-bold uppercase tracking-wider",children:"Base Nacional de Jogadores"}),e.jsxs("p",{className:"text-white text-sm font-medium",children:[j.length," perfis organizados pela Federação Angolana de Futebol."]})]})]}),e.jsx("div",{className:"flex-1 text-sm leading-relaxed text-zinc-400",children:"Use os filtros para consultar cada seleção, posição e estado do atleta. As fotografias aparecem apenas na grelha de perfis."}),e.jsxs("div",{className:"inline-flex items-center gap-2 rounded-xl px-3 py-2 text-xs font-semibold text-red-300 bg-white/5 border border-white/10",children:["Plantel e histórico nacional",e.jsx(L,{className:"w-4 h-4"})]})]})})}),e.jsx("section",{className:"py-8 bg-white border-b",children:e.jsxs("div",{className:"container mx-auto px-4",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-8",children:[e.jsx(g,{className:"border-0 shadow-sm",children:e.jsx(h,{className:"p-6",children:e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"w-12 h-12 bg-red-100 rounded-xl flex items-center justify-center",children:e.jsx(z,{className:"w-6 h-6 text-red-600"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-gray-500",children:"Melhor Marcador da História"}),e.jsx("p",{className:"text-xl font-bold text-gray-900",children:P.name}),e.jsxs("p",{className:"text-sm text-gray-600",children:[P.goals," golos em ",P.caps," jogos"]})]})]})})}),e.jsx(g,{className:"border-0 shadow-sm",children:e.jsx(h,{className:"p-6",children:e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"w-12 h-12 bg-blue-100 rounded-xl flex items-center justify-center",children:e.jsx(ee,{className:"w-6 h-6 text-blue-600"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-gray-500",children:"Mais Internacionalizações"}),e.jsx("p",{className:"text-xl font-bold text-gray-900",children:S.name}),e.jsxs("p",{className:"text-sm text-gray-600",children:[S.caps," jogos e ",S.goals," golos"]})]})]})})}),e.jsx(g,{className:"border-0 shadow-sm",children:e.jsx(h,{className:"p-6",children:e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"w-12 h-12 bg-green-100 rounded-xl flex items-center justify-center",children:e.jsx(se,{className:"w-6 h-6 text-green-600"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-gray-500",children:"Base Nacional"}),e.jsx("p",{className:"text-xl font-bold text-gray-900",children:j.length}),e.jsx("p",{className:"text-sm text-gray-600",children:"Seleções, formação, futsal e clubes"})]})]})})})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsx(g,{className:"border-0 shadow-sm",children:e.jsxs(h,{className:"p-6",children:[e.jsxs("h3",{className:"text-lg font-bold text-gray-900 mb-1 flex items-center gap-2",children:[e.jsx(ae,{className:"w-5 h-5 text-red-600"}),"Melhores Marcadores da História"]}),e.jsx("p",{className:"text-xs text-gray-500 mb-4",children:"Seleção Nacional A — dados oficiais da FAF"}),e.jsx("div",{className:"space-y-1",children:D.map(s=>e.jsx(G,{record:s,accent:"red",metric:"goals",player:C.get(w(s.name))},`scorer-${s.rank}`))})]})}),e.jsx(g,{className:"border-0 shadow-sm",children:e.jsxs(h,{className:"p-6",children:[e.jsxs("h3",{className:"text-lg font-bold text-gray-900 mb-1 flex items-center gap-2",children:[e.jsx(z,{className:"w-5 h-5 text-blue-600"}),"Jogadores com Mais Internacionalizações"]}),e.jsx("p",{className:"text-xs text-gray-500 mb-4",children:"Seleção Nacional A — dados oficiais da FAF"}),e.jsx("div",{className:"space-y-1",children:R.map(s=>e.jsx(G,{record:s,accent:"blue",metric:"caps",player:C.get(w(s.name))},`caps-${s.rank}`))})]})})]}),e.jsx("p",{className:"mt-4 text-xs text-gray-500",children:ne})]})}),e.jsx("section",{className:"py-8 bg-white border-b sticky top-0 z-40",children:e.jsx("div",{className:"container mx-auto px-4",children:e.jsxs("div",{className:"flex flex-col lg:flex-row gap-4",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(te,{className:"absolute left-4 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-400"}
1),e.jsx(Y,{placeholder:"Pesquisar jogadores...",value:l,onChange:s=>N(s.target.value),className:"pl-12 h-12 rounded-xl"})]}),e.jsx(V,{value:n,onValueChange:x,className:"w-full lg:w-auto",children:e.jsxs(O,{className:"bg-gray-100 p-1 rounded-xl h-auto flex-wrap",children:[e.jsx(o,{value:"all",children:"Todas"}),e.jsx(o,{value:"masculino",children:"Principal"}),e.jsx(o,{value:"feminino",children:"Feminino"}),e.jsx(o,{value:"sub21",children:"Sub-21"}),e.jsx(o,{value:"sub20",children:"Sub-20"}),e.jsx(o,{value:"sub17",children:"Sub-17"}),e.jsx(o,{value:"futsal_masculino",children:"Futsal M"}),e.jsx(o,{value:"futsal_feminino",children:"Futsal F"})]})}),e.jsxs("select",{value:i,onChange:s=>f(s.target.value),className:"h-12 px-4 rounded-xl border border-gray-200 bg-white",children:[e.jsx("option",{value:"all",children:"Todas as Posições"}),e.jsx("option",{value:"Guarda-Redes",children:"Guarda-Redes"}),e.jsx("option",{value:"Defesa",children:"Defesa"}),e.jsx("option",{value:"Médio",children:"Médio"}),e.jsx("option",{value:"Avançado",children:"Avançado"}),e.jsx("option",{value:"Ala",children:"Ala"}),e.jsx("option",{value:"Pivô",children:"Pivô"})]}),e.jsxs("select",{value:c,onChange:s=>p(s.target.value),className:"h-12 px-4 rounded-xl border border-gray-200 bg-white",children:[e.jsx("option",{value:"all",children:"Todos os Status"}),e.jsx("option",{value:"active",children:"Ativos"}),e.jsx("option",{value:"retired",children:"Aposentados / Históricos"})]})]})})}),e.jsx("section",{className:"py-12",children:e.jsx("div",{className:"container mx-auto px-4",children:E?e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:[1,2,3,4,5,6,7,8].map(s=>e.jsx(K,{className:"h-80 rounded-2xl"},s))}):y.length>0?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:q.map((s,a)=>{var t,r;return e.jsx(re.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:a*.05},children:e.jsx(J,{to:B(`PlayerDetail?id=${s.id}`),children:e.jsx(g,{className:"h-full hover:shadow-lg transition-shadow cursor-pointer border-0",children:e.jsxs(h,{className:"p-6",children:[e.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[s.photo_url?e.jsx("img",{src:s.photo_url,alt:s.name,loading:"lazy",className:"h-16 w-16 flex-shrink-0 rounded-full border border-gray-200 object-cover object-top"}):e.jsx("div",{className:"flex h-16 w-16 flex-shrink-0 items-center justify-center rounded-full bg-gray-100 text-lg font-bold text-gray-400",children:(t=s.name)==null?void 0:t.substring(0,2).toUpperCase()}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("h3",{className:"truncate font-bold text-lg text-gray-900",children:s.name}),e.jsx("p",{className:"truncate text-sm text-gray-600",children:s.current_club||"Clube não especificado"}),e.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[e.jsx(k,{className:ie[s.position]||"bg-gray-100 text-gray-700",children:s.position}),e.jsx(k,{variant:"outline",className:"text-xs",children:$[s.team_type]||s.team_type}),s.jersey_number&&e.jsxs("span",{className:"text-sm font-bold text-gray-400",children:["#",s.jersey_number]}),s.status==="retired"&&e.jsx(k,{variant:"secondary",className:"border-0 bg-gray-200 text-gray-600",children:"Lenda"})]})]})]}),!s.stats_verified&&!((s.caps||0)>0||(s.goals||0)>0)?e.jsxs("div",{className:"grid grid-cols-3 gap-2 pt-4 border-t",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-2xl font-bold text-red-600",children:((r=s.photos)==null?void 0:r.length)||(s.photo_url?1:0)}),e.jsx("p",{className:"text-xs text-gray-500",children:"Fotos"})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-sm font-bold text-red-600 pt-2 leading-tight",children:s.jersey_number?`#${s.jersey_number}`:s.position}),e.jsx("p",{className:"text-xs text-gray-500",children:s.jersey_number?"Número":"Posição"})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-sm font-bold text-red-600 pt-2 leading-tight",children:$[s.team_type]||"Angola"}),e.jsx("p",{className:"text-xs text-gray-500",children:"Seleção"})]})]}):e.jsxs("div",{className:"grid grid-cols-3 gap-2 pt-4 border-t",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-2xl font-bold text-red-600",children:s.caps||0}),e.jsx("p",{className:"text-xs text-gray-500",children:"Jogos"})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-2xl font-bold text-red-600",children:s.goals||0}),e.jsx("p",{className:"text-xs text-gray-500",children:"Golos"})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-sm font-bold text-red-600 pt-2 leading-tight",children:s.position}),e.jsx("p",{className:"text-xs text-gray-500",children:"Posição"})]})]}),s.birth_date&&e.jsxs("p",{className:"text-xs text-gray-500 text-center mt-4",children:[U(s.birth_date)," anos"]})]})})})},s.id)})}),b>1&&e.jsxs("div",{className:"flex items-center justify-center gap-4 mt-8",children:[e.jsx(M,{variant:"outline",size:"icon",onClick:()=>v(s=>Math.max(1,s-1)),disabled:u===1,"aria-label":"Página anterior",children:e.jsx(le,{className:"w-4 h-4"})}),e.jsxs("p",{className:"min-w-28 text-center text-sm font-semibold text-gray-700",children:["Página ",u," de ",b]}),e.jsx(M,{variant:"outline",size:"icon",onClick:()=>v(s=>Math.min(b,s+1)),disabled:u===b,"aria-label":"Página seguinte",children:e.jsx(L,{className:"w-4 h-4"})})]})]}):e.jsxs("div",{className:"text-center py-20",children:[e.jsx(T,{className:"w-20 h-20 text-gray-300 mx-auto mb-4"}),e.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"Nenhum jogador encontrado"}),e.jsx("p",{className:"text-gray-500",children:"Tente ajustar os filtros ou a pesquisa"})]})})})]})}export{we 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.