1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,163330,e=>{"use strict";var t=e.i(473401),r=e.i(408996);e.s(["default",0,function({summary:e,children:a}){let[s,n]=(0,r.useState)(!1);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{type:"button",onClick:()=>n(e=>!e),"aria-expanded":s,className:"flex w-full items-center justify-between gap-2 py-0.5 text-left md:hidden",children:[(0,t.jsx)("span",{className:"min-w-0 truncate text-[16px] font-bold leading-tight",children:e}),(0,t.jsx)("span",{"aria-hidden":!0,className:`shrink-0 text-[11px] text-(--accent-green) transition-transform ${s?"rotate-180":""}`,children:"â¼"})]}),(0,t.jsx)("div",{className:`${s?"block":"hidden"} md:block`,children:a})]})}])},88279,70186,403367,568543,272252,e=>{"use strict";let t=new Map([{id:"markets-trading",arena:"finance",label:"Markets & Trading",zhLabel:"äºçº§å¸åºä¸äº¤æ",keywords:["trading","trade","arbitrage","markets","quant","defi","solana","sui","wallet","prediction"]},{id:"payments-settlement",arena:"finance",label:"Payments & Settlement",zhLabel:"æ¯ä»ä¸ç»ç®",keywords:["payment","payments","settlement","tickpay","checkout"]},{id:"capital-risk",arena:"finance",label:"Capital, Credit & Risk",zhLabel:"ä¸çº§å¸åºãä¿¡è´·ä¸é£æ§",keywords:["venture","investor","credit","lending","risk"]},{id:"eval-safety-security",arena:"ai-core",label:"Evaluation, Safety & Security",zhLabel:"è¯æµãå®å
¨ä¸é²æ¤",keywords:["security","guard","shield","antivirus","immunizer","safety","audit","eval"]},{id:"data-rag-memory",arena:"ai-core",label:"Data, RAG & Memory",zhLabel:"æ°æ®ãRAG ä¸è®°å¿",keywords:["memory","storage","rag","knowledge","vector","embedding","notebook","brain"]},{id:"agent-runtime",arena:"ai-core",label:"Agent Runtime & Orchestration",zhLabel:"è¿è¡æ¶ä¸ç¼æ",keywords:["multi-agent","runtime","orchestrat","framework","harness","autonomous","agentkit","workflow"]},{id:"models-research",arena:"ai-core",label:"Models & Research",zhLabel:"模åä¸ç ç©¶",keywords:["research","paper","benchmark","model"]},{id:"inference-compute",arena:"ai-core",label:"Inference & Compute",zhLabel:"æ¨çä¸ç®å",keywords:["token-optimization","cost","inference","local-first","litellm","compute","gpu"]},{id:"protocols-infra",arena:"ai-core",label:"Protocols & AI Infrastructure",zhLabel:"åè®®ä¸åºç¡è®¾æ½",keywords:["protocol","gateway","identity","mcp-server","registry"]},{id:"devops-testing",arena:"coding",label:"DevOps, Testing & QA",zhLabel:"DevOps 䏿µè¯",keywords:["devops","deploy","testing","qa","ci/cd","cicd","github-actions","monitor"]},{id:"app-builder",arena:"coding",label:"App Builder",zhLabel:"åºç¨æå»º",keywords:["app-builder","builder","no-code","webos","scaffold"]},{id:"coding-agents",arena:"coding",label:"Coding Agents & IDE",zhLabel:"ç¼ç æºè½ä½ä¸ IDE",keywords:["coding","code","cli","developer","developer-tools","programming","repo","nvim","vscode"]},{id:"marketing-growth",arena:"gtm",label:"Marketing, Content & Growth",zhLabel:"è¥éä¸å¢é¿",keywords:["marketing","growth","content","seo","geo"]},{id:"sales-support",arena:"gtm",label:"Sales & Customer Support",zhLabel:"éå®ä¸å®¢æ·æ¯æ",keywords:["sales","crm","support","customer","chatbot"]},{id:"collab-productivity",arena:"gtm",label:"Collaboration & Productivity",zhLabel:"åä½ä¸åå
¬",keywords:["enterprise","lark","dingtalk","wecom","productivity","slack","office"]},{id:"vertical-domain",arena:"vertical",label:"Vertical AI",zhLabel:"åç´è¡ä¸",keywords:["medical","health","legal","education","science","industrial","robot"]},{id:"design-media",arena:"consumer",label:"Design, Image, Video & Audio",zhLabel:"设计ä¸åªä½",keywords:["design","creative","image","video","audio","diagram","style"]},{id:"personal-social",arena:"consumer",label:"Personal, Social & Games",zhLabel:"个人å©çãç¤¾äº¤ä¸æ¸¸æ",keywords:["personal","social","game","games","community","digital-life","companion"]}].map(e=>[e.id,e])),r=[{id:"agent",label:"Agent",color:"#00ff66"},{id:"skill",label:"Skill",color:"#38e0ff"},{id:"mcp",label:"MCP",color:"#b388ff"},{id:"cli",label:"CLI",color:"#ffb547"},{id:"runtime",label:"Runtime",color:"#ff8a3d"},{id:"computer-use",label:"Computer Use",color:"#ff6bd6"},{id:"memory",label:"Memory",color:"#5aa9ff"},{id:"data",label:"Data",color:"#2fd4b0"},{id:"other",label:"Other",color:"#888888"}],a=new Map(r.map(e=>[e.id,e]));function s(e){return a.get(e)??r[r.length-1]}e.s(["ARENA_VIEW_SLUG",0,"arena","PROJECT_TYPE_DEFINITIONS",0,r,"REPO_AGE_OPTIONS",0,[{id:"1w",maxDays:7},{id:"2w",maxDays:14},{id:"1m",maxDays:30},{id:"3m",maxDays:90},{id:"6m",maxDays:180},{id:"1y",maxDays:365},{id:"over1y",minDays:365}],"getProjectTypeDefinition",0,s,"getScenarioLabel",0,function(e,r){let a=t.get(e);return"zh"===r?a.zhLabel:a.label}],88279),e.s(["getProjectSearchTerms",0,function(e){return e.split(/[\s/]+/).map(e=>
1e.trim()).filter(Boolean).slice(0,6)}],70186);var n=e.i(473401),l=e.i(408996),o=e.i(590818),i=e.i(456904);e.s(["default",0,function({boards:e,activeSlug:t,searchQuery:r="",className:a=""}){let s=(0,o.useTranslations)("BoardSwitcher"),[c,d]=(0,l.useState)(!1),x=(0,l.useRef)(null),p=(0,l.useId)(),m=e.find(e=>e.slug===t)??e[0],u=m?.tone==="gold",h=r?{q:r}:{};return((0,l.useEffect)(()=>{if(!c)return;let e=e=>{x.current?.contains(e.target)||d(!1)},t=e=>{"Escape"===e.key&&d(!1)};return document.addEventListener("pointerdown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("pointerdown",e),document.removeEventListener("keydown",t)}},[c]),m)?(0,n.jsxs)("div",{ref:x,className:`relative ${a}`,children:[(0,n.jsxs)("button",{type:"button","aria-haspopup":"menu","aria-expanded":c,"aria-controls":p,"aria-label":s("label"),onClick:()=>d(e=>!e),className:`[font-family:var(--font-stack)] inline-flex h-11 w-full cursor-pointer items-center justify-between gap-3 border px-3.5 text-[12px] font-bold uppercase tracking-[0.14em] transition-colors md:h-9 md:w-auto ${u?"border-[var(--tier-gold)] bg-[rgba(255,210,74,0.06)] text-[var(--tier-gold)] hover:bg-[rgba(255,210,74,0.12)]":"border-(--accent-green) bg-[var(--green-dim)] text-(--accent-green) hover:bg-[var(--green-soft)]"}`,children:[(0,n.jsx)("span",{className:"truncate",children:m.name}),(0,n.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",stroke:"currentColor",strokeWidth:"1.5","aria-hidden":!0,className:"shrink-0 transition-transform",style:{transform:c?"rotate(180deg)":"none"},children:(0,n.jsx)("path",{d:"M2 3.5 5 6.5 8 3.5"})})]}),c?(0,n.jsx)("div",{id:p,role:"menu",className:`absolute left-0 top-full z-30 -mt-px flex w-full min-w-[300px] flex-col border bg-(--bg-card) md:w-auto ${u?"border-[var(--tier-gold)]":"border-(--accent-green)"}`,children:e.map(e=>{let t=e.slug===m.slug,r="gold"===e.tone?"text-[var(--tier-gold)]":"text-(--accent-green)";return(0,n.jsxs)("div",{className:`flex items-center gap-3 border-b border-(--border-color) last:border-b-0 ${t?"bg-(--bg-card-hover)":""}`,children:[(0,n.jsxs)(i.Link,{role:"menuitem",href:{pathname:"/",query:{event:e.slug,...h}},prefetch:!0,scroll:!1,onClick:()=>d(!1),className:"flex min-w-0 flex-1 flex-col gap-0.5 px-3.5 py-2.5 no-underline transition-colors hover:bg-(--bg-card-hover)",children:[(0,n.jsxs)("span",{className:`flex items-center gap-2 text-[12px] font-bold uppercase tracking-[0.14em] ${t?r:"text-(--text-primary)"}`,children:[t?(0,n.jsx)("span",{className:`h-1.5 w-1.5 rounded-full ${"gold"===e.tone?"bg-[var(--tier-gold)]":"bg-(--accent-green)"}`}):null,(0,n.jsx)("span",{className:"truncate",children:e.name})]}),e.dateRange?(0,n.jsx)("span",{className:"text-[10px] uppercase tracking-[0.08em] text-(--text-secondary)",children:e.dateRange}):null]}),e.detailsHref?(0,n.jsxs)(i.Link,{href:e.detailsHref,prefetch:!0,onClick:()=>d(!1),className:`mr-3 inline-flex shrink-0 items-center gap-1 px-2 py-0.5 text-[10px] font-bold tracking-[0.08em] no-underline transition-opacity hover:opacity-80 ${"gold"===e.tone?"bg-[rgba(255,210,74,0.12)] text-[var(--tier-gold)]":"bg-[var(--green-soft)] text-(--accent-green)"}`,children:[s("details"),(0,n.jsx)("span",{"aria-hidden":!0,children:"â"})]}):null]},e.slug)})}):null]}):null}],403367);var c=e.i(850410),d=e.i(861426);let x="inline-flex h-[22px] shrink-0 items-center whitespace-nowrap border px-2 text-[10px] font-bold uppercase tracking-[0.08em]";function p({lit:e,source:t,compact:r=!1}){let a=(0,o.useTranslations)("Arena");return(0,n.jsx)("span",{className:"inline-flex gap-1",children:["GH","X","LI","G"].map(s=>{let l="closed"===t&&"GH"===s,o=e.has(s)&&!l,i=l?a("sourceSlot.closedGithub"):o?a("sourceSlot.counted",{source:s}):a("sourceSlot.noSignal",{source:s});return(0,n.jsx)("span",{title:i,className:`inline-flex h-[22px] items-center justify-center border text-[10px] font-bold ${r?"w-[26px]":"w-7"} ${o?"border-(--border-color) bg-(--bg-card-hover) text-(--text-primary)":"border-(--border-color)/60 text-(--text-tertiary)"}`,children:l?"â":s},s)})})}function m({text:e}){let t=e.split(/(\*\*[^*]+\*\*)/g);return(0,n.jsx)(n.Fragment,{children:t.map((e,t)=>e.startsWith("**")&&e.endsWith("**")?(0,n.jsx)("strong",{children:e.slice(2,-2)},t):e)})}function u(e){let t=new Set,r=e.signalSources;return r?.gh&&t.add("GH"),r?.x&&t.add("X"),r?.li&&t.add("LI"),r?.g&&t.add("G"),t}function h(e,t){return"zh"===t&&e.trackNameZh||e.trackName||null}function b(e,t,r=!1){let a=r?"min-w-0 px-2":"min-w-15 px-2.5";return null==e?(0,n.jsx)("span",{className:`inline-flex items-center justify-center border border-(--border-color) bg-(--bg-card-hover) py-1 text-[10px] font-bold tracking-[0.14em] text-(--text-tertiary) uppercase ${a}`,children:t}):e>0?(0,n.jsxs)("span",{className:`inline-flex items-center justify-center gap-1 border border-[var(--green-border)] bg-[var(--green-dim)] py-1 text-[10px] font-bold tracking-[0.14em] text-(--accent-green) ${a}`,children:[(0,n.jsx)("span",{"aria-hidden":"true",children:"â"}),`+${e}`]}):e<0?(0,n.jsxs)("span",{className:`inline-flex items-center justify-center gap-1 border border-red-500/30 bg-red-500/10 py-1 text-[10px] font-bold tracking-[0.14em] text-red-300 ${a}`,children:[(0,n.jsx)("span",{"aria-hidden":"true",children:"â"}),Math.abs(e)]}):(0,n.jsxs)("span",{className:`inline-flex items-center justify-center gap-1 border border-(--border-color) bg-(--bg-card-hover) py-1 text-[10px] font-bold tracking-[0.14em] text-(--text-secondary) ${a}`,children:[(0,n.jsx)("span",{"aria-hidden":"true",children:"â¢"}),"0"]})}function g(e){return e>=1e6?`${(e/1e6).toFixed(e>=1e7?0:1)}M`:e>=1e3?`${(e/1e3).toFixed(e>=1e4?0:1)}K`:String(e)}function f({row:e,compact:t=!1}){let r=null==e.totalScore?"--":e.totalScore.toFixed(2),a=(0,n.jsxs)("span",{className:`block min-w-0 ${t?"w-24":"w-40"}`,children:[(0,n.jsx)("span",{className:"block whitespace-nowrap",children:(0,n.jsx)("span",{className:`font-bold text-(--text-primary) ${t?"text-[13px]":"text-[22px]"}`,children:r})}),null==e.totalScore?(0,n.jsx)("span",{className:"mt-1 block h-[4px] w-full border border-(--border-color) bg-(--bg-input)"}):(0,n.jsxs)("span",{className:"splitbar mt-1 w-full",style:{"--size-share":e.scoreBreakdown?.sizeShare??.5},title:`GitHub ${e.scoreBreakdown?.sizeContribution??0} \xb7 Social ${e.scoreBreakdown?.socialContribution??0}`,children:[(0,n.jsx)("i",{className:"size"}),(0,n.jsx)("i",{className:"social"})]}),(0,n.jsxs)("span",{className:"mt-1 block whitespace-nowrap text-[10px] text-(--text-tertiary)",children:["â
",g(e.githubStars)," / ",g(e.githubForks)]})]});return e.twitterUrl?(0,n.jsx)("a",{href:e.twitterUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-block no-underline",onClick:e=>e.stopPropagation(),children:a}):a}function j({links:e}){let t=(0,o.useTranslations)("LeaderboardRow"),r={currentSocialSignal:t("currentSocialSignal"),supplementalSocialSignal:t("supplementalSocialSignal"),supplementalContext:t
1("supplementalContext")},a={likes:t("metrics.likes"),replies:t("metrics.replies"),quotes:t("metrics.quotes"),reposts:t("metrics.reposts")};return(0,n.jsx)("div",{className:"grid min-w-0 gap-2",children:e.map((e,s)=>{var l;let o=e.metrics?[[a.likes,e.metrics.likes],[a.replies,e.metrics.replies],[a.quotes,e.metrics.quotes],[a.reposts,e.metrics.reposts]].filter(e=>"number"==typeof e[1]):[];return(0,n.jsxs)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"group/source border border-(--border-color) bg-(--bg-card-hover) px-3 py-2 text-(--text-secondary) no-underline transition-colors hover:border-(--accent-green)",onClick:e=>e.stopPropagation(),children:[(0,n.jsxs)("span",{className:"flex flex-wrap items-center gap-2",children:[(0,n.jsx)("span",{className:"text-[10px] font-bold uppercase tracking-[0.14em] text-(--accent-green)",children:(l=t("primaryX"),"primary-x-post"===e.role?l:`${e.source.toUpperCase()} ${s+1}`)}),(0,n.jsx)("span",{className:"text-[10px] uppercase tracking-[0.08em] text-(--text-tertiary)",children:"primary-x-post"===e.role?r.currentSocialSignal:"x"===e.source&&e.metrics?r.supplementalSocialSignal:r.supplementalContext})]}),(0,n.jsx)("span",{className:"mt-1 block break-all text-[12px] text-(--text-secondary) group-hover/source:text-(--text-primary)",children:e.url}),o.length>0?(0,n.jsx)("span",{className:"mt-2 flex flex-wrap gap-1.5",children:o.map(([e,t])=>(0,n.jsxs)("span",{className:"border border-(--border-color) bg-(--bg-input)/50 px-2 py-0.5 text-[10px] text-(--text-tertiary)",children:[e,": ",t]},e))}):null]},`${e.url}-${s}`)})})}function y({children:e}){return(0,n.jsxs)("span",{className:"shrink-0 text-(--text-tertiary) text-[10px] tracking-widest w-28 pt-0.5",children:[(0,n.jsx)("span",{className:"text-(--text-tertiary) mr-1",children:"/"}),(0,n.jsx)("span",{className:"uppercase",children:e})]})}function v({category:e}){let t=(0,c.useLocale)();return(0,n.jsx)("span",{className:"inline-flex shrink-0 items-center border border-[var(--green-border)] bg-[var(--green-dim)] px-2 py-0.5 text-[10px] font-bold uppercase tracking-[0.08em] text-(--accent-green)",children:(0,d.getProjectCategoryLabel)(e,t)})}e.s(["OrgBadge",0,function({org:e}){let t=(0,o.useTranslations)("Arena");return"company"!==e?null:(0,n.jsx)("span",{title:t("badge.companyTitle"),className:"inline-flex h-[18px] shrink-0 items-center whitespace-nowrap border border-[var(--org-company-border,rgba(90,169,255,0.45))] bg-[var(--org-company-dim,rgba(90,169,255,0.10))] px-1.5 text-[9px] font-bold uppercase tracking-[0.1em] text-[var(--org-company,#5aa9ff)]",children:t("badge.company")})},"P11Badge",0,function({status:e}){let t=(0,o.useTranslations)("Arena");return"none"===e?null:(0,n.jsx)("span",{className:`shrink-0 whitespace-nowrap text-[10px] font-bold uppercase tracking-[0.08em] ${"verified"===e?"text-(--accent-green)":"text-(--accent-amber)"}`,children:t("verified"===e?"badge.verified":"badge.pending")})},"SourceBadge",0,function({source:e,githubUrl:t}){let r=(0,o.useTranslations)("Arena");if("open"===e){let e=(0,n.jsxs)("span",{className:`${x} gap-1.5 border-[var(--green-border)] bg-[var(--green-dim)] text-(--accent-green) ${t?"transition-colors hover:border-(--accent-green) hover:bg-[var(--green-soft)]":""}`,children:["Y",t?(0,n.jsx)("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:(0,n.jsx)("path",{d:"M12 .5C5.65.5.5 5.65.5 12c0 5.08 3.29 9.39 7.86 10.91.58.1.79-.25.79-.56v-2c-3.2.7-3.87-1.54-3.87-1.54-.52-1.33-1.28-1.68-1.28-1.68-1.04-.71.08-.7.08-.7 1.15.08 1.76 1.19 1.76 1.19 1.03 1.76 2.69 1.25 3.35.96.1-.75.4-1.25.73-1.54-2.55-.29-5.24-1.28-5.24-5.69 0-1.26.45-2.29 1.19-3.09-.12-.29-.52-1.46.11-3.05 0 0 .97-.31 3.17 1.18a11 11 0 0 1 5.78 0c2.2-1.49 3.17-1.18 3.17-1.18.63 1.59.23 2.76.11 3.05.74.8 1.19 1.83 1.19 3.09 0 4.42-2.69 5.39-5.26 5.68.41.36.78 1.06.78 2.14v3.17c0 .31.21.67.8.56A11.5 11.5 0 0 0 23.5 12C23.5 5.65 18.35.5 12 .5Z"})}):null]});return t?(0,n.jsx)("a",{href:t,target:"_blank",rel:"noopener noreferrer","aria-label":r("badge.openRepo"),title:r("badge.openRepo"),className:"inline-flex no-underline",onClick:e=>e.stopPropagation(),children:e}):e}return(0,n.jsx)("span",{className:`${x} border-(--text-secondary) text-(--text-secondary)`,title:r("badge.closed"),children:"N"})},"SourceSlots",0,p,"Sparkline",0,function({values:e,width:t=88,height:r=22,color:a}){if(e.length<2)return(0,n.jsx)("svg",{width:t,height:r,viewBox:`0 0 ${t} ${r}
1`,fill:"none","aria-hidden":!0,children:(0,n.jsx)("line",{x1:"2",y1:r/2,x2:t-2,y2:r/2,stroke:"var(--text-tertiary)",strokeWidth:"1",strokeDasharray:"2 3"})});let s=Math.max(...e),l=Math.min(...e),o=s-l||1,i=e.map((a,s)=>{let n=2+s*(t-4)/(e.length-1),i=r-2-(a-l)/o*(r-4);return`${n.toFixed(1)},${i.toFixed(1)}`}).join(" ");return(0,n.jsx)("svg",{width:t,height:r,viewBox:`0 0 ${t} ${r}`,fill:"none","aria-hidden":!0,children:(0,n.jsx)("polyline",{points:i,stroke:a,strokeWidth:"1.5",fill:"none"})})},"TieChip",0,function(){let e=(0,o.useTranslations)("Arena");return(0,n.jsxs)("span",{className:"group/tie relative inline-flex",children:[(0,n.jsxs)("button",{type:"button","aria-label":e("badge.tieTitle"),className:"[font-family:var(--font-stack)] inline-flex h-5 cursor-help items-center gap-1 border border-dashed border-(--accent-amber) bg-transparent px-1.5 text-[10px] tracking-[0.08em] text-(--accent-amber)",children:[(0,n.jsxs)("svg",{width:"9",height:"10",viewBox:"0 0 9 10",fill:"none",stroke:"currentColor",strokeWidth:"1.3","aria-hidden":!0,children:[(0,n.jsx)("rect",{x:"1",y:"4.5",width:"7",height:"5"}),(0,n.jsx)("path",{d:"M2.5 4.5V3a2 2 0 0 1 4 0v1.5"})]}),e("badge.tie")]}),(0,n.jsxs)("span",{role:"tooltip",className:"pointer-events-none absolute left-0 top-full z-20 mt-2 hidden w-[min(320px,calc(100vw-64px))] flex-col gap-2 border border-(--accent-amber) bg-(--bg-card-hover) p-3.5 text-left group-hover/tie:flex group-focus-within/tie:flex",children:[(0,n.jsx)("span",{className:"text-[10px] uppercase tracking-[0.18em] text-(--accent-amber)",children:e("tieTooltip.title")}),(0,n.jsx)("span",{className:"text-[12px] normal-case leading-[1.7] tracking-normal text-(--text-primary)",children:e("tieTooltip.body")}),(0,n.jsx)("span",{className:"text-[10px] normal-case tracking-[0.08em] text-(--text-secondary)",children:e("tieTooltip.footer")})]})]})},"TypeBadge",0,function({type:e,explicit:t=!0}){let r=(0,o.useTranslations)("Arena"),a=s(e);return t||"other"!==e?(0,n.jsx)("span",{className:x,style:{borderColor:`${a.color}66`,background:`${a.color}14`,color:a.color},children:a.label}):(0,n.jsx)("span",{className:`${x} border-dashed border-(--accent-amber) text-(--accent-amber)`,children:r("typeUnclassified")})},"formatCompactCount",0,function(e){return e>=1e6?`${(e/1e6).toFixed(e>=1e7?0:1)}M`:e>=1e3?`${(e/1e3).toFixed(e>=1e4?0:1)}K`:String(e)},"formatDelta",0,function(e){if(e.length<2)return null;let t=e[e.length-1]-e[0];return .05>Math.abs(t)?{text:"±0.0",tone:"flat"}:t>0?{text:`+${t.toFixed(1)}`,tone:"up"}:{text:`â${Math.abs(t).toFixed(1)}`,tone:"down"}},"formatMomentum",0,function(e){return null==e?"â":e.toFixed(1)},"rankColor",0,function(e){return 1===e?"var(--tier-gold)":2===e?"var(--tier-silver)":3===e?"var(--tier-bronze)":"var(--text-secondary)"}],568543),e.s(["BoldText",0,m,"LeaderboardMobileCard",0,function({row:e,displayRank:t,voteCell:r}){let[a,s]=(0,l.useState)(!1),d=(0,o.useTranslations)("LeaderboardRow"),x=(0,c.useLocale)();return(0,n.jsxs)("article",{className:"border border-(--border-color) bg-(--bg-card)",children:[r?(0,n.jsx)("div",{className:"flex justify-end border-b border-(--border-color) px-4 py-2",onClick:e=>e.stopPropagation(),children:r}):null,(0,n.jsxs)("button",{type:"button",className:"grid w-full grid-cols-[auto_1fr_auto] items-start gap-3 p-4 text-left",onClick:()=>s(e=>!e),children:[(0,n.jsx)("span",{className:"relative flex h-10 min-w-10 items-center justify-center border border-[var(--green-border)] bg-[var(--green-dim)] text-[13px] font-bold text-(--accent-green)",children:t}),(0,n.jsxs)("span",{className:"min-w-0",children:[(0,n.jsx)("span",{className:"block truncate text-[16px] font-semibold text-(--text-primary)",children:e.name}),(0,n.jsx)("span",{className:"mt-1 block truncate text-[11px] text-(--text-secondary)",children:e.author}),e.description?(0,n.jsx)("span",{className:"oa-line-clamp-2 mt-2 text-[12px] leading-relaxed text-(--text-secondary)",children:(0,n.jsx)(m,{text:e.description})}):null,h(e,x)?(0,n.jsx)("span",{className:"mt-2 block text-[11px] text-(--text-secondary)",children:h(e,x)}):null,(0,n.jsxs)("span",{className:"mt-2 flex items-center gap-1.5 overflow-x-auto whitespace-nowrap pb-1",children:[(0,n.jsx)(v,{category:e.category}),(0,n.jsx)("span",{className:"ml-auto",children:(0,n.jsx)(p,{lit:u(e),source:e.signalSources?.gh===!1?"closed":"open",compact:!0})})]}),e.tags.length>0?(0,n.jsx)("span",{className:"mt-2 flex gap-1.5 overflow-x-auto whitespace-nowrap pb-1",children:e.tags.slice(0,3).map(e=>(0,n.jsx)("span",{className:"inline-flex shrink-0 items-center border border-(--border-color) bg-(--bg-card-hover) px-2 py-0.5 text-[10px] font-bold uppercase tracking-[0.08em] text-(--text-secondary)",children:e},e))}):null]}),(0,n.jsxs)("span",{className:"flex flex-col items-end gap-2",children:[(0,n.jsx)(f,{row:e,compact:!0}),b(e.rankChange,d("notAvailable"),!0),(0,n.jsx)("span",{className:"mt-1 inline-flex h-6 w-6 items-center justify-center rounded-full text-[10px] text-(--text-tertiary) transition-transform",style:{transform:a?"rotate(90deg)":"rotate(0deg)"},children:"â¶"})]})]}),a?(0,n.jsxs)("div",{className:"space-y-3 border-t border-(--border-color) px-4 py-4 text-[12px]",children:[e.websiteUrl?(0,n.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,n.jsx)(y,{children:d("labels.website")}),(0,n.jsx)("a",{href:e.websiteUrl,target:"_blank",rel:"noopener noreferrer",className:"break-all text-(--accent-green) hover:underline",children:e.websiteUrl})]}):null,(0,n.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,n.jsx)(y,{children:d("labels.github")}),(0,n.jsx)("a",{href:e.githubUrl,target:"_blank",rel:"noopener noreferrer",className:"break-all text-(--accent-green) hover:underline",children:e.githubUrl})]}),e.description?(0,n.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,n.jsx)(y,{children:d("labels.intro")}),(0,n.jsx)("span",{className:"leading-relaxed text-(--text-secondary)",children:(0,n.jsx)(m,{text:e.description})})]}):null,(0,n.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,n.jsx)(y,{children:d("labels.submitted")}),(0,n.jsx)("span",{className:"text-(--text-secondary)",children:e.submitted})]}),(0,n.jsxs)("div",{className:"grid grid-cols-2 gap-2 pt-1",children:[(0,n.jsx)(i.Link,{href:`/projects/${e.projectId}`,className:"col-span-2 inline-flex items-center justify-center border border-(--accent-green) px-3 py-2 text-[10px] font-bold uppercase tracking-[0.08em] text-(--accent-green)",children:d("viewScoreTrend")}),(0,n.jsx)("a",{href:e.githubUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center border border-(--border-color) px-3 py-2 text-[10px] font-bold uppercase tracking-[0.08em] text-(--text-primary)",children:d("labels.github")}),e.twitterUrl?(0,n.jsx)("a",{href:e.twitterUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center border border-(--border-color) px-3 py-2 text-[10px] font-bold uppercase tracking-[0.08em] text-(--text-primary)",children:d("scorePost")}):null]}),e.externalLinks.length>0?(0,n.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,n.jsx)(y,{children:d("labels.sources")}),(0,n.jsx)(j,{links:e.externalLinks})]}):null]}):null]})},"default",0,function({row:e,displayRank:t,voteCell:r}){let[a,s]=(0,l.useState)(!1),x=(0,c.useLocale)(),g=(0,o.useTranslations)("LeaderboardRow"),w=1===e.currentRank?"var(--tier-gold)":2===e.currentRank?"var(--tier-silver)":3===e.currentRank?"var(--tier-bronze)":"var(--accent-green)",N=e.tags.slice(0,2);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("tr",{className:"leaderboard-row group transition-colors hover:bg-(--bg-card-hover) cursor-pointer",onClick:()=>s(e=>!e),children:[(0,n.jsxs)("td",{className:"relative w-20 border-b border-(--border-color) px-6 py-3 font-bold text-(--accent-green)",style:{color:w},children:[(0,n.jsx)("div",{className:"absolute left-0 top-1/2 h-6 w-0.75 -translate-y-1/2 shadow-(--rank-glow)",style:{backgroundColor:w}}),t]}),(0,n.jsx)("td",{className:"border-b border-(--border-color) px-6 py-3",children:(0,n.jsxs)(i.Link,{href:`/projects/${e.projectId}`,className:"group/link flex min-w-0 flex-col gap-2",onClick:e=>e.stopPropagation(),children:[(0,n.jsxs)("span",{className:"flex min-w-0 items-center gap-2 overflow-x-auto whitespace-nowrap pb-1",children:[(0,n.jsx)("span",{className:"shrink-0 text-[16px] font-semibold transition-colors text-(--text-primary) group-hover/link:text-(--accent-green)",children:e.name}),(0,n.jsx)("span",{className:"shrink-0 text-[11px] text-(--text-tertiary)",children:e.author}),N.length>0?N.map(e=>(0,n.jsx)("span",{className:"inline-flex min-w-0 shrink-0 items-center border border-(--border-color) bg-(--bg-card-hover) px-2 py-0.5 text-[10px] font-bold uppercase tracking-[0.14em] text-(--text-secondary)",children:(0,n.jsx)("span",{className:"truncate",children:e})},e)):null]}),e.description?(0,n.jsx)("span",{className:"oa-line-clamp-2 max-w-[54ch] text-[12px] leading-4 text-(--text-secondary)",children:(0,n.jsx)(m,{text:e.description})}):null]})}),(0,n.jsx)("td",{className:"border-b border-(--border-color) px-4 py-3",children:(0,n.jsx)("span",{className:"block text-[11px] leading-4 text-(--text-secondary)",children:h(e,x)??(0,n.jsx)("span",{className:"text-(--text-tertiary)",children:"â"})})}),(0,n.jsx)("td",{className:"border-b border-(--border-color) px-4 py-3",children:(0,n.jsx)(v,{category:e.category})}),(0,n.jsx)("td",{className:"border-b border-(--border-color) px-4 py-3",children:(0,n.jsx)(f,{row:e})}),(0,n.jsx)("td",{className:"border-b border-(--border-color) px-4 py-3 text-[11px] font-semibold",children:b(e.rankChange,g("notAvailable"))}),(0,n.jsx)("td",{className:"border-b border-(--border-color) px-4 py-3",children:(0,n.jsx)(p,{lit:u(e),source:e.signalSources?.gh===!1?"closed":"open"})}),void 0!==r?(0,n.jsx)("td",{className:"border-b border-(--border-color) px-3 py-3",onClick:e=>e.stopPropagation(),children:r}):null,(0,n.jsx)("td",{className:"border-b border-(--border-color) pr-5 py-3",children:(0,n.jsx)("span",{className:"flex items-center justify-end",children:(0,n.jsx)("span",{className:"inline-flex items-center justify-center w-6 h-6 rounded-full text-[10px] leading-none text-(--text-tertiary) transition-all duration-200 select-none group-hover:bg-(--bg-card-hover) group-hover:text-(--text-secondary)",style:{transform:a?"rotate(90deg)":"rotate(0deg)"},children:"â¶"})})})]}),a&&(0,n.jsx)("tr",{className:"leaderboard-row bg-(--bg-card-hover)",children:(0,n.jsx)("td",{colSpan:void 0!==r?9:8,className:"border-b border-(--border-color) px-6 py-5",children:(0,n.jsxs)("div",{className:"space-y-3.5 text-[12px]",children:[(0,n.jsxs)("div",{className:"flex items-start gap-3",children:[(0,n.jsx)(y,{children:g("labels.scoreTrend")}),(0,n.jsx)(i.Link,{href:`/projects/${e.projectId}`,className:"text-(--accent-green) hover:underline",onClick:e=>e.stopPropagation(),children:g("viewDailyScoreHistory")})]}),h(e,x)?(0,n.jsxs)("div",{className:"flex items-start gap-3",children:[(0,n.jsx)(y,{children:g("labels.scenario")}),(0,n.jsx)("span",{className:"text-(--text-secondary)",children:h(e,x)})]}):null,(0,n.jsxs)("div",{className:"flex items-start gap-3",children:[(0,n.jsx)(y,{children:g("labels.category")}),(0,n.jsx)("span",{className:"text-(--text-secondary)",children:(0,d.getProjectCategoryLabel)(e.category,x)})]}),(0,n.jsxs)("div",{className:"flex items-start gap-3",children:[(0,n.jsx)(y,{children:g("labels.community")}),(0,n.jsxs)("span",{className:"flex flex-wrap gap-2 text-(--text-secondary)",children:[(0,n.jsx)("span",{children:g("communityLikes",{count:e.likeCount})}),(0,n.jsx)("span",{children:"/"}),(0,n.jsx)("span",{children:g("communityBookmarks",{count:e.bookmarkCount})}),(0,n.jsx)("span",{children:"/"}),(0,n.jsx)("span",{children:g("communityThreads",{count:e.discussionThreadCount})})]})]}),e.websiteUrl?(0,n.jsxs)("div",{className:"flex items-start gap-3",children:[(0,n.jsx)(y,{children:g("labels.website")}),(0,n.jsx)("a",{href:e.websiteUrl,target:"_blank",rel:"noopener noreferrer",className:"text-(--accent-green) hover:underline break-all",onClick:e=>e.stopPropagation(),children:e.websiteUrl})]}):null,(0,n.jsxs)("div",{className:"flex items-start gap-3",children:[(0,n.jsx)(y,{children:g("labels.github")}),(0,n.jsx)("a",{href:e.githubUrl,target:"_blank",rel:"noopener noreferrer",className:"text-(--accent-green) hover:underline break-all",children:e.githubUrl})]}),e.description&&(0,n.jsxs)("div",{className:"flex items-start gap-3",children:[(0,n.jsx)(y,{children:g("labels.intro")}),(0,n.jsx)("span",{className:"text-(--text-secondary) leading-relaxed",children:(0,n.jsx)(m,{text:e.description})})]}),(0,n.jsxs)("div",{className:"flex items-start gap-3",children:[(0,n.jsx)(y,{children:g("labels.submitted")}),(0,n.jsx)("span",{className:"text-(--text-secondary)",children:e.submitted})]}),e.externalLinks.length>0&&(0,n.jsxs)("div",{className:"flex items-start gap-3",children:[(0,n.jsx)(y,{children:g("labels.sources")}),(0,n.jsx)(j,{links:e.externalLinks})]})]})})})]})}],272252)},93796,e=>{"use strict";var t=e.i(473401),r=e.i(408996),a=e.i(850410),s=e.i(590818),n=e.i(272252),l=e.i(861426),o=e.i(70186),i=e.i(666439);let c=(0,i.createServerReference)("4029769f708a4bfc85188f89f377d5f0ec5c2d2c4b",i.callServer,void 0,i.findSourceMapURL,"castHzGeneralVoteAction");var d=e.i(456904),x=e.i(403367);function p(e){return`[font-family:var(--font-stack)] inline-flex min-w-0 flex-1 items-center justify-center border px-3 py-2 text-[11px] font-semibold uppercase tracking-[0.08em] transition-colors sm:min-w-20 sm:flex-none sm:tracking-[0.14em] ${e?"pointer-events-none border-(--border-color) text-(--text-tertiary)":"cursor-pointer border-(--text-secondary) bg-transparent text-(--text-primary) hover:border-(--accent-green) hover:text-(--accent-green)"}`}e.s(["default",0,function({boards:e,activeSlug:i,rows:m,categoryCounts:u,initialPage:h,initialSearchQuery:b,initialCategory:g,hzVote:f=null}){let j=(0,s.useTranslations)("Leaderboard"),y=(0,a.useLocale)(),v=(0,l.normalizeProjectCategory)(g),[w,N]=(0,r.useState)(b),[k,S]=(0,r.useState)(v),[C,L]=(0,r.useState)(Math.max(1,Math.floor(h))),T=(0,r.useMemo)(()=>(0,o.getProjectSearchTerms)(w),[w]),[$,P]=(0,r.useState)(()=>new Set(f?.votedProjectIds??[])),[_,z]=(0,r.useState)(f?.remaining??0),M=(0,r.useMemo)(()=>new Set(f?.ownProjectIds??[]),[f]),[I,A]=(0,r.useState)(null),[U,R]=(0,r.useState)(""),[E,B]=(0,r.useTransition)(),D=f?.status==="OPEN",V=!!(D&&f?.eligible),F=!!(D&&f?.signedIn),O=e=>{if(!V)return null;let r=$.has(e.projectId),a=M.has(e.projectId);if(r)return(0,t.jsxs)("span",{className:"inline-flex cursor-default items-center gap-1 border border-[var(--tier-gold)] bg-[linear-gradient(135deg,rgba(240,193,75,0.3),rgba(240,193,75,0.1))] px-3 py-1.5 text-[10px] font-bold uppercase tracking-[0.14em] text-[var(--tier-gold)] shadow-[0_0_12px_rgba(240,193,75,0.35)]",title:j("hzVote.votedTitle"),children:["â
",j("hzVote.voted")]});if(a)return(0,t.jsxs)("span",{className:"inline-flex cursor-not-allowed items-center gap-1 border border-(--border-color) px-3 py-1.5 text-[10px] font-bold uppercase tracking-[0.14em] text-(--text-tertiary) opacity-60",title:j("hzVote.ownProject"),children:["ð¥ ",j("hzVote.vote")]});let s=_<=0;return(0,t.jsxs)("button",{type:"button",disabled:s,onClick:t=>{t.stopPropagation(),R(""),A({projectId:e.projectId,name:e.name})},className:`[font-family:var(--font-stack)] inline-flex items-center gap-1 border px-3 py-1.5 text-[10px] font-bold uppercase tracking-[0.14em] transition-all ${s?"cursor-not-allowed border-(--border-color) text-(--text-tertiary) opacity-60":"cursor-pointer border-[#ff5722] bg-[linear-gradient(135deg,rgba(255,87,34,0.28),rgba(255,140,0,0.12))] text-[#ff7a45] shadow-[0_0_12px_rgba(255,87,34,0.35)] hover:scale-105 hover:shadow-[0_0_20px_rgba(255,87,34,0.6
1)] active:scale-95"}`,title:s?j("hzVote.noVotesLeft"):j("hzVote.voteTitle",{remaining:_}),children:["ð¥ ",j("hzVote.vote")]})},q=(0,r.useMemo)(()=>m.filter(e=>{if(k&&e.category!==k)return!1;if(0===T.length)return!0;let t=(0,l.getProjectCategoryLabel)(e.category,y),r=[e.name,e.author,e.websiteUrl??"",e.githubUrl,e.description,e.submitted,t,...e.tags,...e.externalLinks.map(e=>e.url)].join(" ").toLowerCase();return T.every(e=>r.includes(e.toLowerCase()))}),[k,y,m,T]),G=q.length,H=Math.max(1,Math.ceil(G/100)),W=Math.min(C,H),K=0===G?0:(W-1)*100+1,X=Math.min(G,100*W),Y=q.slice(0===K?0:K-1,X),Z=T.length>0,Q=k?(0,l.getProjectCategoryLabel)(k,y):j("categoryTabs.all");function J(e){let t=new URL(window.location.href),r=(e,r)=>{r?t.searchParams.set(e,r):t.searchParams.delete(e)};"q"in e&&r("q",e.q||void 0),"category"in e&&r("category",e.category),"page"in e&&r("page",e.page&&e.page>1?String(e.page):void 0),window.history.replaceState(null,"",t.toString())}let ee=(0,r.useRef)(null);function et(e){var t;N(e),L(1),t={q:e,page:1},ee.current&&clearTimeout(ee.current),ee.current=setTimeout(()=>J(t),300)}function er(e){L(e),J({page:e})}return(0,t.jsxs)("div",{className:"leaderboard-content w-full space-y-4",children:[(0,t.jsxs)("div",{className:"border border-(--border-color) bg-(--bg-card) p-3",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",children:[(0,t.jsx)(x.default,{boards:e,activeSlug:i,searchQuery:w}),(0,t.jsx)("span",{className:"hidden h-5 w-px bg-(--border-color) lg:block","aria-hidden":!0}),(0,t.jsx)("div",{className:"flex min-w-0 flex-1 gap-1.5 overflow-x-auto whitespace-nowrap pb-1",children:u.map(e=>{let r=e.value===k||!e.value&&!k;return(0,t.jsxs)("button",{type:"button",onClick:()=>{var t;S(t=e.value),L(1),J({category:t,page:1})},className:`[font-family:var(--font-stack)] inline-flex cursor-pointer items-center gap-2 border px-3 py-2 text-[10px] font-bold uppercase tracking-[0.08em] transition-colors ${r?"border-(--accent-green) bg-[var(--green-dim)] text-(--accent-green)":"border-(--border-color) bg-transparent text-(--text-secondary) hover:border-(--text-tertiary) hover:text-(--text-primary)"}`,children:[(0,t.jsx)("span",{children:e.value?(0,l.getProjectCategoryLabel)(e.value,y):j("categoryTabs.all")}),(0,t.jsx)("span",{className:"text-(--text-tertiary)",children:e.count})]},e.value??"ALL")})}),(0,t.jsxs)("form",{className:"grid min-w-0 grid-cols-[1fr_auto] gap-2 lg:w-[360px]",onSubmit:e=>e.preventDefault(),children:[(0,t.jsx)("div",{className:"min-w-0 border border-(--border-color) bg-(--bg-input) px-3 py-2",children:(0,t.jsx)("input",{type:"search",name:"q",value:w,placeholder:j("searchPlaceholder"),autoComplete:"off",className:"[font-family:var(--font-stack)] w-full border-none bg-transparent text-[12px] text-(--text-primary) outline-none placeholder:text-(--text-tertiary)",onChange:e=>et(e.target.value)})}),(0,t.jsx)("button",{type:"button",className:"[font-family:var(--font-stack)] inline-flex cursor-pointer items-center justify-center border border-(--border-color) bg-(--bg-card-hover) px-4 py-2 text-[10px] font-bold uppercase tracking-[0.14em] text-(--text-secondary) transition-all hover:border-(--text-tertiary) hover:text-(--text-primary)",onClick:()=>et(""),children:Z?j("clear"):j("search")})]})]}),(0,t.jsxs)("div",{className:"mt-3 flex flex-col gap-2 border-t border-(--border-color) pt-3 text-[11px] uppercase tracking-[0.14em] text-(--text-tertiary) sm:flex-row sm:items-center sm:justify-between",children:[(0,t.jsx)("span",{children:j("categorySummary",{category:Q,count:G})}),(0,t.jsx)("span",{className:"text-(--text-secondary)",children:Z?0===G?j("noResults",{searchQuery:w}):j("resultsCount",{startIndex:K,endIndex:X,totalCount:G}):0===G?j("empty"):j("showingRange",{startIndex:K,endIndex:X})})]})]}),F&&f?(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3 border-2 border-[var(--tier-gold)] bg-[linear-gradient(135deg,rgba(240,193,75,0.16),rgba(240,193,75,0.04))] px-4 py-3 shadow-[0_0_22px_rgba(240,193,75,0.35)]",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("div",{className:"text-[11px] font-bold uppercase tracking-[0.18em] text-[var(--tier-gold)]",children:j("hzVote.bannerTitle")}),(0,t.jsx)("div",{className:"mt-1 text-[11px] leading-5 text-(--text-secondary)",children:f.eligible?j("hzVote.bannerEligible",{remaining:_}):j("hzVote.bannerSpectator")})]}),(0,t.jsxs)(d.Link,{href:{pathname:"/live-votes",query:{event:f.eventSlug}},className:"group inline-flex shrink-0 items-center gap-2 border-2 border-[var(--tier-gold)] bg-[linear-gradient(135deg,rgba(240,193,75,0.25),rgba(240,193,75,0.08))] px-4 py-2 text-[11px] font-bold uppercase tracking-[0.18em] text-[var(--tier-gold)] no-underline shadow-[0_0_16px_rgba(240,193,75,0.4)] transition-all hover:scale-[1.03] hover:shadow-[0_0_28px_rgba(240,193,75,0.65)]",children:[(0,t.jsxs)("span",{className:"relative flex h-2.5 w-2.5",children:[(0,t.jsx)("span",{className:"absolute inline-flex h-full w-full animate-ping bg-red-500 opacity-75",style:{borderRadius:"9999px"}}),(0,t.jsx)("span",{className:"relative inline-flex h-2.5 w-2.5 bg-red-500",style:{borderRadius:"9999px"}})]}),j("hzVote.liveVotes")]})]}):null,(0,t.jsx)("div",{className:"space-y-3 md:hidden",children:Y.map((e,r)=>(0,t.jsx)(n.LeaderboardMobileCard,{row:e,displayRank:String(e.currentRank??K+r).padStart(2,"0"),voteCell:V?O(e):null},e.githubUrl))}),(0,t.jsx)("div",{className:"leaderboard-table-shell hidden w-full overflow-x-auto md:block",children:(0,t.jsxs)("table",{className:"w-full min-w-[1040px] table-fixed border border-(--border-color) bg-(--bg-card) border-collapse",children:[(0,t.jsxs)("colgroup",{children:[(0,t.jsx)("col",{style:{width:"72px"}}),(0,t.jsx)("col",{}),(0,t.jsx)("col",{style:{width:"150px"}}),(0,t.jsx)("col",{style:{width:"118px"}}),(0,t.jsx)("col",{style:{width:"190px"}}),(0,t.jsx)("col",{style:{width:"108px"}}),(0,t.jsx)("col",{style:{width:"148px"}}),V?(0,t.jsx)("col",{style:{width:"116px"}}):null,(0,t.jsx)("col",{style:{width:"56px"}})]}),(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{className:"border-b-2 border-(--border-color) px-6 py-4 text-left text-[11px] uppercase tracking-widest text-(--text-secondary) whitespace-nowrap",children:j("columns.rank")}),(0,t.jsx)("th",{className:"border-b-2 border-(--border-color) px-6 py-4 text-left text-[11px] uppercase tracking-widest text-(--text-secondary)",children:j("columns.projectName")}
1),(0,t.jsx)("th",{className:"border-b-2 border-(--border-color) px-4 py-4 text-left text-[11px] uppercase tracking-widest text-(--text-secondary)",children:j("columns.scenario")}),(0,t.jsx)("th",{className:"border-b-2 border-(--border-color) px-4 py-4 text-left text-[11px] uppercase tracking-widest text-(--text-secondary)",children:j("columns.category")}),(0,t.jsxs)("th",{className:"border-b-2 border-(--border-color) px-4 py-4 text-left text-[11px] uppercase tracking-widest text-(--text-secondary) whitespace-nowrap",children:[(0,t.jsx)("span",{className:"text-(--accent-green)",children:j("columns.totalScore")}),(0,t.jsxs)("span",{className:"text-(--text-tertiary)",children:[" / ",j("columns.stars")]})]}),(0,t.jsx)("th",{className:"border-b-2 border-(--border-color) px-4 py-4 text-left text-[11px] uppercase tracking-widest text-(--text-secondary) whitespace-nowrap",children:j("columns.movement")}),(0,t.jsx)("th",{className:"border-b-2 border-(--border-color) px-4 py-4 text-left text-[11px] uppercase tracking-widest text-(--text-secondary) whitespace-nowrap",children:j("columns.sources")}),V?(0,t.jsx)("th",{className:"border-b-2 border-(--border-color) px-3 py-4 text-left text-[11px] uppercase tracking-widest text-[#ff7a45] whitespace-nowrap",children:j("hzVote.column")}):null,(0,t.jsx)("th",{className:"border-b-2 border-(--border-color) pr-5 py-4 text-right text-[11px] uppercase tracking-widest text-(--text-secondary) whitespace-nowrap",children:j("columns.details")})]})}),(0,t.jsx)("tbody",{children:Y.map((e,r)=>(0,t.jsx)(n.default,{row:e,displayRank:String(e.currentRank??K+r).padStart(2,"0"),voteCell:V?O(e):void 0},e.githubUrl))})]})}),(0,t.jsxs)("div",{className:"flex flex-col gap-4 border border-(--border-color) bg-(--bg-card) px-4 py-4 sm:flex-row sm:items-center sm:justify-between sm:px-6",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("p",{className:"text-[11px] uppercase tracking-[0.18em] text-(--text-secondary)",children:j("pageSectionTitle")}),(0,t.jsx)("p",{className:"mt-1 text-[13px] leading-5 text-(--text-primary) sm:text-sm",children:0===G?Z?j("noResults",{searchQuery:w}):j("empty"):j("resultsCount",{startIndex:K,endIndex:X,totalCount:G})})]}),(0,t.jsxs)("div",{className:"grid w-full grid-cols-2 gap-2 text-[11px] font-semibold uppercase tracking-[0.08em] sm:flex sm:w-auto sm:items-center sm:tracking-[0.14em]",children:[(0,t.jsx)("button",{type:"button",disabled:W<=1,className:p(W<=1),onClick:()=>er(1),children:j("pagination.first")}),(0,t.jsx)("button",{type:"button",disabled:W<=1,className:p(W<=1),onClick:()=>er(Math.max(1,W-1)),children:j("pagination.prev")}),(0,t.jsx)("span",{className:"col-span-2 row-start-1 min-w-0 text-center text-(--text-secondary) sm:row-auto sm:min-w-28",children:j("pagination.page",{currentPage:W,totalPages:H})}),(0,t.jsx)("button",{type:"button",disabled:W>=H,className:p(W>=H),onClick:()=>er(Math.min(H,W+1)),children:j("pagination.next")}),(0,t.jsx)("button",{type:"button",disabled:W>=H,className:p(W>=H),onClick:()=>er(H),children:j("pagination.last")})]})]}),I&&f?(0,t.jsx)("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/70 p-4",role:"dialog","aria-modal":"true",onClick:()=>E?null:A(null),children:(0,t.jsxs)("div",{className:"w-full max-w-md border-2 border-[#ff5722] bg-(--bg-card) p-6 shadow-[0_0_40px_rgba(255,87,34,0.35)]",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"mb-2 text-[11px] uppercase tracking-[0.18em] text-[#ff7a45]",children:["ð¥ ",j("hzVote.confirmTitle")]}),(0,t.jsx)("p",{className:"mb-2 text-[13px] leading-6 text-(--text-primary)",children:j("hzVote.confirmBody",{project:I.name})}),(0,t.jsx)("p",{className:"mb-4 text-[11px] uppercase tracking-[0.14em] text-(--text-tertiary)",children:j("hzVote.confirmRemaining",{remaining:_})}),U?(0,t.jsx)("div",{className:"mb-4 border border-red-500/50 bg-red-500/10 px-3 py-2 text-[12px] text-red-300",children:U}):null,(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-end gap-3",children:[(0,t.jsx)("button",{type:"button",disabled:E,onClick:()=>
1A(null),className:"[font-family:var(--font-stack)] cursor-pointer border border-(--border-color) px-4 py-2 text-[11px] font-bold uppercase tracking-[0.14em] text-(--text-secondary) transition-colors hover:text-(--text-primary) disabled:opacity-60",children:j("hzVote.cancel")}),(0,t.jsx)("button",{type:"button",disabled:E,onClick:()=>{f&&I&&!E&&(R(""),B(async()=>{let e=await c({eventSlug:f.eventSlug,projectId:I.projectId});e.success?(P(e=>{let t=new Set(e);return t.add(I.projectId),t}),z(e.remaining),A(null)):R(e.error)}))},className:"[font-family:var(--font-stack)] cursor-pointer border border-[#ff5722] bg-[linear-gradient(135deg,rgba(255,87,34,0.85),rgba(255,140,0,0.75))] px-4 py-2 text-[11px] font-bold uppercase tracking-[0.14em] text-black transition-all hover:shadow-[0_0_18px_rgba(255,87,34,0.6)] disabled:opacity-60",children:E?j("hzVote.confirming"):j("hzVote.confirm")})]})]})}):null]})}],93796)},664770,e=>{"use strict";var t=e.i(473401),r=e.i(408996),a=e.i(850410),s=e.i(590818),n=e.i(456904),l=e.i(88279),o=e.i(70186),i=e.i(403367);function c({label:e,allLabel:a,options:s,selected:n,onChange:l,multiple:o=!1,clearLabel:i,className:d=""}){let[x,p]=(0,r.useState)(!1),m=(0,r.useRef)(null),u=(0,r.useId)(),h=n.length>0;(0,r.useEffect)(()=>{if(!x)return;let e=e=>{m.current?.contains(e.target)||p(!1)},t=e=>{"Escape"===e.key&&p(!1)};return document.addEventListener("pointerdown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("pointerdown",e),document.removeEventListener("keydown",t)}},[x]);let b=s.filter(e=>n.includes(e.value)),g=0===b.length?a:1===b.length?b[0].label:`${b.length}`;return(0,t.jsxs)("div",{ref:m,className:`relative ${d}`,children:[(0,t.jsxs)("button",{type:"button","aria-haspopup":"listbox","aria-expanded":x,"aria-controls":u,onClick:()=>p(e=>!e),className:`[font-family:var(--font-stack)] inline-flex h-11 w-full cursor-pointer items-center justify-between gap-3 border bg-(--bg-card) px-3 text-[11px] tracking-[0.08em] transition-colors md:h-9 md:w-auto ${h?"border-(--text-secondary) text-(--text-primary)":"border-(--border-color) text-(--text-secondary) hover:border-(--text-tertiary) hover:text-(--text-primary)"}`,children:[(0,t.jsxs)("span",{className:"inline-flex min-w-0 items-center gap-2",children:[(0,t.jsx)("span",{className:"shrink-0 text-[10px] uppercase tracking-[0.14em] text-(--text-tertiary)",children:e}),(0,t.jsx)("span",{className:`truncate ${h?"font-bold":""}`,children:g})]}),(0,t.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",stroke:"currentColor",strokeWidth:"1.5","aria-hidden":!0,className:"shrink-0 transition-transform",style:{transform:x?"rotate(180deg)":"none"},children:(0,t.jsx)("path",{d:"M2 3.5 5 6.5 8 3.5"})})]}),x?(0,t.jsxs)("div",{id:u,role:"listbox","aria-multiselectable":o,className:"absolute left-0 top-full z-30 -mt-px flex w-full min-w-[220px] flex-col border border-(--text-secondary) bg-(--bg-card) md:w-auto",children:[s.map(e=>{let r=n.includes(e.value);return(0,t.jsxs)("button",{type:"button",role:"option","aria-selected":r,onClick:()=>{var t;return t=e.value,void(o?l(n.includes(t)?n.filter(e=>e!==t):[...n,t]):(l(n.includes(t)?[]:[t]),p(!1)))},className:`[font-family:var(--font-stack)] flex cursor-pointer items-center gap-2.5 border-0 border-b border-(--border-color) bg-transparent px-3 py-2.5 text-left text-[11px] tracking-[0.08em] transition-colors last:border-b-0 hover:bg-(--bg-card-hover) ${r?"text-(--text-primary)":"text-(--text-secondary)"}`,children:[(0,t.jsx)("span",{className:`inline-flex h-3.5 w-3.5 shrink-0 items-center justify-center border ${o?"":"rounded-full"} ${r?"border-(--accent-green)":"border-(--text-tertiary)"}`,"aria-hidden":!0,children:r?(0,t.jsx)("span",{className:`block bg-(--accent-green) ${o?"h-2 w-2":"h-1.5 w-1.5 rounded-full"}`}):null}),e.color?(0,t.jsx)("span",{className:"inline-block h-2 w-2 shrink-0",style:{background:e.color},"aria-hidden":!0}):null,(0,t.jsx)("span",{className:"truncate",children:e.label})]},e.value)}),h&&i?(0,t.jsx)("button",{type:"button",onClick:()=>{l([]),p(!1)}
1,className:"[font-family:var(--font-stack)] cursor-pointer border-0 border-t border-(--border-color) bg-transparent px-3 py-2 text-left text-[10px] uppercase tracking-[0.08em] text-(--text-tertiary) hover:text-(--text-primary)",children:i}):null]}):null]})}var d=e.i(272252),x=e.i(568543);let p="border-b border-(--border-color) px-4 py-3.5";function m({scenario:e,onClick:r,className:n=""}){let o=(0,s.useTranslations)("Arena"),i=(0,a.useLocale)();if(!e)return(0,t.jsx)("span",{className:`text-[11px] text-(--text-tertiary) ${n}`,children:o("scenarioNone")});let c=(0,l.getScenarioLabel)(e,i);return r?(0,t.jsx)("button",{type:"button",title:o("scenarioFilterTitle"),className:`[font-family:var(--font-stack)] cursor-pointer border-0 bg-transparent p-0 text-left text-[11px] leading-4 text-(--text-secondary) transition-colors hover:text-(--accent-green) hover:underline ${n}`,onClick:t=>{t.stopPropagation(),r(e)},children:c}):(0,t.jsx)("span",{className:`text-[11px] text-(--text-secondary) ${n}`,children:c})}function u(e){let t=new Set;return"open"===e.classification.source&&t.add("GH"),(e.twitterUrl||e.externalLinks.some(e=>"x"===e.source))&&t.add("X"),e.externalLinks.some(e=>/linkedin\.com/i.test(e.url))&&t.add("LI"),t}function h(e){return"zh"===(0,a.useLocale)()&&e.descriptionZh||e.description}function b(e){let t=new Date(e),r=t.getUTCFullYear(),a=String(t.getUTCMonth()+1).padStart(2,"0"),s=String(t.getUTCDate()).padStart(2,"0");return`${r}.${a}.${s}`}function g({children:e}){return(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-[0.14em] text-(--text-secondary)",children:e})}function f({history:e}){let r=(0,x.formatDelta)(e);return r?(0,t.jsx)("span",{className:`text-[11px] ${"up"===r.tone?"text-(--accent-green)":"down"===r.tone?"text-(--accent-red)":"text-(--text-secondary)"}`,children:r.text}):(0,t.jsx)("span",{className:"text-[11px] text-(--text-tertiary)",children:"â"})}function j({row:e,stacked:r=!1}){let o=(0,s.useTranslations)("Arena"),i=(0,a.useLocale)(),c=e.classification,p=(0,l.getProjectTypeDefinition)(c.type),m=h(e);return(0,t.jsxs)("div",{className:`grid gap-4 text-[11px] ${r?"grid-cols-1":"grid-cols-1 lg:grid-cols-3"}`,children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2.5",children:[e.websiteUrl?(0,t.jsxs)("div",{children:[(0,t.jsx)(g,{children:o("detail.website")}),(0,t.jsx)("a",{href:e.websiteUrl,target:"_blank",rel:"noopener noreferrer",className:"break-all text-(--accent-green) hover:underline",onClick:e=>e.stopPropagation(),children:e.websiteUrl})]}):null,(0,t.jsxs)("div",{children:[(0,t.jsx)(g,{children:o("detail.github")}),(0,t.jsx)("a",{href:e.githubUrl,target:"_blank",rel:"noopener noreferrer",className:"break-all text-(--accent-green) hover:underline",onClick:e=>e.stopPropagation(),children:e.githubUrl.replace(/^https?:\/\//,"")})]}),e.githubCreatedAt?(0,t.jsxs)("div",{children:[(0,t.jsx)(g,{children:o("detail.repoCreated")}),(0,t.jsx)("div",{className:"text-(--text-primary)",children:b(e.githubCreatedAt)})]}):null,(0,t.jsxs)("div",{children:[(0,t.jsx)(g,{children:o("detail.submitted")}),(0,t.jsx)("div",{className:"text-(--text-primary)",children:e.submitted})]})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2.5",children:[m?(0,t.jsxs)("div",{children:[(0,t.jsx)(g,{children:o("detail.intro")}),(0,t.jsx)("div",{className:"leading-[1.6] text-(--text-secondary)",children:(0,t.jsx)(d.BoldText,{text:m})})]}):null,(0,t.jsxs)("div",{children:[(0,t.jsx)(g,{children:o("detail.typeArena")}),(0,t.jsxs)("div",{className:"text-(--text-primary)",children:[c.scenario?(0,l.getScenarioLabel)(c.scenario,i):o("scenarioNone")," ·"," ",c.typeExplicit||"other"!==c.type?p.label:o("typeUnclassified")," · ",c.source,"none"!==c.p11?` \xb7 P-11 ${c.p11}`:""]})]}),e.displayTags.length>0?(0,t.jsxs)("div",{children:[(0,t.jsx)(g,{children:o("detail.tags")}),(0,t.jsx)("div",{className:"mt-1 flex flex-wrap gap-1",children:e.displayTags.map(e=>(0,t.jsx)("span",{className:"inline-flex h-5 items-center border border-(--border-color) bg-(--bg-card-hover) px-1.5 text-[10px] uppercase tracking-[0.08em] text-(--text-secondary)",children:e},e))})]}):null]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(g,{children:o("detail.sources")}),(0,t.jsx)("div",{className:"mt-1",children:(0,t.jsx)(x.SourceSlots,{lit:u(e),source:c.source})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(g,{children:o("detail.scoreTrend")}),(0,t.jsx)(n.Link,{href:`/projects/${e.projectId}`,className:"text-(--accent-green) hover:underline",onClick:e=>e.stopPropagation(),children:o("detail.viewHistory")})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(g,{children:o("detail.community")}),(0,t.jsx)("div",{className:"text-(--text-secondary)",children:o("detail.communityLine",{likes:e.likeCount,bookmarks:e.bookmarkCount,threads:e.discussionThreadCount})})]})]})]})}function y({row:e,rank:a,tie:l,onScenarioClick:o}){let[i,c]=(0,r.useState)(!1),g=(0,s.useTranslations)("Arena"),v=e.classification,w=(0,x.rankColor)(a),N="open"===v.source?"var(--accent-green)":"var(--text-secondary)",k=h(e);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("tr",{className:`group cursor-pointer transition-colors hover:bg-(--bg-card-hover) ${i?"bg-[var(--green-dim)]":""}`,onClick:()=>c(e=>!e),children:[(0,t.jsxs)("td",{className:`${p} relative px-6 text-[16px] font-bold`,style:{color:w},children:[(0,t.jsx)("div",{className:"absolute left-0 top-1/2 h-6 w-0.75 -translate-y-1/2 shadow-(--rank-glow)",style:{backgroundColor:w}}),null==a?"â":String(a).padStart(2,"0")]}),(0,t.jsx)("td",{className:p,children:(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-1",children:[(0,t.jsxs)("span",{className:"flex min-w-0 items-baseline gap-2",children:[(0,t.jsx)(n.Link,{href:`/projects/${e.projectId}`,className:"min-w-0 shrink truncate text-[13px] font-semibold text-(--text-primary) no-underline transition-colors hover:text-(--accent-green)",onClick:e=>e.stopPropagation(),children:e.name}),(0,t.jsx)(x.OrgBadge,{org:v.org}),(0,t.jsx)("span",{className:"shrink-0 truncate text-[11px] text-(--text-tertiary)",children:e.author})]}),k?(0,t.jsx)("span",{className:"oa-line-clamp-2 max-w-[54ch] text-[12px] leading-4 text-(--text-secondary)",children:(0,t.jsx)(d.BoldText,{text:k})}):null,"none"!==v.p11||l?(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,t.jsx)(x.P11Badge,{status:v.p11}),l?(0,t.jsx)(x.TieChip,{}):null]}):null]})}),(0,t.jsx)("td",{className:p,children:(0,t.jsx)(m,{scenario:v.scenario,onClick:o})}),(0,t.jsx)("td",{className:p,children:(0,t.jsx)(x.TypeBadge,{type:v.type,explicit:v.typeExplicit||"other"!==v.type})}),(0,t.jsx)("td",{className:p,children:(0,t.jsxs)("div",{className:"flex flex-col items-start gap-1",children:[(0,t.jsx)(x.SourceBadge,{source:v.source,githubUrl:e.githubUrl}),e.githubCreatedAt?(0,t.jsx)("span",{className:"text-[10px] tracking-[0.04em] text-(--text-tertiary)",t
1itle:g("createdTitle"),children:b(e.githubCreatedAt)}):null]})}),(0,t.jsxs)("td",{className:`${p} whitespace-nowrap`,children:[(0,t.jsx)("span",{className:"text-[16px] font-bold text-(--accent-green)",children:(0,x.formatMomentum)(e.totalScore)}),(0,t.jsxs)("span",{className:"ml-2 text-[11px] text-(--text-tertiary)",children:["/ â
",(0,x.formatCompactCount)(e.githubStars)]})]}),(0,t.jsx)("td",{className:p,children:(0,t.jsxs)("span",{className:"inline-flex items-center gap-2",children:[(0,t.jsx)(x.Sparkline,{values:e.scoreHistory,width:60,height:18,color:N}),(0,t.jsx)(f,{history:e.scoreHistory})]})}),(0,t.jsx)("td",{className:p,children:(0,t.jsx)(x.SourceSlots,{lit:u(e),source:v.source})}),(0,t.jsx)("td",{className:`${p} pr-5 text-right`,children:(0,t.jsx)("button",{type:"button","aria-expanded":i,"aria-label":g("details"),className:"inline-flex h-6 w-6 cursor-pointer items-center justify-center rounded-full border-0 bg-transparent text-[10px] leading-none text-(--text-tertiary) transition-all duration-200 select-none group-hover:bg-(--bg-card-hover) group-hover:text-(--text-secondary)",style:{transform:i?"rotate(90deg)":"rotate(0deg)"},onClick:e=>{e.stopPropagation(),c(e=>!e)},children:"â¶"})})]}),i?(0,t.jsx)("tr",{className:"bg-(--bg-body)",children:(0,t.jsx)("td",{colSpan:9,className:"border-b border-(--border-color) px-6 py-5",children:(0,t.jsx)(j,{row:e})})}):null]})}function v({row:e,rank:a,tie:l,onScenarioClick:o}){let[i,c]=(0,r.useState)(!1),p=(0,s.useTranslations)("Arena"),g=e.classification,y=(0,x.rankColor)(a),w="open"===g.source?"var(--accent-green)":"var(--text-secondary)",N=h(e);return(0,t.jsxs)("article",{className:"border border-(--border-color) bg-(--bg-card)",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2 p-3",onClick:()=>c(e=>!e),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,t.jsx)("span",{className:"text-[16px] font-bold",style:{color:y},children:null==a?"â":String(a).padStart(2,"0")}),(0,t.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col",children:[(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[(0,t.jsx)(n.Link,{href:`/projects/${e.projectId}`,className:"min-w-0 shrink truncate text-[13px] font-semibold text-(--text-primary) no-underline",onClick:e=>e.stopPropagation(),children:e.name}),(0,t.jsx)(x.OrgBadge,{org:g.org})]}),(0,t.jsx)("span",{className:"truncate text-[10px] text-(--text-tertiary)",children:e.author})]}),(0,t.jsx)("span",{className:"text-[16px] font-bold text-(--text-primary)",children:(0,x.formatMomentum)(e.totalScore)}),(0,t.jsx)("button",{type:"button","aria-expanded":i,"aria-label":p("details"),className:"[font-family:var(--font-stack)] inline-flex h-6 w-6 cursor-pointer items-center justify-center border-0 bg-transparent text-[10px] text-(--text-tertiary) transition-transform",style:{transform:i?"rotate(90deg)":"none"},onClick:e=>{e.stopPropagation(),c(e=>!e)},children:"â¶"})]}),N?(0,t.jsx)("span",{className:"oa-line-clamp-2 text-[12px] leading-relaxed text-(--text-secondary)",children:(0,t.jsx)(d.BoldText,{text:N})}):null,g.scenario?(0,t.jsx)(m,{scenario:g.scenario,onClick:o}):null,(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,t.jsx)(x.TypeBadge,{type:g.type,explicit:g.typeExplicit||"other"!==g.type}),(0,t.jsx)(x.SourceBadge,{source:g.source,githubUrl:e.githubUrl}),e.githubCreatedAt?(0,t.jsx)("span",{className:"text-[10px] text-(--text-tertiary)",children:b(e.githubCreatedAt)}):null,l?(0,t.jsx)(x.TieChip,{}):null,(0,t.jsx)("span",{className:"ml-auto",children:(0,t.jsx)(x.P11Badge,{status:g.p11})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(x.Sparkline,{values:e.scoreHistory,color:w}),(0,t.jsx)(f,{history:e.scoreHistory}),(0,t.jsx)("span",{className:"ml-auto",children:(0,t.jsx)(x.SourceSlots,{lit:u(e),source:g.source,compact:!0})})]})]}),i?(0,t.jsx)("div",{className:"border-t border-(--border-color) p-3",children:(0,t.jsx)(j,{row:e,stacked:!0})}):null]})}function w({row:e}){let r=(0,s.useTranslations)("Arena"),a=e.classification,l=r(null==e.totalScore?"lc.reasonNoScore":e.isDownweighted?"lc.reasonDownweighted":"lc.reasonTagged");return(0,t.jsxs)("div",{className:"grid grid-cols-[32px_minmax(0,1fr)_auto] items-center gap-3 border-t border-(--border-color) bg-(--bg-body) px-4 py-3 sm:grid-cols-[40px_minmax(0,1fr)_auto_auto_auto] sm:px-6",children:[(0,t.jsx)("span",{className:"text-[12px] text-(--text-tertiary)",children:"â"}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,t.jsx)(n.Link,{href:`/projects/${e.projectId}`,className:"truncate text-[13px] font-semibold text-(--text-secondary) no-underline hover:text-(--text-primary)",children:e.name}),(0,t.jsx)("span",{className:"truncate text-[11px] text-(--text-secondary)",children:l})]}),(0,t.jsx)("span",{className:"hidden sm:inline-flex",children:(0,t.jsx)(x.TypeBadge,{type:a.type,explicit:a.typeExplicit||"other"!==a.type})}),(0,t.jsx)("span",{className:"hidden sm:inline-flex",children:(0,t.jsx)(x.SourceBadge,{source:a.source,githubUrl:e.githubUrl})}),(0,t.jsx)("span",{className:"inline-flex h-[22px] items-center gap-1.5 border border-[rgba(255,181,71,0.4)] bg-(--accent-amber-dim) px-2 text-[10px] font-bold uppercase tracking-[0.08em] text-(--accent-amber)",children:r("lc.tag")})]})}let N="border-b-2 border-(--border-color) px-4 py-4 text-left text-[11px] font-normal uppercase tracking-[0.14em] text-(--text-secondary)";e.s(["default",0,function({rows:e,boards:d,initialArena:x,initialScenarios:p=[],initialSource:m="all",initialTypes:u=[],initialAge:h,initialSearchQuery:b="",initialPage:g=1}){let f=(0,s.useTranslations)("Arena"),j=(0,a.useLocale)(),k=x??null,[S,C]=(0,r.useState)(()=>new Set(u)),[L,T]=(0,r.useState)(()=>new Set(p)),[$,P]=(0,r.useState)(h),[_,z]=(0,r.useState)(b),[M,I]=(0,r.useState)(Math.max(1,Math.floor(g))),[A,U]=(0,r.useState)(!1),R=(0,r.useMemo)(()=>(0,o.getProjectSearchTerms)(_),[_]),E=(0,r.useRef)(null);function B(e){let t=new URL(window.location.href),r=(e,r)=>{r?t.searchParams.set(e,r):t.searchParams.delete(e)};"scenario"in e&&r("scenario",e.scenario&&e.scenario.size>
10?[...e.scenario].join(","):void 0),"type"in e&&r("type",e.type&&e.type.size>0?[...e.type].join(","):void 0),"age"in e&&r("age",e.age),"q"in e&&r("q",e.q||void 0),"page"in e&&r("page",e.page&&e.page>1?String(e.page):void 0),window.history.replaceState(null,"",t.toString())}function D(e){let t=new Set(L);t.has(e)?t.delete(e):t.add(e),T(t),I(1),B({scenario:t,page:1})}function V(e){var t;z(e),I(1),t={q:e,page:1},E.current&&clearTimeout(E.current),E.current=setTimeout(()=>B(t),300)}function F(e){I(e),B({page:e})}let O=e=>(null==k||e.classification.arena===k)&&("all"===m||e.classification.source===m),q=(0,r.useMemo)(()=>e.filter(e=>O(e)&&!e.classification.lowConfidence),[e,k,m]),G=(0,r.useMemo)(()=>e.filter(e=>O(e)&&e.classification.lowConfidence),[e,k,m]),H=(0,r.useMemo)(()=>{let e=l.REPO_AGE_OPTIONS.find(e=>e.id===$);if(!e)return null;let t=Date.now();return{min:"maxDays"in e?t-864e5*e.maxDays:null,max:"minDays"in e?t-864e5*e.minDays:null}},[$]),W=e=>{if(S.size>0&&!S.has(e.classification.type))return!1;if(H){if(!e.githubCreatedAt)return!1;let t=new Date(e.githubCreatedAt).getTime();if(null!=H.min&&t<H.min||null!=H.max&&t>=H.max)return!1}if(L.size>0&&(!e.classification.scenario||!L.has(e.classification.scenario)))return!1;if(0===R.length)return!0;let t=[e.name,e.author,e.websiteUrl??"",e.githubUrl,e.description,e.descriptionZh,e.submitted,e.classification.type,e.classification.scenario??"",...e.displayTags,...e.externalLinks.map(e=>e.url)].join(" ").toLowerCase();return R.every(e=>t.includes(e.toLowerCase()))},K=q.filter(W),X=G.filter(W),Y=new Map,Z=new Set;
1K.forEach((e,t)=>{Y.set(e.projectId,t+1);let r=K[t-1];r&&null!=e.totalScore&&null!=r.totalScore&&e.totalScore.toFixed(1)===r.totalScore.toFixed(1)&&("verified"!==e.classification.p11||"verified"!==r.classification.p11)&&(Z.add(e.projectId),Z.add(r.projectId))});let Q=K.length,J=Math.max(1,Math.ceil(Q/20)),ee=Math.min(M,J),et=0===Q?0:(ee-1)*20+1,er=Math.min(Q,20*ee),ea=K.slice(0===et?0:et-1,er),es=R.length>0,en=0===q.length&&0===G.length;return(0,t.jsxs)("div",{className:"leaderboard-content w-full space-y-3",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2 md:flex-row md:flex-wrap md:items-center",children:[(0,t.jsx)(i.default,{boards:d,activeSlug:l.ARENA_VIEW_SLUG,searchQuery:_}),(0,t.jsx)("span",{className:"hidden h-5 w-px bg-(--border-color) md:block","aria-hidden":!0}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-2 md:contents",children:[(0,t.jsx)(c,{label:f("typeLabel"),allLabel:f("filterAll"),options:l.PROJECT_TYPE_DEFINITIONS.map(e=>({value:e.id,label:e.label,color:e.color})),selected:[...S],onChange:function(e){let t=new Set(e);C(t),I(1),B({type:t,page:1})},multiple:!0,clearLabel:f("clearTypes")}),(0,t.jsx)(c,{label:f("ageLabel"),allLabel:f("filterAll"),options:l.REPO_AGE_OPTIONS.map(e=>({value:e.id,label:f(`age.${e.id}`)})),selected:$?[$]:[],onChange:e=>{var t;P(t=e[0]),I(1),B({age:t,page:1})}})]}),[...L].map(e=>(0,t.jsxs)("button",{type:"button","aria-pressed":!0,title:f("scenarioFilterTitle"),onClick:()=>D(e),className:"[font-family:var(--font-stack)] inline-flex h-9 w-fit cursor-pointer items-center gap-1.5 border border-(--accent-green) bg-[var(--green-dim)] px-2.5 text-[11px] tracking-[0.08em] text-(--accent-green)",children:[(0,t.jsx)("span",{className:"text-[10px] uppercase text-(--text-secondary)",children:f("scenarioFilter")}
1),(0,l.getScenarioLabel)(e,j),(0,t.jsx)("span",{"aria-hidden":!0,children:"Ã"})]},e)),(0,t.jsxs)("form",{className:"grid min-w-0 grid-cols-[1fr_auto] gap-2 md:ml-auto md:w-[360px]",onSubmit:e=>e.preventDefault(),children:[(0,t.jsx)("input",{type:"search",name:"q",value:_,placeholder:f("searchPlaceholder"),autoComplete:"off",className:"[font-family:var(--font-stack)] h-11 min-w-0 border border-(--border-color) bg-(--bg-input) px-3 text-[16px] text-(--text-primary) outline-none placeholder:text-(--text-tertiary) md:h-9 md:text-[12px]",onChange:e=>V(e.target.value)}),(0,t.jsx)("button",{type:"button",className:"[font-family:var(--font-stack)] h-11 cursor-pointer border border-(--border-color) bg-transparent px-3.5 text-[11px] font-bold uppercase tracking-[0.08em] text-(--text-primary) transition-colors hover:border-(--text-tertiary) md:h-9",onClick:()=>V(""),children:es?f("clear"):f("search")})]})]}),en?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-3 border border-dashed border-(--border-color) bg-(--bg-card) px-6 py-14 text-center",children:[(0,t.jsxs)("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"1.5","aria-hidden":!0,children:[(0,t.jsx)("rect",{x:"6",y:"10",width:"28",height:"20"}),(0,t.jsx)("path",{d:"M6 16h28M12 22h8"})]}),(0,t.jsx)("div",{className:"text-[16px] font-bold uppercase tracking-[0.14em] text-(--text-primary)",children:f("empty.title")}),(0,t.jsx)(n.Link,{href:"/submit",className:"mt-2 inline-flex h-10 items-center bg-(--accent-green) px-5 text-[11px] font-bold uppercase tracking-[0.14em] text-(--on-accent) no-underline transition-opacity hover:opacity-90",children:f("empty.cta")})]}):(0,t.jsxs)("div",{className:"border border-(--border-color) bg-(--bg-card)",children:[(0,t.jsxs)("div",{className:"space-y-2 p-3 md:hidden",children:[ea.map(e=>(0,t.jsx)(v,{row:e,rank:Y.get(e.projectId)??null,tie:Z.has(e.projectId),onScenarioClick:D},e.projectId)),0===ea.length?(0,t.jsx)("p",{className:"px-1 py-6 text-center text-[12px] text-(--text-secondary)",children:es?f("noResults",{searchQuery:_}):"â"}):null]}),(0,t.jsx)("div",{className:"hidden overflow-x-auto md:block",children:(0,t.jsxs)("table",{className:"w-full min-w-[1040px] table-fixed border-collapse",children:[(0,t.jsxs)("colgroup",{children:[(0,t.jsx)("col",{style:{width:"76px"}}),(0,t.jsx)("col",{}),(0,t.jsx)("col",{style:{width:"168px"}}),(0,t.jsx)("col",{style:{width:"124px"}}),(0,t.jsx)("col",{style:{width:"88px"}}),(0,t.jsx)("col",{style:{width:"150px"}}),(0,t.jsx)("col",{style:{width:"136px"}}),(0,t.jsx)("col",{style:{width:"144px"}}),(0,t.jsx)("col",{style:{width:"56px"}})]}),(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{className:N,children:f("columns.rank")}),(0,t.jsx)("th",{className:N,children:f("columns.project")}),(0,t.jsx)("th",{className:N,children:f("columns.scenario")}),(0,t.jsx)("th",{className:N,children:f("typeLabel")}),(0,t.jsx)("th",{className:N,children:f("columns.openSource")}),(0,t.jsxs)("th",{className:`${N} whitespace-nowrap`,children:[(0,t.jsx)("span",{className:"text-(--accent-green)",children:f("columns.momentum")}),(0,t.jsxs)("span",{className:"text-(--text-tertiary)",children:[" / ",f("columns.stars")]})]}),(0,t.jsx)("th",{className:N,children:f("columns.movement")}),(0,t.jsx)("th",{className:N,children:f("columns.sources")}),(0,t.jsx)("th",{className:`${N} pr-5 text-right`,children:(0,t.jsx)("span",{className:"sr-only",children:f("details")})})]})}),(0,t.jsxs)("tbody",{children:[ea.map(e=>(0,t.jsx)(y,{row:e,rank:Y.get(e.projectId)??null,tie:Z.has(e.projectId),onScenarioClick:D},e.projectId)),0===ea.length?(0,t.jsx)("tr",{children:(0,t.jsx)("td",{colSpan:9,className:"px-6 py-10 text-center text-[12px] text-(--text-secondary)",children:es?f("noResults",{searchQuery:_}):"â"})}):null]})]})}),(0,t.jsxs)("div",{className:"flex flex-col gap-3 border-t border-(--border-color) bg-(--bg-body) px-4 py-3 sm:px-6 md:flex-row md:items-center",children:[(0,t.jsxs)("button",{type:"button","aria-expanded":A,onClick:()=>U(e=>!e),className:"[font-family:var(--font-stack)] inline-flex h-7 w-fit cursor-pointer items-center gap-2 border border-(--border-color) bg-transparent px-3 text-[11px] tracking-[0.14em] text-(--text-secondary) transition-colors hover:text-(--text-primary)",children:[(0,t.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",stroke:"currentColor",strokeWidth:"1.5","aria-hidden":!0,
1className:"transition-transform",style:{transform:A?"rotate(90deg)":"none"},children:(0,t.jsx)("path",{d:"M3.5 2 6.5 5 3.5 8"})}),f("lc.toggle",{count:X.length})]}),(0,t.jsx)("span",{className:"text-[11px] text-(--text-secondary) md:ml-auto",children:0===Q?es?f("noResults",{searchQuery:_}):"â":f("showing",{startIndex:et,endIndex:er,totalCount:Q})}),(0,t.jsxs)("div",{className:"flex items-center gap-1 text-[11px]",children:[(0,t.jsx)("button",{type:"button",disabled:ee<=1,onClick:()=>F(Math.max(1,ee-1)),"aria-label":f("pagination.prev"),className:"[font-family:var(--font-stack)] inline-flex h-7 w-7 cursor-pointer items-center justify-center border border-(--border-color) bg-transparent text-(--text-secondary) transition-colors hover:text-(--text-primary) disabled:cursor-default disabled:opacity-40",children:"â¹"}),(0,t.jsx)("span",{className:"inline-flex h-7 min-w-7 items-center justify-center border border-(--accent-green) px-2 text-(--accent-green)",children:ee}),(0,t.jsxs)("span",{className:"px-1 text-(--text-tertiary)",children:["/ ",J]}
1),(0,t.jsx)("button",{type:"button",disabled:ee>=J,onClick:()=>F(Math.min(J,ee+1)),"aria-label":f("pagination.next"),className:"[font-family:var(--font-stack)] inline-flex h-7 w-7 cursor-pointer items-center justify-center border border-(--border-color) bg-transparent text-(--text-secondary) transition-colors hover:text-(--text-primary) disabled:cursor-default disabled:opacity-40",children:"âº"})]})]}),A?(0,t.jsx)("div",{children:X.length>0?X.map(e=>(0,t.jsx)(w,{row:e},e.projectId)):(0,t.jsx)("p",{className:"border-t border-(--border-color) px-4 py-4 text-[11px] text-(--text-secondary) sm:px-6",children:f("lc.empty")})}):null]})]})}],664770)}]);
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.