1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1410],{6613:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(71847).A)("Trophy",[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]])},27937:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(71847).A)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},69631:(e,t,r)=>{Promise.resolve().then(r.bind(r,86865)),Promise.resolve().then(r.bind(r,89379))},86865:(e,t,r)=>{"use strict";r.d(t,{default:()=>v});var s=r(95155),a=r(12115),l=r(26497),n=r(15599),i=r(71847);let d=(0,i.A)("Crown",[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]]),o=(0,i.A)("Medal",[["path",{d:"M7.21 15 2.66 7.14a2 2 0 0 1 .13-2.2L4.4 2.8A2 2 0 0 1 6 2h12a2 2 0 0 1 1.6.8l1.6 2.14a2 2 0 0 1 .14 2.2L16.79 15",key:"143lza"}],["path",{d:"M11 12 5.12 2.2",key:"qhuxz6"}],["path",{d:"m13 12 5.88-9.8",key:"hbye0f"}],["path",{d:"M8 7h8",key:"i86dvs"}],["circle",{cx:"12",cy:"17",r:"5",key:"qbz8iq"}],["path",{d:"M12 18v-2h-.5",key:"fawc4q"}]]);var c=r(6613);let x=(0,i.A)("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);var m=r(90368),u=r(27937),h=r(41696),p=r(64269);let g=[{position:1,label:"1st",title:"The Untouchable",Icon:d,color:"#F59E0B",colorDim:"rgba(245,158,11,0.5)",bg:"rgba(245,158,11,0.07)",border:"rgba(245,158,11,0.22)",glow:"0 0 40px rgba(245,158,11,0.12)",strip:"linear-gradient(90deg, #F59E0B, #FDE68A)"},{position:2,label:"2nd",title:"Glow Ascendant",Icon:o,color:"#94A3B8",colorDim:"rgba(148,163,184,0.5)",bg:"rgba(148,163,184,0.05)",border:"rgba(148,163,184,0.18)",glow:void 0,strip:"linear-gradient(90deg, #94A3B8, #CBD5E1)"},{position:3,label:"3rd",title:"Radiant Contender",Icon:o,color:"#CD7F32",colorDim:"rgba(205,127,50,0.5)",bg:"rgba(205,127,50,0.05)",border:"rgba(205,127,50,0.18)",glow:void 0,strip:"linear-gradient(90deg, #CD7F32, #E8A96C)"}];function f(e){let{cfg:t,users:r,elevated:i}=e,[d,o]=(0,a.useState)(0);(0,a.useEffect)(()=>{if(r.length<=1)return;let e=setInterval(()=>o(e=>(e+1)%r.length),3e3);return()=>clearInterval(e)},[r.length]);let c=r[d],{Icon:x}=t;return(0,s.jsxs)("div",{className:"relative flex flex-col rounded-none overflow-hidden border transition-all duration-300 ".concat(i?"shadow-md":""),style:{background:t.bg,borderColor:t.border,boxShadow:t.glow},children:[(0,s.jsx)("div",{className:"h-[3px] w-full shrink-0",style:{background:t.strip}}),(0,s.jsxs)("div",{className:"flex flex-col items-center px-3 pt-4 pb-4 gap-2",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1 px-2.5 py-1 rounded-full text-[10px] font-bold uppercase tracking-wider",style:{background:"color-mix(in oklch, var(--foreground) 6%, transparent)",border:"1px solid ".concat(t.border),color:t.color},children:[(0,s.jsx)(x,{className:"w-3 h-3"}),t.label]}),(0,s.jsxs)("div",{className:"flex items-baseline gap-0.5 mt-1",children:[(0,s.jsx)("span",{className:"font-black tabular-nums leading-none ".concat(i?"text-xl md:text-4xl":"text-md md:text-2xl"," ").concat(i?"":"text-foreground"),style:{color:i?t.color:void 0},children:c?Number(c.overall_score).toFixed(2):"-"}),(0,s.jsx)("span",{className:"text-muted-foreground text-[8px] md:text-[10px] mb-0.5",children:"/100"})]}),(0,s.jsx)("div",{className:"w-full h-px",style:{background:"".concat(t.border)}}),(0,s.jsx)("div",{className:"h-5 w-full flex items-center justify-center overflow-hidden",children:(0,s.jsx)(l.N,{mode:"wait",children:(0,s.jsx)(n.P.p,{initial:{opacity:0,y:5},animate:{opacity:1,y:0},exit:{opacity:0,y:-5},transition:{duration:.22},className:"text-foreground text-xs font-semibold text-center truncate w-full px-2",children:c?"@".concat(c.username):"-"},"".concat(t.position,"-").concat(d))})}),(0,s.jsx)("p",{className:"text-[10px] font-bold uppercase tracking-wider text-center",style:{color:t.colorDim},children:t.title}),r.length>1&&(0,s.jsxs)("div",{className:"flex items-center gap-1 mt-0.5",children:[r.slice(0,5).map((e,a)=>
1(0,s.jsx)(n.P.div,{animate:{opacity:a===d%Math.min(r.length,5)?1:.25},transition:{duration:.3},className:"w-1 h-1 rounded-full",style:{background:t.color}},a)),r.length>5&&(0,s.jsxs)("span",{className:"text-[9px] ml-0.5",style:{color:t.colorDim},children:["+",r.length-5]})]})]})]})}function b(e){var t,r,a;let{entries:l}=e,i=[...l].sort((e,t)=>t.overall_score-e.overall_score||new Date(e.created_at).getTime()-new Date(t.created_at).getTime()),d=[];for(let e of i){let t=d[d.length-1];t&&t[0].overall_score===e.overall_score?t.push(e):d.length<3&&d.push([e])}if(0===d.length)return null;let o=[{cfg:g[1],users:null!=(t=d[1])?t:[]},{cfg:g[0],users:null!=(r=d[0])?r:[]},{cfg:g[2],users:null!=(a=d[2])?a:[]}];return(0,s.jsxs)(n.P.div,{initial:{opacity:0,y:-8},animate:{opacity:1,y:0},transition:{delay:.15},className:"mb-8",children:[(0,s.jsx)("p",{className:"text-[10px] font-semibold uppercase tracking-[0.18em] text-muted-foreground mb-4 text-center",children:"Top Performers"}),(0,s.jsxs)("div",{className:"grid grid-cols-3 gap-3 items-end",children:[(0,s.jsx)("div",{children:o[0].users.length>0?(0,s.jsx)(f,{cfg:o[0].cfg,users:o[0].users,elevated:!1}):(0,s.jsx)("div",{className:"rounded-2xl border border-dashed border-border h-32"})}),(0,s.jsx)("div",{className:"-translate-y-4",children:(0,s.jsx)(f,{cfg:o[1].cfg,users:o[1].users,elevated:!0})}),(0,s.jsx)("div",{children:o[2].users.length>0?(0,s.jsx)(f,{cfg:o[2].cfg,users:o[2].users,elevated:!1}):(0,s.jsx)("div",{className:"rounded-2xl border border-dashed border-border h-32"})})]})]})}let y={1:"#F59E0B",2:"#94A3B8",3:"#CD7F32"};function j(e){var t;let{rank:r,entries:i,rankIconFn:d}=e,[o,c]=(0,a.useState)(0),x=null!=(t=y[r])?t:"#737373";(0,a.useEffect)(()=>{if(i.length<=1)return;let e=setInterval(()=>c(e=>(e+1)%i.length),3e3);return()=>clearInterval(e)},[i.length]);let m=i[o],u=(0,p.a_)(m.tier);return(0,s.jsxs)("div",{className:"grid grid-cols-[36px_1fr_56px_62px] sm:grid-cols-[48px_1fr_80px_80px_100px] gap-3 px-4 py-3.5 items-center hover:bg-muted/50 transition-colors",children:[(0,s.jsx)("div",{className:"flex items-center justify-center",children:d(r)}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("div",{className:"h-5 overflow-hidden",children:(0,s.jsx)(l.N,{mode:"wait",children:(0,s.jsx)(n.P.span,{initial:{opacity:0,y:5},animate:{opacity:1,y:0},exit:{opacity:0,y:-5},transition:{duration:.22},className:"text-foreground text-sm font-semibold truncate block",children:m.username},o)})}),i.length>1&&(0,s.jsxs)("div",{className:"flex items-center gap-1 mt-0.5",children:[i.slice(0,5).map((e,t)=>(0,s.jsx)(n.P.div,{animate:{opacity:t===o%Math.min(i.length,5)?1:.2},transition:{duration:.3},className:"w-1 h-1 rounded-full",style:{background:x}},t)),i.length>5&&(0,s.jsxs)("span",{className:"text-muted-foreground text-[9px] ml-0.5",children:["+",i.length-5]})]})]}),(0,s.jsxs)("div",{className:"text-right",children:[(0,s.jsx)("span",{className:"text-sm font-black",style:{color:u},children:Number(m.overall_score).toFixed(2)}),(0,s.jsx)("span",{className:"text-muted-foreground text-[10px]",children:"/100"})]}),(0,s.jsx)("div",{className:"text-right",children:(0,s.jsx)(l.N,{mode:"wait",children:(0,s.jsx)(n.P.span,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},transition:{duration:.22},className:"text-muted-foreground text-sm",children:m.skin_age},o)})}),(0,s.jsx)("div",{className:"text-right hidden sm:block",children:(0,s.jsx)(l.N,{mode:"wait",children:(0,s.jsx)(n.P.span,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.22},className:"text-muted-foreground text-[11px]",children:(0,p.Yq)(m.created_at)},o)})})]})}function v(){let[e,t]=(0,a.useState)([]),[r,l]=(0,a.useState)([]),[i,g]=(0,a.useState)(0),[f,y]=(0,a.useState)(1),[v,w]=(0,a.useState)(!0),[k,_]=(0,a.useState)("");(0,a.useEffect)(()=>{(0,h.kK)(1).then(e=>{let{entries:r}=e;return t(r)}).catch(()=>{})},[]),(0,a.useEffect)(()=>{w(!0),(0,h.kK)(f).then(e=>{let{entries:t,total:r}=e;l(t),g(r)}).catch(console.error).finally(()=>w(!1))},[f]);let M=k?r.filter(e=>e.username.toLowerCase().includes(k.toLowerCase())):r,A=(0,a.useMemo)(()=>{let e=new Map,t=(f-1)*20+1;for(let s=0;s<r.length;s++)s>0&&r[s].overall_score===r[s-1].overall_score?e.set(r[s].id,e.get(r[s-1].id)):e.set(r[s].id,t),t++;return e},[r,f]),C=(0,a.useMemo)(()=>{let e=new Map;for(let s of r){var t;let r=null!=(t=A.get(s.id))?t:999;r<=3&&(e.has(r)||e.set(r,[]),e.get(r).push(s))}return e},[r,A]),P=(0,a.useMemo)(()=>M.filter(e=>{var t;return(null!=(t=A.get(e.id))?t:999)>3}),[M,A]),S=Math.ceil(i/20),D=e=>1===e?(0,s.jsx)(d,{className:"w-4 h-4 text-yellow-400"}):2===e?(0,s.jsx)(o,{className:"w-4 h-4 text-slate-300"}):3===e?(0,s.jsx)(o,{className:"w-4 h-4 text-amber-600"}):null;return(0,s.jsxs)("div",{className:"max-w-3xl mx-auto px-4 py-12",children:[(0,s.jsxs)("div",{className:"text-center mb-10",children:[(0,s.jsxs)(n.P.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-full border border-border bg-muted/50 text-foreground text-xs font-medium mb-4",children:[(0,s.jsx)(c.A,{className:"w-3 h-3"}),"Global Skin Leaderboard"]}),(0,s.jsxs)(n.P.h1,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.1},className:"text-4xl font-bold text-foreground mb-2",children:["Who's Got the Best"," ",(0,s.jsx)("span",{className:"bg-gradient-to-r from-foreground via-foreground/80 to-muted-foreground bg-clip-text text-transparent",children:"Skin Score?"})]}),(0,s.jsx)("p",{className:"text-muted-foreground text-sm",children:"Voluntarily submitted scores from the UMPH.AI community"})]}),(0,s.jsx)(b,{entries:e}),(0,s.jsxs)("div",{className:"relative mb-6",children:[(0,s.jsx)(x,{className:"absolute left-4 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),(0,s.jsx)("input",{type:"text",value:k,onChange:e=>_(e.target.value),placeholder:"Search by username...",className:"w-full bg-card border border-border rounded-xl pl-11 pr-4 py-2.5 text-foreground text-sm focus:outline-none focus:border-primary/50 placeholder:text-muted-foreground"})]}),(0,s.jsxs)("div",{className:"rounded-2xl border border-border overflow-hidden",children:[(0,s.jsxs)("div",{className:"grid grid-cols-[36px_1fr_56px_62px] sm:grid-cols-[48px_1fr_80px_80px_100px] gap-3 px-4 py-3 bg-card border-b border-border",children:[(0,s.jsx)("span",{className:"text-muted-foreground text-[11px] font-semibold uppercase tracking-wide text-center",children:"#"}),(0,s.jsx)("span",{className:"text-muted-foreground text-[11px] font-semibold uppercase tracking-wide",children:"Username"}),(0,s.jsx)("span",{className:"text-muted-foreground text-[11px] font-semibold uppercase tracking-wide text-right",children:"Score"}),(0,s.jsx)("span",{className:"text-muted-foreground text-[11px] font-semibold uppercase tracking-wide text-right",children:"Skin Age"}),(0,s.jsx)("span",{className:"text-muted-foreground text-[11px] font-semibold uppercase tracking-wide text-right hidden sm:block",children:"Date"})]}),v?(0,s.jsx)("div",{className:"flex items-center justify-center py-16",children:(0,s.jsx)("div",{className:"w-8 h-8 border-2 border-border border-t-primary rounded-full animate-spin"})}):0===M.length?(0,s.jsxs)("div",{className:"text-center py-16",children:[(0,s.jsx)(c.A,{className:"w-10 h-10 text-muted-foreground mx-auto mb-3 opacity-30"}),(0,s.jsx)("p",{className:"text-muted-foreground text-sm",children:"No entries yet. Be the first!"})]}):(0,s.jsxs)("div",{className:"divide-y divide-border",children:[[1,2,3].map(e=>{let t=C.get(e);return t?(0,s.jsx)(j,{rank:e,entries:t,rankIconFn:D},e):null}),P.map((e,t)=>{var r;let a=null!=(r=A.get(e.id))?r:(f-1)*20+t+1,l=(0,p.a_)(e.tier);return(0,s.jsxs)(n.P.div,{initial:{opacity:0,x:-8}
1,animate:{opacity:1,x:0},transition:{delay:.03*t},className:"grid grid-cols-[36px_1fr_56px_62px] sm:grid-cols-[48px_1fr_80px_80px_100px] gap-3 px-4 py-3.5 hover:bg-muted/50 transition-colors items-center",children:[(0,s.jsx)("div",{className:"flex items-center justify-center",children:(0,s.jsx)("span",{className:"text-muted-foreground text-sm font-bold",children:a})}),(0,s.jsx)("div",{className:"min-w-0",children:(0,s.jsx)("span",{className:"text-foreground text-sm font-semibold truncate block",children:e.username})}),(0,s.jsxs)("div",{className:"text-right",children:[(0,s.jsx)("span",{className:"text-sm font-black",style:{color:l},children:Number(e.overall_score).toFixed(2)}),(0,s.jsx)("span",{className:"text-muted-foreground text-[10px]",children:"/100"})]}),(0,s.jsx)("div",{className:"text-right",children:(0,s.jsx)("span",{className:"text-muted-foreground text-sm",children:e.skin_age})}),(0,s.jsx)("div",{className:"text-right hidden sm:block",children:(0,s.jsx)("span",{className:"text-muted-foreground text-[11px]",children:(0,p.Yq)(e.created_at)})})]},e.id)})]})]}),S>1&&(0,s.jsxs)("div",{className:"flex items-center justify-between mt-4",children:[(0,s.jsxs)(N,{onClick:()=>y(e=>Math.max(1,e-1)),disabled:1===f,children:[(0,s.jsx)(m.A,{className:"w-4 h-4"}),"Prev"]}),(0,s.jsxs)("span",{className:"text-muted-foreground text-sm",children:["Page ",f," of ",S]}),(0,s.jsxs)(N,{onClick:()=>y(e=>Math.min(S,e+1)),disabled:f===S,children:["Next",(0,s.jsx)(u.A,{className:"w-4 h-4"})]})]})]})}function N(e){let{onClick:t,disabled:r,children:a}=e;return(0,s.jsx)("button",{onClick:t,disabled:r,className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-sm font-medium text-muted-foreground hover:text-foreground transition-all disabled:opacity-40 disabled:cursor-not-allowed",children:a})}},90368:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(71847).A)("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]])}},e=>{e.O(0,[297,8657,4909,4050,8441,1255,7358],()=>e(e.s=69631)),_N_E=e.O()}]);
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.