Spaces:
Running
Running
Sync paperswithcode.co frontend
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- assets/{AgentLogos-BBl9UNVD.js → AgentLogos-j-Qekw7T.js} +1 -1
- assets/AiDeadlinesView--bEB1R4q.js +3 -0
- assets/AiDeadlinesView-BhXjtcbF.js +0 -3
- assets/ApiDocsView-DhYUFS5g.js +9 -0
- assets/ApiDocsView-hjoHKqpf.js +0 -9
- assets/{AreaSection-NWvfO4Sb.js → AreaSection-BxnKzNK0.js} +1 -1
- assets/{ArtifactWorkspace-Cwix1Wp6.js → ArtifactWorkspace-Ya79_F5k.js} +0 -0
- assets/AstraForRoboticsView-BZJ-P8S9.js +1 -0
- assets/AstraForRoboticsView-pQ4cp5_V.js +0 -1
- assets/AuthorAvatar-B-9xS2Wo.js +1 -0
- assets/AuthorAvatar-CUJMmp_z.js +0 -1
- assets/AuthorDetailView-BpcSKHs1.js +0 -1
- assets/AuthorDetailView-BykOxZh0.js +1 -0
- assets/AuthorizePaperEditView-D0e1jji8.js +0 -1
- assets/AuthorizePaperEditView-DNfre5z5.js +1 -0
- assets/AutonomousOperations-B4vSAvB8.js +1 -0
- assets/AutonomousOperations-CzJGtkdV.js +0 -1
- assets/BenchmarkDetailView-BGwBE1Ld.js +0 -2
- assets/BenchmarkDetailView-BObHaEFx.js +2 -0
- assets/{BenchmarkTrendSparkline-C135_NtS.js → BenchmarkTrendSparkline-DhXxdQ2D.js} +1 -1
- assets/{CatalogEntityPreviewLink-Cvehtzvn.js → CatalogEntityPreviewLink-BktpwL3_.js} +2 -2
- assets/{ChatView-DlSbJMKT.js → ChatView-D06zYumh.js} +0 -0
- assets/ConferenceDetailView-DgDeLFoO.js +1 -0
- assets/ConferenceDetailView-i-HB-ysc.js +0 -1
- assets/ConferenceTaskView-BZBMXZD8.js +0 -1
- assets/ConferenceTaskView-BvWfAecx.js +1 -0
- assets/ConferencesIndexView-Cw6IrAk5.js +0 -1
- assets/ConferencesIndexView-DJVYKUiz.js +1 -0
- assets/CronDashboard-CC1lPV3k.js +0 -36
- assets/CronDashboard-kqcQ1rzf.js +36 -0
- assets/{CronDashboard-B3Xofwvu.js → CronDashboard-qYV75PLc.js} +2 -2
- assets/{ExternalSourceEvalBadge-npO6bZ8N.js → ExternalSourceEvalBadge-K3r45EmO.js} +1 -1
- assets/FeedView-BR2dQQ-K.js +0 -1
- assets/FeedView-tA68x8iy.js +1 -0
- assets/FollowingView-Ctbw54vk.js +1 -0
- assets/FollowingView-nVVViEvV.js +0 -1
- assets/FrameworksIndexView-CQtYg5mA.js +0 -1
- assets/FrameworksIndexView-CZmHXkeL.js +1 -0
- assets/{Icon-D-kA0Owz.js → Icon-T4LYkEQj.js} +1 -1
- assets/{LatexTitle-Z-HGmZ-H.js → LatexTitle-Bkyz3jCs.js} +1 -1
- assets/{MarkdownText-Bj-G_S-B.js → MarkdownText-CUzPoC9Y.js} +1 -1
- assets/{McpShowcase-CMLfdJM2.js → McpShowcase-CLO4HLon.js} +1 -1
- assets/McpView-BrXaRo4V.js +0 -6
- assets/McpView-DYa6GKrp.js +6 -0
- assets/MethodDetailView-5wFkSBs8.js +1 -0
- assets/MethodDetailView-CEUGGyVV.js +0 -1
- assets/MethodsIndexView-DYp0dUSa.js +0 -6
- assets/MethodsIndexView-D_aKGLyJ.js +6 -0
- assets/{NotFound-DtzwOULp.js → NotFound-DV_nwcxG.js} +1 -1
- assets/OrganizationContributionGraph-DsoZR4EG.js +1 -0
assets/{AgentLogos-BBl9UNVD.js → AgentLogos-j-Qekw7T.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{j as e}from"./index-CbgxfyGU.js";const s="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='256'%20height='257'%20preserveAspectRatio='xMidYMid'%20viewBox='0%200%20256%20257'%3e%3cpath%20fill='%23D97757'%20d='m50.228%20170.321%2050.357-28.257.843-2.463-.843-1.361h-2.462l-8.426-.518-28.775-.778-24.952-1.037-24.175-1.296-6.092-1.297L0%20125.796l.583-3.759%205.12-3.434%207.324.648%2016.202%201.101%2024.304%201.685%2017.629%201.037%2026.118%202.722h4.148l.583-1.685-1.426-1.037-1.101-1.037-25.147-17.045-27.22-18.017-14.258-10.37-7.713-5.25-3.888-4.925-1.685-10.758%207-7.713%209.397.649%202.398.648%209.527%207.323%2020.35%2015.75L94.817%2091.9l3.889%203.24%201.555-1.102.195-.777-1.75-2.917-14.453-26.118-15.425-26.572-6.87-11.018-1.814-6.61c-.648-2.723-1.102-4.991-1.102-7.778l7.972-10.823L71.42%200%2082.05%201.426l4.472%203.888%206.61%2015.101%2010.694%2023.786%2016.591%2032.34%204.861%209.592%202.592%208.879.973%202.722h1.685v-1.556l1.36-18.211%202.528-22.36%202.463-28.776.843-8.1%204.018-9.722%207.971-5.25%206.222%202.981%205.12%207.324-.713%204.73-3.046%2019.768-5.962%2030.98-3.889%2020.739h2.268l2.593-2.593%2010.499-13.934%2017.628-22.036%207.778-8.749%209.073-9.657%205.833-4.601h11.018l8.1%2012.055-3.628%2012.443-11.342%2014.388-9.398%2012.184-13.48%2018.147-8.426%2014.518.778%201.166%202.01-.194%2030.46-6.481%2016.462-2.982%2019.637-3.37%208.88%204.148.971%204.213-3.5%208.62-20.998%205.184-24.628%204.926-36.682%208.685-.454.324.519.648%2016.526%201.555%207.065.389h17.304l32.21%202.398%208.426%205.574%205.055%206.805-.843%205.184-12.962%206.611-17.498-4.148-40.83-9.721-14-3.5h-1.944v1.167l11.666%2011.406%2021.387%2019.314%2026.767%2024.887%201.36%206.157-3.434%204.86-3.63-.518-23.526-17.693-9.073-7.972-20.545-17.304h-1.36v1.814l4.73%206.935%2025.017%2037.59%201.296%2011.536-1.814%203.76-6.481%202.268-7.13-1.297-14.647-20.544-15.1-23.138-12.185-20.739-1.49.843-7.194%2077.448-3.37%203.953-7.778%202.981-6.48-4.925-3.436-7.972%203.435-15.749%204.148-20.544%203.37-16.333%203.046-20.285%201.815-6.74-.13-.454-1.49.194-15.295%2020.999-23.267%2031.433-18.406%2019.702-4.407%201.75-7.648-3.954.713-7.064%204.277-6.286%2025.47-32.405%2015.36-20.092%209.917-11.6-.065-1.686h-.583L44.07%20198.125l-12.055%201.555-5.185-4.86.648-7.972%202.463-2.593%2020.35-13.999-.064.065Z'/%3e%3c/svg%3e",a="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='256'%20height='257'%20preserveAspectRatio='xMidYMid'%20viewBox='0%200%20256%20257'%3e%3cpath%20fill='%23D97757'%20d='m50.228%20170.321%2050.357-28.257.843-2.463-.843-1.361h-2.462l-8.426-.518-28.775-.778-24.952-1.037-24.175-1.296-6.092-1.297L0%20125.796l.583-3.759%205.12-3.434%207.324.648%2016.202%201.101%2024.304%201.685%2017.629%201.037%2026.118%202.722h4.148l.583-1.685-1.426-1.037-1.101-1.037-25.147-17.045-27.22-18.017-14.258-10.37-7.713-5.25-3.888-4.925-1.685-10.758%207-7.713%209.397.649%202.398.648%209.527%207.323%2020.35%2015.75L94.817%2091.9l3.889%203.24%201.555-1.102.195-.777-1.75-2.917-14.453-26.118-15.425-26.572-6.87-11.018-1.814-6.61c-.648-2.723-1.102-4.991-1.102-7.778l7.972-10.823L71.42%200%2082.05%201.426l4.472%203.888%206.61%2015.101%2010.694%2023.786%2016.591%2032.34%204.861%209.592%202.592%208.879.973%202.722h1.685v-1.556l1.36-18.211%202.528-22.36%202.463-28.776.843-8.1%204.018-9.722%207.971-5.25%206.222%202.981%205.12%207.324-.713%204.73-3.046%2019.768-5.962%2030.98-3.889%2020.739h2.268l2.593-2.593%2010.499-13.934%2017.628-22.036%207.778-8.749%209.073-9.657%205.833-4.601h11.018l8.1%2012.055-3.628%2012.443-11.342%2014.388-9.398%2012.184-13.48%2018.147-8.426%2014.518.778%201.166%202.01-.194%2030.46-6.481%2016.462-2.982%2019.637-3.37%208.88%204.148.971%204.213-3.5%208.62-20.998%205.184-24.628%204.926-36.682%208.685-.454.324.519.648%2016.526%201.555%207.065.389h17.304l32.21%202.398%208.426%205.574%205.055%206.805-.843%205.184-12.962%206.611-17.498-4.148-40.83-9.721-14-3.5h-1.944v1.167l11.666%2011.406%2021.387%2019.314%2026.767%2024.887%201.36%206.157-3.434%204.86-3.63-.518-23.526-17.693-9.073-7.972-20.545-17.304h-1.36v1.814l4.73%206.935%2025.017%2037.59%201.296%2011.536-1.814%203.76-6.481%202.268-7.13-1.297-14.647-20.544-15.1-23.138-12.185-20.739-1.49.843-7.194%2077.448-3.37%203.953-7.778%202.981-6.48-4.925-3.436-7.972%203.435-15.749%204.148-20.544%203.37-16.333%203.046-20.285%201.815-6.74-.13-.454-1.49.194-15.295%2020.999-23.267%2031.433-18.406%2019.702-4.407%201.75-7.648-3.954.713-7.064%204.277-6.286%2025.47-32.405%2015.36-20.092%209.917-11.6-.065-1.686h-.583L44.07%20198.125l-12.055%201.555-5.185-4.86.648-7.972%202.463-2.593%2020.35-13.999-.064.065Z'/%3e%3c/svg%3e",h="data:image/svg+xml,%3csvg%20fill='%23111'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eCodex%3c/title%3e%3cpath%20clip-rule='evenodd'%20d='M8.086.457a6.105%206.105%200%20013.046-.415c1.333.153%202.521.72%203.564%201.7a.117.117%200%2000.107.029c1.408-.346%202.762-.224%204.061.366l.063.03.154.076c1.357.703%202.33%201.77%202.918%203.198.278.679.418%201.388.421%202.126a5.655%205.655%200%2001-.18%201.631.167.167%200%2000.04.155%205.982%205.982%200%20011.578%202.891c.385%201.901-.01%203.615-1.183%205.14l-.182.22a6.063%206.063%200%2001-2.934%201.851.162.162%200%2000-.108.102c-.255.736-.511%201.364-.987%201.992-1.199%201.582-2.962%202.462-4.948%202.451-1.583-.008-2.986-.587-4.21-1.736a.145.145%200%2000-.14-.032c-.518.167-1.04.191-1.604.185a5.924%205.924%200%2001-2.595-.622%206.058%206.058%200%2001-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74%207.74%200%2001-.495-1.283%206.11%206.11%200%2001-.017-3.064.166.166%200%2000.008-.074.115.115%200%2000-.037-.064%205.958%205.958%200%2001-1.38-2.202%205.196%205.196%200%2001-.333-1.589%206.915%206.915%200%2001.188-2.132c.45-1.484%201.309-2.648%202.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129%200%2000.087-.087A6.016%206.016%200%20015.635%202.31C6.315%201.464%207.132.846%208.086.457zm-.804%207.85a.848.848%200%2000-1.473.842l1.694%202.965-1.688%202.848a.849.849%200%20001.46.864l1.94-3.272a.849.849%200%2000.007-.854l-1.94-3.393zm5.446%206.24a.849.849%200%20000%201.695h4.848a.849.849%200%20000-1.696h-4.848z'%3e%3c/path%3e%3c/svg%3e",o="data:image/svg+xml,%3csvg%20fill='%23fff'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eCodex%3c/title%3e%3cpath%20clip-rule='evenodd'%20d='M8.086.457a6.105%206.105%200%20013.046-.415c1.333.153%202.521.72%203.564%201.7a.117.117%200%2000.107.029c1.408-.346%202.762-.224%204.061.366l.063.03.154.076c1.357.703%202.33%201.77%202.918%203.198.278.679.418%201.388.421%202.126a5.655%205.655%200%2001-.18%201.631.167.167%200%2000.04.155%205.982%205.982%200%20011.578%202.891c.385%201.901-.01%203.615-1.183%205.14l-.182.22a6.063%206.063%200%2001-2.934%201.851.162.162%200%2000-.108.102c-.255.736-.511%201.364-.987%201.992-1.199%201.582-2.962%202.462-4.948%202.451-1.583-.008-2.986-.587-4.21-1.736a.145.145%200%2000-.14-.032c-.518.167-1.04.191-1.604.185a5.924%205.924%200%2001-2.595-.622%206.058%206.058%200%2001-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74%207.74%200%2001-.495-1.283%206.11%206.11%200%2001-.017-3.064.166.166%200%2000.008-.074.115.115%200%2000-.037-.064%205.958%205.958%200%2001-1.38-2.202%205.196%205.196%200%2001-.333-1.589%206.915%206.915%200%2001.188-2.132c.45-1.484%201.309-2.648%202.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129%200%2000.087-.087A6.016%206.016%200%20015.635%202.31C6.315%201.464%207.132.846%208.086.457zm-.804%207.85a.848.848%200%2000-1.473.842l1.694%202.965-1.688%202.848a.849.849%200%20001.46.864l1.94-3.272a.849.849%200%2000.007-.854l-1.94-3.393zm5.446%206.24a.849.849%200%20000%201.695h4.848a.849.849%200%20000-1.696h-4.848z'%3e%3c/path%3e%3c/svg%3e",r="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='cursor_light__Ebene_1'%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20viewBox='0%200%20466.73%20532.09'%3e%3c!--Generator:%20Adobe%20Illustrator%2029.6.1,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%202.1.1%20Build%209)--%3e%3cdefs%3e%3cstyle%3e.cursor_light__st0{fill:%2326251e}%3c/style%3e%3c/defs%3e%3cpath%20class='cursor_light__st0'%20d='M457.43,125.94L244.42,2.96c-6.84-3.95-15.28-3.95-22.12,0L9.3,125.94c-5.75,3.32-9.3,9.46-9.3,16.11v247.99c0,6.65,3.55,12.79,9.3,16.11l213.01,122.98c6.84,3.95,15.28,3.95,22.12,0l213.01-122.98c5.75-3.32,9.3-9.46,9.3-16.11v-247.99c0-6.65-3.55-12.79-9.3-16.11h-.01ZM444.05,151.99l-205.63,356.16c-1.39,2.4-5.06,1.42-5.06-1.36v-233.21c0-4.66-2.49-8.97-6.53-11.31L24.87,145.67c-2.4-1.39-1.42-5.06,1.36-5.06h411.26c5.84,0,9.49,6.33,6.57,11.39h-.01Z'/%3e%3c/svg%3e",d="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='cursor_dark__Ebene_1'%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20viewBox='0%200%20466.73%20532.09'%3e%3c!--Generator:%20Adobe%20Illustrator%2029.6.1,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%202.1.1%20Build%209)--%3e%3cdefs%3e%3cstyle%3e.cursor_dark__st0{fill:%23edecec}%3c/style%3e%3c/defs%3e%3cpath%20class='cursor_dark__st0'%20d='M457.43,125.94L244.42,2.96c-6.84-3.95-15.28-3.95-22.12,0L9.3,125.94c-5.75,3.32-9.3,9.46-9.3,16.11v247.99c0,6.65,3.55,12.79,9.3,16.11l213.01,122.98c6.84,3.95,15.28,3.95,22.12,0l213.01-122.98c5.75-3.32,9.3-9.46,9.3-16.11v-247.99c0-6.65-3.55-12.79-9.3-16.11h-.01ZM444.05,151.99l-205.63,356.16c-1.39,2.4-5.06,1.42-5.06-1.36v-233.21c0-4.66-2.49-8.97-6.53-11.31L24.87,145.67c-2.4-1.39-1.42-5.06,1.36-5.06h411.26c5.84,0,9.49,6.33,6.57,11.39h-.01Z'/%3e%3c/svg%3e",n="data:image/svg+xml,%3csvg%20width='512'%20height='512'%20viewBox='0%200%20512%20512'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='512'%20height='512'%20fill='%23FDFCFC'/%3e%3cpath%20d='M320%20224V352H192V224H320Z'%20fill='%23E6E5E6'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M384%20416H128V96H384V416ZM320%20160H192V352H320V160Z'%20fill='%2317181C'/%3e%3c/svg%3e",g="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='512'%20height='512'%3e%3csvg%20width='512'%20height='512'%20viewBox='0%200%20512%20512'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='512'%20height='512'%20fill='%23131010'%3e%3c/rect%3e%3cpath%20d='M320%20224V352H192V224H320Z'%20fill='%235A5858'%3e%3c/path%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M384%20416H128V96H384V416ZM320%20160H192V352H320V160Z'%20fill='white'%3e%3c/path%3e%3c/svg%3e%3cstyle%3e@media%20(prefers-color-scheme:%20light)%20{%20:root%20{%20filter:%20none;%20}%20}%20@media%20(prefers-color-scheme:%20dark)%20{%20:root%20{%20filter:%20none;%20}%20}%20%3c/style%3e%3c/svg%3e",i=[{name:"Claude",light:s,dark:a},{name:"Codex",light:h,dark:o},{name:"Cursor",light:r,dark:d},{name:"OpenCode",light:n,dark:g}];function w(){return e.jsx("span",{className:"ml-1 inline-flex shrink-0 items-center gap-1.5","aria-hidden":"true",children:i.map(({name:l,light:t,dark:c})=>e.jsxs("span",{title:l,className:"inline-flex h-[18px] w-[18px]",children:[e.jsx("img",{src:t,alt:"",width:18,height:18,className:"h-full w-full object-contain dark:hidden"}),e.jsx("img",{src:c,alt:"",width:18,height:18,className:"hidden h-full w-full object-contain dark:block"})]},l))})}function m(){return e.jsx("ul",{className:"flex flex-wrap gap-2","aria-label":"Supported coding agents",children:i.map(({name:l,light:t,dark:c})=>e.jsxs("li",{className:"inline-flex items-center gap-2 rounded-full border px-3 py-1 text-sm",children:[e.jsx("img",{src:t,alt:"",width:18,height:18,className:"h-[18px] w-[18px] object-contain dark:hidden"}),e.jsx("img",{src:c,alt:"",width:18,height:18,className:"hidden h-[18px] w-[18px] object-contain dark:block"}),l]},l))})}export{w as A,m as a};
|
|
|
|
| 1 |
+
import{j as e}from"./index-DyXq7-Tg.js";const s="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='256'%20height='257'%20preserveAspectRatio='xMidYMid'%20viewBox='0%200%20256%20257'%3e%3cpath%20fill='%23D97757'%20d='m50.228%20170.321%2050.357-28.257.843-2.463-.843-1.361h-2.462l-8.426-.518-28.775-.778-24.952-1.037-24.175-1.296-6.092-1.297L0%20125.796l.583-3.759%205.12-3.434%207.324.648%2016.202%201.101%2024.304%201.685%2017.629%201.037%2026.118%202.722h4.148l.583-1.685-1.426-1.037-1.101-1.037-25.147-17.045-27.22-18.017-14.258-10.37-7.713-5.25-3.888-4.925-1.685-10.758%207-7.713%209.397.649%202.398.648%209.527%207.323%2020.35%2015.75L94.817%2091.9l3.889%203.24%201.555-1.102.195-.777-1.75-2.917-14.453-26.118-15.425-26.572-6.87-11.018-1.814-6.61c-.648-2.723-1.102-4.991-1.102-7.778l7.972-10.823L71.42%200%2082.05%201.426l4.472%203.888%206.61%2015.101%2010.694%2023.786%2016.591%2032.34%204.861%209.592%202.592%208.879.973%202.722h1.685v-1.556l1.36-18.211%202.528-22.36%202.463-28.776.843-8.1%204.018-9.722%207.971-5.25%206.222%202.981%205.12%207.324-.713%204.73-3.046%2019.768-5.962%2030.98-3.889%2020.739h2.268l2.593-2.593%2010.499-13.934%2017.628-22.036%207.778-8.749%209.073-9.657%205.833-4.601h11.018l8.1%2012.055-3.628%2012.443-11.342%2014.388-9.398%2012.184-13.48%2018.147-8.426%2014.518.778%201.166%202.01-.194%2030.46-6.481%2016.462-2.982%2019.637-3.37%208.88%204.148.971%204.213-3.5%208.62-20.998%205.184-24.628%204.926-36.682%208.685-.454.324.519.648%2016.526%201.555%207.065.389h17.304l32.21%202.398%208.426%205.574%205.055%206.805-.843%205.184-12.962%206.611-17.498-4.148-40.83-9.721-14-3.5h-1.944v1.167l11.666%2011.406%2021.387%2019.314%2026.767%2024.887%201.36%206.157-3.434%204.86-3.63-.518-23.526-17.693-9.073-7.972-20.545-17.304h-1.36v1.814l4.73%206.935%2025.017%2037.59%201.296%2011.536-1.814%203.76-6.481%202.268-7.13-1.297-14.647-20.544-15.1-23.138-12.185-20.739-1.49.843-7.194%2077.448-3.37%203.953-7.778%202.981-6.48-4.925-3.436-7.972%203.435-15.749%204.148-20.544%203.37-16.333%203.046-20.285%201.815-6.74-.13-.454-1.49.194-15.295%2020.999-23.267%2031.433-18.406%2019.702-4.407%201.75-7.648-3.954.713-7.064%204.277-6.286%2025.47-32.405%2015.36-20.092%209.917-11.6-.065-1.686h-.583L44.07%20198.125l-12.055%201.555-5.185-4.86.648-7.972%202.463-2.593%2020.35-13.999-.064.065Z'/%3e%3c/svg%3e",a="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='256'%20height='257'%20preserveAspectRatio='xMidYMid'%20viewBox='0%200%20256%20257'%3e%3cpath%20fill='%23D97757'%20d='m50.228%20170.321%2050.357-28.257.843-2.463-.843-1.361h-2.462l-8.426-.518-28.775-.778-24.952-1.037-24.175-1.296-6.092-1.297L0%20125.796l.583-3.759%205.12-3.434%207.324.648%2016.202%201.101%2024.304%201.685%2017.629%201.037%2026.118%202.722h4.148l.583-1.685-1.426-1.037-1.101-1.037-25.147-17.045-27.22-18.017-14.258-10.37-7.713-5.25-3.888-4.925-1.685-10.758%207-7.713%209.397.649%202.398.648%209.527%207.323%2020.35%2015.75L94.817%2091.9l3.889%203.24%201.555-1.102.195-.777-1.75-2.917-14.453-26.118-15.425-26.572-6.87-11.018-1.814-6.61c-.648-2.723-1.102-4.991-1.102-7.778l7.972-10.823L71.42%200%2082.05%201.426l4.472%203.888%206.61%2015.101%2010.694%2023.786%2016.591%2032.34%204.861%209.592%202.592%208.879.973%202.722h1.685v-1.556l1.36-18.211%202.528-22.36%202.463-28.776.843-8.1%204.018-9.722%207.971-5.25%206.222%202.981%205.12%207.324-.713%204.73-3.046%2019.768-5.962%2030.98-3.889%2020.739h2.268l2.593-2.593%2010.499-13.934%2017.628-22.036%207.778-8.749%209.073-9.657%205.833-4.601h11.018l8.1%2012.055-3.628%2012.443-11.342%2014.388-9.398%2012.184-13.48%2018.147-8.426%2014.518.778%201.166%202.01-.194%2030.46-6.481%2016.462-2.982%2019.637-3.37%208.88%204.148.971%204.213-3.5%208.62-20.998%205.184-24.628%204.926-36.682%208.685-.454.324.519.648%2016.526%201.555%207.065.389h17.304l32.21%202.398%208.426%205.574%205.055%206.805-.843%205.184-12.962%206.611-17.498-4.148-40.83-9.721-14-3.5h-1.944v1.167l11.666%2011.406%2021.387%2019.314%2026.767%2024.887%201.36%206.157-3.434%204.86-3.63-.518-23.526-17.693-9.073-7.972-20.545-17.304h-1.36v1.814l4.73%206.935%2025.017%2037.59%201.296%2011.536-1.814%203.76-6.481%202.268-7.13-1.297-14.647-20.544-15.1-23.138-12.185-20.739-1.49.843-7.194%2077.448-3.37%203.953-7.778%202.981-6.48-4.925-3.436-7.972%203.435-15.749%204.148-20.544%203.37-16.333%203.046-20.285%201.815-6.74-.13-.454-1.49.194-15.295%2020.999-23.267%2031.433-18.406%2019.702-4.407%201.75-7.648-3.954.713-7.064%204.277-6.286%2025.47-32.405%2015.36-20.092%209.917-11.6-.065-1.686h-.583L44.07%20198.125l-12.055%201.555-5.185-4.86.648-7.972%202.463-2.593%2020.35-13.999-.064.065Z'/%3e%3c/svg%3e",h="data:image/svg+xml,%3csvg%20fill='%23111'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eCodex%3c/title%3e%3cpath%20clip-rule='evenodd'%20d='M8.086.457a6.105%206.105%200%20013.046-.415c1.333.153%202.521.72%203.564%201.7a.117.117%200%2000.107.029c1.408-.346%202.762-.224%204.061.366l.063.03.154.076c1.357.703%202.33%201.77%202.918%203.198.278.679.418%201.388.421%202.126a5.655%205.655%200%2001-.18%201.631.167.167%200%2000.04.155%205.982%205.982%200%20011.578%202.891c.385%201.901-.01%203.615-1.183%205.14l-.182.22a6.063%206.063%200%2001-2.934%201.851.162.162%200%2000-.108.102c-.255.736-.511%201.364-.987%201.992-1.199%201.582-2.962%202.462-4.948%202.451-1.583-.008-2.986-.587-4.21-1.736a.145.145%200%2000-.14-.032c-.518.167-1.04.191-1.604.185a5.924%205.924%200%2001-2.595-.622%206.058%206.058%200%2001-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74%207.74%200%2001-.495-1.283%206.11%206.11%200%2001-.017-3.064.166.166%200%2000.008-.074.115.115%200%2000-.037-.064%205.958%205.958%200%2001-1.38-2.202%205.196%205.196%200%2001-.333-1.589%206.915%206.915%200%2001.188-2.132c.45-1.484%201.309-2.648%202.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129%200%2000.087-.087A6.016%206.016%200%20015.635%202.31C6.315%201.464%207.132.846%208.086.457zm-.804%207.85a.848.848%200%2000-1.473.842l1.694%202.965-1.688%202.848a.849.849%200%20001.46.864l1.94-3.272a.849.849%200%2000.007-.854l-1.94-3.393zm5.446%206.24a.849.849%200%20000%201.695h4.848a.849.849%200%20000-1.696h-4.848z'%3e%3c/path%3e%3c/svg%3e",o="data:image/svg+xml,%3csvg%20fill='%23fff'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eCodex%3c/title%3e%3cpath%20clip-rule='evenodd'%20d='M8.086.457a6.105%206.105%200%20013.046-.415c1.333.153%202.521.72%203.564%201.7a.117.117%200%2000.107.029c1.408-.346%202.762-.224%204.061.366l.063.03.154.076c1.357.703%202.33%201.77%202.918%203.198.278.679.418%201.388.421%202.126a5.655%205.655%200%2001-.18%201.631.167.167%200%2000.04.155%205.982%205.982%200%20011.578%202.891c.385%201.901-.01%203.615-1.183%205.14l-.182.22a6.063%206.063%200%2001-2.934%201.851.162.162%200%2000-.108.102c-.255.736-.511%201.364-.987%201.992-1.199%201.582-2.962%202.462-4.948%202.451-1.583-.008-2.986-.587-4.21-1.736a.145.145%200%2000-.14-.032c-.518.167-1.04.191-1.604.185a5.924%205.924%200%2001-2.595-.622%206.058%206.058%200%2001-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74%207.74%200%2001-.495-1.283%206.11%206.11%200%2001-.017-3.064.166.166%200%2000.008-.074.115.115%200%2000-.037-.064%205.958%205.958%200%2001-1.38-2.202%205.196%205.196%200%2001-.333-1.589%206.915%206.915%200%2001.188-2.132c.45-1.484%201.309-2.648%202.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129%200%2000.087-.087A6.016%206.016%200%20015.635%202.31C6.315%201.464%207.132.846%208.086.457zm-.804%207.85a.848.848%200%2000-1.473.842l1.694%202.965-1.688%202.848a.849.849%200%20001.46.864l1.94-3.272a.849.849%200%2000.007-.854l-1.94-3.393zm5.446%206.24a.849.849%200%20000%201.695h4.848a.849.849%200%20000-1.696h-4.848z'%3e%3c/path%3e%3c/svg%3e",r="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='cursor_light__Ebene_1'%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20viewBox='0%200%20466.73%20532.09'%3e%3c!--Generator:%20Adobe%20Illustrator%2029.6.1,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%202.1.1%20Build%209)--%3e%3cdefs%3e%3cstyle%3e.cursor_light__st0{fill:%2326251e}%3c/style%3e%3c/defs%3e%3cpath%20class='cursor_light__st0'%20d='M457.43,125.94L244.42,2.96c-6.84-3.95-15.28-3.95-22.12,0L9.3,125.94c-5.75,3.32-9.3,9.46-9.3,16.11v247.99c0,6.65,3.55,12.79,9.3,16.11l213.01,122.98c6.84,3.95,15.28,3.95,22.12,0l213.01-122.98c5.75-3.32,9.3-9.46,9.3-16.11v-247.99c0-6.65-3.55-12.79-9.3-16.11h-.01ZM444.05,151.99l-205.63,356.16c-1.39,2.4-5.06,1.42-5.06-1.36v-233.21c0-4.66-2.49-8.97-6.53-11.31L24.87,145.67c-2.4-1.39-1.42-5.06,1.36-5.06h411.26c5.84,0,9.49,6.33,6.57,11.39h-.01Z'/%3e%3c/svg%3e",d="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='cursor_dark__Ebene_1'%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20viewBox='0%200%20466.73%20532.09'%3e%3c!--Generator:%20Adobe%20Illustrator%2029.6.1,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%202.1.1%20Build%209)--%3e%3cdefs%3e%3cstyle%3e.cursor_dark__st0{fill:%23edecec}%3c/style%3e%3c/defs%3e%3cpath%20class='cursor_dark__st0'%20d='M457.43,125.94L244.42,2.96c-6.84-3.95-15.28-3.95-22.12,0L9.3,125.94c-5.75,3.32-9.3,9.46-9.3,16.11v247.99c0,6.65,3.55,12.79,9.3,16.11l213.01,122.98c6.84,3.95,15.28,3.95,22.12,0l213.01-122.98c5.75-3.32,9.3-9.46,9.3-16.11v-247.99c0-6.65-3.55-12.79-9.3-16.11h-.01ZM444.05,151.99l-205.63,356.16c-1.39,2.4-5.06,1.42-5.06-1.36v-233.21c0-4.66-2.49-8.97-6.53-11.31L24.87,145.67c-2.4-1.39-1.42-5.06,1.36-5.06h411.26c5.84,0,9.49,6.33,6.57,11.39h-.01Z'/%3e%3c/svg%3e",n="data:image/svg+xml,%3csvg%20width='512'%20height='512'%20viewBox='0%200%20512%20512'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='512'%20height='512'%20fill='%23FDFCFC'/%3e%3cpath%20d='M320%20224V352H192V224H320Z'%20fill='%23E6E5E6'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M384%20416H128V96H384V416ZM320%20160H192V352H320V160Z'%20fill='%2317181C'/%3e%3c/svg%3e",g="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='512'%20height='512'%3e%3csvg%20width='512'%20height='512'%20viewBox='0%200%20512%20512'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='512'%20height='512'%20fill='%23131010'%3e%3c/rect%3e%3cpath%20d='M320%20224V352H192V224H320Z'%20fill='%235A5858'%3e%3c/path%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M384%20416H128V96H384V416ZM320%20160H192V352H320V160Z'%20fill='white'%3e%3c/path%3e%3c/svg%3e%3cstyle%3e@media%20(prefers-color-scheme:%20light)%20{%20:root%20{%20filter:%20none;%20}%20}%20@media%20(prefers-color-scheme:%20dark)%20{%20:root%20{%20filter:%20none;%20}%20}%20%3c/style%3e%3c/svg%3e",i=[{name:"Claude",light:s,dark:a},{name:"Codex",light:h,dark:o},{name:"Cursor",light:r,dark:d},{name:"OpenCode",light:n,dark:g}];function w(){return e.jsx("span",{className:"ml-1 inline-flex shrink-0 items-center gap-1.5","aria-hidden":"true",children:i.map(({name:l,light:t,dark:c})=>e.jsxs("span",{title:l,className:"inline-flex h-[18px] w-[18px]",children:[e.jsx("img",{src:t,alt:"",width:18,height:18,className:"h-full w-full object-contain dark:hidden"}),e.jsx("img",{src:c,alt:"",width:18,height:18,className:"hidden h-full w-full object-contain dark:block"})]},l))})}function m(){return e.jsx("ul",{className:"flex flex-wrap gap-2","aria-label":"Supported coding agents",children:i.map(({name:l,light:t,dark:c})=>e.jsxs("li",{className:"inline-flex items-center gap-2 rounded-full border px-3 py-1 text-sm",children:[e.jsx("img",{src:t,alt:"",width:18,height:18,className:"h-[18px] w-[18px] object-contain dark:hidden"}),e.jsx("img",{src:c,alt:"",width:18,height:18,className:"hidden h-[18px] w-[18px] object-contain dark:block"}),l]},l))})}export{w as A,m as a};
|
assets/AiDeadlinesView--bEB1R4q.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import{d as g,j as t,b as R,T as A}from"./index-DyXq7-Tg.js";import{c as L}from"./catalog-CRar2olQ.js";import{S as B}from"./switch-nfvTohnt.js";import{S as U}from"./skeleton-C3IIzpSL.js";import{A as W,a as M}from"./alert-gbJBhAVE.js";import{s as $}from"./safeExternalHref-CkBrsh84.js";import{D as O,a as V,c as P,b as G,d as H}from"./dialog-CfM0Uql2.js";import{s as K,n as S,f as _,p as Y,u as N,l as k,a as I,c as b,D as q,b as z,d as Q}from"./deadlines-BH32v7D1.js";import"./index-C041TDos.js";const w={fontFamily:"var(--mono)",fontSize:10,letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--ink-faint)"},J=(e,l)=>{const s=Math.ceil((e-l)/q);return s<=0?"passed":`${s} ${s===1?"day":"days"}`},F=(e,l)=>{const s=_(e.start_date,e.end_date),r=e.venue||[e.city,e.country].filter(Boolean).join(", ");return[`${l.label||l.type||"Deadline"} for ${e.name}`,s?`Dates: ${s}`:null,r?`Location: ${r}`:null,e.url?`Website: ${e.url}`:null].filter(Boolean).join(`
|
| 2 |
+
`)},C=e=>e.toISOString().replace(/[-:]/g,"").replace(/\.\d{3}/,""),X=(e,l)=>{const s=new Date(l.deadline_at),r=new Date(s.getTime()+60*60*1e3),o=`${e.short_name||e.name} ${l.label||l.type||"deadline"}`,h=e.venue||[e.city,e.country].filter(Boolean).join(", "),n=`https://calendar.google.com/calendar/render?action=TEMPLATE&text=${encodeURIComponent(o)}&dates=${C(s)}/${C(r)}&details=${encodeURIComponent(F(e,l))}&location=${encodeURIComponent(h)}`,p=$(n);p&&window.open(p,"_blank","noopener,noreferrer")},Z=(e,l)=>{const s=new Date(l.deadline_at),r=new Date(s.getTime()+60*60*1e3),o=`${e.short_name||e.name} ${l.label||l.type||"deadline"}`,h=e.venue||[e.city,e.country].filter(Boolean).join(", "),n=["BEGIN:VCALENDAR","VERSION:2.0","BEGIN:VEVENT",e.url?`URL:${e.url}`:null,`DTSTART:${C(s)}`,`DTEND:${C(r)}`,`SUMMARY:${o}`,`DESCRIPTION:${F(e,l).replace(/\n/g,"\\n")}`,h?`LOCATION:${h}`:null,"END:VEVENT","END:VCALENDAR"].filter(Boolean).join(`
|
| 3 |
+
`),p=new Blob([n],{type:"text/calendar;charset=utf-8"}),d=document.createElement("a");d.href=URL.createObjectURL(p),d.download=`${(e.short_name||e.name).toLowerCase().replace(/\s+/g,"-")}-deadline.ics`,document.body.appendChild(d),d.click(),document.body.removeChild(d),URL.revokeObjectURL(d.href)},ee=({conf:e,open:l,onOpenChange:s})=>{const[r,o]=g.useState(()=>Date.now());g.useEffect(()=>{if(!l)return;o(Date.now());const i=setInterval(()=>o(Date.now()),1e3);return()=>clearInterval(i)},[l]);const h=g.useMemo(()=>e?K(e):[],[e]),n=g.useMemo(()=>e?S(e,r):null,[e,r]),p=e?_(e.start_date,e.end_date):null,d=e?e.venue||[e.city,e.country].filter(Boolean).join(", ")||e.location:null,m=n?new Date(n.deadline_at).getTime():null;return t.jsx(O,{open:l,onOpenChange:s,children:t.jsx(V,{className:"max-w-xl",style:{background:"var(--bg-elevated)",maxHeight:"85vh",overflowY:"auto"},children:e&&t.jsxs(t.Fragment,{children:[t.jsxs(P,{children:[t.jsx(G,{asChild:!0,children:t.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.01em",margin:0},children:e.short_name?`${e.short_name} ${e.year??""}`.trim():e.name})}),e.short_name&&e.name||e.description?t.jsx(H,{asChild:!0,children:t.jsx("span",{style:{fontFamily:"var(--serif)",fontSize:14,color:"var(--ink-soft)"},children:e.short_name?e.name:e.description})}):null]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:20,marginTop:4},children:[t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:24},children:[p&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[t.jsx("span",{style:w,children:"Dates"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-soft)"},children:p})]}),d&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[t.jsx("span",{style:w,children:"Venue"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-soft)"},children:d})]})]}),m!=null&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,padding:"12px 14px",borderRadius:8,background:"var(--bg-subtle)",border:"1px solid var(--hairline)"},children:[t.jsx("span",{style:w,children:"Next deadline in"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:22,fontWeight:600,color:N(m,r)},children:Y(m,r)})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[t.jsx("span",{style:w,children:"Important deadlines"}),h.length===0?t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-faint)"},children:"No deadlines listed"}):h.map((i,c)=>{const y=new Date(i.deadline_at).getTime(),a=n!=null&&i.deadline_at===n.deadline_at&&i.type===n.type,u=y<=r;return t.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12,padding:"8px 12px",borderRadius:6,background:a?"var(--accent-soft)":"transparent",border:a?"1px solid var(--hairline-strong)":"1px solid var(--hairline)",opacity:u&&!a?.55:1},children:[t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[t.jsxs("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink)",fontWeight:a?600:400},children:[i.label||k(i.type||"deadline"),a&&t.jsx("span",{style:{...w,marginLeft:8},children:"Next"})]}),t.jsxs("span",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-faint)"},children:[I(i.deadline_at),i.timezone?` · ${i.timezone}`:""]})]}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:12,fontWeight:600,whiteSpace:"nowrap",color:N(u?null:y,r)},children:J(y,r)})]},`${i.type??"deadline"}-${c}`)})]}),b(e).length>0&&t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:b(e).map(i=>t.jsx("span",{className:"tag-chip",style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:k(i)},i))}),t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:16,paddingTop:12,borderTop:"1px solid var(--hairline)"},children:[e.url&&t.jsx("a",{href:$(e.url)??void 0,target:"_blank",rel:"noopener noreferrer",style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--accent-text)"},children:"Visit website ↗"}),n&&t.jsxs("div",{style:{display:"flex",gap:12,marginLeft:"auto"},children:[t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>X(e,n),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Google Calendar"}),t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>Z(e,n),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Apple / .ics"})]})]})]})]})})})},E=({id:e,label:l,checked:s,onChange:r})=>t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:[t.jsx(B,{id:e,checked:s,onCheckedChange:r}),t.jsx("label",{htmlFor:e,style:{cursor:"pointer"},children:l})]}),te=({conf:e,now:l,selectedDomains:s,onToggleDomain:r,onOpen:o})=>{const h=S(e,l),n=h??z(e),p=n?new Date(n.deadline_at).getTime():null,d=N(h?p:null,l),m=_(e.start_date,e.end_date),i=[e.city??null,e.country??null].filter(Boolean).join(", ");return t.jsxs("div",{role:"button",tabIndex:0,onClick:()=>o(e),onKeyDown:c=>{(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),o(e))},style:{border:"1px solid var(--hairline)",borderRadius:8,padding:20,background:"var(--bg-elevated)",display:"flex",flexDirection:"column",gap:12,cursor:"pointer"},children:[t.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",gap:12},children:[t.jsx("h3",{style:{fontFamily:"var(--serif)",fontSize:20,fontWeight:500,letterSpacing:"-0.01em",margin:0},children:e.short_name?`${e.short_name} ${e.year??""}`.trim():e.name}),e.url&&t.jsx("a",{href:$(e.url)??void 0,target:"_blank",rel:"noopener noreferrer",onClick:c=>c.stopPropagation(),style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",whiteSpace:"nowrap"},children:"website ↗"})]}),t.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12,paddingBottom:12,borderBottom:"1px solid var(--hairline)"},children:[t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)"},children:(n==null?void 0:n.label)||(n==null?void 0:n.type)||"Deadline"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:n?`${I(n.deadline_at)}${n.timezone?` · ${n.timezone}`:""}`:"TBD"})]}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:14,fontWeight:600,color:d,whiteSpace:"nowrap"},children:p!=null?Q(p,l):"TBD"})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)"},children:[m&&t.jsx("span",{children:m}),i&&t.jsx("span",{children:i})]}),b(e).length>0&&t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:b(e).map(c=>{const y=s.has(c);return t.jsx("button",{className:"tag-chip",onClick:a=>{a.stopPropagation(),r(c)},style:{background:y?"var(--ink)":"var(--bg-subtle)",color:y?"var(--bg)":"var(--ink-soft)"},children:k(c)},c)})})]})},pe=()=>{const[e,l]=g.useState(!0),[s,r]=g.useState(!1),[o,h]=g.useState(new Set),[n,p]=g.useState(null),d=g.useMemo(()=>Date.now(),[]),m=R({queryKey:["conference-deadlines"],queryFn:()=>L.conferenceDeadlines(),staleTime:A}),i=a=>{h(u=>{const x=new Set(u);return x.has(a)?x.delete(a):x.add(a),x})},c=g.useMemo(()=>{var u;const a=new Map;return(u=m.data)==null||u.results.forEach(x=>{b(x).forEach(j=>a.set(j,(a.get(j)??0)+1))}),Array.from(a.entries()).sort((x,j)=>j[1]-x[1]).map(([x])=>x)},[m.data]),y=g.useMemo(()=>{var j;const u=(((j=m.data)==null?void 0:j.results)??[]).filter(f=>!(e&&f.tier!=="a"||o.size>0&&!b(f).some(v=>o.has(v))||!s&&!S(f,d))),x=f=>{const D=S(f,d);if(D)return{group:0,time:new Date(D.deadline_at).getTime()};const v=z(f);return{group:1,time:-(v?new Date(v.deadline_at).getTime():0)}};return[...u].sort((f,D)=>{const v=x(f),T=x(D);return v.group!==T.group?v.group-T.group:v.time-T.time})},[m.data,e,s,o,d]);return m.error?t.jsx("div",{className:"page",children:t.jsx(W,{variant:"destructive",children:t.jsx(M,{children:"Failed to load conference deadlines. Please try again."})})}):t.jsxs("div",{className:"page",children:[t.jsx("div",{className:"feed-header",children:t.jsxs("div",{children:[t.jsxs("h1",{className:"feed-title",children:["AI Conference ",t.jsx("em",{children:"Deadlines"})]}),t.jsx("div",{className:"feed-subtitle",children:"Upcoming submission deadlines for major AI conferences, counting down."})]})}),t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:20,padding:"16px 0",borderBottom:"1px solid var(--hairline)",marginBottom:24},children:[t.jsx(E,{id:"top-tier-only",label:"Top tier only",checked:e,onChange:l}),t.jsx(E,{id:"show-past",label:"Show past conferences",checked:s,onChange:r})]}),c.length>0&&t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:6,marginBottom:24},children:[c.map(a=>{const u=o.has(a);return t.jsx("button",{className:"tag-chip",onClick:()=>i(a),style:{background:u?"var(--ink)":"var(--bg-subtle)",color:u?"var(--bg)":"var(--ink-soft)"},children:k(a)},a)}),o.size>0&&t.jsx("button",{className:"tag-chip",onClick:()=>h(new Set),style:{background:"transparent",color:"var(--ink-faint)"},children:"Clear ✕"})]}),t.jsx("div",{className:"sort-bar",children:t.jsx("div",{className:"results-count",children:m.isLoading?"…":`${y.length} conferences`})}),m.isLoading?t.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:16},children:Array.from({length:6}).map((a,u)=>t.jsx(U,{className:"h-44"},u))}):y.length===0?t.jsxs("div",{className:"no-results",children:["No conferences match these filters",s?".":" — try enabling “Show past conferences”."]}):t.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:16},children:y.map(a=>t.jsx(te,{conf:a,now:d,selectedDomains:o,onToggleDomain:i,onOpen:p},a.id))}),t.jsx(ee,{conf:n,open:n!==null,onOpenChange:a=>{a||p(null)}})]})};export{pe as default};
|
assets/AiDeadlinesView-BhXjtcbF.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
import{r as g,j as t}from"./index-CbgxfyGU.js";import{u as R}from"./useQuery-Bx9s5-D2.js";import{c as A}from"./catalog-DhK7_9-6.js";import{S as L}from"./switch-BSZohE4x.js";import{S as B}from"./skeleton-HwvdxvSN.js";import{A as W,a as U}from"./alert-CFDDvdIM.js";import{s as $}from"./safeExternalHref-CkBrsh84.js";import{D as M,a as O,c as V,b as P,d as G}from"./dialog-Cfp_d3CC.js";import{s as H,n as S,f as _,p as K,u as N,l as k,a as I,c as b,D as Y,b as E,d as q}from"./deadlines-BH32v7D1.js";import"./index-CxPKwmVQ.js";const w={fontFamily:"var(--mono)",fontSize:10,letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--ink-faint)"},Q=(e,l)=>{const s=Math.ceil((e-l)/Y);return s<=0?"passed":`${s} ${s===1?"day":"days"}`},F=(e,l)=>{const s=_(e.start_date,e.end_date),r=e.venue||[e.city,e.country].filter(Boolean).join(", ");return[`${l.label||l.type||"Deadline"} for ${e.name}`,s?`Dates: ${s}`:null,r?`Location: ${r}`:null,e.url?`Website: ${e.url}`:null].filter(Boolean).join(`
|
| 2 |
-
`)},C=e=>e.toISOString().replace(/[-:]/g,"").replace(/\.\d{3}/,""),J=(e,l)=>{const s=new Date(l.deadline_at),r=new Date(s.getTime()+60*60*1e3),o=`${e.short_name||e.name} ${l.label||l.type||"deadline"}`,h=e.venue||[e.city,e.country].filter(Boolean).join(", "),n=`https://calendar.google.com/calendar/render?action=TEMPLATE&text=${encodeURIComponent(o)}&dates=${C(s)}/${C(r)}&details=${encodeURIComponent(F(e,l))}&location=${encodeURIComponent(h)}`,p=$(n);p&&window.open(p,"_blank","noopener,noreferrer")},X=(e,l)=>{const s=new Date(l.deadline_at),r=new Date(s.getTime()+60*60*1e3),o=`${e.short_name||e.name} ${l.label||l.type||"deadline"}`,h=e.venue||[e.city,e.country].filter(Boolean).join(", "),n=["BEGIN:VCALENDAR","VERSION:2.0","BEGIN:VEVENT",e.url?`URL:${e.url}`:null,`DTSTART:${C(s)}`,`DTEND:${C(r)}`,`SUMMARY:${o}`,`DESCRIPTION:${F(e,l).replace(/\n/g,"\\n")}`,h?`LOCATION:${h}`:null,"END:VEVENT","END:VCALENDAR"].filter(Boolean).join(`
|
| 3 |
-
`),p=new Blob([n],{type:"text/calendar;charset=utf-8"}),d=document.createElement("a");d.href=URL.createObjectURL(p),d.download=`${(e.short_name||e.name).toLowerCase().replace(/\s+/g,"-")}-deadline.ics`,document.body.appendChild(d),d.click(),document.body.removeChild(d),URL.revokeObjectURL(d.href)},Z=({conf:e,open:l,onOpenChange:s})=>{const[r,o]=g.useState(()=>Date.now());g.useEffect(()=>{if(!l)return;o(Date.now());const i=setInterval(()=>o(Date.now()),1e3);return()=>clearInterval(i)},[l]);const h=g.useMemo(()=>e?H(e):[],[e]),n=g.useMemo(()=>e?S(e,r):null,[e,r]),p=e?_(e.start_date,e.end_date):null,d=e?e.venue||[e.city,e.country].filter(Boolean).join(", ")||e.location:null,m=n?new Date(n.deadline_at).getTime():null;return t.jsx(M,{open:l,onOpenChange:s,children:t.jsx(O,{className:"max-w-xl",style:{background:"var(--bg-elevated)",maxHeight:"85vh",overflowY:"auto"},children:e&&t.jsxs(t.Fragment,{children:[t.jsxs(V,{children:[t.jsx(P,{asChild:!0,children:t.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.01em",margin:0},children:e.short_name?`${e.short_name} ${e.year??""}`.trim():e.name})}),e.short_name&&e.name||e.description?t.jsx(G,{asChild:!0,children:t.jsx("span",{style:{fontFamily:"var(--serif)",fontSize:14,color:"var(--ink-soft)"},children:e.short_name?e.name:e.description})}):null]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:20,marginTop:4},children:[t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:24},children:[p&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[t.jsx("span",{style:w,children:"Dates"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-soft)"},children:p})]}),d&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[t.jsx("span",{style:w,children:"Venue"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-soft)"},children:d})]})]}),m!=null&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,padding:"12px 14px",borderRadius:8,background:"var(--bg-subtle)",border:"1px solid var(--hairline)"},children:[t.jsx("span",{style:w,children:"Next deadline in"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:22,fontWeight:600,color:N(m,r)},children:K(m,r)})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[t.jsx("span",{style:w,children:"Important deadlines"}),h.length===0?t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-faint)"},children:"No deadlines listed"}):h.map((i,c)=>{const y=new Date(i.deadline_at).getTime(),a=n!=null&&i.deadline_at===n.deadline_at&&i.type===n.type,u=y<=r;return t.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12,padding:"8px 12px",borderRadius:6,background:a?"var(--accent-soft)":"transparent",border:a?"1px solid var(--hairline-strong)":"1px solid var(--hairline)",opacity:u&&!a?.55:1},children:[t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[t.jsxs("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink)",fontWeight:a?600:400},children:[i.label||k(i.type||"deadline"),a&&t.jsx("span",{style:{...w,marginLeft:8},children:"Next"})]}),t.jsxs("span",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-faint)"},children:[I(i.deadline_at),i.timezone?` · ${i.timezone}`:""]})]}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:12,fontWeight:600,whiteSpace:"nowrap",color:N(u?null:y,r)},children:Q(y,r)})]},`${i.type??"deadline"}-${c}`)})]}),b(e).length>0&&t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:b(e).map(i=>t.jsx("span",{className:"tag-chip",style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:k(i)},i))}),t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:16,paddingTop:12,borderTop:"1px solid var(--hairline)"},children:[e.url&&t.jsx("a",{href:$(e.url)??void 0,target:"_blank",rel:"noopener noreferrer",style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--accent-text)"},children:"Visit website ↗"}),n&&t.jsxs("div",{style:{display:"flex",gap:12,marginLeft:"auto"},children:[t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>J(e,n),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Google Calendar"}),t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>X(e,n),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Apple / .ics"})]})]})]})]})})})},z=({id:e,label:l,checked:s,onChange:r})=>t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:[t.jsx(L,{id:e,checked:s,onCheckedChange:r}),t.jsx("label",{htmlFor:e,style:{cursor:"pointer"},children:l})]}),ee=({conf:e,now:l,selectedDomains:s,onToggleDomain:r,onOpen:o})=>{const h=S(e,l),n=h??E(e),p=n?new Date(n.deadline_at).getTime():null,d=N(h?p:null,l),m=_(e.start_date,e.end_date),i=[e.city??null,e.country??null].filter(Boolean).join(", ");return t.jsxs("div",{role:"button",tabIndex:0,onClick:()=>o(e),onKeyDown:c=>{(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),o(e))},style:{border:"1px solid var(--hairline)",borderRadius:8,padding:20,background:"var(--bg-elevated)",display:"flex",flexDirection:"column",gap:12,cursor:"pointer"},children:[t.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",gap:12},children:[t.jsx("h3",{style:{fontFamily:"var(--serif)",fontSize:20,fontWeight:500,letterSpacing:"-0.01em",margin:0},children:e.short_name?`${e.short_name} ${e.year??""}`.trim():e.name}),e.url&&t.jsx("a",{href:$(e.url)??void 0,target:"_blank",rel:"noopener noreferrer",onClick:c=>c.stopPropagation(),style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",whiteSpace:"nowrap"},children:"website ↗"})]}),t.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12,paddingBottom:12,borderBottom:"1px solid var(--hairline)"},children:[t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)"},children:(n==null?void 0:n.label)||(n==null?void 0:n.type)||"Deadline"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:n?`${I(n.deadline_at)}${n.timezone?` · ${n.timezone}`:""}`:"TBD"})]}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:14,fontWeight:600,color:d,whiteSpace:"nowrap"},children:p!=null?q(p,l):"TBD"})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)"},children:[m&&t.jsx("span",{children:m}),i&&t.jsx("span",{children:i})]}),b(e).length>0&&t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:b(e).map(c=>{const y=s.has(c);return t.jsx("button",{className:"tag-chip",onClick:a=>{a.stopPropagation(),r(c)},style:{background:y?"var(--ink)":"var(--bg-subtle)",color:y?"var(--bg)":"var(--ink-soft)"},children:k(c)},c)})})]})},pe=()=>{const[e,l]=g.useState(!0),[s,r]=g.useState(!1),[o,h]=g.useState(new Set),[n,p]=g.useState(null),d=g.useMemo(()=>Date.now(),[]),m=R({queryKey:["conference-deadlines"],queryFn:()=>A.conferenceDeadlines(),staleTime:10*60*1e3}),i=a=>{h(u=>{const x=new Set(u);return x.has(a)?x.delete(a):x.add(a),x})},c=g.useMemo(()=>{var u;const a=new Map;return(u=m.data)==null||u.results.forEach(x=>{b(x).forEach(j=>a.set(j,(a.get(j)??0)+1))}),Array.from(a.entries()).sort((x,j)=>j[1]-x[1]).map(([x])=>x)},[m.data]),y=g.useMemo(()=>{var j;const u=(((j=m.data)==null?void 0:j.results)??[]).filter(f=>!(e&&f.tier!=="a"||o.size>0&&!b(f).some(v=>o.has(v))||!s&&!S(f,d))),x=f=>{const D=S(f,d);if(D)return{group:0,time:new Date(D.deadline_at).getTime()};const v=E(f);return{group:1,time:-(v?new Date(v.deadline_at).getTime():0)}};return[...u].sort((f,D)=>{const v=x(f),T=x(D);return v.group!==T.group?v.group-T.group:v.time-T.time})},[m.data,e,s,o,d]);return m.error?t.jsx("div",{className:"page",children:t.jsx(W,{variant:"destructive",children:t.jsx(U,{children:"Failed to load conference deadlines. Please try again."})})}):t.jsxs("div",{className:"page",children:[t.jsx("div",{className:"feed-header",children:t.jsxs("div",{children:[t.jsxs("h1",{className:"feed-title",children:["AI Conference ",t.jsx("em",{children:"Deadlines"})]}),t.jsx("div",{className:"feed-subtitle",children:"Upcoming submission deadlines for major AI conferences, counting down."})]})}),t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:20,padding:"16px 0",borderBottom:"1px solid var(--hairline)",marginBottom:24},children:[t.jsx(z,{id:"top-tier-only",label:"Top tier only",checked:e,onChange:l}),t.jsx(z,{id:"show-past",label:"Show past conferences",checked:s,onChange:r})]}),c.length>0&&t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:6,marginBottom:24},children:[c.map(a=>{const u=o.has(a);return t.jsx("button",{className:"tag-chip",onClick:()=>i(a),style:{background:u?"var(--ink)":"var(--bg-subtle)",color:u?"var(--bg)":"var(--ink-soft)"},children:k(a)},a)}),o.size>0&&t.jsx("button",{className:"tag-chip",onClick:()=>h(new Set),style:{background:"transparent",color:"var(--ink-faint)"},children:"Clear ✕"})]}),t.jsx("div",{className:"sort-bar",children:t.jsx("div",{className:"results-count",children:m.isLoading?"…":`${y.length} conferences`})}),m.isLoading?t.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:16},children:Array.from({length:6}).map((a,u)=>t.jsx(B,{className:"h-44"},u))}):y.length===0?t.jsxs("div",{className:"no-results",children:["No conferences match these filters",s?".":" — try enabling “Show past conferences”."]}):t.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:16},children:y.map(a=>t.jsx(ee,{conf:a,now:d,selectedDomains:o,onToggleDomain:i,onOpen:p},a.id))}),t.jsx(Z,{conf:n,open:n!==null,onOpenChange:a=>{a||p(null)}})]})};export{pe as default};
|
|
|
|
|
|
|
|
|
|
|
|
assets/ApiDocsView-DhYUFS5g.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import{ac as m,b as f,d as h,j as e}from"./index-DyXq7-Tg.js";import{u as g}from"./useDocumentTitle-DcxM2Zv_.js";import{M as y}from"./index-mCi_y_l3.js";const b={queryKey:["public-api-schema"],queryFn:()=>m("/openapi.json",{credentials:"omit"}),staleTime:5*60*1e3};function w(s,r){const n=new URLSearchParams;for(const[a,t]of Object.entries(r["x-example-parameters"]))s.includes(`{${a}}`)?s=s.replace(`{${a}}`,encodeURIComponent(String(t))):n.append(a,String(t));return`https://paperswithcode.co${s}${n.size?`?${n}`:""}`}function v(s,r){return r==="Python"?`import requests
|
| 2 |
+
|
| 3 |
+
response = requests.get(${JSON.stringify(s)}, timeout=30)
|
| 4 |
+
response.raise_for_status()
|
| 5 |
+
print(response.json())`:r==="JavaScript"?`const response = await fetch(${JSON.stringify(s)}, {
|
| 6 |
+
credentials: "omit",
|
| 7 |
+
});
|
| 8 |
+
if (!response.ok) throw new Error(\`HTTP \${response.status}\`);
|
| 9 |
+
console.log(await response.json());`:`curl --fail-with-body ${JSON.stringify(s)}`}function d(s){return s.$ref?s.$ref.split("/").pop()??"object":s.anyOf?s.anyOf.map(d).join(" | "):s.allOf?s.allOf.map(d).join(" & "):s.enum?s.enum.map(r=>JSON.stringify(r)).join(" | "):s.type==="array"?`array<${d(s.items??{})}>`:s.type??"object"}const k=["curl","Python","JavaScript"],q="https://github.com/huggingface/paperswithcode/issues/new?template=api.yml";function l({value:s}){const[r,n]=h.useState("Copy");async function a(){try{await navigator.clipboard.writeText(s),n("Copied")}catch{n("Select and copy the code below")}}return e.jsxs("div",{className:"api-code",children:[e.jsx("pre",{children:e.jsx("code",{children:s})}),e.jsx("button",{onClick:a,"aria-live":"polite",children:r})]})}function c({schema:s}){if(s.$ref){const r=d(s);return e.jsx("a",{href:`#model-${r}`,children:r})}return s.anyOf||s.allOf?e.jsx(e.Fragment,{children:(s.anyOf??s.allOf).map((r,n)=>e.jsxs("span",{children:[n>0&&" | ",e.jsx(c,{schema:r})]},n))}):s.type==="array"?e.jsxs(e.Fragment,{children:["array of ",e.jsx(c,{schema:s.items??{}})]}):e.jsx("code",{children:d(s)})}function x({schema:s}){return e.jsxs(e.Fragment,{children:[["minimum","maximum","minLength","maxLength"].map(r=>s[r]!==void 0&&e.jsxs("small",{children:[r,": ",s[r]]},r)),(s.anyOf??s.allOf??[]).map((r,n)=>e.jsx(x,{schema:r},n))]})}function j({schema:s}){return s.properties?e.jsx("div",{className:"api-table-wrap",children:e.jsxs("table",{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Field"}),e.jsx("th",{children:"Type"}),e.jsx("th",{children:"Description"})]})}),e.jsx("tbody",{children:Object.entries(s.properties).map(([r,n])=>{var a;return e.jsxs("tr",{children:[e.jsxs("td",{children:[e.jsx("code",{children:r}),((a=s.required)==null?void 0:a.includes(r))&&e.jsx("small",{children:"required"})]}),e.jsx("td",{children:e.jsx(c,{schema:n})}),e.jsxs("td",{children:[n.description,n.format&&e.jsxs("small",{children:["Format: ",n.format]}),n.default!==void 0&&e.jsxs("small",{children:["Default: ",JSON.stringify(n.default)]}),n.properties&&e.jsx(j,{schema:n}),typeof n.additionalProperties=="object"&&e.jsxs("p",{children:["Values:"," ",e.jsx(c,{schema:n.additionalProperties})]})]})]},r)})})]})}):e.jsx(c,{schema:s})}function P({path:s,operation:r}){var t;const[n,a]=h.useState("curl");return e.jsxs("section",{id:r.operationId,className:"api-endpoint",children:[e.jsx("h2",{children:r.summary}),e.jsxs("p",{className:"api-path",children:[e.jsx("b",{children:"GET"})," ",e.jsx("code",{children:s})]}),e.jsx("div",{className:"api-description",children:e.jsx(y,{children:r.description})}),!!((t=r.parameters)!=null&&t.length)&&e.jsxs(e.Fragment,{children:[e.jsx("h3",{children:"Parameters"}),e.jsx("div",{className:"api-table-wrap",children:e.jsxs("table",{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Parameter"}),e.jsx("th",{children:"Type"}),e.jsx("th",{children:"Description"})]})}),e.jsx("tbody",{children:r.parameters.map(i=>e.jsxs("tr",{children:[e.jsxs("td",{children:[e.jsx("code",{children:i.name}),e.jsxs("small",{children:[i.in," ·"," ",i.required?"required":"optional"]})]}),e.jsx("td",{children:e.jsx(c,{schema:i.schema})}),e.jsxs("td",{children:[i.description,i.schema.default!==void 0&&e.jsxs("small",{children:["Default: ",JSON.stringify(i.schema.default)]}),e.jsx(x,{schema:i.schema})]})]},`${i.in}-${i.name}`))})]})})]}),e.jsx("h3",{children:"Example request"}),e.jsx("div",{className:"api-languages",role:"group","aria-label":`Example language for ${r.summary}`,children:k.map(i=>e.jsx("button",{"aria-pressed":n===i,onClick:()=>a(i),children:i},i))}),e.jsx(l,{value:v(w(s,r),n)}),e.jsx("h3",{children:"Responses"}),Object.entries(r.responses).map(([i,o])=>{var p,u;return e.jsxs("div",{className:"api-response",children:[e.jsx("strong",{children:i})," ",o.description,((u=(p=o.content)==null?void 0:p["application/json"])==null?void 0:u.schema)&&e.jsx("p",{children:e.jsx(c,{schema:o.content["application/json"].schema})})]},i)})]})}function S(){const{data:s,isPending:r,isError:n,refetch:a}=f(b);return g("API documentation — Papers With Code",{restorePrevious:!0}),h.useEffect(()=>{if(!s||!window.location.hash)return;const t=requestAnimationFrame(()=>{var i;(i=document.getElementById(window.location.hash.slice(1)))==null||i.scrollIntoView()});return()=>cancelAnimationFrame(t)},[s]),e.jsxs("div",{className:"api-docs",children:[e.jsxs("nav",{className:"api-sidebar","aria-label":"API documentation",children:[e.jsx("strong",{children:"API documentation"}),e.jsx("a",{href:"#getting-started",children:"Getting started"}),e.jsx("a",{href:"#limits",children:"Traffic limits"}),e.jsx("a",{href:"#pagination",children:"Pagination & identifiers"}),e.jsx("a",{href:"#benchmarks",children:"Reading leaderboards"}),e.jsx("a",{href:"#errors",children:"Errors"}),e.jsx("a",{href:"#changelog",children:"Changelog"}),s&&Object.entries(s.paths).map(([t,{get:i}])=>e.jsx("a",{href:`#${i.operationId}`,children:i.summary},t)),e.jsx("a",{href:"#response-models",children:"Response models"})]}),e.jsxs("main",{className:"api-content",children:[e.jsxs("section",{id:"getting-started",children:[e.jsx("span",{className:"api-beta",children:"Experimental beta"}),e.jsx("h1",{children:"Papers With Code API"}),e.jsx("p",{className:"api-lead",children:"Find papers, explore benchmarks, and bring research results into your scripts and applications."}),e.jsx("p",{children:"Free, anonymous, read-only access. No account or API key required. The public beta covers keyword search and core catalog lookups."}),e.jsxs("p",{children:[e.jsx("a",{href:"https://paperswithcode.co/api/v1/openapi.json",children:"Download the public OpenAPI specification"})," ","· ",e.jsx("a",{href:q,children:"Report a bug or request a feature"})]}),e.jsx("h2",{children:"Your first request"}),e.jsx(l,{value:'curl --fail-with-body "https://paperswithcode.co/api/v1/papers/search?q=attention&mode=keyword&page_size=5"'}),e.jsxs("p",{children:["Responses are JSON. Python examples require"," ",e.jsx("code",{children:"pip install requests"}),"; JavaScript examples use built-in"," ",e.jsx("code",{children:"fetch"}),". Browser requests from any origin are supported for these public reads: omit cookies and authorization headers."]}),e.jsxs("p",{children:["Base URL: ",e.jsx("code",{children:"https://paperswithcode.co/api/v1"})]})]}),e.jsxs("section",{id:"limits",children:[e.jsx("h2",{children:"Traffic limits"}),e.jsx("p",{children:"Each IP address shares a catalog allowance of 120 requests/minute. List and search endpoints also share a stricter allowance of 60 requests/minute. These are sustained rates with short bursts of up to 60 and 20 excess requests respectively, not fixed-minute quotas."}),e.jsxs("p",{children:["Website browsing and scripts on the same network share these limits. Send requests sequentially, cache results, and avoid parallel crawls. On HTTP 429, wait at least the ",e.jsx("code",{children:"Retry-After"})," ","duration, then retry with increasing delays and jitter. Browser preflight requests do not consume this allowance."]})]}),e.jsxs("section",{id:"pagination",children:[e.jsx("h2",{children:"Pagination & identifiers"}),e.jsxs("p",{children:["Paginated endpoints return ",e.jsx("code",{children:"results"}),","," ",e.jsx("code",{children:"next_page"}),", and ",e.jsx("code",{children:"previous_page"}),". Catalog lists also return ",e.jsx("code",{children:"count"}),"; paper search omits it. Pass"," ",e.jsx("code",{children:"page"})," and ",e.jsx("code",{children:"page_size"}),"; stop when"," ",e.jsx("code",{children:"next_page"})," is null. Recent and trending endpoints instead return arrays bounded by ",e.jsx("code",{children:"limit"}),"."]}),e.jsx("p",{children:"Paper listing and search stop at page 100. Other bounds are shown per endpoint. Counts and page contents may change as the catalog updates; pagination is not a snapshot or a bulk export interface."}),e.jsxs("p",{children:["Use identifiers returned by lookups. Paper detail accepts an arXiv ID or numeric catalog ID; the arXiv endpoint takes an arXiv ID. Task and dataset detail accept their catalog IDs or slugs. Leaderboard metrics require numeric task and dataset IDs. Evaluation filters such as ",e.jsx("code",{children:"dataset_id"})," and ",e.jsx("code",{children:"task_id"})," require numeric catalog IDs. Example IDs may no longer exist: replace them with current lookup results."]})]}),e.jsxs("section",{id:"benchmarks",children:[e.jsx("h2",{children:"Reading leaderboards"}),e.jsxs("p",{children:["Search datasets, select a dataset, then fetch its tasks and the metrics for a dataset/task pair. Fetch"," ",e.jsx("code",{children:"/evaluations/?dataset_id=…&task_id=…&ordering=best_rank"})," ","using the numeric IDs. An evaluation includes reported scores and source information; check metric direction, split, and evaluation setup before comparing results."]}),e.jsxs("p",{children:["Use ",e.jsx("code",{children:"include_resources=true"})," on paper list/detail requests for linked repositories and project pages. Missing fields or null values mean data is unavailable; they are not zero scores. Keyword search examples explicitly send ",e.jsx("code",{children:"mode=keyword"}),"; semantic and hybrid search are outside this beta."]})]}),e.jsxs("section",{id:"errors",children:[e.jsx("h2",{children:"Errors"}),e.jsxs("p",{children:["Check the HTTP status before parsing a successful result. Errors usually contain a ",e.jsx("code",{children:"detail"})," field, which can be a string, object, or validation-error array."]}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("b",{children:"400:"})," invalid request."]}),e.jsxs("li",{children:[e.jsx("b",{children:"404:"})," record not found."]}),e.jsxs("li",{children:[e.jsx("b",{children:"422:"})," invalid parameter type, value, or missing parameter."]}),e.jsxs("li",{children:[e.jsx("b",{children:"429:"})," traffic limit exceeded; obey ",e.jsx("code",{children:"Retry-After"}),"."]}),e.jsxs("li",{children:[e.jsx("b",{children:"5xx:"})," temporary server failure; retry with bounded backoff."]})]}),e.jsx(l,{value:'{ "detail": "API traffic limit exceeded. Retry with backoff." }'})]}),e.jsxs("section",{id:"changelog",children:[e.jsx("h2",{children:"Changelog"}),e.jsx("h3",{children:"Initial experimental beta"}),e.jsx("p",{children:"Core catalog reads, keyword search, public schemas, and anonymous browser access. Planned breaking changes will be announced here at least 14 days before they take effect. Urgent security and service-restoration fixes may take effect immediately. This beta has no uptime or support-response guarantee."})]}),r&&e.jsx("p",{role:"status",children:"Loading endpoint reference…"}),n&&e.jsxs("div",{role:"alert",children:[e.jsx("p",{children:"Could not load the endpoint reference."}),e.jsx("button",{onClick:()=>void a(),children:"Retry"})]}),s&&e.jsxs(e.Fragment,{children:[Object.entries(s.paths).map(([t,{get:i}])=>e.jsx(P,{path:t,operation:i},t)),e.jsxs("section",{id:"response-models",children:[e.jsx("h2",{children:"Response models"}),Object.entries(s.components.schemas).map(([t,i])=>e.jsxs("article",{id:`model-${t}`,children:[e.jsx("h3",{children:t}),e.jsx("p",{children:i.description}),e.jsx(j,{schema:i})]},t))]})]})]})]})}export{S as default};
|
assets/ApiDocsView-hjoHKqpf.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
| 1 |
-
import{a6 as m,r as o,j as e}from"./index-CbgxfyGU.js";import{u as f}from"./useQuery-Bx9s5-D2.js";import{M as g}from"./index-ZkEATkOr.js";const y={queryKey:["public-api-schema"],queryFn:()=>m("/openapi.json",{credentials:"omit"}),staleTime:5*60*1e3};function b(s,r){const n=new URLSearchParams;for(const[a,t]of Object.entries(r["x-example-parameters"]))s.includes(`{${a}}`)?s=s.replace(`{${a}}`,encodeURIComponent(String(t))):n.append(a,String(t));return`https://paperswithcode.co${s}${n.size?`?${n}`:""}`}function w(s,r){return r==="Python"?`import requests
|
| 2 |
-
|
| 3 |
-
response = requests.get(${JSON.stringify(s)}, timeout=30)
|
| 4 |
-
response.raise_for_status()
|
| 5 |
-
print(response.json())`:r==="JavaScript"?`const response = await fetch(${JSON.stringify(s)}, {
|
| 6 |
-
credentials: "omit",
|
| 7 |
-
});
|
| 8 |
-
if (!response.ok) throw new Error(\`HTTP \${response.status}\`);
|
| 9 |
-
console.log(await response.json());`:`curl --fail-with-body ${JSON.stringify(s)}`}function d(s){return s.$ref?s.$ref.split("/").pop()??"object":s.anyOf?s.anyOf.map(d).join(" | "):s.allOf?s.allOf.map(d).join(" & "):s.enum?s.enum.map(r=>JSON.stringify(r)).join(" | "):s.type==="array"?`array<${d(s.items??{})}>`:s.type??"object"}const v=["curl","Python","JavaScript"],k="https://github.com/huggingface/paperswithcode/issues/new?template=api.yml";function h({value:s}){const[r,n]=o.useState("Copy");async function a(){try{await navigator.clipboard.writeText(s),n("Copied")}catch{n("Select and copy the code below")}}return e.jsxs("div",{className:"api-code",children:[e.jsx("pre",{children:e.jsx("code",{children:s})}),e.jsx("button",{onClick:a,"aria-live":"polite",children:r})]})}function c({schema:s}){if(s.$ref){const r=d(s);return e.jsx("a",{href:`#model-${r}`,children:r})}return s.anyOf||s.allOf?e.jsx(e.Fragment,{children:(s.anyOf??s.allOf).map((r,n)=>e.jsxs("span",{children:[n>0&&" | ",e.jsx(c,{schema:r})]},n))}):s.type==="array"?e.jsxs(e.Fragment,{children:["array of ",e.jsx(c,{schema:s.items??{}})]}):e.jsx("code",{children:d(s)})}function x({schema:s}){return e.jsxs(e.Fragment,{children:[["minimum","maximum","minLength","maxLength"].map(r=>s[r]!==void 0&&e.jsxs("small",{children:[r,": ",s[r]]},r)),(s.anyOf??s.allOf??[]).map((r,n)=>e.jsx(x,{schema:r},n))]})}function j({schema:s}){return s.properties?e.jsx("div",{className:"api-table-wrap",children:e.jsxs("table",{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Field"}),e.jsx("th",{children:"Type"}),e.jsx("th",{children:"Description"})]})}),e.jsx("tbody",{children:Object.entries(s.properties).map(([r,n])=>{var a;return e.jsxs("tr",{children:[e.jsxs("td",{children:[e.jsx("code",{children:r}),((a=s.required)==null?void 0:a.includes(r))&&e.jsx("small",{children:"required"})]}),e.jsx("td",{children:e.jsx(c,{schema:n})}),e.jsxs("td",{children:[n.description,n.format&&e.jsxs("small",{children:["Format: ",n.format]}),n.default!==void 0&&e.jsxs("small",{children:["Default: ",JSON.stringify(n.default)]}),n.properties&&e.jsx(j,{schema:n}),typeof n.additionalProperties=="object"&&e.jsxs("p",{children:["Values:"," ",e.jsx(c,{schema:n.additionalProperties})]})]})]},r)})})]})}):e.jsx(c,{schema:s})}function q({path:s,operation:r}){var t;const[n,a]=o.useState("curl");return e.jsxs("section",{id:r.operationId,className:"api-endpoint",children:[e.jsx("h2",{children:r.summary}),e.jsxs("p",{className:"api-path",children:[e.jsx("b",{children:"GET"})," ",e.jsx("code",{children:s})]}),e.jsx("div",{className:"api-description",children:e.jsx(g,{children:r.description})}),!!((t=r.parameters)!=null&&t.length)&&e.jsxs(e.Fragment,{children:[e.jsx("h3",{children:"Parameters"}),e.jsx("div",{className:"api-table-wrap",children:e.jsxs("table",{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Parameter"}),e.jsx("th",{children:"Type"}),e.jsx("th",{children:"Description"})]})}),e.jsx("tbody",{children:r.parameters.map(i=>e.jsxs("tr",{children:[e.jsxs("td",{children:[e.jsx("code",{children:i.name}),e.jsxs("small",{children:[i.in," ·"," ",i.required?"required":"optional"]})]}),e.jsx("td",{children:e.jsx(c,{schema:i.schema})}),e.jsxs("td",{children:[i.description,i.schema.default!==void 0&&e.jsxs("small",{children:["Default: ",JSON.stringify(i.schema.default)]}),e.jsx(x,{schema:i.schema})]})]},`${i.in}-${i.name}`))})]})})]}),e.jsx("h3",{children:"Example request"}),e.jsx("div",{className:"api-languages",role:"group","aria-label":`Example language for ${r.summary}`,children:v.map(i=>e.jsx("button",{"aria-pressed":n===i,onClick:()=>a(i),children:i},i))}),e.jsx(h,{value:w(b(s,r),n)}),e.jsx("h3",{children:"Responses"}),Object.entries(r.responses).map(([i,l])=>{var p,u;return e.jsxs("div",{className:"api-response",children:[e.jsx("strong",{children:i})," ",l.description,((u=(p=l.content)==null?void 0:p["application/json"])==null?void 0:u.schema)&&e.jsx("p",{children:e.jsx(c,{schema:l.content["application/json"].schema})})]},i)})]})}function I(){const{data:s,isPending:r,isError:n,refetch:a}=f(y);return o.useEffect(()=>{const t=document.title;return document.title="API documentation — Papers With Code",()=>{document.title=t}},[]),o.useEffect(()=>{if(!s||!window.location.hash)return;const t=requestAnimationFrame(()=>{var i;(i=document.getElementById(window.location.hash.slice(1)))==null||i.scrollIntoView()});return()=>cancelAnimationFrame(t)},[s]),e.jsxs("div",{className:"api-docs",children:[e.jsxs("nav",{className:"api-sidebar","aria-label":"API documentation",children:[e.jsx("strong",{children:"API documentation"}),e.jsx("a",{href:"#getting-started",children:"Getting started"}),e.jsx("a",{href:"#limits",children:"Traffic limits"}),e.jsx("a",{href:"#pagination",children:"Pagination & identifiers"}),e.jsx("a",{href:"#benchmarks",children:"Reading leaderboards"}),e.jsx("a",{href:"#errors",children:"Errors"}),e.jsx("a",{href:"#changelog",children:"Changelog"}),s&&Object.entries(s.paths).map(([t,{get:i}])=>e.jsx("a",{href:`#${i.operationId}`,children:i.summary},t)),e.jsx("a",{href:"#response-models",children:"Response models"})]}),e.jsxs("main",{className:"api-content",children:[e.jsxs("section",{id:"getting-started",children:[e.jsx("span",{className:"api-beta",children:"Experimental beta"}),e.jsx("h1",{children:"Papers With Code API"}),e.jsx("p",{className:"api-lead",children:"Find papers, explore benchmarks, and bring research results into your scripts and applications."}),e.jsx("p",{children:"Free, anonymous, read-only access. No account or API key required. The public beta covers keyword search and core catalog lookups."}),e.jsxs("p",{children:[e.jsx("a",{href:"https://paperswithcode.co/api/v1/openapi.json",children:"Download the public OpenAPI specification"})," ","· ",e.jsx("a",{href:k,children:"Report a bug or request a feature"})]}),e.jsx("h2",{children:"Your first request"}),e.jsx(h,{value:'curl --fail-with-body "https://paperswithcode.co/api/v1/papers/search?q=attention&mode=keyword&page_size=5"'}),e.jsxs("p",{children:["Responses are JSON. Python examples require"," ",e.jsx("code",{children:"pip install requests"}),"; JavaScript examples use built-in"," ",e.jsx("code",{children:"fetch"}),". Browser requests from any origin are supported for these public reads: omit cookies and authorization headers."]}),e.jsxs("p",{children:["Base URL: ",e.jsx("code",{children:"https://paperswithcode.co/api/v1"})]})]}),e.jsxs("section",{id:"limits",children:[e.jsx("h2",{children:"Traffic limits"}),e.jsx("p",{children:"Each IP address shares a catalog allowance of 120 requests/minute. List and search endpoints also share a stricter allowance of 60 requests/minute. These are sustained rates with short bursts of up to 60 and 20 excess requests respectively, not fixed-minute quotas."}),e.jsxs("p",{children:["Website browsing and scripts on the same network share these limits. Send requests sequentially, cache results, and avoid parallel crawls. On HTTP 429, wait at least the ",e.jsx("code",{children:"Retry-After"})," ","duration, then retry with increasing delays and jitter. Browser preflight requests do not consume this allowance."]})]}),e.jsxs("section",{id:"pagination",children:[e.jsx("h2",{children:"Pagination & identifiers"}),e.jsxs("p",{children:["Paginated endpoints return ",e.jsx("code",{children:"results"}),","," ",e.jsx("code",{children:"next_page"}),", and ",e.jsx("code",{children:"previous_page"}),". Catalog lists also return ",e.jsx("code",{children:"count"}),"; paper search omits it. Pass"," ",e.jsx("code",{children:"page"})," and ",e.jsx("code",{children:"page_size"}),"; stop when"," ",e.jsx("code",{children:"next_page"})," is null. Recent and trending endpoints instead return arrays bounded by ",e.jsx("code",{children:"limit"}),"."]}),e.jsx("p",{children:"Paper listing and search stop at page 100. Other bounds are shown per endpoint. Counts and page contents may change as the catalog updates; pagination is not a snapshot or a bulk export interface."}),e.jsxs("p",{children:["Use identifiers returned by lookups. Paper detail accepts an arXiv ID or numeric catalog ID; the arXiv endpoint takes an arXiv ID. Task and dataset detail accept their catalog IDs or slugs. Leaderboard metrics require numeric task and dataset IDs. Evaluation filters such as ",e.jsx("code",{children:"dataset_id"})," and ",e.jsx("code",{children:"task_id"})," require numeric catalog IDs. Example IDs may no longer exist: replace them with current lookup results."]})]}),e.jsxs("section",{id:"benchmarks",children:[e.jsx("h2",{children:"Reading leaderboards"}),e.jsxs("p",{children:["Search datasets, select a dataset, then fetch its tasks and the metrics for a dataset/task pair. Fetch"," ",e.jsx("code",{children:"/evaluations/?dataset_id=…&task_id=…&ordering=best_rank"})," ","using the numeric IDs. An evaluation includes reported scores and source information; check metric direction, split, and evaluation setup before comparing results."]}),e.jsxs("p",{children:["Use ",e.jsx("code",{children:"include_resources=true"})," on paper list/detail requests for linked repositories and project pages. Missing fields or null values mean data is unavailable; they are not zero scores. Keyword search examples explicitly send ",e.jsx("code",{children:"mode=keyword"}),"; semantic and hybrid search are outside this beta."]})]}),e.jsxs("section",{id:"errors",children:[e.jsx("h2",{children:"Errors"}),e.jsxs("p",{children:["Check the HTTP status before parsing a successful result. Errors usually contain a ",e.jsx("code",{children:"detail"})," field, which can be a string, object, or validation-error array."]}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("b",{children:"400:"})," invalid request."]}),e.jsxs("li",{children:[e.jsx("b",{children:"404:"})," record not found."]}),e.jsxs("li",{children:[e.jsx("b",{children:"422:"})," invalid parameter type, value, or missing parameter."]}),e.jsxs("li",{children:[e.jsx("b",{children:"429:"})," traffic limit exceeded; obey ",e.jsx("code",{children:"Retry-After"}),"."]}),e.jsxs("li",{children:[e.jsx("b",{children:"5xx:"})," temporary server failure; retry with bounded backoff."]})]}),e.jsx(h,{value:'{ "detail": "API traffic limit exceeded. Retry with backoff." }'})]}),e.jsxs("section",{id:"changelog",children:[e.jsx("h2",{children:"Changelog"}),e.jsx("h3",{children:"Initial experimental beta"}),e.jsx("p",{children:"Core catalog reads, keyword search, public schemas, and anonymous browser access. Planned breaking changes will be announced here at least 14 days before they take effect. Urgent security and service-restoration fixes may take effect immediately. This beta has no uptime or support-response guarantee."})]}),r&&e.jsx("p",{role:"status",children:"Loading endpoint reference…"}),n&&e.jsxs("div",{role:"alert",children:[e.jsx("p",{children:"Could not load the endpoint reference."}),e.jsx("button",{onClick:()=>void a(),children:"Retry"})]}),s&&e.jsxs(e.Fragment,{children:[Object.entries(s.paths).map(([t,{get:i}])=>e.jsx(q,{path:t,operation:i},t)),e.jsxs("section",{id:"response-models",children:[e.jsx("h2",{children:"Response models"}),Object.entries(s.components.schemas).map(([t,i])=>e.jsxs("article",{id:`model-${t}`,children:[e.jsx("h3",{children:t}),e.jsx("p",{children:i.description}),e.jsx(j,{schema:i})]},t))]})]})]})]})}export{I as default};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/{AreaSection-NWvfO4Sb.js → AreaSection-BxnKzNK0.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{j as s}from"./index-
|
|
|
|
| 1 |
+
import{j as s}from"./index-DyXq7-Tg.js";import{S as l}from"./skeleton-C3IIzpSL.js";const m=({id:t,title:a,description:e,meta:r,style:c,children:i})=>s.jsxs("section",{id:t,className:"area-section",style:c,children:[s.jsxs("div",{className:"area-section-head",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"area-section-title",children:a}),e&&s.jsx("div",{className:"area-section-description",children:e})]}),s.jsx("div",{className:"area-section-meta",children:r})]}),s.jsx("div",{className:"tag-grid",children:i})]}),h=({sections:t=4,tiles:a,tileClassName:e})=>s.jsx("div",{className:"area-directory-skeleton",children:Array.from({length:t}).map((r,c)=>s.jsxs("div",{children:[s.jsx(l,{className:"h-8 w-1/3 mb-4"}),s.jsx("div",{className:"tag-grid",children:Array.from({length:a}).map((i,n)=>s.jsx(l,{className:e},n))})]},c))}),x=({areas:t})=>{const a=t.filter(r=>r.tasks.length>0),e=a.reduce((r,c)=>r+c.tasks.length,0);return e===0?null:s.jsxs("div",{className:"area-directory-footer",children:[e," tasks across ",a.length," areas."]})};export{h as A,m as a,x as b};
|
assets/{ArtifactWorkspace-Cwix1Wp6.js → ArtifactWorkspace-Ya79_F5k.js}
RENAMED
|
The diff for this file is too large to render.
See raw diff
|
|
|
assets/AstraForRoboticsView-BZJ-P8S9.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{p,d as u,j as a,L as o}from"./index-DyXq7-Tg.js";import{u as g,b as x,a as b}from"./PaperFeed-EBt97iOL.js";import{A as f,a as j}from"./alert-gbJBhAVE.js";import{u as y}from"./usePapers-B0s20UcU.js";import{p as v}from"./papers-Dh3ljlL0.js";import{u as k,f as w}from"./useDocumentTitle-DcxM2Zv_.js";import{t as A}from"./transform-D46m70Qr.js";import"./PaperCard-57p1OSGy.js";import"./AuthorAvatar-B-9xS2Wo.js";import"./SotaBadges-vbLLOUtT.js";import"./colors-BkWRhvFI.js";import"./Icon-T4LYkEQj.js";import"./LatexTitle-Bkyz3jCs.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-CTBEUp7Y.js";import"./skeleton-C3IIzpSL.js";import"./useIntersectionObserver-D6_Iig9a.js";import"./useInfiniteQuery-BYh2zN-T.js";import"./curation-YeS7FBYf.js";const n="robotics",i="gpt-6-astra",_="https://x.com/YuXiang_IRVL/status/2100395131924840570",P=[{handle:"Frame_Robotics",author:"Frame Robotics",summary:"Real-arm control that fixes grip angle and carry height on the next try after a miss.",url:"https://x.com/Frame_Robotics/status/2099900836273090614"},{handle:"qineng_wang",author:"Qineng Wang",summary:"Dual-ALOHA spatial-constraint puzzles: unlocking interlocked parts and threading a rope through three rings.",url:"https://x.com/qineng_wang/status/2099893504658866561"},{handle:"__Rhodium__",author:"Lucas",summary:"In-context learning of the controls and the workspace, reaching the task goal in three tries.",url:"https://x.com/__Rhodium__/status/2099521054678925534"},{handle:"SuveenE",author:"Suveen Ellawela",summary:"Picking up a pipette and fitting a 5 mm tip on a MolmoAct2 real-world eval, using the free hand for a better view.",url:"https://x.com/SuveenE/status/2099448450341605672"},{handle:"cdngdev",author:"thijs",summary:"A robot arm with a paintbrush painting the Golden Gate Bridge, improving across attempts from camera feedback.",url:"https://x.com/cdngdev/status/2097339677128982873"},{handle:"IsaacSin12",author:"Isaac Sin",summary:"Zero-shot sorting of irregularly shaped blocks into cups by color.",url:"https://x.com/IsaacSin12/status/2096715382166098302"},{handle:"chooi_jeq",author:"Jay Chooi",summary:"Robocurve's robot-control comparison: 95% task completion versus 40% for Fable 5.1 at lower cost.",url:"https://x.com/chooi_jeq/status/2096064315115839904"}],R=[{handle:"Lingjun_Mao",author:"Lingjun Mao",summary:"Adapting to a new embodiment to put a cake into an air fryer through CuRobo motion-planning tool APIs.",url:"https://x.com/Lingjun_Mao/status/2100294902672462176"},{handle:"walterzhu8",author:"Wentao Zhu",summary:"A day-and-a-half autonomous run that builds and trains pen spinning on a Sharpa hand in Isaac Lab.",url:"https://x.com/walterzhu8/status/2100212420840989112"},{handle:"mishig25",author:"Mishig",summary:"Painting the Eiffel Tower in MuJoCo with an SO-101 and a brush, with the full experiment shared on Hugging Face.",url:"https://x.com/mishig25/status/2099611674793668676"},{handle:"RunpeiDong",author:"Runpei Dong",summary:"Getting a humanoid into a Tesla in MuJoCo: learning from feedback, then reusing that experience with egocentric perception.",url:"https://x.com/RunpeiDong/status/2099604536327614717"},{handle:"frankzydou",author:"Zhiyang (Frank) Dou",summary:"A LeRobot SO-101 real-world pickup from a third-person RGB camera, where the arm has to bend back to reach the pen.",url:"https://x.com/frankzydou/status/2099338127915512297"},{handle:"Parvkpr",author:"Parv Kapoor",summary:"Real-to-sim: building an interactive simulation environment from a single image or video.",url:"https://x.com/Parvkpr/status/2098847963867238597"},{handle:"z_code68632",author:"code_z",summary:"One demo per task: unscrewing a bottle cap, inserting a plug, clearing obstacles, and imitating a dance on a real robot.",url:"https://x.com/z_code68632/status/2098397364725895387"}],h=({posts:s,label:e})=>a.jsxs("div",{className:"astra-posts",children:[a.jsx("div",{className:"astra-posts-label",children:e}),a.jsx("ul",{children:s.map(t=>a.jsxs("li",{children:[a.jsxs("a",{href:t.url,target:"_blank",rel:"noreferrer",children:["@",t.handle]}),a.jsxs("span",{className:"astra-post-author",children:[" ",t.author]}),a.jsxs("span",{className:"astra-post-summary",children:[" — ",t.summary]})]},t.url))})]}),B=()=>{var l,c;const s=g(),e=y([...p.feeds.infinite,{task:n,method:i,...s.filters}],r=>v.list({...s.filters,task:n,method:i,page:r,page_size:12}));k(w("GPT-6 Astra for Robotics"));const t=u.useMemo(()=>{var r;return(((r=e.data)==null?void 0:r.pages)??[]).flatMap(d=>d.results.map(A))},[e.data]),m=((c=(l=e.data)==null?void 0:l.pages[0])==null?void 0:c.count)??0;return a.jsxs("div",{className:"page",children:[a.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[a.jsx(o,{to:"/",children:"Home"}),a.jsx("span",{children:" / "}),a.jsx("span",{children:"GPT-6 Astra for Robotics"})]}),a.jsx("header",{className:"feed-header",children:a.jsxs("div",{children:[a.jsx("div",{className:"astra-eyebrow",children:"Collection"}),a.jsxs("h1",{className:"feed-title",children:["GPT-6 Astra ",a.jsx("em",{children:"for Robotics"})]}),a.jsx("div",{className:"feed-subtitle",children:"Papers, technical reports, and evaluations that put OpenAI’s frontier model in control of real and simulated robots."}),a.jsxs("p",{className:"astra-lede",children:["The GPT-6 Astra launch never mentioned robots, yet within days the model was driving arms, hands, and humanoids. As"," ",a.jsx("a",{href:_,target:"_blank",rel:"noreferrer",children:"Yu Xiang"})," ","framed it, the work splits into two families: Astra acting as the robot policy itself, and Astra acting as an agent that orchestrates everything else."]})]})}),a.jsxs("section",{className:"astra-approaches","aria-label":"How GPT-6 Astra is used for robots",children:[a.jsxs("article",{className:"astra-approach",children:[a.jsx("div",{className:"astra-approach-num",children:"01 / Robot policy"}),a.jsx("h2",{children:"Astra as the policy, like a VLA"}),a.jsx("p",{children:"The model looks at camera frames and robot state and directly emits actions: end-effector poses, joint targets, or gripper commands, closing the control loop step by step with no task-specific training."}),a.jsx(h,{posts:P,label:"Seen on X"})]}),a.jsxs("article",{className:"astra-approach",children:[a.jsx("div",{className:"astra-approach-num",children:"02 / Agent"}),a.jsx("h2",{children:"Astra as the agent"}),a.jsx("p",{children:"The model reasons about the scene, writes and runs code, calls planners and tools, or delegates low-level motion to pretrained policies such as VLAs, and keeps the robot on task over long horizons."}),a.jsx(h,{posts:R,label:"Seen on X"})]})]}),a.jsxs("p",{className:"astra-note",children:["Listing is automatic: any paper tagged with both the"," ",a.jsx(o,{to:`/tasks/${n}`,children:"Robotics"})," task and the"," ",a.jsx(o,{to:`/methods/${i}`,children:"GPT-6 Astra"})," method appears here. Missing a report or preprint?"," ",a.jsx(o,{to:"/submit",children:"Submit it"}),"."]}),a.jsxs("div",{className:"task-section-head",style:{marginTop:36},children:[a.jsx("div",{className:"task-section-eyebrow",children:"Top trending · sort below"}),a.jsxs("div",{className:"task-section-title",children:["Papers ",a.jsxs("span",{className:"meta",children:["[",m.toLocaleString(),"]"]})]})]}),a.jsx(x,{feed:s,showDateFilter:!1}),e.error?a.jsx(f,{variant:"destructive",children:a.jsx(j,{children:"Failed to load the collection. Please try again."})}):a.jsx(b,{query:e,cards:t,empty:"No papers match this selection yet."})]})};export{B as default};
|
assets/AstraForRoboticsView-pQ4cp5_V.js
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
import{r as h,j as a,L as o}from"./index-CbgxfyGU.js";import{u,b as g,a as x}from"./PaperFeed-DMvUfA47.js";import{A as f,a as b}from"./alert-CFDDvdIM.js";import{u as j}from"./usePapers-CJaWLZ3y.js";import{p as y,a as v}from"./paperQueryKeys-B8u1BWlI.js";import{f as k,D as w}from"./latexPlainText-DI8YEXVe.js";import{t as A}from"./transform-0Udg2p6b.js";import"./PaperCard-tdTC_dRN.js";import"./AuthorAvatar-CUJMmp_z.js";import"./SotaBadges-C-sTR-EF.js";import"./colors-BkWRhvFI.js";import"./Icon-D-kA0Owz.js";import"./LatexTitle-Z-HGmZ-H.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-DKJYnYjk.js";import"./skeleton-HwvdxvSN.js";import"./useIntersectionObserver-CID9Kkak.js";import"./useQuery-Bx9s5-D2.js";import"./useInfiniteQuery-BAc_4HO5.js";import"./curation-C7Gmmp4z.js";const n="robotics",i="gpt-6-astra",_="https://x.com/YuXiang_IRVL/status/2100395131924840570",P=[{handle:"Frame_Robotics",author:"Frame Robotics",summary:"Real-arm control that fixes grip angle and carry height on the next try after a miss.",url:"https://x.com/Frame_Robotics/status/2099900836273090614"},{handle:"qineng_wang",author:"Qineng Wang",summary:"Dual-ALOHA spatial-constraint puzzles: unlocking interlocked parts and threading a rope through three rings.",url:"https://x.com/qineng_wang/status/2099893504658866561"},{handle:"__Rhodium__",author:"Lucas",summary:"In-context learning of the controls and the workspace, reaching the task goal in three tries.",url:"https://x.com/__Rhodium__/status/2099521054678925534"},{handle:"SuveenE",author:"Suveen Ellawela",summary:"Picking up a pipette and fitting a 5 mm tip on a MolmoAct2 real-world eval, using the free hand for a better view.",url:"https://x.com/SuveenE/status/2099448450341605672"},{handle:"cdngdev",author:"thijs",summary:"A robot arm with a paintbrush painting the Golden Gate Bridge, improving across attempts from camera feedback.",url:"https://x.com/cdngdev/status/2097339677128982873"},{handle:"IsaacSin12",author:"Isaac Sin",summary:"Zero-shot sorting of irregularly shaped blocks into cups by color.",url:"https://x.com/IsaacSin12/status/2096715382166098302"},{handle:"chooi_jeq",author:"Jay Chooi",summary:"Robocurve's robot-control comparison: 95% task completion versus 40% for Fable 5.1 at lower cost.",url:"https://x.com/chooi_jeq/status/2096064315115839904"}],R=[{handle:"Lingjun_Mao",author:"Lingjun Mao",summary:"Adapting to a new embodiment to put a cake into an air fryer through CuRobo motion-planning tool APIs.",url:"https://x.com/Lingjun_Mao/status/2100294902672462176"},{handle:"walterzhu8",author:"Wentao Zhu",summary:"A day-and-a-half autonomous run that builds and trains pen spinning on a Sharpa hand in Isaac Lab.",url:"https://x.com/walterzhu8/status/2100212420840989112"},{handle:"mishig25",author:"Mishig",summary:"Painting the Eiffel Tower in MuJoCo with an SO-101 and a brush, with the full experiment shared on Hugging Face.",url:"https://x.com/mishig25/status/2099611674793668676"},{handle:"RunpeiDong",author:"Runpei Dong",summary:"Getting a humanoid into a Tesla in MuJoCo: learning from feedback, then reusing that experience with egocentric perception.",url:"https://x.com/RunpeiDong/status/2099604536327614717"},{handle:"frankzydou",author:"Zhiyang (Frank) Dou",summary:"A LeRobot SO-101 real-world pickup from a third-person RGB camera, where the arm has to bend back to reach the pen.",url:"https://x.com/frankzydou/status/2099338127915512297"},{handle:"Parvkpr",author:"Parv Kapoor",summary:"Real-to-sim: building an interactive simulation environment from a single image or video.",url:"https://x.com/Parvkpr/status/2098847963867238597"},{handle:"z_code68632",author:"code_z",summary:"One demo per task: unscrewing a bottle cap, inserting a plug, clearing obstacles, and imitating a dance on a real robot.",url:"https://x.com/z_code68632/status/2098397364725895387"}],m=({posts:s,label:e})=>a.jsxs("div",{className:"astra-posts",children:[a.jsx("div",{className:"astra-posts-label",children:e}),a.jsx("ul",{children:s.map(t=>a.jsxs("li",{children:[a.jsxs("a",{href:t.url,target:"_blank",rel:"noreferrer",children:["@",t.handle]}),a.jsxs("span",{className:"astra-post-author",children:[" ",t.author]}),a.jsxs("span",{className:"astra-post-summary",children:[" — ",t.summary]})]},t.url))})]}),J=()=>{var l,c;const s=u(),e=j([...y.feeds.infinite,{task:n,method:i,...s.filters}],r=>v.list({...s.filters,task:n,method:i,page:r,page_size:12}));h.useEffect(()=>(document.title=k("GPT-6 Astra for Robotics"),()=>{document.title=w}),[]);const t=h.useMemo(()=>{var r;return(((r=e.data)==null?void 0:r.pages)??[]).flatMap(p=>p.results.map(A))},[e.data]),d=((c=(l=e.data)==null?void 0:l.pages[0])==null?void 0:c.count)??0;return a.jsxs("div",{className:"page",children:[a.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[a.jsx(o,{to:"/",children:"Home"}),a.jsx("span",{children:" / "}),a.jsx("span",{children:"GPT-6 Astra for Robotics"})]}),a.jsx("header",{className:"feed-header",children:a.jsxs("div",{children:[a.jsx("div",{className:"astra-eyebrow",children:"Collection"}),a.jsxs("h1",{className:"feed-title",children:["GPT-6 Astra ",a.jsx("em",{children:"for Robotics"})]}),a.jsx("div",{className:"feed-subtitle",children:"Papers, technical reports, and evaluations that put OpenAI’s frontier model in control of real and simulated robots."}),a.jsxs("p",{className:"astra-lede",children:["The GPT-6 Astra launch never mentioned robots, yet within days the model was driving arms, hands, and humanoids. As"," ",a.jsx("a",{href:_,target:"_blank",rel:"noreferrer",children:"Yu Xiang"})," ","framed it, the work splits into two families: Astra acting as the robot policy itself, and Astra acting as an agent that orchestrates everything else."]})]})}),a.jsxs("section",{className:"astra-approaches","aria-label":"How GPT-6 Astra is used for robots",children:[a.jsxs("article",{className:"astra-approach",children:[a.jsx("div",{className:"astra-approach-num",children:"01 / Robot policy"}),a.jsx("h2",{children:"Astra as the policy, like a VLA"}),a.jsx("p",{children:"The model looks at camera frames and robot state and directly emits actions: end-effector poses, joint targets, or gripper commands, closing the control loop step by step with no task-specific training."}),a.jsx(m,{posts:P,label:"Seen on X"})]}),a.jsxs("article",{className:"astra-approach",children:[a.jsx("div",{className:"astra-approach-num",children:"02 / Agent"}),a.jsx("h2",{children:"Astra as the agent"}),a.jsx("p",{children:"The model reasons about the scene, writes and runs code, calls planners and tools, or delegates low-level motion to pretrained policies such as VLAs, and keeps the robot on task over long horizons."}),a.jsx(m,{posts:R,label:"Seen on X"})]})]}),a.jsxs("p",{className:"astra-note",children:["Listing is automatic: any paper tagged with both the"," ",a.jsx(o,{to:`/tasks/${n}`,children:"Robotics"})," task and the"," ",a.jsx(o,{to:`/methods/${i}`,children:"GPT-6 Astra"})," method appears here. Missing a report or preprint?"," ",a.jsx(o,{to:"/submit",children:"Submit it"}),"."]}),a.jsxs("div",{className:"task-section-head",style:{marginTop:36},children:[a.jsx("div",{className:"task-section-eyebrow",children:"Top trending · sort below"}),a.jsxs("div",{className:"task-section-title",children:["Papers ",a.jsxs("span",{className:"meta",children:["[",d.toLocaleString(),"]"]})]})]}),a.jsx(g,{feed:s,showDateFilter:!1}),e.error?a.jsx(f,{variant:"destructive",children:a.jsx(b,{children:"Failed to load the collection. Please try again."})}):a.jsx(x,{query:e,cards:t,empty:"No papers match this selection yet."})]})};export{J as default};
|
|
|
|
|
|
assets/AuthorAvatar-B-9xS2Wo.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{d as c,j as r}from"./index-DyXq7-Tg.js";const p=a=>a!=null&&a.startsWith("https://")&&!a.startsWith("https://huggingface.co/avatars/")?a:null,g=({url:a,className:o,href:t,label:n})=>{const[i,l]=c.useState(!1),s=i?null:p(a);if(!s)return null;const e=r.jsx("img",{className:`author-avatar-base ${o}`,src:s,alt:"",loading:"lazy",onError:()=>l(!0)});return t?r.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer","aria-label":n,children:e}):e};export{g as A};
|
assets/AuthorAvatar-CUJMmp_z.js
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
import{r as c,j as e}from"./index-CbgxfyGU.js";const p=a=>a!=null&&a.startsWith("https://")&&!a.startsWith("https://huggingface.co/avatars/")?a:null,h=({url:a,className:o,href:t,label:n})=>{const[i,l]=c.useState(!1),s=i?null:p(a);if(!s)return null;const r=e.jsx("img",{className:`author-avatar-base ${o}`,src:s,alt:"",loading:"lazy",onError:()=>l(!0)});return t?e.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer","aria-label":n,children:r}):r};export{h as A};
|
|
|
|
|
|
assets/AuthorDetailView-BpcSKHs1.js
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
import{u as b,j as a,r as N,ai as v,L as F}from"./index-CbgxfyGU.js";import{u as y}from"./useQuery-Bx9s5-D2.js";import{A}from"./AuthorAvatar-CUJMmp_z.js";import{u as k,b as P,a as $}from"./PaperFeed-DMvUfA47.js";import{R as S}from"./ResearchFollowButton-D2BXlDtQ.js";import{A as L,a as R}from"./alert-CFDDvdIM.js";import{S as w}from"./skeleton-HwvdxvSN.js";import{u as z}from"./usePapers-CJaWLZ3y.js";import{p as C,a as m}from"./paperQueryKeys-B8u1BWlI.js";import{i as H}from"./apiErrors-BZ5h1Kmb.js";import{t as q}from"./transform-0Udg2p6b.js";import f from"./NotFound-DtzwOULp.js";import"./PaperCard-tdTC_dRN.js";import"./SotaBadges-C-sTR-EF.js";import"./colors-BkWRhvFI.js";import"./Icon-D-kA0Owz.js";import"./LatexTitle-Z-HGmZ-H.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-DKJYnYjk.js";import"./useIntersectionObserver-CID9Kkak.js";import"./useMutation-P_trTy9i.js";import"./research-DgpyzSy_.js";import"./plus-UK0TEjgd.js";import"./useInfiniteQuery-BAc_4HO5.js";import"./curation-C7Gmmp4z.js";const Q=({authorId:r})=>{var n,i,l,p,c,d,h,u;const o=k(),{searchParams:g}=o,e=y({queryKey:["author",r],queryFn:()=>m.getAuthor(r)}),s=z([...C.feeds.infinite,{author:r,...o.filters}],t=>m.list({...o.filters,author:r,page:t,page_size:12})),x=N.useMemo(()=>{var t;return(((t=s.data)==null?void 0:t.pages)??[]).flatMap(_=>_.results.map(q))},[s.data]),j=((i=(n=s.data)==null?void 0:n.pages[0])==null?void 0:i.count)??0;if(H(e.error))return a.jsx(f,{});if((l=e.data)!=null&&l.organization_slug){const t=g.toString();return a.jsx(v,{to:`/orgs/${e.data.organization_slug}${t?`?${t}`:""}`,replace:!0})}return a.jsxs("div",{className:"page",children:[a.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[a.jsx(F,{to:"/",children:"Home"}),a.jsx("span",{children:" / "}),a.jsx("span",{children:"Authors"}),a.jsx("span",{children:" / "}),a.jsx("span",{children:((p=e.data)==null?void 0:p.full_name)??r})]}),a.jsxs("header",{className:"author-hero",children:[a.jsx("div",{className:"organizations-eyebrow",children:"AUTHOR"}),a.jsxs("div",{className:"author-hero-title",children:[(c=e.data)!=null&&c.photo?a.jsxs("figure",{className:"author-photo",children:[a.jsx("img",{className:"author-avatar-base author-avatar",src:e.data.photo.url,alt:""}),a.jsxs("figcaption",{children:["Photo:"," ",a.jsx("a",{href:e.data.photo.source_url,target:"_blank",rel:"noopener noreferrer",children:e.data.photo.credit}),", ",e.data.photo.license_url?a.jsx("a",{href:e.data.photo.license_url,target:"_blank",rel:"noopener noreferrer",children:e.data.photo.license}):e.data.photo.license]})]}):((d=e.data)==null?void 0:d.hf_username)&&a.jsx(A,{className:"author-avatar",url:e.data.hf_avatar_url,href:`https://huggingface.co/${e.data.hf_username}`,label:`@${e.data.hf_username} on Hugging Face`}),a.jsx("h1",{className:"feed-title",children:((h=e.data)==null?void 0:h.full_name)??a.jsx(w,{className:"h-12 w-64 inline-block"})})]}),e.data&&a.jsxs("div",{className:"feed-subtitle",children:[e.data.paper_count.toLocaleString()," ",e.data.paper_count===1?"paper":"papers",e.data.hf_username&&a.jsxs(a.Fragment,{children:[" · ",a.jsxs("a",{href:`https://huggingface.co/${e.data.hf_username}`,target:"_blank",rel:"noopener noreferrer",children:["@",e.data.hf_username," on Hugging Face ↗"]})]}),e.data.google_scholar_id&&a.jsxs(a.Fragment,{children:[" · ",a.jsx("a",{href:`https://scholar.google.com/citations?user=${encodeURIComponent(e.data.google_scholar_id)}`,target:"_blank",rel:"noopener noreferrer",children:"Google Scholar ↗"})]})]}),e.data&&a.jsx(S,{kind:"author",entityId:e.data.id})]}),a.jsx(P,{feed:o,style:{alignItems:"center",gap:16},children:a.jsxs("div",{className:"results-count",children:[j.toLocaleString()," papers"]})}),s.error?a.jsx(L,{variant:"destructive",children:a.jsxs(R,{children:["Failed to load papers."," ",a.jsx("button",{type:"button",onClick:()=>void s.refetch(),children:"Try again"})]})}):a.jsx($,{query:s,cards:x,empty:((u=e.data)==null?void 0:u.paper_count)===0?"No public papers are available.":"No papers found for this selection."})]})},pa=()=>{const{authorId:r}=b();return r?a.jsx(Q,{authorId:r},r):a.jsx(f,{})};export{pa as default};
|
|
|
|
|
|
assets/AuthorDetailView-BykOxZh0.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{u as b,j as a,b as N,p as v,d as F,ao as y,L as A}from"./index-DyXq7-Tg.js";import{A as k}from"./AuthorAvatar-B-9xS2Wo.js";import{u as P,b as $,a as S}from"./PaperFeed-EBt97iOL.js";import{R as L}from"./ResearchFollowButton-Dv316ClR.js";import{A as R,a as w}from"./alert-gbJBhAVE.js";import{S as z}from"./skeleton-C3IIzpSL.js";import{u as C}from"./usePapers-B0s20UcU.js";import{p as m}from"./papers-Dh3ljlL0.js";import{i as H}from"./apiErrors-BSvbQBb0.js";import{t as q}from"./transform-D46m70Qr.js";import f from"./NotFound-DV_nwcxG.js";import"./PaperCard-57p1OSGy.js";import"./SotaBadges-vbLLOUtT.js";import"./colors-BkWRhvFI.js";import"./Icon-T4LYkEQj.js";import"./LatexTitle-Bkyz3jCs.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-CTBEUp7Y.js";import"./useIntersectionObserver-D6_Iig9a.js";import"./researchTopic-DbX0eko-.js";import"./useMutation-UWxBeqtn.js";import"./plus-Yh42pKZz.js";import"./useInfiniteQuery-BYh2zN-T.js";import"./curation-YeS7FBYf.js";const Q=({authorId:r})=>{var n,i,l,p,c,d,h,u;const o=P(),{searchParams:g}=o,e=N({queryKey:["author",r],queryFn:()=>m.getAuthor(r)}),s=C([...v.feeds.infinite,{author:r,...o.filters}],t=>m.list({...o.filters,author:r,page:t,page_size:12})),x=F.useMemo(()=>{var t;return(((t=s.data)==null?void 0:t.pages)??[]).flatMap(_=>_.results.map(q))},[s.data]),j=((i=(n=s.data)==null?void 0:n.pages[0])==null?void 0:i.count)??0;if(H(e.error))return a.jsx(f,{});if((l=e.data)!=null&&l.organization_slug){const t=g.toString();return a.jsx(y,{to:`/orgs/${e.data.organization_slug}${t?`?${t}`:""}`,replace:!0})}return a.jsxs("div",{className:"page",children:[a.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[a.jsx(A,{to:"/",children:"Home"}),a.jsx("span",{children:" / "}),a.jsx("span",{children:"Authors"}),a.jsx("span",{children:" / "}),a.jsx("span",{children:((p=e.data)==null?void 0:p.full_name)??r})]}),a.jsxs("header",{className:"author-hero",children:[a.jsx("div",{className:"organizations-eyebrow",children:"AUTHOR"}),a.jsxs("div",{className:"author-hero-title",children:[(c=e.data)!=null&&c.photo?a.jsxs("figure",{className:"author-photo",children:[a.jsx("img",{className:"author-avatar-base author-avatar",src:e.data.photo.url,alt:""}),a.jsxs("figcaption",{children:["Photo:"," ",a.jsx("a",{href:e.data.photo.source_url,target:"_blank",rel:"noopener noreferrer",children:e.data.photo.credit}),", ",e.data.photo.license_url?a.jsx("a",{href:e.data.photo.license_url,target:"_blank",rel:"noopener noreferrer",children:e.data.photo.license}):e.data.photo.license]})]}):((d=e.data)==null?void 0:d.hf_username)&&a.jsx(k,{className:"author-avatar",url:e.data.hf_avatar_url,href:`https://huggingface.co/${e.data.hf_username}`,label:`@${e.data.hf_username} on Hugging Face`}),a.jsx("h1",{className:"feed-title",children:((h=e.data)==null?void 0:h.full_name)??a.jsx(z,{className:"h-12 w-64 inline-block"})})]}),e.data&&a.jsxs("div",{className:"feed-subtitle",children:[e.data.paper_count.toLocaleString()," ",e.data.paper_count===1?"paper":"papers",e.data.hf_username&&a.jsxs(a.Fragment,{children:[" · ",a.jsxs("a",{href:`https://huggingface.co/${e.data.hf_username}`,target:"_blank",rel:"noopener noreferrer",children:["@",e.data.hf_username," on Hugging Face ↗"]})]}),e.data.google_scholar_id&&a.jsxs(a.Fragment,{children:[" · ",a.jsx("a",{href:`https://scholar.google.com/citations?user=${encodeURIComponent(e.data.google_scholar_id)}`,target:"_blank",rel:"noopener noreferrer",children:"Google Scholar ↗"})]})]}),e.data&&a.jsx(L,{kind:"author",entityId:e.data.id})]}),a.jsx($,{feed:o,style:{alignItems:"center",gap:16},children:a.jsxs("div",{className:"results-count",children:[j.toLocaleString()," papers"]})}),s.error?a.jsx(R,{variant:"destructive",children:a.jsxs(w,{children:["Failed to load papers."," ",a.jsx("button",{type:"button",onClick:()=>void s.refetch(),children:"Try again"})]})}):a.jsx(S,{query:s,cards:x,empty:((u=e.data)==null?void 0:u.paper_count)===0?"No public papers are available.":"No papers found for this selection."})]})},la=()=>{const{authorId:r}=b();return r?a.jsx(Q,{authorId:r},r):a.jsx(f,{})};export{la as default};
|
assets/AuthorizePaperEditView-D0e1jji8.js
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
import{u,a as d,j as e,L as l,H as p}from"./index-CbgxfyGU.js";import{u as c}from"./useQuery-Bx9s5-D2.js";import{u as h}from"./useMutation-P_trTy9i.js";import{B as m}from"./button-Bv9oZ-QU.js";import{p as n}from"./paperEdits-C5GTaRR8.js";function b(){const{authorizationId:t=""}=u(),{user:s,isLoading:o}=d(),i=c({queryKey:["paper-edit-authorization",t],queryFn:()=>n.authorization(t),retry:!1}),r=h({mutationFn:()=>n.approve(t)}),a=i.data;return e.jsxs("main",{className:"mx-auto max-w-xl space-y-5 px-6 py-12",children:[e.jsx("h1",{className:"text-2xl font-semibold",children:"Authorize your agent to edit a paper"}),(i.isLoading||o)&&e.jsx("p",{children:"Loading authorization…"}),i.error&&e.jsx("p",{role:"alert",children:i.error.message}),a&&e.jsxs(e.Fragment,{children:[e.jsx(l,{className:"underline",to:`/paper/${a.paper_id}`,children:a.title}),e.jsxs("p",{children:["Check that your CLI shows this code: ",e.jsx("strong",{className:"font-mono",children:a.user_code})]}),e.jsx("p",{children:"Only approve a request you started. Your agent will be able to publish changes to this paper’s links, tags, and evaluation results for one hour, without further approval."}),e.jsx("p",{children:"Edits appear publicly under your Hugging Face username. You can edit up to 20 distinct papers per UTC day. Evaluation deletion and changes to shared benchmark definitions require an administrator."}),r.isSuccess||a.approved?e.jsx("p",{role:"status",children:"Access approved. Return to your CLI to continue."}):s?e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:["Signed in as ",e.jsxs("strong",{children:["@",s.username]})]}),e.jsx(m,{disabled:r.isPending||!s.can_directly_edit_catalog,onClick:()=>r.mutate(),children:r.isPending?"Authorizing…":"Authorize for one hour"}),!s.can_directly_edit_catalog&&e.jsx("p",{children:"Direct editing is unavailable for this session."})]}):e.jsx(p,{returnTo:`/authorize-paper-edit/${t}`,label:"Sign in with Hugging Face"}),r.error&&e.jsx("p",{role:"alert",children:r.error.message})]})]})}export{b as default};
|
|
|
|
|
|
assets/AuthorizePaperEditView-DNfre5z5.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{u,a as d,b as l,j as e,L as p,H as c}from"./index-DyXq7-Tg.js";import{u as h}from"./useMutation-UWxBeqtn.js";import{B as g}from"./button-DZeAbOf2.js";import{p as n}from"./paperEdits-CIjFYfYE.js";function f(){const{authorizationId:t=""}=u(),{user:s,isLoading:o}=d(),i=l({queryKey:["paper-edit-authorization",t],queryFn:()=>n.authorization(t),retry:!1}),r=h({mutationFn:()=>n.approve(t)}),a=i.data;return e.jsxs("main",{className:"mx-auto max-w-xl space-y-5 px-6 py-12",children:[e.jsx("h1",{className:"text-2xl font-semibold",children:"Authorize your agent to edit a paper"}),(i.isLoading||o)&&e.jsx("p",{children:"Loading authorization…"}),i.error&&e.jsx("p",{role:"alert",children:i.error.message}),a&&e.jsxs(e.Fragment,{children:[e.jsx(p,{className:"underline",to:`/paper/${a.paper_id}`,children:a.title}),e.jsxs("p",{children:["Check that your CLI shows this code: ",e.jsx("strong",{className:"font-mono",children:a.user_code})]}),e.jsx("p",{children:"Only approve a request you started. Your agent will be able to publish changes to this paper’s links, tags, and evaluation results for one hour, without further approval."}),e.jsx("p",{children:"Edits appear publicly under your Hugging Face username. You can edit up to 20 distinct papers per UTC day. Evaluation deletion and changes to shared benchmark definitions require an administrator."}),r.isSuccess||a.approved?e.jsx("p",{role:"status",children:"Access approved. Return to your CLI to continue."}):s?e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:["Signed in as ",e.jsxs("strong",{children:["@",s.username]})]}),e.jsx(g,{disabled:r.isPending||!s.can_directly_edit_catalog,onClick:()=>r.mutate(),children:r.isPending?"Authorizing…":"Authorize for one hour"}),!s.can_directly_edit_catalog&&e.jsx("p",{children:"Direct editing is unavailable for this session."})]}):e.jsx(c,{returnTo:`/authorize-paper-edit/${t}`,label:"Sign in with Hugging Face"}),r.error&&e.jsx("p",{role:"alert",children:r.error.message})]})]})}export{f as default};
|
assets/AutonomousOperations-B4vSAvB8.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{i as R,d,b as B,I as C,j as e,L as q}from"./index-DyXq7-Tg.js";import{u as I}from"./useMutation-UWxBeqtn.js";import{C as n,e as i,S as Q,b as l,c as t,t as E,f as m,o as x}from"./CronDashboard-qYV75PLc.js";import{B as H}from"./badge-e6t3GCyf.js";import{B as h}from"./button-DZeAbOf2.js";import{I as u}from"./input-DJqCAbs7.js";import{A as P}from"./activity-S-FQ6Anu.js";import{A as D}from"./arrow-left-PA_b6law.js";const j={submissions:"Submission review",curation:"Scheduled curation",cron_health:"CRON health",chat_reliability:"Chat reliability"},S={healthy:"healthy",degraded:"degraded",repairing:"running","rolled-back":"broken",manual:"degraded"},V=()=>{var A;const M=R(),[p,T]=d.useState(""),[f,_]=d.useState(""),[b,v]=d.useState({}),[g,N]=d.useState(""),c=B({queryKey:C.autonomousOperations,queryFn:()=>x.getAutonomousOperations(),refetchInterval:3e4,retry:!1}),r=I({mutationFn:s=>s(),onSuccess:s=>{M.setQueryData(C.autonomousOperations,s),_(""),v({}),N("")}}),a=c.data,y=r.error instanceof Error?r.error.message:null;if(c.isLoading)return e.jsx("div",{className:"page","aria-busy":"true",children:"Loading autonomous operations…"});if(c.error||!a)return e.jsxs("div",{className:"page",children:[e.jsx("h1",{children:"Autonomous operations unavailable"}),e.jsx("p",{children:c.error instanceof Error?c.error.message:"No status was returned."})]});const O=()=>r.mutate(()=>x.setAutonomousManualMode(!a.manual_mode,a.revision,f)),k=(s,o)=>r.mutate(()=>x.setAutonomousOperator(s,o,a.revision,b[s]??"")),w=()=>{var o;const s=((o=a.baseline)==null?void 0:o.revision)??0;r.mutate(()=>x.qualifyAutonomousChatBaseline(p,s,g))};return e.jsx("div",{className:"cron-dashboard","data-shadcn":!0,children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8 space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between gap-4 flex-wrap",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"text-3xl font-bold flex items-center gap-3",children:[e.jsx(P,{className:"h-8 w-8"}),"Autonomous operations"]}),e.jsx("p",{className:"mt-2 cron-muted",children:"Content-free supervision, remote controls, and bounded audit history."})]}),e.jsx(h,{asChild:!0,variant:"outline",children:e.jsxs(q,{to:"/admin-dashboard",children:[e.jsx(D,{className:"h-4 w-4 mr-2"}),"Admin dashboard"]})})]}),a.manual_mode&&e.jsx(n,{className:"cron-status--degraded",role:"status",children:e.jsxs(i,{className:"pt-6 flex gap-3",children:[e.jsx(Q,{className:"h-5 w-5"}),e.jsxs("div",{children:[e.jsx("strong",{children:"Manual mode is enabled."}),e.jsxs("p",{children:[a.monitoring_active?"Monitoring remains active":"Monitoring is not currently verified","; autonomous callbacks, retries, deployments, and data mutations fail closed."]})]})]})}),e.jsxs("div",{className:"grid md:grid-cols-4 gap-4",children:[e.jsxs(n,{className:E(S[a.display_state]),children:[e.jsx(l,{children:e.jsx(t,{className:"text-sm",children:"Overall state"})}),e.jsxs(i,{children:[e.jsx("div",{className:"text-2xl font-bold capitalize",children:a.display_state}),e.jsxs("p",{className:"text-sm",children:["Monitoring ",a.monitoring_active?"active":"inactive"]})]})]}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{className:"text-sm",children:"Codex cost"})}),e.jsxs(i,{children:[e.jsxs("div",{className:"text-2xl font-bold",children:["$",a.costs.total_usd]}),e.jsxs("p",{className:"text-sm",children:[a.costs.input_tokens+a.costs.output_tokens," tokens"]})]})]}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{className:"text-sm",children:"Repair lease"})}),e.jsxs(i,{children:[e.jsx("div",{className:"text-lg font-bold",children:a.active_lease?a.active_lease.owner_operator:"Available"}),e.jsx("p",{className:"text-sm",children:a.active_lease?`Expires ${m(a.active_lease.expires_at)}`:"No active source repair"})]})]}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{className:"text-sm",children:"Global control"})}),e.jsxs(i,{className:"space-y-2",children:[e.jsx(u,{"aria-label":"Manual mode confirmation",value:f,onChange:s=>_(s.target.value),placeholder:"Type SET_MANUAL_MODE"}),e.jsx(h,{disabled:r.isPending||f!=="SET_MANUAL_MODE",onClick:O,children:a.manual_mode?"Leave manual mode":"Enable manual mode"})]})]})]}),e.jsx("div",{className:"grid md:grid-cols-4 gap-4",children:a.operators.map(s=>e.jsxs(n,{className:E(S[s.status]),children:[e.jsx(l,{children:e.jsxs(t,{className:"flex justify-between gap-2",children:[e.jsx("span",{children:j[s.operator]}),e.jsx(H,{children:s.status})]})}),e.jsxs(i,{className:"space-y-3",children:[e.jsxs("p",{children:[s.enabled?"Mutation enabled":"Mutation disabled"," · monitoring ",s.monitoring_active?"active":"unverified"]}),e.jsxs("p",{className:"text-sm",children:["Next scheduled run: ",s.next_scheduled_run?m(s.next_scheduled_run):"not scheduled"]}),e.jsx(u,{"aria-label":`${j[s.operator]} confirmation`,value:b[s.operator]??"",onChange:o=>v(L=>({...L,[s.operator]:o.target.value})),placeholder:"Type SET_OPERATOR_STATE"}),e.jsx(h,{disabled:r.isPending||a.manual_mode&&!s.enabled||b[s.operator]!=="SET_OPERATOR_STATE",onClick:()=>k(s.operator,!s.enabled),children:s.enabled?"Disable":"Enable"})]})]},s.operator))}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{children:"Qualified scalable-chat baseline"})}),e.jsxs(i,{className:"space-y-3",children:[e.jsx("p",{className:"font-mono break-all",children:((A=a.baseline)==null?void 0:A.sha)??"No baseline qualified"}),a.baseline&&e.jsxs("p",{className:"text-sm",children:["Revision ",a.baseline.revision," · ",a.baseline.qualified_by," · ",m(a.baseline.qualified_at)]}),e.jsxs("div",{className:"grid md:grid-cols-[1fr_1fr_auto] gap-2",children:[e.jsx(u,{"aria-label":"Exact baseline SHA",value:p,onChange:s=>T(s.target.value),placeholder:"40-character lowercase commit SHA"}),e.jsx(u,{"aria-label":"Baseline confirmation",value:g,onChange:s=>N(s.target.value),placeholder:"Type QUALIFY_CHAT_BASELINE"}),e.jsx(h,{disabled:r.isPending||!/^[0-9a-f]{40}$/.test(p)||g!=="QUALIFY_CHAT_BASELINE",onClick:w,children:"Qualify exact SHA"})]})]})]}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{children:"Provider and fallback state"})}),e.jsx(i,{children:a.provider_states.length?e.jsx("ul",{className:"space-y-2",children:a.provider_states.map(s=>e.jsxs("li",{children:[e.jsx("strong",{children:s.environment}),": ",s.active_provider," · ",s.reason_code," · manifest ",s.manifest_revision]},s.environment))}):e.jsx("p",{children:"No provider state recorded."})})]}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{children:"Recent runs"})}),e.jsx(i,{children:a.recent_runs.length?e.jsx("ul",{className:"space-y-2",children:a.recent_runs.map(s=>e.jsxs("li",{children:[e.jsx("strong",{children:j[s.operator]})," · ",s.status," · ",s.exit_classification," · $",s.cost_usd," · ",m(s.created_at)]},s.run_id))}):e.jsx("p",{children:"No runs recorded."})})]}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{children:"Recent actions"})}),e.jsx(i,{children:a.recent_actions.length?e.jsx("ul",{className:"space-y-2",children:a.recent_actions.map(s=>e.jsxs("li",{children:[e.jsx("strong",{children:j[s.operator]})," · ",s.capability," · ",s.reason_code," · ",s.resource_kind,"/",s.resource_identifier]},s.action_id))}):e.jsx("p",{children:"No actions recorded."})})]})]}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{children:"Hard exclusions"})}),e.jsx(i,{children:e.jsx("ul",{className:"list-disc pl-5",children:a.exclusions.map(s=>e.jsx("li",{children:s},s))})})]}),y&&e.jsxs("p",{role:"alert",children:["Control update failed: ",y,". Refresh before retrying."]})]})})};export{V as default};
|
assets/AutonomousOperations-CzJGtkdV.js
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
import{f as R,r as d,j as e,L as B}from"./index-CbgxfyGU.js";import{u as q}from"./useQuery-Bx9s5-D2.js";import{u as H}from"./useMutation-P_trTy9i.js";import{C as n,e as i,S as I,b as l,c as r,t as C,f as m,o as x}from"./CronDashboard-B3Xofwvu.js";import{B as Q}from"./badge-Klg-RRGs.js";import{B as h}from"./button-Bv9oZ-QU.js";import{I as u}from"./input-B6pxtfPe.js";import{A as P}from"./activity-dcKMRXBy.js";import{A as D}from"./arrow-left-Czeu3VzJ.js";const j={submissions:"Submission review",curation:"Scheduled curation",cron_health:"CRON health",chat_reliability:"Chat reliability"},E={healthy:"healthy",degraded:"degraded",repairing:"running","rolled-back":"broken",manual:"degraded"},S=["admin","autonomousOperations"],W=()=>{var A;const M=R(),[p,T]=d.useState(""),[f,_]=d.useState(""),[g,v]=d.useState({}),[b,N]=d.useState(""),c=q({queryKey:S,queryFn:()=>x.getAutonomousOperations(),refetchInterval:3e4,retry:!1}),t=H({mutationFn:s=>s(),onSuccess:s=>{M.setQueryData(S,s),_(""),v({}),N("")}}),a=c.data,y=t.error instanceof Error?t.error.message:null;if(c.isLoading)return e.jsx("div",{className:"page","aria-busy":"true",children:"Loading autonomous operations…"});if(c.error||!a)return e.jsxs("div",{className:"page",children:[e.jsx("h1",{children:"Autonomous operations unavailable"}),e.jsx("p",{children:c.error instanceof Error?c.error.message:"No status was returned."})]});const O=()=>t.mutate(()=>x.setAutonomousManualMode(!a.manual_mode,a.revision,f)),k=(s,o)=>t.mutate(()=>x.setAutonomousOperator(s,o,a.revision,g[s]??"")),w=()=>{var o;const s=((o=a.baseline)==null?void 0:o.revision)??0;t.mutate(()=>x.qualifyAutonomousChatBaseline(p,s,b))};return e.jsx("div",{className:"cron-dashboard","data-shadcn":!0,children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8 space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between gap-4 flex-wrap",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"text-3xl font-bold flex items-center gap-3",children:[e.jsx(P,{className:"h-8 w-8"}),"Autonomous operations"]}),e.jsx("p",{className:"mt-2 cron-muted",children:"Content-free supervision, remote controls, and bounded audit history."})]}),e.jsx(h,{asChild:!0,variant:"outline",children:e.jsxs(B,{to:"/admin-dashboard",children:[e.jsx(D,{className:"h-4 w-4 mr-2"}),"Admin dashboard"]})})]}),a.manual_mode&&e.jsx(n,{className:"cron-status--degraded",role:"status",children:e.jsxs(i,{className:"pt-6 flex gap-3",children:[e.jsx(I,{className:"h-5 w-5"}),e.jsxs("div",{children:[e.jsx("strong",{children:"Manual mode is enabled."}),e.jsxs("p",{children:[a.monitoring_active?"Monitoring remains active":"Monitoring is not currently verified","; autonomous callbacks, retries, deployments, and data mutations fail closed."]})]})]})}),e.jsxs("div",{className:"grid md:grid-cols-4 gap-4",children:[e.jsxs(n,{className:C(E[a.display_state]),children:[e.jsx(l,{children:e.jsx(r,{className:"text-sm",children:"Overall state"})}),e.jsxs(i,{children:[e.jsx("div",{className:"text-2xl font-bold capitalize",children:a.display_state}),e.jsxs("p",{className:"text-sm",children:["Monitoring ",a.monitoring_active?"active":"inactive"]})]})]}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(r,{className:"text-sm",children:"Codex cost"})}),e.jsxs(i,{children:[e.jsxs("div",{className:"text-2xl font-bold",children:["$",a.costs.total_usd]}),e.jsxs("p",{className:"text-sm",children:[a.costs.input_tokens+a.costs.output_tokens," tokens"]})]})]}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(r,{className:"text-sm",children:"Repair lease"})}),e.jsxs(i,{children:[e.jsx("div",{className:"text-lg font-bold",children:a.active_lease?a.active_lease.owner_operator:"Available"}),e.jsx("p",{className:"text-sm",children:a.active_lease?`Expires ${m(a.active_lease.expires_at)}`:"No active source repair"})]})]}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(r,{className:"text-sm",children:"Global control"})}),e.jsxs(i,{className:"space-y-2",children:[e.jsx(u,{"aria-label":"Manual mode confirmation",value:f,onChange:s=>_(s.target.value),placeholder:"Type SET_MANUAL_MODE"}),e.jsx(h,{disabled:t.isPending||f!=="SET_MANUAL_MODE",onClick:O,children:a.manual_mode?"Leave manual mode":"Enable manual mode"})]})]})]}),e.jsx("div",{className:"grid md:grid-cols-4 gap-4",children:a.operators.map(s=>e.jsxs(n,{className:C(E[s.status]),children:[e.jsx(l,{children:e.jsxs(r,{className:"flex justify-between gap-2",children:[e.jsx("span",{children:j[s.operator]}),e.jsx(Q,{children:s.status})]})}),e.jsxs(i,{className:"space-y-3",children:[e.jsxs("p",{children:[s.enabled?"Mutation enabled":"Mutation disabled"," · monitoring ",s.monitoring_active?"active":"unverified"]}),e.jsxs("p",{className:"text-sm",children:["Next scheduled run: ",s.next_scheduled_run?m(s.next_scheduled_run):"not scheduled"]}),e.jsx(u,{"aria-label":`${j[s.operator]} confirmation`,value:g[s.operator]??"",onChange:o=>v(L=>({...L,[s.operator]:o.target.value})),placeholder:"Type SET_OPERATOR_STATE"}),e.jsx(h,{disabled:t.isPending||a.manual_mode&&!s.enabled||g[s.operator]!=="SET_OPERATOR_STATE",onClick:()=>k(s.operator,!s.enabled),children:s.enabled?"Disable":"Enable"})]})]},s.operator))}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(r,{children:"Qualified scalable-chat baseline"})}),e.jsxs(i,{className:"space-y-3",children:[e.jsx("p",{className:"font-mono break-all",children:((A=a.baseline)==null?void 0:A.sha)??"No baseline qualified"}),a.baseline&&e.jsxs("p",{className:"text-sm",children:["Revision ",a.baseline.revision," · ",a.baseline.qualified_by," · ",m(a.baseline.qualified_at)]}),e.jsxs("div",{className:"grid md:grid-cols-[1fr_1fr_auto] gap-2",children:[e.jsx(u,{"aria-label":"Exact baseline SHA",value:p,onChange:s=>T(s.target.value),placeholder:"40-character lowercase commit SHA"}),e.jsx(u,{"aria-label":"Baseline confirmation",value:b,onChange:s=>N(s.target.value),placeholder:"Type QUALIFY_CHAT_BASELINE"}),e.jsx(h,{disabled:t.isPending||!/^[0-9a-f]{40}$/.test(p)||b!=="QUALIFY_CHAT_BASELINE",onClick:w,children:"Qualify exact SHA"})]})]})]}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(r,{children:"Provider and fallback state"})}),e.jsx(i,{children:a.provider_states.length?e.jsx("ul",{className:"space-y-2",children:a.provider_states.map(s=>e.jsxs("li",{children:[e.jsx("strong",{children:s.environment}),": ",s.active_provider," · ",s.reason_code," · manifest ",s.manifest_revision]},s.environment))}):e.jsx("p",{children:"No provider state recorded."})})]}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(r,{children:"Recent runs"})}),e.jsx(i,{children:a.recent_runs.length?e.jsx("ul",{className:"space-y-2",children:a.recent_runs.map(s=>e.jsxs("li",{children:[e.jsx("strong",{children:j[s.operator]})," · ",s.status," · ",s.exit_classification," · $",s.cost_usd," · ",m(s.created_at)]},s.run_id))}):e.jsx("p",{children:"No runs recorded."})})]}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(r,{children:"Recent actions"})}),e.jsx(i,{children:a.recent_actions.length?e.jsx("ul",{className:"space-y-2",children:a.recent_actions.map(s=>e.jsxs("li",{children:[e.jsx("strong",{children:j[s.operator]})," · ",s.capability," · ",s.reason_code," · ",s.resource_kind,"/",s.resource_identifier]},s.action_id))}):e.jsx("p",{children:"No actions recorded."})})]})]}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(r,{children:"Hard exclusions"})}),e.jsx(i,{children:e.jsx("ul",{className:"list-disc pl-5",children:a.exclusions.map(s=>e.jsx("li",{children:s},s))})})]}),y&&e.jsxs("p",{role:"alert",children:["Control update failed: ",y,". Refresh before retrying."]})]})})};export{W as default};
|
|
|
|
|
|
assets/BenchmarkDetailView-BGwBE1Ld.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
| 1 |
-
import{r as L,j as a,E as le,L as ne,c as ot,p as ct,u as dt,e as ut,q as mt}from"./index-CbgxfyGU.js";import{R as ht}from"./ResearchFollowButton-D2BXlDtQ.js";import{u as te}from"./useQuery-Bx9s5-D2.js";import{c as re}from"./catalog-DhK7_9-6.js";import{C as ft,E as pt,e as gt}from"./ExternalSourceEvalBadge-npO6bZ8N.js";import{L as oe}from"./LatexTitle-Z-HGmZ-H.js";import{S as Ke}from"./switch-BSZohE4x.js";import{I as xt}from"./Icon-D-kA0Owz.js";import{S as ce}from"./skeleton-HwvdxvSN.js";import{A as bt,a as yt}from"./alert-CFDDvdIM.js";import{B as wt}from"./BenchmarkTrendSparkline-C135_NtS.js";import{s as vt}from"./safeExternalHref-CkBrsh84.js";import{s as jt}from"./slug-BpH-Nkvz.js";import{i as _t}from"./apiErrors-BZ5h1Kmb.js";import St from"./NotFound-DtzwOULp.js";import"./useMutation-P_trTy9i.js";import"./research-DgpyzSy_.js";import"./plus-UK0TEjgd.js";import"./curation-C7Gmmp4z.js";import"./hover-card-ufez2uMo.js";import"./index-CxPKwmVQ.js";function ie(e){if(e==null)return null;if(typeof e=="number")return Number.isFinite(e)?e:null;const t=e.includes("±")?e.split("±")[0].trim():e.trim(),r=parseFloat(t);return Number.isFinite(r)?r:null}const Ge=[{label:"All",maxParametersExclusive:void 0},{label:"<10M",maxParametersExclusive:1e7},{label:"<100M",maxParametersExclusive:1e8},{label:"<1B",maxParametersExclusive:1e9},{label:"<3B",maxParametersExclusive:3e9},{label:"<6B",maxParametersExclusive:6e9},{label:"<12B",maxParametersExclusive:12e9},{label:"<32B",maxParametersExclusive:32e9},{label:"<128B",maxParametersExclusive:128e9},{label:"<500B",maxParametersExclusive:5e11}];function kt(e){const t=e===null?void 0:Number(e);return Ge.some(r=>r.maxParametersExclusive===t)?t:void 0}function Ct(e){return new Intl.NumberFormat("en",{notation:"compact",maximumSignificantDigits:3}).format(e)}function Et(e){return[e.paper_id,e.task_id,e.dataset_id,e.model_name,e.harness??""].join("|")}function Nt(e){const t=new Map;for(const r of e){const s=Et(r),n=t.get(s);if(!n){t.set(s,{...r,metrics:{...r.metrics||{}},sourceEvaluationIds:[r.id],ranksByMetric:r.best_metric&&r.best_rank!=null?{[r.best_metric]:r.best_rank}:{},parameterCount:r.num_parameters??null,hasParameterConflict:!1});continue}n.metrics={...n.metrics,...r.metrics||{}},n.sourceEvaluationIds.push(r.id),r.best_metric&&r.best_rank!=null&&(n.ranksByMetric[r.best_metric]=r.best_rank),r.num_parameters!=null&&!n.hasParameterConflict&&(n.parameterCount===null?n.parameterCount=r.num_parameters:n.parameterCount!==r.num_parameters&&(n.parameterCount=null,n.hasParameterConflict=!0))}return Array.from(t.values())}function Le(e,t){return t===void 0?e:e.filter(r=>r.parameterCount!==null&&r.parameterCount<t)}function Rt(e,t){return t?e.id===t||e.sourceEvaluationIds.includes(t):!1}function Ie(e,t){return e.ranksByMetric[t]??e.best_rank??9999}function Pt(e){const t=Date.parse(e);return Number.isNaN(t)?"":new Date(t).toISOString().slice(0,10)}function $t(e){const t=new Map;for(const s of e)s.evaluated_on&&t.set(s.evaluated_on,(t.get(s.evaluated_on)??0)+1);const r=Array.from(t.values()).reduce((s,n)=>s+n,0);for(const[s,n]of t)if(n>=2&&n*2>r)return s;return null}function Mt(e,t){const r=e.evaluated_on;return r&&r!==t&&r!==Pt(e.updated_at)?r:e.paper_published_date||""}function Tt(e,t,r){if(e.length===0)return{points:[],sota:0,sotaModel:""};const s=$t(e),n=e.map(u=>{var R;const h=ie((R=u.metrics)==null?void 0:R[t]);return{eval:u,value:h,date:Mt(u,s)}}).filter(u=>u.value!==null&&!!u.date).sort((u,h)=>u.date.localeCompare(h.date)),i=[];let l=null;for(const u of n){const h=l==null?!0:r==="↓"?u.value<l:u.value>l;h&&(l=u.value),i.push({value:u.value,date:u.date,dateLabel:u.date.slice(0,7),modelName:u.eval.model_name||"",paperTitle:u.eval.paper_title||"",paperRouteId:u.eval.paper_arxiv_id||u.eval.paper_id||null,isSota:h})}const d=e.map(u=>{var h;return{eval:u,value:ie((h=u.metrics)==null?void 0:h[t])}}).filter(u=>u.value!==null).sort((u,h)=>r==="↓"?u.value-h.value:h.value-u.value)[0],f=(d==null?void 0:d.value)??0,x=(d==null?void 0:d.eval.model_name)||(d==null?void 0:d.eval.paper_title)||"";return{points:i,sota:f,sotaModel:x}}function Ft(e,t,r){const s=t?(e??[]).filter(l=>l.task_id===t):e??[],n=s.filter(l=>l.is_open===!1),i=n.reduce((l,c)=>l?(c.best_rank??Number.POSITIVE_INFINITY)<(l.best_rank??Number.POSITIVE_INFINITY)?c:l:c,null);return{visible:r?s.filter(l=>l.is_open!==!1):s,hiddenClosed:n,topHiddenClosed:i}}function Qe(e,t,r,s){const n=t.find(i=>i.id===s);if(e.length===0)return null;if(n!=null&&n.task_id&&e.some(i=>i.id===n.task_id))return n.task_id;if(r){const i=e.find(l=>l.slug===r);if(i)return i.id}if(e.length===1)return e[0].id;if(t.length>0){const i=new Map;for(const d of t)i.set(d.task_id,(i.get(d.task_id)||0)+1);let l=null,c=-1;for(const d of e){const f=i.get(d.id)||0;f>c&&(c=f,l=d.id)}if(l)return l}return e[0].id}function Lt(e){var _,X,Y;const{evaluations:t,tasks:r,taskSlug:s,highlightEvalId:n,parameterBound:i,showMoreMetrics:l,fittingMetricCount:c=1}=e,d=Qe(r,t,s,n),f=r.find(o=>o.id===d)||r[0]||null,x=t.find(o=>o.id===n),u=Ft(t,d,e.hideClosed),h=Nt(u.visible),R=Le(h,i),C=e.configuredMetrics.map(o=>o.metric_name),P=Array.from(new Set(h.flatMap(o=>[...o.best_metric?[o.best_metric]:[],...Object.keys(o.metrics||{})]))),S=C.length?C:P,g=new Map;for(const o of h){const m=o.best_metric;!m||ie(o.metrics[m])===null||C.length&&!S.includes(m)||g.set(m,(g.get(m)||0)+1)}const k=((_=[...g].sort((o,m)=>m[1]-o[1])[0])==null?void 0:_[0])||S[0]||"",j=S.find(o=>{var m;return o.toLocaleLowerCase()===((m=e.metric)==null?void 0:m.trim().toLocaleLowerCase())})||(x==null?void 0:x.best_metric)||k,D=((X=e.directions)==null?void 0:X.directions[j])==="lower_is_better"?"↓":"↑",W=j&&S.includes(j)?[j,...S.filter(o=>o!==j)]:S,w=W.length?l?W:W.slice(0,Math.max(1,c)):j?[j]:[],U=R.slice().sort((o,m)=>{const p=ie(o.metrics[j]),y=ie(m.metrics[j]);return p!==null&&y!==null?D==="↓"?p-y:y-p:p!==null?-1:y!==null?1:Ie(o,j)-Ie(m,j)});let I=null,N=0;const Q=U.map((o,m)=>{const p=ie(o.metrics[j]);return p!==null&&p!==I&&(I=p,N=m+1),{evaluation:o,rank:p===null?null:N,isHighlighted:Rt(o,n)}}),{points:z,sota:ee,sotaModel:O}=Tt(R,j,D),M=i===void 0?e.initialSummary:void 0,q=e.ready.evaluations&&e.ready.tasks&&e.ready.directions&&(!d||e.ready.metrics),K={parameter_coverage_known:h.filter(o=>o.parameterCount!==null).length,parameter_coverage_total:h.length};return{currentTaskId:d,primaryTask:f,activeMetric:j,arrow:D,allowedMetrics:S,orderedMetrics:W,visibleMetrics:w,rows:Q,chartPoints:z,highlightedEval:((Y=Q.find(o=>o.isHighlighted))==null?void 0:Y.evaluation)||null,hiddenClosedEvals:u.hiddenClosed,hiddenClosedTopEval:u.topHiddenClosed,parameterBound:i,parameterCoverage:K,hasParameterMetadata:K.parameter_coverage_known>0,parameterFilters:Ge.map(o=>({...o,selected:i===o.maxParametersExclusive,disabled:i!==o.maxParametersExclusive&&Le(h,o.maxParametersExclusive).length===0})),displayedMetric:q?j:M==null?void 0:M.metric,displayedSota:q?ee:M==null?void 0:M.value,displayedSotaModel:q?O:M==null?void 0:M.model_name,isSummaryLoading:!q&&!M,isInitialFilteredViewLoading:i!==void 0&&!q}}function It(e,t,r,s=1,n=0){const i=e-t.fixed-(r?t.harness:0);if(t.metric<=0)return 1;const l=Math.floor(i/t.metric);if(l<s)return Math.max(1,l);const c=Math.floor((i-n)/t.metric);return Math.max(1,s,c)}function he(e,t){return parseFloat(e.getPropertyValue(t))||0}function At(e){const t=getComputedStyle(e);return{fixed:["--bm-rank-width","--bm-model-width","--bm-parameters-width","--bm-paper-width","--bm-year-width"].reduce((r,s)=>r+he(t,s),0),harness:he(t,"--bm-harness-width"),metric:he(t,"--bm-metric-width")}}const Bt=20;function Ae(e,t){return e?a.jsx(oe,{title:e}):t||"—"}function Dt({model:e,showHarness:t,setMetric:r,highlightRowRef:s,onFittingMetricCountChange:n}){const{rows:i,visibleMetrics:l,activeMetric:c,arrow:d}=e,[f,x]=L.useState(null);return L.useEffect(()=>{if(!f)return;const u=()=>{f.classList.toggle("has-horizontal-overflow",f.scrollWidth>f.clientWidth);const R=f.firstElementChild;if(!R)return;const C=f.clientWidth,P=At(R);f.classList.toggle("unpins-trailing-columns",C<P.fixed+P.metric);const S=document.documentElement,g=S.scrollHeight>S.clientHeight?0:Bt;n(k=>It(C,P,t,k,g))},h=new ResizeObserver(u);return h.observe(f),f.firstElementChild&&h.observe(f.firstElementChild),u(),()=>h.disconnect()},[f,t,n]),a.jsx("div",{ref:x,className:"bm-table-scroll",role:"region","aria-label":"Leaderboard metrics",tabIndex:0,children:a.jsxs("table",{id:"benchmark-leaderboard",className:"bm-table",style:{"--bm-metric-count":l.length,"--bm-harness-count":t?1:0},children:[a.jsxs("colgroup",{children:[a.jsx("col",{className:"bm-width-rank"}),a.jsx("col",{className:"bm-width-model"}),a.jsx("col",{className:"bm-width-parameters"}),t&&a.jsx("col",{className:"bm-width-harness"}),l.map(u=>a.jsx("col",{className:"bm-width-metric"},u)),a.jsx("col",{}),a.jsx("col",{className:"bm-width-year"})]}),a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{className:"col-rank",children:"Rank"}),a.jsx("th",{className:"col-model",children:"Model"}),a.jsxs("th",{className:"col-parameters",children:[a.jsx("span",{className:"bm-label-full",children:"Parameters"}),a.jsx("span",{className:"bm-label-short",children:"Params"})]}),t&&a.jsx("th",{className:"col-harness",children:"Harness"}),l.map(u=>{const h=u===c;return a.jsx("th",{className:`col-value ${h?"is-active":""}`,"aria-sort":h?d==="↓"?"ascending":"descending":"none",children:a.jsxs("button",{type:"button",className:"bm-metric-header",onClick:()=>r(u),"aria-pressed":h,title:`Sort by ${u}`,children:[u,h?` ${d}`:""]})},u)}),a.jsx("th",{className:"col-paper",children:"Paper"}),a.jsx("th",{className:"col-year",children:"Year"})]})}),a.jsx("tbody",{children:i.map(({evaluation:u,rank:h,isHighlighted:R})=>{var S;const C=u.paper_arxiv_id||u.paper_id,P=u.paper_title||(u.paper_arxiv_id?`arXiv:${u.paper_arxiv_id}`:null);return a.jsxs("tr",{ref:R?s:void 0,className:R?"is-highlighted":void 0,children:[a.jsx("td",{className:"col-rank",children:h??"—"}),a.jsxs("td",{className:"col-model",children:[R&&a.jsx("span",{className:"bm-row-marker","aria-hidden":"true"}),u.hf_model_url?a.jsx("a",{href:u.hf_model_url,target:"_blank",rel:"noopener noreferrer",className:"bm-model-link",title:`Open ${u.model_name||"model"} on Hugging Face`,children:u.model_name||"—"}):u.model_name||"—",u.is_open===!1&&a.jsx(ft,{}),(u.external??u.is_external)&&a.jsx(pt,{sourceUrl:u.source_url||u.external_source_url||u.result_url})]}),a.jsx("td",{className:"col-parameters",title:u.parameterCount===null?void 0:u.parameterCount.toLocaleString("en-US"),"aria-label":u.parameterCount===null?"Parameters unknown":`${u.parameterCount.toLocaleString("en-US")} parameters`,children:u.parameterCount===null?"—":Ct(u.parameterCount)}),t&&a.jsx("td",{className:"col-harness",children:u.harness||"—"}),l.map(g=>{var j;const k=g===c,B=(j=u.metrics)==null?void 0:j[g];return a.jsx("td",{className:`col-value${k?" is-active":""}${k&&h===1?" is-best":""}`,children:B!=null&&B!==""?le(B):"—"},g)}),a.jsx("td",{className:"col-paper",children:C?a.jsx(ne,{to:`/paper/${C}`,title:u.paper_title||P||void 0,children:Ae(u.paper_title,P)}):Ae(u.paper_title,P)}),a.jsx("td",{className:"col-year",children:((S=u.evaluated_on||u.paper_published_date)==null?void 0:S.slice(0,4))||"—"})]},u.id)})})]})})}function Be(e){const t=e.length===7?`${e}-01`:e,r=new Date(t).getTime();return Number.isFinite(r)?r:0}const fe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function pe(e){const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()}}function Ht(e,t){if(e===t){const{year:d,month:f}=pe(e);return[{timestamp:new Date(d,f,1).getTime(),key:`${d}-${f}`,label:`${fe[f]} ${d}`}]}const r=pe(e),s=pe(t);if(r.year===s.year){const d=s.month-r.month+1;let f=1;const x=12;d>x&&(f=Math.ceil(d/x));const u=[];for(let h=r.month;h<=s.month;h+=f)u.push({timestamp:new Date(r.year,h,1).getTime(),key:`${r.year}-${h}`,label:d<=3?`${fe[h]} ${r.year}`:fe[h]});return u}const n=s.year-r.year+1;let i=1;const l=12;n>l&&(i=Math.ceil(n/l));const c=[];for(let d=r.year;d<=s.year;d+=i)c.push({timestamp:new Date(d,0,1).getTime(),key:String(d),label:String(d)});return c}const Vt=({points:e,metric:t})=>{const r=ot(),[s,n]=L.useState(null),i=880,l=320,c=60,d=30,f=40,x=50,u=e.map(o=>o.value),h=Math.min(...u),C=Math.max(...u)-h||1,P=i-c-d,S=l-f-x,g=e.map(o=>Be(o.date)),k=Math.min(...g),B=Math.max(...g),j=B-k||1,D=o=>k===B?c+P/2:c+(o-k)/j*P,W=e.map((o,m)=>{const p=D(Be(o.date)),y=(o.value-h)/C,$=f+S*(1-y);return{x:p,y:$,data:o,idx:m}}),w=W.filter(o=>o.data.isSota);let U="";if(w.length>=2){U=`M${w[0].x},${w[0].y}`;for(let o=1;o<w.length;o++){const m=w[o-1],p=w[o],y=(m.x+p.x)/2;U+=` C${y},${m.y} ${y},${p.y} ${p.x},${p.y}`}}const I=5.4,N=8,Q=9,z=o=>{const m=o.data.modelName||o.data.paperTitle||"";if(!m)return null;const p=m.length>22?m.slice(0,21)+"…":m,y=p.length*I;let $=o.x-y/2,E=o.x+y/2,v="middle";return $<c?($=c,E=c+y,v="start"):E>i-d&&(E=i-d,$=E-y,v="end"),{x:v==="start"?c:v==="end"?i-d:o.x,y:o.y-Q,text:p,anchor:v,left:$,right:E}},ee=[],O=w.length>0?z(w[w.length-1]):null;let M=-1/0;for(let o=0;o<w.length-1;o++){const m=z(w[o]);m&&(m.left<M+N||O&&m.right>O.left-N||(M=m.right,ee.push({x:m.x,y:m.y,text:m.text,anchor:m.anchor})))}O&&ee.push({x:O.x,y:O.y,text:O.text,anchor:O.anchor});const q=Ht(k,B),K=5,_=o=>n(m=>m===o?null:m),X=o=>{o&&r(`/paper/${o}`)},Y=(o,m)=>{const y=`${o.data.modelName||o.data.paperTitle||"Unknown model"}: ${le(o.data.value)} on ${o.data.dateLabel}`,$=!!o.data.paperRouteId;return a.jsxs("g",{children:[m,a.jsx("circle",{cx:o.x,cy:o.y,r:"10",fill:"transparent",style:{cursor:$?"pointer":"default",outline:"none"},tabIndex:0,role:$?"link":"img","aria-label":y,onMouseEnter:()=>n(o.idx),onMouseLeave:()=>_(o.idx),onFocus:()=>n(o.idx),onBlur:()=>_(o.idx),onClick:()=>X(o.data.paperRouteId),onKeyDown:E=>{$&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),X(o.data.paperRouteId))},children:a.jsx("title",{children:y})})]},o.idx)};return a.jsxs("svg",{width:"100%",viewBox:`0 0 ${i} ${l}`,style:{display:"block"},children:[a.jsx("text",{x:c-38,y:f+S/2,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"middle",transform:`rotate(-90 ${c-38} ${f+S/2})`,children:t}),Array.from({length:K}).map((o,m)=>{const p=m/(K-1),y=f+S*(1-p),$=h+C*p;return a.jsxs("g",{children:[a.jsx("line",{x1:c,y1:y,x2:i-d,y2:y,stroke:"var(--hairline)",strokeWidth:"1"}),a.jsx("text",{x:c-10,y:y+4,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"end",children:le($)})]},m)}),q.map(o=>{const m=D(o.timestamp);return a.jsx("text",{x:m,y:l-x+18,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:"middle",children:o.label},o.key)}),W.filter(o=>!o.data.isSota).map(o=>{const m=s===o.idx;return Y(o,a.jsx("circle",{cx:o.x,cy:o.y,r:m?3:2,fill:"var(--ink-faint)",opacity:m?1:.45,style:{transition:"r 0.12s ease, opacity 0.12s ease"}}))}),U&&a.jsx("path",{d:U,stroke:"var(--accent)",strokeWidth:"2",fill:"none",strokeLinejoin:"round",strokeLinecap:"round"}),w.map(o=>{const m=s===o.idx;return Y(o,a.jsx("circle",{cx:o.x,cy:o.y,r:m?4.5:3,fill:m?"var(--accent)":"var(--bg-elevated)",stroke:"var(--accent)",strokeWidth:"1.5",style:{transition:"r 0.12s ease, fill 0.12s ease"}}))}),ee.map((o,m)=>a.jsx("text",{x:o.x,y:o.y,fontSize:"9.5",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:o.anchor,pointerEvents:"none",style:{paintOrder:"stroke",stroke:"var(--bg-elevated)",strokeWidth:3,strokeLinejoin:"round"},children:o.text},`label-${m}`)),s!==null&&W[s]&&(()=>{const o=W[s],m=o.data.modelName||o.data.paperTitle||"Unknown model",y=`${m.length>40?m.slice(0,39)+"…":m}: ${le(o.data.value)}`,E=Math.max(120,Math.min(340,y.length*6.6+24)),v=30;let H=o.x-E/2;H<c&&(H=c),H+E>i-d&&(H=i-d-E);const G=o.y-v-14>=f?o.y-v-12:o.y+12;return a.jsxs("g",{pointerEvents:"none",children:[a.jsx("rect",{x:H,y:G,width:E,height:v,rx:"6",ry:"6",fill:"var(--bg-elevated)",stroke:"var(--hairline-strong)",strokeWidth:"1",style:{filter:"drop-shadow(0 2px 6px rgba(0,0,0,0.08))"}}),a.jsx("text",{x:H+12,y:G+19,fontSize:"12",fontFamily:"var(--sans)",fill:"var(--ink)",fontWeight:500,children:y})]})})()]})};function Wt(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const r=document.implementation.createHTMLDocument(),s=r.createElement("base"),n=r.createElement("a");return r.head.appendChild(s),r.body.appendChild(n),t&&(s.href=t),n.href=e,n.href}const Ot=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function Z(e){const t=[];for(let r=0,s=e.length;r<s;r++)t.push(e[r]);return t}let ae=null;function Xe(e={}){return ae||(e.includeStyleProperties?(ae=e.includeStyleProperties,ae):(ae=Z(window.getComputedStyle(document.documentElement)),ae))}function de(e,t){const s=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return s?parseFloat(s.replace("px","")):0}function qt(e){const t=de(e,"border-left-width"),r=de(e,"border-right-width");return e.clientWidth+t+r}function Ut(e){const t=de(e,"border-top-width"),r=de(e,"border-bottom-width");return e.clientHeight+t+r}function Ye(e,t={}){const r=t.width||qt(e),s=t.height||Ut(e);return{width:r,height:s}}function zt(){let e,t;try{t=process}catch{}const r=t&&t.env?t.env.devicePixelRatio:null;return r&&(e=parseInt(r,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}const V=16384;function Kt(e){(e.width>V||e.height>V)&&(e.width>V&&e.height>V?e.width>e.height?(e.height*=V/e.width,e.width=V):(e.width*=V/e.height,e.height=V):e.width>V?(e.height*=V/e.width,e.width=V):(e.width*=V/e.height,e.height=V))}function Gt(e,t={}){return e.toBlob?new Promise(r=>{e.toBlob(r,t.type?t.type:"image/png",t.quality?t.quality:1)}):new Promise(r=>{const s=window.atob(e.toDataURL(t.type?t.type:void 0,t.quality?t.quality:void 0).split(",")[1]),n=s.length,i=new Uint8Array(n);for(let l=0;l<n;l+=1)i[l]=s.charCodeAt(l);r(new Blob([i],{type:t.type?t.type:"image/png"}))})}function ue(e){return new Promise((t,r)=>{const s=new Image;s.onload=()=>{s.decode().then(()=>{requestAnimationFrame(()=>t(s))})},s.onerror=r,s.crossOrigin="anonymous",s.decoding="async",s.src=e})}async function Qt(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function Xt(e,t,r){const s="http://www.w3.org/2000/svg",n=document.createElementNS(s,"svg"),i=document.createElementNS(s,"foreignObject");return n.setAttribute("width",`${t}`),n.setAttribute("height",`${r}`),n.setAttribute("viewBox",`0 0 ${t} ${r}`),i.setAttribute("width","100%"),i.setAttribute("height","100%"),i.setAttribute("x","0"),i.setAttribute("y","0"),i.setAttribute("externalResourcesRequired","true"),n.appendChild(i),i.appendChild(e),Qt(n)}const A=(e,t)=>{if(e instanceof t)return!0;const r=Object.getPrototypeOf(e);return r===null?!1:r.constructor.name===t.name||A(r,t)};function Yt(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function Jt(e,t){return Xe(t).map(r=>{const s=e.getPropertyValue(r),n=e.getPropertyPriority(r);return`${r}: ${s}${n?" !important":""};`}).join(" ")}function Zt(e,t,r,s){const n=`.${e}:${t}`,i=r.cssText?Yt(r):Jt(r,s);return document.createTextNode(`${n}{${i}}`)}function De(e,t,r,s){const n=window.getComputedStyle(e,r),i=n.getPropertyValue("content");if(i===""||i==="none")return;const l=Ot();try{t.className=`${t.className} ${l}`}catch{return}const c=document.createElement("style");c.appendChild(Zt(l,r,n,s)),t.appendChild(c)}function er(e,t,r){De(e,t,":before",r),De(e,t,":after",r)}const He="application/font-woff",Ve="image/jpeg",tr={woff:He,woff2:He,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:Ve,jpeg:Ve,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function rr(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function ye(e){const t=rr(e).toLowerCase();return tr[t]||""}function ar(e){return e.split(/,/)[1]}function xe(e){return e.search(/^(data:)/)!==-1}function sr(e,t){return`data:${t};base64,${e}`}async function Je(e,t,r){const s=await fetch(e,t);if(s.status===404)throw new Error(`Resource "${s.url}" not found`);const n=await s.blob();return new Promise((i,l)=>{const c=new FileReader;c.onerror=l,c.onloadend=()=>{try{i(r({res:s,result:c.result}))}catch(d){l(d)}},c.readAsDataURL(n)})}const ge={};function nr(e,t,r){let s=e.replace(/\?.*/,"");return r&&(s=e),/ttf|otf|eot|woff2?/i.test(s)&&(s=s.replace(/.*\//,"")),t?`[${t}]${s}`:s}async function we(e,t,r){const s=nr(e,t,r.includeQueryParams);if(ge[s]!=null)return ge[s];r.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let n;try{const i=await Je(e,r.fetchRequestInit,({res:l,result:c})=>(t||(t=l.headers.get("Content-Type")||""),ar(c)));n=sr(i,t)}catch(i){n=r.imagePlaceholder||"";let l=`Failed to fetch resource: ${e}`;i&&(l=typeof i=="string"?i:i.message),l&&console.warn(l)}return ge[s]=n,n}async function ir(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):ue(t)}async function lr(e,t){if(e.currentSrc){const i=document.createElement("canvas"),l=i.getContext("2d");i.width=e.clientWidth,i.height=e.clientHeight,l==null||l.drawImage(e,0,0,i.width,i.height);const c=i.toDataURL();return ue(c)}const r=e.poster,s=ye(r),n=await we(r,s,t);return ue(n)}async function or(e,t){var r;try{if(!((r=e==null?void 0:e.contentDocument)===null||r===void 0)&&r.body)return await me(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function cr(e,t){return A(e,HTMLCanvasElement)?ir(e):A(e,HTMLVideoElement)?lr(e,t):A(e,HTMLIFrameElement)?or(e,t):e.cloneNode(Ze(e))}const dr=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",Ze=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function ur(e,t,r){var s,n;if(Ze(t))return t;let i=[];return dr(e)&&e.assignedNodes?i=Z(e.assignedNodes()):A(e,HTMLIFrameElement)&&(!((s=e.contentDocument)===null||s===void 0)&&s.body)?i=Z(e.contentDocument.body.childNodes):i=Z(((n=e.shadowRoot)!==null&&n!==void 0?n:e).childNodes),i.length===0||A(e,HTMLVideoElement)||await i.reduce((l,c)=>l.then(()=>me(c,r)).then(d=>{d&&t.appendChild(d)}),Promise.resolve()),t}function mr(e,t,r){const s=t.style;if(!s)return;const n=window.getComputedStyle(e);n.cssText?(s.cssText=n.cssText,s.transformOrigin=n.transformOrigin):Xe(r).forEach(i=>{let l=n.getPropertyValue(i);i==="font-size"&&l.endsWith("px")&&(l=`${Math.floor(parseFloat(l.substring(0,l.length-2)))-.1}px`),A(e,HTMLIFrameElement)&&i==="display"&&l==="inline"&&(l="block"),i==="d"&&t.getAttribute("d")&&(l=`path(${t.getAttribute("d")})`),s.setProperty(i,l,n.getPropertyPriority(i))})}function hr(e,t){A(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),A(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function fr(e,t){if(A(e,HTMLSelectElement)){const r=t,s=Array.from(r.children).find(n=>e.value===n.getAttribute("value"));s&&s.setAttribute("selected","")}}function pr(e,t,r){return A(t,Element)&&(mr(e,t,r),er(e,t,r),hr(e,t),fr(e,t)),t}async function gr(e,t){const r=e.querySelectorAll?e.querySelectorAll("use"):[];if(r.length===0)return e;const s={};for(let i=0;i<r.length;i++){const c=r[i].getAttribute("xlink:href");if(c){const d=e.querySelector(c),f=document.querySelector(c);!d&&f&&!s[c]&&(s[c]=await me(f,t,!0))}}const n=Object.values(s);if(n.length){const i="http://www.w3.org/1999/xhtml",l=document.createElementNS(i,"svg");l.setAttribute("xmlns",i),l.style.position="absolute",l.style.width="0",l.style.height="0",l.style.overflow="hidden",l.style.display="none";const c=document.createElementNS(i,"defs");l.appendChild(c);for(let d=0;d<n.length;d++)c.appendChild(n[d]);e.appendChild(l)}return e}async function me(e,t,r){return!r&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(s=>cr(s,t)).then(s=>ur(e,s,t)).then(s=>pr(e,s,t)).then(s=>gr(s,t))}const et=/url\((['"]?)([^'"]+?)\1\)/g,xr=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,br=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function yr(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function wr(e){const t=[];return e.replace(et,(r,s,n)=>(t.push(n),r)),t.filter(r=>!xe(r))}async function vr(e,t,r,s,n){try{const i=r?Wt(t,r):t,l=ye(t);let c;return n||(c=await we(i,l,s)),e.replace(yr(t),`$1${c}$3`)}catch{}return e}function jr(e,{preferredFontFormat:t}){return t?e.replace(br,r=>{for(;;){const[s,,n]=xr.exec(r)||[];if(!n)return"";if(n===t)return`src: ${s};`}}):e}function tt(e){return e.search(et)!==-1}async function rt(e,t,r){if(!tt(e))return e;const s=jr(e,r);return wr(s).reduce((i,l)=>i.then(c=>vr(c,l,t,r)),Promise.resolve(s))}async function se(e,t,r){var s;const n=(s=t.style)===null||s===void 0?void 0:s.getPropertyValue(e);if(n){const i=await rt(n,null,r);return t.style.setProperty(e,i,t.style.getPropertyPriority(e)),!0}return!1}async function _r(e,t){await se("background",e,t)||await se("background-image",e,t),await se("mask",e,t)||await se("-webkit-mask",e,t)||await se("mask-image",e,t)||await se("-webkit-mask-image",e,t)}async function Sr(e,t){const r=A(e,HTMLImageElement);if(!(r&&!xe(e.src))&&!(A(e,SVGImageElement)&&!xe(e.href.baseVal)))return;const s=r?e.src:e.href.baseVal,n=await we(s,ye(s),t);await new Promise((i,l)=>{e.onload=i,e.onerror=t.onImageErrorHandler?(...d)=>{try{i(t.onImageErrorHandler(...d))}catch(f){l(f)}}:l;const c=e;c.decode&&(c.decode=i),c.loading==="lazy"&&(c.loading="eager"),r?(e.srcset="",e.src=n):e.href.baseVal=n})}async function kr(e,t){const s=Z(e.childNodes).map(n=>at(n,t));await Promise.all(s).then(()=>e)}async function at(e,t){A(e,Element)&&(await _r(e,t),await Sr(e,t),await kr(e,t))}function Cr(e,t){const{style:r}=e;t.backgroundColor&&(r.backgroundColor=t.backgroundColor),t.width&&(r.width=`${t.width}px`),t.height&&(r.height=`${t.height}px`);const s=t.style;return s!=null&&Object.keys(s).forEach(n=>{r[n]=s[n]}),e}const We={};async function Oe(e){let t=We[e];if(t!=null)return t;const s=await(await fetch(e)).text();return t={url:e,cssText:s},We[e]=t,t}async function qe(e,t){let r=e.cssText;const s=/url\(["']?([^"')]+)["']?\)/g,i=(r.match(/url\([^)]+\)/g)||[]).map(async l=>{let c=l.replace(s,"$1");return c.startsWith("https://")||(c=new URL(c,e.url).href),Je(c,t.fetchRequestInit,({result:d})=>(r=r.replace(l,`url(${d})`),[l,d]))});return Promise.all(i).then(()=>r)}function Ue(e){if(e==null)return[];const t=[],r=/(\/\*[\s\S]*?\*\/)/gi;let s=e.replace(r,"");const n=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const d=n.exec(s);if(d===null)break;t.push(d[0])}s=s.replace(n,"");const i=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,l="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",c=new RegExp(l,"gi");for(;;){let d=i.exec(s);if(d===null){if(d=c.exec(s),d===null)break;i.lastIndex=c.lastIndex}else c.lastIndex=i.lastIndex;t.push(d[0])}return t}async function Er(e,t){const r=[],s=[];return e.forEach(n=>{if("cssRules"in n)try{Z(n.cssRules||[]).forEach((i,l)=>{if(i.type===CSSRule.IMPORT_RULE){let c=l+1;const d=i.href,f=Oe(d).then(x=>qe(x,t)).then(x=>Ue(x).forEach(u=>{try{n.insertRule(u,u.startsWith("@import")?c+=1:n.cssRules.length)}catch(h){console.error("Error inserting rule from remote css",{rule:u,error:h})}})).catch(x=>{console.error("Error loading remote css",x.toString())});s.push(f)}})}catch(i){const l=e.find(c=>c.href==null)||document.styleSheets[0];n.href!=null&&s.push(Oe(n.href).then(c=>qe(c,t)).then(c=>Ue(c).forEach(d=>{l.insertRule(d,l.cssRules.length)})).catch(c=>{console.error("Error loading remote stylesheet",c)})),console.error("Error inlining remote css file",i)}}),Promise.all(s).then(()=>(e.forEach(n=>{if("cssRules"in n)try{Z(n.cssRules||[]).forEach(i=>{r.push(i)})}catch(i){console.error(`Error while reading CSS rules from ${n.href}`,i)}}),r))}function Nr(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>tt(t.style.getPropertyValue("src")))}async function Rr(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=Z(e.ownerDocument.styleSheets),s=await Er(r,t);return Nr(s)}function st(e){return e.trim().replace(/["']/g,"")}function Pr(e){const t=new Set;function r(s){(s.style.fontFamily||getComputedStyle(s).fontFamily).split(",").forEach(i=>{t.add(st(i))}),Array.from(s.children).forEach(i=>{i instanceof HTMLElement&&r(i)})}return r(e),t}async function $r(e,t){const r=await Rr(e,t),s=Pr(e);return(await Promise.all(r.filter(i=>s.has(st(i.style.fontFamily))).map(i=>{const l=i.parentStyleSheet?i.parentStyleSheet.href:null;return rt(i.cssText,l,t)}))).join(`
|
| 2 |
-
`)}async function Mr(e,t){const r=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await $r(e,t);if(r){const s=document.createElement("style"),n=document.createTextNode(r);s.appendChild(n),e.firstChild?e.insertBefore(s,e.firstChild):e.appendChild(s)}}async function Tr(e,t={}){const{width:r,height:s}=Ye(e,t),n=await me(e,t,!0);return await Mr(n,t),await at(n,t),Cr(n,t),await Xt(n,r,s)}async function Fr(e,t={}){const{width:r,height:s}=Ye(e,t),n=await Tr(e,t),i=await ue(n),l=document.createElement("canvas"),c=l.getContext("2d"),d=t.pixelRatio||zt(),f=t.canvasWidth||r,x=t.canvasHeight||s;return l.width=f*d,l.height=x*d,t.skipAutoScale||Kt(l),l.style.width=`${f}`,l.style.height=`${x}`,t.backgroundColor&&(c.fillStyle=t.backgroundColor,c.fillRect(0,0,l.width,l.height)),c.drawImage(i,0,0,l.width,l.height),l}async function Lr(e,t={}){const r=await Fr(e,t);return await Gt(r)}const be="#ffffff";function Ir(){return typeof window>"u"?be:window.getComputedStyle(document.documentElement).getPropertyValue("--bg-elevated").trim()||be}function Ar(e){if(typeof window>"u")return be;const t=window.getComputedStyle(e).backgroundColor;return!t||t==="rgba(0, 0, 0, 0)"||t==="transparent"?Ir():t}async function Br(e){var r,s;if(typeof window>"u"||!((s=(r=window.navigator)==null?void 0:r.clipboard)!=null&&s.write))throw new Error("Clipboard image copy is not supported in this browser.");if(typeof window.ClipboardItem>"u")throw new Error("Clipboard image copy is not supported in this browser.");const t=await Lr(e,{pixelRatio:2,cacheBust:!0,backgroundColor:Ar(e)});if(!t)throw new Error("Failed to render screenshot.");await window.navigator.clipboard.write([new window.ClipboardItem({"image/png":t})])}const nt=({targetRef:e,label:t})=>{const{toast:r}=ct(),[s,n]=L.useState("idle"),i=L.useRef(null);L.useEffect(()=>()=>{i.current!==null&&window.clearTimeout(i.current)},[]);const l=L.useCallback(async()=>{const d=e.current;if(d){n("copying"),d.classList.add("is-capturing"),d.offsetHeight,await new Promise(f=>window.requestAnimationFrame(()=>f()));try{await Br(d),n("copied"),r({title:"Screenshot copied",description:`Image of the ${t} copied to your clipboard.`}),i.current!==null&&window.clearTimeout(i.current),i.current=window.setTimeout(()=>n("idle"),1500)}catch(f){n("idle"),r({title:"Copy failed",description:f instanceof Error&&f.message?f.message:"Could not copy the screenshot to your clipboard.",variant:"destructive"})}finally{d.classList.remove("is-capturing")}}},[e,t,r]),c=s==="copied"?"Copied":s==="copying"?"Copying…":"Copy image";return a.jsxs("button",{type:"button",className:"bm-copy-btn",onClick:l,disabled:s==="copying","aria-label":`Copy ${t} screenshot to clipboard`,title:`Copy ${t} screenshot to clipboard`,children:[a.jsx(xt,{name:"copy",size:11}),c]})};function Dr({model:e,datasetName:t,hideClosed:r,setHideClosed:s,setMetric:n}){const i=L.useRef(null),{isInitialFilteredViewLoading:l,chartPoints:c,activeMetric:d,allowedMetrics:f,orderedMetrics:x,parameterBound:u}=e;return l||c.length===0?null:a.jsxs("div",{className:"bm-card",ref:i,children:[a.jsxs("div",{className:"bm-card-screenshot-header","aria-hidden":"true",children:[a.jsxs("div",{className:"bm-card-screenshot-title",children:[a.jsx("span",{className:"bm-card-screenshot-eyebrow",children:"Benchmark"}),a.jsx("span",{className:"bm-card-screenshot-name",children:t})]}),a.jsxs("div",{className:"bm-card-screenshot-brand",children:[a.jsxs("span",{className:"brand",children:[a.jsx("span",{className:"brand-mark"}),a.jsxs("span",{className:"brand-name",children:["Papers ",a.jsx("em",{children:"With Code"})]})]}),a.jsx("span",{className:"bm-card-screenshot-url",children:"paperswithcode.co"})]})]}),a.jsxs("div",{className:"bm-card-head",children:[a.jsx("div",{className:"bm-card-title",children:"SOTA progression"}),a.jsxs("div",{className:"bm-card-actions",children:[f.length>1&&a.jsxs("label",{className:"bm-view-select",children:[a.jsx("span",{className:"bm-view-select-label",children:"View"}),a.jsx("select",{value:d,onChange:h=>n(h.target.value),children:x.map(h=>a.jsx("option",{value:h,children:h},h))})]}),a.jsxs("label",{className:"bm-closed-toggle",title:"Show or hide evaluations of closed-source models",children:[a.jsx(Ke,{className:"bm-closed-toggle-switch",checked:!r,onCheckedChange:h=>{s(!h)},"aria-label":"Show closed-source models"}),a.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),a.jsx(nt,{targetRef:i,label:"SOTA chart"})]})]}),a.jsx("div",{className:"bm-chart-wrap",children:a.jsx(Vt,{points:c,metric:d})}),a.jsxs("div",{className:"bm-chart-foot",children:[a.jsx("span",{className:"legend-dot"}),u===void 0?"All models":"Filtered models"," over time · highlighted dots track the running best · hover for the model · click to open the paper"]})]})}function Hr(e){if(!e)return null;const t=e.trim(),r=t.match(/^https?:\/\/(?:www\.)?arxiv\.org\/(?:abs|pdf)\/([^/?#]+)/i);if(r!=null&&r[1])return r[1].replace(/\.pdf$/i,"");const s=t.match(/^(?:https?:\/\/(?:www\.)?paperswithcode\.co)?\/paper\/([^/?#]+)/i);return(s==null?void 0:s[1])??null}function ze(e,t){return e?a.jsx(oe,{title:e}):t||"—"}const oa=()=>{var ve,je,_e,Se,ke,Ce,Ee,Ne,Re,Pe,$e;const{datasetSlug:e}=dt(),[t,r]=ut(),s=t.get("task")||void 0,n=t.get("eval")||void 0,i=kt(t.get("max_parameters_exclusive")),{preferences:l,setHideClosedSourceEvals:c}=mt(),d=L.useRef(null),f=L.useRef(!1),x=L.useRef(null),[u,h]=L.useState(null),R=`${e}:${s||""}`,C=u===R,[P,S]=L.useState(1),g=te({queryKey:["dataset",e,"with-paper",s,l.hide_closed_source_evals?"open":"all"],queryFn:()=>re.getDatasetBySlug(e,{include_paper:!0,task:s,is_open:l.hide_closed_source_evals?!0:void 0}),enabled:!!e,staleTime:10*60*1e3}),k=te({queryKey:["dataset-evals",(ve=g.data)==null?void 0:ve.id],queryFn:()=>gt.byDataset(g.data.id),enabled:!!((je=g.data)!=null&&je.id),staleTime:5*60*1e3}),B=te({queryKey:["dataset-tasks",(_e=g.data)==null?void 0:_e.id],queryFn:()=>re.datasetTasks(g.data.id),enabled:!!((Se=g.data)!=null&&Se.id),staleTime:10*60*1e3}),j=te({queryKey:["metric-directions"],queryFn:()=>re.metricDirections(),staleTime:60*60*1e3}),D=Qe(B.data||[],k.data||[],s,n),W=te({queryKey:["task-benchmark-trends",D,l.hide_closed_source_evals?!0:void 0],queryFn:()=>re.trendingBenchmarks(D,{limit:100,min_recent_papers:0,is_open:l.hide_closed_source_evals?!0:void 0}),enabled:!!D&&!!((ke=g.data)!=null&&ke.id),staleTime:10*60*1e3}),w=L.useMemo(()=>{var b;return(((b=W.data)==null?void 0:b.results)||[]).find(T=>{var F;return T.id===((F=g.data)==null?void 0:F.id)})||null},[W.data,(Ce=g.data)==null?void 0:Ce.id]),U=te({queryKey:["leaderboard-metrics",(Ee=g.data)==null?void 0:Ee.id,D],queryFn:()=>re.leaderboardMetrics(g.data.id,D),enabled:!!((Ne=g.data)!=null&&Ne.id)&&!!D,staleTime:10*60*1e3}),I=Lt({evaluations:k.data||[],tasks:B.data||[],configuredMetrics:U.data||[],directions:j.data,initialSummary:(Re=g.data)==null?void 0:Re.leaderboard_summary,taskSlug:s,highlightEvalId:n,metric:t.get("metric")||void 0,hideClosed:l.hide_closed_source_evals,parameterBound:i,showMoreMetrics:C,fittingMetricCount:P,ready:{evaluations:k.isSuccess,tasks:B.isSuccess,directions:j.isSuccess,metrics:U.isSuccess}}),{primaryTask:N,hiddenClosedEvals:Q,hiddenClosedTopEval:z,isSummaryLoading:ee,displayedMetric:O,displayedSota:M,displayedSotaModel:q,isInitialFilteredViewLoading:K,highlightedEval:_,hasParameterMetadata:X,parameterCoverage:Y,orderedMetrics:o}=I;L.useEffect(()=>{if(f.current||!n||!k.data||k.data.length===0)return;const b=d.current;b&&(f.current=!0,b.scrollIntoView({behavior:"smooth",block:"start"}))},[n,k.data]);const m=te({queryKey:["area",N==null?void 0:N.area_id],queryFn:()=>re.getArea(N.area_id),enabled:!!(N!=null&&N.area_id),staleTime:10*60*1e3});if(g.isLoading)return a.jsxs("div",{className:"page",children:[a.jsx(ce,{className:"h-12 w-1/2 mb-6"}),a.jsx(ce,{className:"h-64 w-full"})]});if(_t(g.error))return a.jsx(St,{});if(g.error||!g.data)return a.jsx("div",{className:"page",children:a.jsx(bt,{variant:"destructive",children:a.jsx(yt,{children:"Benchmark not found."})})});const p=g.data,y=!!p.supports_harness,$=b=>{r(T=>{const F=new URLSearchParams(T);return b===void 0?F.delete("max_parameters_exclusive"):F.set("max_parameters_exclusive",String(b)),F})},E=b=>{r(T=>{const F=new URLSearchParams(T);return F.set("metric",b),F})},v=p.introducing_paper??void 0,H=(v==null?void 0:v.arxiv_id)||(v==null?void 0:v.id)||Hr(p.paper_url),J=(v==null?void 0:v.title)||p.introducing_paper_title||null,G=((Pe=v==null?void 0:v.published)==null?void 0:Pe.slice(0,4))||p.introduced_year||null,it=!!H||!!p.paper_url||!!J,lt=v!=null&&v.arxiv_id||($e=p.paper_url)!=null&&$e.match(/^https?:\/\/(?:www\.)?arxiv\.org\//i)?`arXiv:${H}`:`Paper ${H}`;return a.jsx("div",{className:"page",children:a.jsxs("div",{className:"bm-page",children:[a.jsxs("div",{className:"breadcrumb",children:[a.jsx(ne,{to:"/tasks",children:"Tasks"}),m.data&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"sep",children:"/"}),a.jsx(ne,{to:`/tasks#area-${jt(m.data.name)}`,children:m.data.name})]}),N&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"sep",children:"/"}),a.jsx(ne,{to:`/tasks/${N.slug||N.id}`,children:N.name})]}),a.jsx("span",{className:"sep",children:"/"}),a.jsx("span",{style:{color:"var(--accent-text)"},children:p.name})]}),a.jsxs("div",{className:"bm-title-row",children:[a.jsx("h1",{className:"bm-title",children:p.name}),w&&a.jsxs("div",{className:"bm-title-trend","aria-label":`${p.name} reporting trend`,children:[a.jsx(wt,{history:w.history,benchmarkName:w.name}),a.jsxs("span",{className:"bm-title-trend-summary",children:[a.jsx("strong",{children:w.recent_paper_count})," ",w.recent_paper_count===1?"paper":"papers",w.rate_change==null?w.recent_paper_count>0&&a.jsx("span",{className:"benchmark-trend-change is-new",children:"new"}):a.jsxs("span",{className:`benchmark-trend-change ${w.rate_change>=1?"is-up":"is-down"}`,children:[w.rate_change>=1?"↑":"↓"," ",w.rate_change.toFixed(1),"×"]})]})]})]}),a.jsx(ht,{kind:"benchmark",entityId:p.id}),a.jsxs("div",{className:"bm-subtitle",children:[ee?a.jsx(ce,{className:"h-5 w-64 bm-summary-skeleton","aria-label":"Loading benchmark summary"}):a.jsxs("span",{children:[O&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"metric-tag",children:O}),a.jsx("span",{style:{color:"var(--hairline-strong)",margin:"0 8px"},children:"·"})]}),q?a.jsxs("span",{children:["Best: ",a.jsx("span",{className:"best-name",children:le(M)})," by ",a.jsx("span",{className:"best-name",style:{fontStyle:"normal"},children:q})]}):a.jsxs("span",{children:[I.rows.length," evaluations"]})]}),p.hf_url&&a.jsxs("a",{className:"bm-action-btn",href:p.hf_url,target:"_blank",rel:"noopener noreferrer",children:[a.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),p.description&&a.jsx("p",{className:"bm-description",children:p.description}),l.hide_closed_source_evals&&Q.length>0&&a.jsxs("div",{className:"bm-hidden-closed-notice",children:[a.jsxs("span",{children:[Q.length," closed-source ",Q.length===1?"row is":"rows are"," hidden",z!=null&&z.model_name?a.jsxs(a.Fragment,{children:[", including ",a.jsx("strong",{children:z.model_name})]}):null,"."]}),a.jsx("button",{type:"button",className:"bm-hidden-closed-action",onClick:()=>{c(!1)},children:"Show closed-source"})]}),it&&a.jsxs("div",{className:"method-source",style:{marginTop:0,marginBottom:18},children:[a.jsx("span",{className:"method-source-label",children:"Source"}),H?a.jsxs(ne,{to:`/paper/${H}`,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[a.jsx("span",{className:"method-source-title",children:J?a.jsx(oe,{title:J}):lt}),G&&a.jsx("span",{className:"method-source-meta",children:G})]}):p.paper_url?a.jsxs("a",{href:vt(p.paper_url)??void 0,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[a.jsx("span",{className:"method-source-title",children:J?a.jsx(oe,{title:J}):p.paper_url}),G&&a.jsx("span",{className:"method-source-meta",children:G})]}):a.jsxs("div",{className:"method-source-link is-static",children:[a.jsx("span",{className:"method-source-title",children:J?a.jsx(oe,{title:J}):null}),G&&a.jsx("span",{className:"method-source-meta",children:G})]})]}),a.jsx(Dr,{model:I,datasetName:p.name,hideClosed:l.hide_closed_source_evals,setHideClosed:c,setMetric:E}),_&&(()=>{var Te,Fe;const b=_.paper_arxiv_id||_.paper_id,T=_.paper_title||(_.paper_arxiv_id?`arXiv:${_.paper_arxiv_id}`:null),F=_.best_metric&&((Te=_.metrics)==null?void 0:Te[_.best_metric])!==void 0?_.best_metric:I.activeMetric,Me=(Fe=_.metrics)==null?void 0:Fe[F];return a.jsxs("div",{className:"bm-highlight-banner",role:"status",children:[a.jsx("span",{className:"bm-highlight-dot","aria-hidden":"true"}),a.jsxs("div",{className:"bm-highlight-text",children:[a.jsx("span",{className:"bm-highlight-label",children:"Comparing result"}),a.jsxs("span",{className:"bm-highlight-paper",children:[_.model_name||T||"—",_.harness?` · ${_.harness}`:""]}),a.jsxs("span",{className:"bm-highlight-meta",children:[Me!==void 0&&F?a.jsxs(a.Fragment,{children:[F,": ",le(Me),T?" · ":""]}):null,b?a.jsx(ne,{to:`/paper/${b}`,children:ze(_.paper_title,T)}):ze(_.paper_title,T)]})]})]})})(),a.jsxs("div",{className:"bm-card",ref:x,children:[a.jsxs("div",{className:"bm-card-screenshot-header","aria-hidden":"true",children:[a.jsxs("div",{className:"bm-card-screenshot-title",children:[a.jsx("span",{className:"bm-card-screenshot-eyebrow",children:"Benchmark"}),a.jsx("span",{className:"bm-card-screenshot-name",children:p.name})]}),a.jsxs("div",{className:"bm-card-screenshot-brand",children:[a.jsxs("span",{className:"brand",children:[a.jsx("span",{className:"brand-mark"}),a.jsxs("span",{className:"brand-name",children:["Papers ",a.jsx("em",{children:"With Code"})]})]}),a.jsx("span",{className:"bm-card-screenshot-url",children:"paperswithcode.co"})]})]}),a.jsxs("div",{className:"bm-card-head",children:[a.jsx("div",{className:"bm-card-title",children:"Leaderboard"}),a.jsxs("div",{className:"bm-card-actions",children:[I.allowedMetrics.length>1&&a.jsxs("label",{className:"bm-view-select",children:[a.jsx("span",{className:"bm-view-select-label",children:"View"}),a.jsx("select",{value:I.activeMetric,onChange:b=>E(b.target.value),children:o.map(b=>a.jsx("option",{value:b,children:b},b))})]}),a.jsxs("label",{className:"bm-closed-toggle",title:"Show or hide evaluations of closed-source models",children:[a.jsx(Ke,{className:"bm-closed-toggle-switch",checked:!l.hide_closed_source_evals,onCheckedChange:b=>{c(!b)},"aria-label":"Show closed-source models"}),a.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),!K&&!X&&k.isSuccess?a.jsx("span",{className:"bm-parameter-unavailable",children:"Parameter metadata unavailable"}):null,a.jsx(nt,{targetRef:x,label:"leaderboard"})]})]}),!K&&X&&a.jsxs("div",{className:"bm-parameter-filter-bar",children:[a.jsx("span",{className:"bm-parameter-filter-label",children:"Parameters Size"}),a.jsx("div",{className:"bm-parameter-filter-options",role:"group","aria-label":"Filter leaderboard by parameter size",children:I.parameterFilters.map(b=>{const{selected:T,disabled:F}=b;return a.jsx("button",{type:"button",className:`bm-parameter-filter-option${T?" is-active":""}`,"aria-pressed":T,disabled:F,onClick:()=>$(b.maxParametersExclusive),children:b.label},b.label)})}),a.jsxs("span",{className:"bm-parameter-coverage",children:["Parameters known for ",Y.parameter_coverage_known," of ",Y.parameter_coverage_total," entries"]})]}),k.isLoading||K?a.jsx("div",{style:{padding:16},children:Array.from({length:5}).map((b,T)=>a.jsx(ce,{className:"h-10 w-full mb-2"},T))}):I.rows.length===0?i?a.jsxs("div",{className:"no-results",children:["No known parameter counts match this filter. "," ",a.jsx("button",{type:"button",className:"bm-empty-filter-action",onClick:()=>$(void 0),children:"Show all"})]}):a.jsx("div",{className:"no-results",children:"No evaluations submitted yet."}):a.jsxs(a.Fragment,{children:[o.length>P&&a.jsxs("div",{className:"bm-metric-columns-control",children:[a.jsx("button",{type:"button",className:"bm-metric-columns-toggle","aria-expanded":C,"aria-controls":"benchmark-leaderboard",onClick:()=>h(C?null:R),children:C?"Show fewer metrics":`Show more metrics (${o.length-P})`}),C&&a.jsx("span",{children:"Scroll metrics horizontally; model and paper details stay visible."})]}),a.jsx(Dt,{model:I,showHarness:y,setMetric:E,highlightRowRef:d,onFittingMetricCountChange:S})]})]})]})})};export{oa as default};
|
|
|
|
|
|
|
|
|
assets/BenchmarkDetailView-BObHaEFx.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import{d as L,j as a,K as le,L as ne,e as dt,x as ut,u as mt,g as ht,b as te,o as de,t as ft,T as oe}from"./index-DyXq7-Tg.js";import{R as pt}from"./ResearchFollowButton-Dv316ClR.js";import{c as re}from"./catalog-CRar2olQ.js";import{C as gt,E as xt,e as bt}from"./ExternalSourceEvalBadge-K3r45EmO.js";import{u as yt}from"./preferences-COzeOLyS.js";import{L as ce}from"./LatexTitle-Bkyz3jCs.js";import{S as Ge}from"./switch-nfvTohnt.js";import{I as wt}from"./Icon-T4LYkEQj.js";import{S as ue}from"./skeleton-C3IIzpSL.js";import{A as vt,a as jt}from"./alert-gbJBhAVE.js";import{B as _t}from"./BenchmarkTrendSparkline-DhXxdQ2D.js";import{s as St}from"./safeExternalHref-CkBrsh84.js";import{s as kt}from"./slug-BpH-Nkvz.js";import{i as Ct}from"./apiErrors-BSvbQBb0.js";import Et from"./NotFound-DV_nwcxG.js";import"./researchTopic-DbX0eko-.js";import"./useMutation-UWxBeqtn.js";import"./plus-Yh42pKZz.js";import"./curation-YeS7FBYf.js";import"./hover-card-B45EJIn_.js";import"./account-cbblajck.js";import"./index-C041TDos.js";function ie(e){if(e==null)return null;if(typeof e=="number")return Number.isFinite(e)?e:null;const t=e.includes("±")?e.split("±")[0].trim():e.trim(),r=parseFloat(t);return Number.isFinite(r)?r:null}const Xe=[{label:"All",maxParametersExclusive:void 0},{label:"<10M",maxParametersExclusive:1e7},{label:"<100M",maxParametersExclusive:1e8},{label:"<1B",maxParametersExclusive:1e9},{label:"<3B",maxParametersExclusive:3e9},{label:"<6B",maxParametersExclusive:6e9},{label:"<12B",maxParametersExclusive:12e9},{label:"<32B",maxParametersExclusive:32e9},{label:"<128B",maxParametersExclusive:128e9},{label:"<500B",maxParametersExclusive:5e11}];function Nt(e){const t=e===null?void 0:Number(e);return Xe.some(r=>r.maxParametersExclusive===t)?t:void 0}function Rt(e){return new Intl.NumberFormat("en",{notation:"compact",maximumSignificantDigits:3}).format(e)}function Pt(e){return[e.paper_id,e.task_id,e.dataset_id,e.model_name,e.harness??""].join("|")}function Tt(e){const t=new Map;for(const r of e){const s=Pt(r),n=t.get(s);if(!n){t.set(s,{...r,metrics:{...r.metrics||{}},sourceEvaluationIds:[r.id],ranksByMetric:r.best_metric&&r.best_rank!=null?{[r.best_metric]:r.best_rank}:{},parameterCount:r.num_parameters??null,hasParameterConflict:!1});continue}n.metrics={...n.metrics,...r.metrics||{}},n.sourceEvaluationIds.push(r.id),r.best_metric&&r.best_rank!=null&&(n.ranksByMetric[r.best_metric]=r.best_rank),r.num_parameters!=null&&!n.hasParameterConflict&&(n.parameterCount===null?n.parameterCount=r.num_parameters:n.parameterCount!==r.num_parameters&&(n.parameterCount=null,n.hasParameterConflict=!0))}return Array.from(t.values())}function Ae(e,t){return t===void 0?e:e.filter(r=>r.parameterCount!==null&&r.parameterCount<t)}function $t(e,t){return t?e.id===t||e.sourceEvaluationIds.includes(t):!1}function Be(e,t){return e.ranksByMetric[t]??e.best_rank??9999}function Mt(e){const t=Date.parse(e);return Number.isNaN(t)?"":new Date(t).toISOString().slice(0,10)}function Ft(e){const t=new Map;for(const s of e)s.evaluated_on&&t.set(s.evaluated_on,(t.get(s.evaluated_on)??0)+1);const r=Array.from(t.values()).reduce((s,n)=>s+n,0);for(const[s,n]of t)if(n>=2&&n*2>r)return s;return null}function Lt(e,t){const r=e.evaluated_on;return r&&r!==t&&r!==Mt(e.updated_at)?r:e.paper_published_date||""}function It(e,t,r){if(e.length===0)return{points:[],sota:0,sotaModel:""};const s=Ft(e),n=e.map(u=>{var R;const h=ie((R=u.metrics)==null?void 0:R[t]);return{eval:u,value:h,date:Lt(u,s)}}).filter(u=>u.value!==null&&!!u.date).sort((u,h)=>u.date.localeCompare(h.date)),i=[];let l=null;for(const u of n){const h=l==null?!0:r==="↓"?u.value<l:u.value>l;h&&(l=u.value),i.push({value:u.value,date:u.date,dateLabel:u.date.slice(0,7),modelName:u.eval.model_name||"",paperTitle:u.eval.paper_title||"",paperRouteId:u.eval.paper_arxiv_id||u.eval.paper_id||null,isSota:h})}const d=e.map(u=>{var h;return{eval:u,value:ie((h=u.metrics)==null?void 0:h[t])}}).filter(u=>u.value!==null).sort((u,h)=>r==="↓"?u.value-h.value:h.value-u.value)[0],f=(d==null?void 0:d.value)??0,x=(d==null?void 0:d.eval.model_name)||(d==null?void 0:d.eval.paper_title)||"";return{points:i,sota:f,sotaModel:x}}function At(e,t,r){const s=t?(e??[]).filter(l=>l.task_id===t):e??[],n=s.filter(l=>l.is_open===!1),i=n.reduce((l,c)=>l?(c.best_rank??Number.POSITIVE_INFINITY)<(l.best_rank??Number.POSITIVE_INFINITY)?c:l:c,null);return{visible:r?s.filter(l=>l.is_open!==!1):s,hiddenClosed:n,topHiddenClosed:i}}function Ye(e,t,r,s){const n=t.find(i=>i.id===s);if(e.length===0)return null;if(n!=null&&n.task_id&&e.some(i=>i.id===n.task_id))return n.task_id;if(r){const i=e.find(l=>l.slug===r);if(i)return i.id}if(e.length===1)return e[0].id;if(t.length>0){const i=new Map;for(const d of t)i.set(d.task_id,(i.get(d.task_id)||0)+1);let l=null,c=-1;for(const d of e){const f=i.get(d.id)||0;f>c&&(c=f,l=d.id)}if(l)return l}return e[0].id}function Bt(e){var _,X,Y;const{evaluations:t,tasks:r,taskSlug:s,highlightEvalId:n,parameterBound:i,showMoreMetrics:l,fittingMetricCount:c=1}=e,d=Ye(r,t,s,n),f=r.find(o=>o.id===d)||r[0]||null,x=t.find(o=>o.id===n),u=At(t,d,e.hideClosed),h=Tt(u.visible),R=Ae(h,i),C=e.configuredMetrics.map(o=>o.metric_name),P=Array.from(new Set(h.flatMap(o=>[...o.best_metric?[o.best_metric]:[],...Object.keys(o.metrics||{})]))),S=C.length?C:P,g=new Map;for(const o of h){const m=o.best_metric;!m||ie(o.metrics[m])===null||C.length&&!S.includes(m)||g.set(m,(g.get(m)||0)+1)}const k=((_=[...g].sort((o,m)=>m[1]-o[1])[0])==null?void 0:_[0])||S[0]||"",j=S.find(o=>{var m;return o.toLocaleLowerCase()===((m=e.metric)==null?void 0:m.trim().toLocaleLowerCase())})||(x==null?void 0:x.best_metric)||k,D=((X=e.directions)==null?void 0:X.directions[j])==="lower_is_better"?"↓":"↑",W=j&&S.includes(j)?[j,...S.filter(o=>o!==j)]:S,w=W.length?l?W:W.slice(0,Math.max(1,c)):j?[j]:[],q=R.slice().sort((o,m)=>{const p=ie(o.metrics[j]),y=ie(m.metrics[j]);return p!==null&&y!==null?D==="↓"?p-y:y-p:p!==null?-1:y!==null?1:Be(o,j)-Be(m,j)});let I=null,N=0;const G=q.map((o,m)=>{const p=ie(o.metrics[j]);return p!==null&&p!==I&&(I=p,N=m+1),{evaluation:o,rank:p===null?null:N,isHighlighted:$t(o,n)}}),{points:z,sota:ee,sotaModel:O}=It(R,j,D),$=i===void 0?e.initialSummary:void 0,U=e.ready.evaluations&&e.ready.tasks&&e.ready.directions&&(!d||e.ready.metrics),K={parameter_coverage_known:h.filter(o=>o.parameterCount!==null).length,parameter_coverage_total:h.length};return{currentTaskId:d,primaryTask:f,activeMetric:j,arrow:D,allowedMetrics:S,orderedMetrics:W,visibleMetrics:w,rows:G,chartPoints:z,highlightedEval:((Y=G.find(o=>o.isHighlighted))==null?void 0:Y.evaluation)||null,hiddenClosedEvals:u.hiddenClosed,hiddenClosedTopEval:u.topHiddenClosed,parameterBound:i,parameterCoverage:K,hasParameterMetadata:K.parameter_coverage_known>0,parameterFilters:Xe.map(o=>({...o,selected:i===o.maxParametersExclusive,disabled:i!==o.maxParametersExclusive&&Ae(h,o.maxParametersExclusive).length===0})),displayedMetric:U?j:$==null?void 0:$.metric,displayedSota:U?ee:$==null?void 0:$.value,displayedSotaModel:U?O:$==null?void 0:$.model_name,isSummaryLoading:!U&&!$,isInitialFilteredViewLoading:i!==void 0&&!U}}function Dt(e,t,r,s=1,n=0){const i=e-t.fixed-(r?t.harness:0);if(t.metric<=0)return 1;const l=Math.floor(i/t.metric);if(l<s)return Math.max(1,l);const c=Math.floor((i-n)/t.metric);return Math.max(1,s,c)}function pe(e,t){return parseFloat(e.getPropertyValue(t))||0}function Ht(e){const t=getComputedStyle(e);return{fixed:["--bm-rank-width","--bm-model-width","--bm-parameters-width","--bm-paper-width","--bm-year-width"].reduce((r,s)=>r+pe(t,s),0),harness:pe(t,"--bm-harness-width"),metric:pe(t,"--bm-metric-width")}}const Vt=20;function De(e,t){return e?a.jsx(ce,{title:e}):t||"—"}function Wt({model:e,showHarness:t,setMetric:r,highlightRowRef:s,onFittingMetricCountChange:n}){const{rows:i,visibleMetrics:l,activeMetric:c,arrow:d}=e,[f,x]=L.useState(null);return L.useEffect(()=>{if(!f)return;const u=()=>{f.classList.toggle("has-horizontal-overflow",f.scrollWidth>f.clientWidth);const R=f.firstElementChild;if(!R)return;const C=f.clientWidth,P=Ht(R);f.classList.toggle("unpins-trailing-columns",C<P.fixed+P.metric);const S=document.documentElement,g=S.scrollHeight>S.clientHeight?0:Vt;n(k=>Dt(C,P,t,k,g))},h=new ResizeObserver(u);return h.observe(f),f.firstElementChild&&h.observe(f.firstElementChild),u(),()=>h.disconnect()},[f,t,n]),a.jsx("div",{ref:x,className:"bm-table-scroll",role:"region","aria-label":"Leaderboard metrics",tabIndex:0,children:a.jsxs("table",{id:"benchmark-leaderboard",className:"bm-table",style:{"--bm-metric-count":l.length,"--bm-harness-count":t?1:0},children:[a.jsxs("colgroup",{children:[a.jsx("col",{className:"bm-width-rank"}),a.jsx("col",{className:"bm-width-model"}),a.jsx("col",{className:"bm-width-parameters"}),t&&a.jsx("col",{className:"bm-width-harness"}),l.map(u=>a.jsx("col",{className:"bm-width-metric"},u)),a.jsx("col",{}),a.jsx("col",{className:"bm-width-year"})]}),a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{className:"col-rank",children:"Rank"}),a.jsx("th",{className:"col-model",children:"Model"}),a.jsxs("th",{className:"col-parameters",children:[a.jsx("span",{className:"bm-label-full",children:"Parameters"}),a.jsx("span",{className:"bm-label-short",children:"Params"})]}),t&&a.jsx("th",{className:"col-harness",children:"Harness"}),l.map(u=>{const h=u===c;return a.jsx("th",{className:`col-value ${h?"is-active":""}`,"aria-sort":h?d==="↓"?"ascending":"descending":"none",children:a.jsxs("button",{type:"button",className:"bm-metric-header",onClick:()=>r(u),"aria-pressed":h,title:`Sort by ${u}`,children:[u,h?` ${d}`:""]})},u)}),a.jsx("th",{className:"col-paper",children:"Paper"}),a.jsx("th",{className:"col-year",children:"Year"})]})}),a.jsx("tbody",{children:i.map(({evaluation:u,rank:h,isHighlighted:R})=>{var S;const C=u.paper_arxiv_id||u.paper_id,P=u.paper_title||(u.paper_arxiv_id?`arXiv:${u.paper_arxiv_id}`:null);return a.jsxs("tr",{ref:R?s:void 0,className:R?"is-highlighted":void 0,children:[a.jsx("td",{className:"col-rank",children:h??"—"}),a.jsxs("td",{className:"col-model",children:[R&&a.jsx("span",{className:"bm-row-marker","aria-hidden":"true"}),u.hf_model_url?a.jsx("a",{href:u.hf_model_url,target:"_blank",rel:"noopener noreferrer",className:"bm-model-link",title:`Open ${u.model_name||"model"} on Hugging Face`,children:u.model_name||"—"}):u.model_name||"—",u.is_open===!1&&a.jsx(gt,{}),(u.external??u.is_external)&&a.jsx(xt,{sourceUrl:u.source_url||u.external_source_url||u.result_url})]}),a.jsx("td",{className:"col-parameters",title:u.parameterCount===null?void 0:u.parameterCount.toLocaleString("en-US"),"aria-label":u.parameterCount===null?"Parameters unknown":`${u.parameterCount.toLocaleString("en-US")} parameters`,children:u.parameterCount===null?"—":Rt(u.parameterCount)}),t&&a.jsx("td",{className:"col-harness",children:u.harness||"—"}),l.map(g=>{var j;const k=g===c,B=(j=u.metrics)==null?void 0:j[g];return a.jsx("td",{className:`col-value${k?" is-active":""}${k&&h===1?" is-best":""}`,children:B!=null&&B!==""?le(B):"—"},g)}),a.jsx("td",{className:"col-paper",children:C?a.jsx(ne,{to:`/paper/${C}`,title:u.paper_title||P||void 0,children:De(u.paper_title,P)}):De(u.paper_title,P)}),a.jsx("td",{className:"col-year",children:((S=u.evaluated_on||u.paper_published_date)==null?void 0:S.slice(0,4))||"—"})]},u.id)})})]})})}function He(e){const t=e.length===7?`${e}-01`:e,r=new Date(t).getTime();return Number.isFinite(r)?r:0}const ge=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function xe(e){const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()}}function Ot(e,t){if(e===t){const{year:d,month:f}=xe(e);return[{timestamp:new Date(d,f,1).getTime(),key:`${d}-${f}`,label:`${ge[f]} ${d}`}]}const r=xe(e),s=xe(t);if(r.year===s.year){const d=s.month-r.month+1;let f=1;const x=12;d>x&&(f=Math.ceil(d/x));const u=[];for(let h=r.month;h<=s.month;h+=f)u.push({timestamp:new Date(r.year,h,1).getTime(),key:`${r.year}-${h}`,label:d<=3?`${ge[h]} ${r.year}`:ge[h]});return u}const n=s.year-r.year+1;let i=1;const l=12;n>l&&(i=Math.ceil(n/l));const c=[];for(let d=r.year;d<=s.year;d+=i)c.push({timestamp:new Date(d,0,1).getTime(),key:String(d),label:String(d)});return c}const Ut=({points:e,metric:t})=>{const r=dt(),[s,n]=L.useState(null),i=880,l=320,c=60,d=30,f=40,x=50,u=e.map(o=>o.value),h=Math.min(...u),C=Math.max(...u)-h||1,P=i-c-d,S=l-f-x,g=e.map(o=>He(o.date)),k=Math.min(...g),B=Math.max(...g),j=B-k||1,D=o=>k===B?c+P/2:c+(o-k)/j*P,W=e.map((o,m)=>{const p=D(He(o.date)),y=(o.value-h)/C,T=f+S*(1-y);return{x:p,y:T,data:o,idx:m}}),w=W.filter(o=>o.data.isSota);let q="";if(w.length>=2){q=`M${w[0].x},${w[0].y}`;for(let o=1;o<w.length;o++){const m=w[o-1],p=w[o],y=(m.x+p.x)/2;q+=` C${y},${m.y} ${y},${p.y} ${p.x},${p.y}`}}const I=5.4,N=8,G=9,z=o=>{const m=o.data.modelName||o.data.paperTitle||"";if(!m)return null;const p=m.length>22?m.slice(0,21)+"…":m,y=p.length*I;let T=o.x-y/2,E=o.x+y/2,v="middle";return T<c?(T=c,E=c+y,v="start"):E>i-d&&(E=i-d,T=E-y,v="end"),{x:v==="start"?c:v==="end"?i-d:o.x,y:o.y-G,text:p,anchor:v,left:T,right:E}},ee=[],O=w.length>0?z(w[w.length-1]):null;let $=-1/0;for(let o=0;o<w.length-1;o++){const m=z(w[o]);m&&(m.left<$+N||O&&m.right>O.left-N||($=m.right,ee.push({x:m.x,y:m.y,text:m.text,anchor:m.anchor})))}O&&ee.push({x:O.x,y:O.y,text:O.text,anchor:O.anchor});const U=Ot(k,B),K=5,_=o=>n(m=>m===o?null:m),X=o=>{o&&r(`/paper/${o}`)},Y=(o,m)=>{const y=`${o.data.modelName||o.data.paperTitle||"Unknown model"}: ${le(o.data.value)} on ${o.data.dateLabel}`,T=!!o.data.paperRouteId;return a.jsxs("g",{children:[m,a.jsx("circle",{cx:o.x,cy:o.y,r:"10",fill:"transparent",style:{cursor:T?"pointer":"default",outline:"none"},tabIndex:0,role:T?"link":"img","aria-label":y,onMouseEnter:()=>n(o.idx),onMouseLeave:()=>_(o.idx),onFocus:()=>n(o.idx),onBlur:()=>_(o.idx),onClick:()=>X(o.data.paperRouteId),onKeyDown:E=>{T&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),X(o.data.paperRouteId))},children:a.jsx("title",{children:y})})]},o.idx)};return a.jsxs("svg",{width:"100%",viewBox:`0 0 ${i} ${l}`,style:{display:"block"},children:[a.jsx("text",{x:c-38,y:f+S/2,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"middle",transform:`rotate(-90 ${c-38} ${f+S/2})`,children:t}),Array.from({length:K}).map((o,m)=>{const p=m/(K-1),y=f+S*(1-p),T=h+C*p;return a.jsxs("g",{children:[a.jsx("line",{x1:c,y1:y,x2:i-d,y2:y,stroke:"var(--hairline)",strokeWidth:"1"}),a.jsx("text",{x:c-10,y:y+4,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"end",children:le(T)})]},m)}),U.map(o=>{const m=D(o.timestamp);return a.jsx("text",{x:m,y:l-x+18,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:"middle",children:o.label},o.key)}),W.filter(o=>!o.data.isSota).map(o=>{const m=s===o.idx;return Y(o,a.jsx("circle",{cx:o.x,cy:o.y,r:m?3:2,fill:"var(--ink-faint)",opacity:m?1:.45,style:{transition:"r 0.12s ease, opacity 0.12s ease"}}))}),q&&a.jsx("path",{d:q,stroke:"var(--accent)",strokeWidth:"2",fill:"none",strokeLinejoin:"round",strokeLinecap:"round"}),w.map(o=>{const m=s===o.idx;return Y(o,a.jsx("circle",{cx:o.x,cy:o.y,r:m?4.5:3,fill:m?"var(--accent)":"var(--bg-elevated)",stroke:"var(--accent)",strokeWidth:"1.5",style:{transition:"r 0.12s ease, fill 0.12s ease"}}))}),ee.map((o,m)=>a.jsx("text",{x:o.x,y:o.y,fontSize:"9.5",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:o.anchor,pointerEvents:"none",style:{paintOrder:"stroke",stroke:"var(--bg-elevated)",strokeWidth:3,strokeLinejoin:"round"},children:o.text},`label-${m}`)),s!==null&&W[s]&&(()=>{const o=W[s],m=o.data.modelName||o.data.paperTitle||"Unknown model",y=`${m.length>40?m.slice(0,39)+"…":m}: ${le(o.data.value)}`,E=Math.max(120,Math.min(340,y.length*6.6+24)),v=30;let H=o.x-E/2;H<c&&(H=c),H+E>i-d&&(H=i-d-E);const Q=o.y-v-14>=f?o.y-v-12:o.y+12;return a.jsxs("g",{pointerEvents:"none",children:[a.jsx("rect",{x:H,y:Q,width:E,height:v,rx:"6",ry:"6",fill:"var(--bg-elevated)",stroke:"var(--hairline-strong)",strokeWidth:"1",style:{filter:"drop-shadow(0 2px 6px rgba(0,0,0,0.08))"}}),a.jsx("text",{x:H+12,y:Q+19,fontSize:"12",fontFamily:"var(--sans)",fill:"var(--ink)",fontWeight:500,children:y})]})})()]})};function qt(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const r=document.implementation.createHTMLDocument(),s=r.createElement("base"),n=r.createElement("a");return r.head.appendChild(s),r.body.appendChild(n),t&&(s.href=t),n.href=e,n.href}const zt=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function Z(e){const t=[];for(let r=0,s=e.length;r<s;r++)t.push(e[r]);return t}let ae=null;function Je(e={}){return ae||(e.includeStyleProperties?(ae=e.includeStyleProperties,ae):(ae=Z(window.getComputedStyle(document.documentElement)),ae))}function me(e,t){const s=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return s?parseFloat(s.replace("px","")):0}function Kt(e){const t=me(e,"border-left-width"),r=me(e,"border-right-width");return e.clientWidth+t+r}function Qt(e){const t=me(e,"border-top-width"),r=me(e,"border-bottom-width");return e.clientHeight+t+r}function Ze(e,t={}){const r=t.width||Kt(e),s=t.height||Qt(e);return{width:r,height:s}}function Gt(){let e,t;try{t=process}catch{}const r=t&&t.env?t.env.devicePixelRatio:null;return r&&(e=parseInt(r,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}const V=16384;function Xt(e){(e.width>V||e.height>V)&&(e.width>V&&e.height>V?e.width>e.height?(e.height*=V/e.width,e.width=V):(e.width*=V/e.height,e.height=V):e.width>V?(e.height*=V/e.width,e.width=V):(e.width*=V/e.height,e.height=V))}function Yt(e,t={}){return e.toBlob?new Promise(r=>{e.toBlob(r,t.type?t.type:"image/png",t.quality?t.quality:1)}):new Promise(r=>{const s=window.atob(e.toDataURL(t.type?t.type:void 0,t.quality?t.quality:void 0).split(",")[1]),n=s.length,i=new Uint8Array(n);for(let l=0;l<n;l+=1)i[l]=s.charCodeAt(l);r(new Blob([i],{type:t.type?t.type:"image/png"}))})}function he(e){return new Promise((t,r)=>{const s=new Image;s.onload=()=>{s.decode().then(()=>{requestAnimationFrame(()=>t(s))})},s.onerror=r,s.crossOrigin="anonymous",s.decoding="async",s.src=e})}async function Jt(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function Zt(e,t,r){const s="http://www.w3.org/2000/svg",n=document.createElementNS(s,"svg"),i=document.createElementNS(s,"foreignObject");return n.setAttribute("width",`${t}`),n.setAttribute("height",`${r}`),n.setAttribute("viewBox",`0 0 ${t} ${r}`),i.setAttribute("width","100%"),i.setAttribute("height","100%"),i.setAttribute("x","0"),i.setAttribute("y","0"),i.setAttribute("externalResourcesRequired","true"),n.appendChild(i),i.appendChild(e),Jt(n)}const A=(e,t)=>{if(e instanceof t)return!0;const r=Object.getPrototypeOf(e);return r===null?!1:r.constructor.name===t.name||A(r,t)};function er(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function tr(e,t){return Je(t).map(r=>{const s=e.getPropertyValue(r),n=e.getPropertyPriority(r);return`${r}: ${s}${n?" !important":""};`}).join(" ")}function rr(e,t,r,s){const n=`.${e}:${t}`,i=r.cssText?er(r):tr(r,s);return document.createTextNode(`${n}{${i}}`)}function Ve(e,t,r,s){const n=window.getComputedStyle(e,r),i=n.getPropertyValue("content");if(i===""||i==="none")return;const l=zt();try{t.className=`${t.className} ${l}`}catch{return}const c=document.createElement("style");c.appendChild(rr(l,r,n,s)),t.appendChild(c)}function ar(e,t,r){Ve(e,t,":before",r),Ve(e,t,":after",r)}const We="application/font-woff",Oe="image/jpeg",sr={woff:We,woff2:We,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:Oe,jpeg:Oe,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function nr(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function ve(e){const t=nr(e).toLowerCase();return sr[t]||""}function ir(e){return e.split(/,/)[1]}function ye(e){return e.search(/^(data:)/)!==-1}function lr(e,t){return`data:${t};base64,${e}`}async function et(e,t,r){const s=await fetch(e,t);if(s.status===404)throw new Error(`Resource "${s.url}" not found`);const n=await s.blob();return new Promise((i,l)=>{const c=new FileReader;c.onerror=l,c.onloadend=()=>{try{i(r({res:s,result:c.result}))}catch(d){l(d)}},c.readAsDataURL(n)})}const be={};function or(e,t,r){let s=e.replace(/\?.*/,"");return r&&(s=e),/ttf|otf|eot|woff2?/i.test(s)&&(s=s.replace(/.*\//,"")),t?`[${t}]${s}`:s}async function je(e,t,r){const s=or(e,t,r.includeQueryParams);if(be[s]!=null)return be[s];r.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let n;try{const i=await et(e,r.fetchRequestInit,({res:l,result:c})=>(t||(t=l.headers.get("Content-Type")||""),ir(c)));n=lr(i,t)}catch(i){n=r.imagePlaceholder||"";let l=`Failed to fetch resource: ${e}`;i&&(l=typeof i=="string"?i:i.message),l&&console.warn(l)}return be[s]=n,n}async function cr(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):he(t)}async function dr(e,t){if(e.currentSrc){const i=document.createElement("canvas"),l=i.getContext("2d");i.width=e.clientWidth,i.height=e.clientHeight,l==null||l.drawImage(e,0,0,i.width,i.height);const c=i.toDataURL();return he(c)}const r=e.poster,s=ve(r),n=await je(r,s,t);return he(n)}async function ur(e,t){var r;try{if(!((r=e==null?void 0:e.contentDocument)===null||r===void 0)&&r.body)return await fe(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function mr(e,t){return A(e,HTMLCanvasElement)?cr(e):A(e,HTMLVideoElement)?dr(e,t):A(e,HTMLIFrameElement)?ur(e,t):e.cloneNode(tt(e))}const hr=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",tt=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function fr(e,t,r){var s,n;if(tt(t))return t;let i=[];return hr(e)&&e.assignedNodes?i=Z(e.assignedNodes()):A(e,HTMLIFrameElement)&&(!((s=e.contentDocument)===null||s===void 0)&&s.body)?i=Z(e.contentDocument.body.childNodes):i=Z(((n=e.shadowRoot)!==null&&n!==void 0?n:e).childNodes),i.length===0||A(e,HTMLVideoElement)||await i.reduce((l,c)=>l.then(()=>fe(c,r)).then(d=>{d&&t.appendChild(d)}),Promise.resolve()),t}function pr(e,t,r){const s=t.style;if(!s)return;const n=window.getComputedStyle(e);n.cssText?(s.cssText=n.cssText,s.transformOrigin=n.transformOrigin):Je(r).forEach(i=>{let l=n.getPropertyValue(i);i==="font-size"&&l.endsWith("px")&&(l=`${Math.floor(parseFloat(l.substring(0,l.length-2)))-.1}px`),A(e,HTMLIFrameElement)&&i==="display"&&l==="inline"&&(l="block"),i==="d"&&t.getAttribute("d")&&(l=`path(${t.getAttribute("d")})`),s.setProperty(i,l,n.getPropertyPriority(i))})}function gr(e,t){A(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),A(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function xr(e,t){if(A(e,HTMLSelectElement)){const r=t,s=Array.from(r.children).find(n=>e.value===n.getAttribute("value"));s&&s.setAttribute("selected","")}}function br(e,t,r){return A(t,Element)&&(pr(e,t,r),ar(e,t,r),gr(e,t),xr(e,t)),t}async function yr(e,t){const r=e.querySelectorAll?e.querySelectorAll("use"):[];if(r.length===0)return e;const s={};for(let i=0;i<r.length;i++){const c=r[i].getAttribute("xlink:href");if(c){const d=e.querySelector(c),f=document.querySelector(c);!d&&f&&!s[c]&&(s[c]=await fe(f,t,!0))}}const n=Object.values(s);if(n.length){const i="http://www.w3.org/1999/xhtml",l=document.createElementNS(i,"svg");l.setAttribute("xmlns",i),l.style.position="absolute",l.style.width="0",l.style.height="0",l.style.overflow="hidden",l.style.display="none";const c=document.createElementNS(i,"defs");l.appendChild(c);for(let d=0;d<n.length;d++)c.appendChild(n[d]);e.appendChild(l)}return e}async function fe(e,t,r){return!r&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(s=>mr(s,t)).then(s=>fr(e,s,t)).then(s=>br(e,s,t)).then(s=>yr(s,t))}const rt=/url\((['"]?)([^'"]+?)\1\)/g,wr=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,vr=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function jr(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function _r(e){const t=[];return e.replace(rt,(r,s,n)=>(t.push(n),r)),t.filter(r=>!ye(r))}async function Sr(e,t,r,s,n){try{const i=r?qt(t,r):t,l=ve(t);let c;return n||(c=await je(i,l,s)),e.replace(jr(t),`$1${c}$3`)}catch{}return e}function kr(e,{preferredFontFormat:t}){return t?e.replace(vr,r=>{for(;;){const[s,,n]=wr.exec(r)||[];if(!n)return"";if(n===t)return`src: ${s};`}}):e}function at(e){return e.search(rt)!==-1}async function st(e,t,r){if(!at(e))return e;const s=kr(e,r);return _r(s).reduce((i,l)=>i.then(c=>Sr(c,l,t,r)),Promise.resolve(s))}async function se(e,t,r){var s;const n=(s=t.style)===null||s===void 0?void 0:s.getPropertyValue(e);if(n){const i=await st(n,null,r);return t.style.setProperty(e,i,t.style.getPropertyPriority(e)),!0}return!1}async function Cr(e,t){await se("background",e,t)||await se("background-image",e,t),await se("mask",e,t)||await se("-webkit-mask",e,t)||await se("mask-image",e,t)||await se("-webkit-mask-image",e,t)}async function Er(e,t){const r=A(e,HTMLImageElement);if(!(r&&!ye(e.src))&&!(A(e,SVGImageElement)&&!ye(e.href.baseVal)))return;const s=r?e.src:e.href.baseVal,n=await je(s,ve(s),t);await new Promise((i,l)=>{e.onload=i,e.onerror=t.onImageErrorHandler?(...d)=>{try{i(t.onImageErrorHandler(...d))}catch(f){l(f)}}:l;const c=e;c.decode&&(c.decode=i),c.loading==="lazy"&&(c.loading="eager"),r?(e.srcset="",e.src=n):e.href.baseVal=n})}async function Nr(e,t){const s=Z(e.childNodes).map(n=>nt(n,t));await Promise.all(s).then(()=>e)}async function nt(e,t){A(e,Element)&&(await Cr(e,t),await Er(e,t),await Nr(e,t))}function Rr(e,t){const{style:r}=e;t.backgroundColor&&(r.backgroundColor=t.backgroundColor),t.width&&(r.width=`${t.width}px`),t.height&&(r.height=`${t.height}px`);const s=t.style;return s!=null&&Object.keys(s).forEach(n=>{r[n]=s[n]}),e}const Ue={};async function qe(e){let t=Ue[e];if(t!=null)return t;const s=await(await fetch(e)).text();return t={url:e,cssText:s},Ue[e]=t,t}async function ze(e,t){let r=e.cssText;const s=/url\(["']?([^"')]+)["']?\)/g,i=(r.match(/url\([^)]+\)/g)||[]).map(async l=>{let c=l.replace(s,"$1");return c.startsWith("https://")||(c=new URL(c,e.url).href),et(c,t.fetchRequestInit,({result:d})=>(r=r.replace(l,`url(${d})`),[l,d]))});return Promise.all(i).then(()=>r)}function Ke(e){if(e==null)return[];const t=[],r=/(\/\*[\s\S]*?\*\/)/gi;let s=e.replace(r,"");const n=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const d=n.exec(s);if(d===null)break;t.push(d[0])}s=s.replace(n,"");const i=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,l="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",c=new RegExp(l,"gi");for(;;){let d=i.exec(s);if(d===null){if(d=c.exec(s),d===null)break;i.lastIndex=c.lastIndex}else c.lastIndex=i.lastIndex;t.push(d[0])}return t}async function Pr(e,t){const r=[],s=[];return e.forEach(n=>{if("cssRules"in n)try{Z(n.cssRules||[]).forEach((i,l)=>{if(i.type===CSSRule.IMPORT_RULE){let c=l+1;const d=i.href,f=qe(d).then(x=>ze(x,t)).then(x=>Ke(x).forEach(u=>{try{n.insertRule(u,u.startsWith("@import")?c+=1:n.cssRules.length)}catch(h){console.error("Error inserting rule from remote css",{rule:u,error:h})}})).catch(x=>{console.error("Error loading remote css",x.toString())});s.push(f)}})}catch(i){const l=e.find(c=>c.href==null)||document.styleSheets[0];n.href!=null&&s.push(qe(n.href).then(c=>ze(c,t)).then(c=>Ke(c).forEach(d=>{l.insertRule(d,l.cssRules.length)})).catch(c=>{console.error("Error loading remote stylesheet",c)})),console.error("Error inlining remote css file",i)}}),Promise.all(s).then(()=>(e.forEach(n=>{if("cssRules"in n)try{Z(n.cssRules||[]).forEach(i=>{r.push(i)})}catch(i){console.error(`Error while reading CSS rules from ${n.href}`,i)}}),r))}function Tr(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>at(t.style.getPropertyValue("src")))}async function $r(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=Z(e.ownerDocument.styleSheets),s=await Pr(r,t);return Tr(s)}function it(e){return e.trim().replace(/["']/g,"")}function Mr(e){const t=new Set;function r(s){(s.style.fontFamily||getComputedStyle(s).fontFamily).split(",").forEach(i=>{t.add(it(i))}),Array.from(s.children).forEach(i=>{i instanceof HTMLElement&&r(i)})}return r(e),t}async function Fr(e,t){const r=await $r(e,t),s=Mr(e);return(await Promise.all(r.filter(i=>s.has(it(i.style.fontFamily))).map(i=>{const l=i.parentStyleSheet?i.parentStyleSheet.href:null;return st(i.cssText,l,t)}))).join(`
|
| 2 |
+
`)}async function Lr(e,t){const r=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await Fr(e,t);if(r){const s=document.createElement("style"),n=document.createTextNode(r);s.appendChild(n),e.firstChild?e.insertBefore(s,e.firstChild):e.appendChild(s)}}async function Ir(e,t={}){const{width:r,height:s}=Ze(e,t),n=await fe(e,t,!0);return await Lr(n,t),await nt(n,t),Rr(n,t),await Zt(n,r,s)}async function Ar(e,t={}){const{width:r,height:s}=Ze(e,t),n=await Ir(e,t),i=await he(n),l=document.createElement("canvas"),c=l.getContext("2d"),d=t.pixelRatio||Gt(),f=t.canvasWidth||r,x=t.canvasHeight||s;return l.width=f*d,l.height=x*d,t.skipAutoScale||Xt(l),l.style.width=`${f}`,l.style.height=`${x}`,t.backgroundColor&&(c.fillStyle=t.backgroundColor,c.fillRect(0,0,l.width,l.height)),c.drawImage(i,0,0,l.width,l.height),l}async function Br(e,t={}){const r=await Ar(e,t);return await Yt(r)}const we="#ffffff";function Dr(){return typeof window>"u"?we:window.getComputedStyle(document.documentElement).getPropertyValue("--bg-elevated").trim()||we}function Hr(e){if(typeof window>"u")return we;const t=window.getComputedStyle(e).backgroundColor;return!t||t==="rgba(0, 0, 0, 0)"||t==="transparent"?Dr():t}async function Vr(e){var r,s;if(typeof window>"u"||!((s=(r=window.navigator)==null?void 0:r.clipboard)!=null&&s.write))throw new Error("Clipboard image copy is not supported in this browser.");if(typeof window.ClipboardItem>"u")throw new Error("Clipboard image copy is not supported in this browser.");const t=await Br(e,{pixelRatio:2,cacheBust:!0,backgroundColor:Hr(e)});if(!t)throw new Error("Failed to render screenshot.");await window.navigator.clipboard.write([new window.ClipboardItem({"image/png":t})])}const lt=({targetRef:e,label:t})=>{const{toast:r}=ut(),[s,n]=L.useState("idle"),i=L.useRef(null);L.useEffect(()=>()=>{i.current!==null&&window.clearTimeout(i.current)},[]);const l=L.useCallback(async()=>{const d=e.current;if(d){n("copying"),d.classList.add("is-capturing"),d.offsetHeight,await new Promise(f=>window.requestAnimationFrame(()=>f()));try{await Vr(d),n("copied"),r({title:"Screenshot copied",description:`Image of the ${t} copied to your clipboard.`}),i.current!==null&&window.clearTimeout(i.current),i.current=window.setTimeout(()=>n("idle"),1500)}catch(f){n("idle"),r({title:"Copy failed",description:f instanceof Error&&f.message?f.message:"Could not copy the screenshot to your clipboard.",variant:"destructive"})}finally{d.classList.remove("is-capturing")}}},[e,t,r]),c=s==="copied"?"Copied":s==="copying"?"Copying…":"Copy image";return a.jsxs("button",{type:"button",className:"bm-copy-btn",onClick:l,disabled:s==="copying","aria-label":`Copy ${t} screenshot to clipboard`,title:`Copy ${t} screenshot to clipboard`,children:[a.jsx(wt,{name:"copy",size:11}),c]})};function Wr({model:e,datasetName:t,hideClosed:r,setHideClosed:s,setMetric:n}){const i=L.useRef(null),{isInitialFilteredViewLoading:l,chartPoints:c,activeMetric:d,allowedMetrics:f,orderedMetrics:x,parameterBound:u}=e;return l||c.length===0?null:a.jsxs("div",{className:"bm-card",ref:i,children:[a.jsxs("div",{className:"bm-card-screenshot-header","aria-hidden":"true",children:[a.jsxs("div",{className:"bm-card-screenshot-title",children:[a.jsx("span",{className:"bm-card-screenshot-eyebrow",children:"Benchmark"}),a.jsx("span",{className:"bm-card-screenshot-name",children:t})]}),a.jsxs("div",{className:"bm-card-screenshot-brand",children:[a.jsxs("span",{className:"brand",children:[a.jsx("span",{className:"brand-mark"}),a.jsxs("span",{className:"brand-name",children:["Papers ",a.jsx("em",{children:"With Code"})]})]}),a.jsx("span",{className:"bm-card-screenshot-url",children:"paperswithcode.co"})]})]}),a.jsxs("div",{className:"bm-card-head",children:[a.jsx("div",{className:"bm-card-title",children:"SOTA progression"}),a.jsxs("div",{className:"bm-card-actions",children:[f.length>1&&a.jsxs("label",{className:"bm-view-select",children:[a.jsx("span",{className:"bm-view-select-label",children:"View"}),a.jsx("select",{value:d,onChange:h=>n(h.target.value),children:x.map(h=>a.jsx("option",{value:h,children:h},h))})]}),a.jsxs("label",{className:"bm-closed-toggle",title:"Show or hide evaluations of closed-source models",children:[a.jsx(Ge,{className:"bm-closed-toggle-switch",checked:!r,onCheckedChange:h=>{s(!h)},"aria-label":"Show closed-source models"}),a.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),a.jsx(lt,{targetRef:i,label:"SOTA chart"})]})]}),a.jsx("div",{className:"bm-chart-wrap",children:a.jsx(Ut,{points:c,metric:d})}),a.jsxs("div",{className:"bm-chart-foot",children:[a.jsx("span",{className:"legend-dot"}),u===void 0?"All models":"Filtered models"," over time · highlighted dots track the running best · hover for the model · click to open the paper"]})]})}function Or(e){if(!e)return null;const t=e.trim(),r=t.match(/^https?:\/\/(?:www\.)?arxiv\.org\/(?:abs|pdf)\/([^/?#]+)/i);if(r!=null&&r[1])return r[1].replace(/\.pdf$/i,"");const s=t.match(/^(?:https?:\/\/(?:www\.)?paperswithcode\.co)?\/paper\/([^/?#]+)/i);return(s==null?void 0:s[1])??null}function Qe(e,t){return e?a.jsx(ce,{title:e}):t||"—"}const ma=()=>{var _e,Se,ke,Ce,Ee,Ne,Re,Pe,Te,$e,Me;const{datasetSlug:e}=mt(),[t,r]=ht(),s=t.get("task")||void 0,n=t.get("eval")||void 0,i=Nt(t.get("max_parameters_exclusive")),{preferences:l,setHideClosedSourceEvals:c}=yt(),d=L.useRef(null),f=L.useRef(!1),x=L.useRef(null),[u,h]=L.useState(null),R=`${e}:${s||""}`,C=u===R,[P,S]=L.useState(1),g=te({queryKey:[...de.dataset(e),"with-paper",s,l.hide_closed_source_evals?"open":"all"],queryFn:()=>re.getDatasetBySlug(e,{include_paper:!0,task:s,is_open:l.hide_closed_source_evals?!0:void 0}),enabled:!!e,staleTime:oe}),k=te({queryKey:ft.byDataset((_e=g.data)==null?void 0:_e.id),queryFn:()=>bt.byDataset(g.data.id),enabled:!!((Se=g.data)!=null&&Se.id),staleTime:5*60*1e3}),B=te({queryKey:[...de.datasetTasks,(ke=g.data)==null?void 0:ke.id],queryFn:()=>re.datasetTasks(g.data.id),enabled:!!((Ce=g.data)!=null&&Ce.id),staleTime:oe}),j=te({queryKey:["metric-directions"],queryFn:()=>re.metricDirections(),staleTime:60*60*1e3}),D=Ye(B.data||[],k.data||[],s,n),W=te({queryKey:[...de.taskBenchmarkTrends,D,l.hide_closed_source_evals?!0:void 0],queryFn:()=>re.trendingBenchmarks(D,{limit:100,min_recent_papers:0,is_open:l.hide_closed_source_evals?!0:void 0}),enabled:!!D&&!!((Ee=g.data)!=null&&Ee.id),staleTime:oe}),w=L.useMemo(()=>{var b;return(((b=W.data)==null?void 0:b.results)||[]).find(M=>{var F;return M.id===((F=g.data)==null?void 0:F.id)})||null},[W.data,(Ne=g.data)==null?void 0:Ne.id]),q=te({queryKey:["leaderboard-metrics",(Re=g.data)==null?void 0:Re.id,D],queryFn:()=>re.leaderboardMetrics(g.data.id,D),enabled:!!((Pe=g.data)!=null&&Pe.id)&&!!D,staleTime:oe}),I=Bt({evaluations:k.data||[],tasks:B.data||[],configuredMetrics:q.data||[],directions:j.data,initialSummary:(Te=g.data)==null?void 0:Te.leaderboard_summary,taskSlug:s,highlightEvalId:n,metric:t.get("metric")||void 0,hideClosed:l.hide_closed_source_evals,parameterBound:i,showMoreMetrics:C,fittingMetricCount:P,ready:{evaluations:k.isSuccess,tasks:B.isSuccess,directions:j.isSuccess,metrics:q.isSuccess}}),{primaryTask:N,hiddenClosedEvals:G,hiddenClosedTopEval:z,isSummaryLoading:ee,displayedMetric:O,displayedSota:$,displayedSotaModel:U,isInitialFilteredViewLoading:K,highlightedEval:_,hasParameterMetadata:X,parameterCoverage:Y,orderedMetrics:o}=I;L.useEffect(()=>{if(f.current||!n||!k.data||k.data.length===0)return;const b=d.current;b&&(f.current=!0,b.scrollIntoView({behavior:"smooth",block:"start"}))},[n,k.data]);const m=te({queryKey:de.area(N==null?void 0:N.area_id),queryFn:()=>re.getArea(N.area_id),enabled:!!(N!=null&&N.area_id),staleTime:oe});if(g.isLoading)return a.jsxs("div",{className:"page",children:[a.jsx(ue,{className:"h-12 w-1/2 mb-6"}),a.jsx(ue,{className:"h-64 w-full"})]});if(Ct(g.error))return a.jsx(Et,{});if(g.error||!g.data)return a.jsx("div",{className:"page",children:a.jsx(vt,{variant:"destructive",children:a.jsx(jt,{children:"Benchmark not found."})})});const p=g.data,y=!!p.supports_harness,T=b=>{r(M=>{const F=new URLSearchParams(M);return b===void 0?F.delete("max_parameters_exclusive"):F.set("max_parameters_exclusive",String(b)),F})},E=b=>{r(M=>{const F=new URLSearchParams(M);return F.set("metric",b),F})},v=p.introducing_paper??void 0,H=(v==null?void 0:v.arxiv_id)||(v==null?void 0:v.id)||Or(p.paper_url),J=(v==null?void 0:v.title)||p.introducing_paper_title||null,Q=(($e=v==null?void 0:v.published)==null?void 0:$e.slice(0,4))||p.introduced_year||null,ot=!!H||!!p.paper_url||!!J,ct=v!=null&&v.arxiv_id||(Me=p.paper_url)!=null&&Me.match(/^https?:\/\/(?:www\.)?arxiv\.org\//i)?`arXiv:${H}`:`Paper ${H}`;return a.jsx("div",{className:"page",children:a.jsxs("div",{className:"bm-page",children:[a.jsxs("div",{className:"breadcrumb",children:[a.jsx(ne,{to:"/tasks",children:"Tasks"}),m.data&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"sep",children:"/"}),a.jsx(ne,{to:`/tasks#area-${kt(m.data.name)}`,children:m.data.name})]}),N&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"sep",children:"/"}),a.jsx(ne,{to:`/tasks/${N.slug||N.id}`,children:N.name})]}),a.jsx("span",{className:"sep",children:"/"}),a.jsx("span",{style:{color:"var(--accent-text)"},children:p.name})]}),a.jsxs("div",{className:"bm-title-row",children:[a.jsx("h1",{className:"bm-title",children:p.name}),w&&a.jsxs("div",{className:"bm-title-trend","aria-label":`${p.name} reporting trend`,children:[a.jsx(_t,{history:w.history,benchmarkName:w.name}),a.jsxs("span",{className:"bm-title-trend-summary",children:[a.jsx("strong",{children:w.recent_paper_count})," ",w.recent_paper_count===1?"paper":"papers",w.rate_change==null?w.recent_paper_count>0&&a.jsx("span",{className:"benchmark-trend-change is-new",children:"new"}):a.jsxs("span",{className:`benchmark-trend-change ${w.rate_change>=1?"is-up":"is-down"}`,children:[w.rate_change>=1?"↑":"↓"," ",w.rate_change.toFixed(1),"×"]})]})]})]}),a.jsx(pt,{kind:"benchmark",entityId:p.id}),a.jsxs("div",{className:"bm-subtitle",children:[ee?a.jsx(ue,{className:"h-5 w-64 bm-summary-skeleton","aria-label":"Loading benchmark summary"}):a.jsxs("span",{children:[O&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"metric-tag",children:O}),a.jsx("span",{style:{color:"var(--hairline-strong)",margin:"0 8px"},children:"·"})]}),U?a.jsxs("span",{children:["Best: ",a.jsx("span",{className:"best-name",children:le($)})," by ",a.jsx("span",{className:"best-name",style:{fontStyle:"normal"},children:U})]}):a.jsxs("span",{children:[I.rows.length," evaluations"]})]}),p.hf_url&&a.jsxs("a",{className:"bm-action-btn",href:p.hf_url,target:"_blank",rel:"noopener noreferrer",children:[a.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),p.description&&a.jsx("p",{className:"bm-description",children:p.description}),l.hide_closed_source_evals&&G.length>0&&a.jsxs("div",{className:"bm-hidden-closed-notice",children:[a.jsxs("span",{children:[G.length," closed-source ",G.length===1?"row is":"rows are"," hidden",z!=null&&z.model_name?a.jsxs(a.Fragment,{children:[", including ",a.jsx("strong",{children:z.model_name})]}):null,"."]}),a.jsx("button",{type:"button",className:"bm-hidden-closed-action",onClick:()=>{c(!1)},children:"Show closed-source"})]}),ot&&a.jsxs("div",{className:"method-source",style:{marginTop:0,marginBottom:18},children:[a.jsx("span",{className:"method-source-label",children:"Source"}),H?a.jsxs(ne,{to:`/paper/${H}`,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[a.jsx("span",{className:"method-source-title",children:J?a.jsx(ce,{title:J}):ct}),Q&&a.jsx("span",{className:"method-source-meta",children:Q})]}):p.paper_url?a.jsxs("a",{href:St(p.paper_url)??void 0,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[a.jsx("span",{className:"method-source-title",children:J?a.jsx(ce,{title:J}):p.paper_url}),Q&&a.jsx("span",{className:"method-source-meta",children:Q})]}):a.jsxs("div",{className:"method-source-link is-static",children:[a.jsx("span",{className:"method-source-title",children:J?a.jsx(ce,{title:J}):null}),Q&&a.jsx("span",{className:"method-source-meta",children:Q})]})]}),a.jsx(Wr,{model:I,datasetName:p.name,hideClosed:l.hide_closed_source_evals,setHideClosed:c,setMetric:E}),_&&(()=>{var Le,Ie;const b=_.paper_arxiv_id||_.paper_id,M=_.paper_title||(_.paper_arxiv_id?`arXiv:${_.paper_arxiv_id}`:null),F=_.best_metric&&((Le=_.metrics)==null?void 0:Le[_.best_metric])!==void 0?_.best_metric:I.activeMetric,Fe=(Ie=_.metrics)==null?void 0:Ie[F];return a.jsxs("div",{className:"bm-highlight-banner",role:"status",children:[a.jsx("span",{className:"bm-highlight-dot","aria-hidden":"true"}),a.jsxs("div",{className:"bm-highlight-text",children:[a.jsx("span",{className:"bm-highlight-label",children:"Comparing result"}),a.jsxs("span",{className:"bm-highlight-paper",children:[_.model_name||M||"—",_.harness?` · ${_.harness}`:""]}),a.jsxs("span",{className:"bm-highlight-meta",children:[Fe!==void 0&&F?a.jsxs(a.Fragment,{children:[F,": ",le(Fe),M?" · ":""]}):null,b?a.jsx(ne,{to:`/paper/${b}`,children:Qe(_.paper_title,M)}):Qe(_.paper_title,M)]})]})]})})(),a.jsxs("div",{className:"bm-card",ref:x,children:[a.jsxs("div",{className:"bm-card-screenshot-header","aria-hidden":"true",children:[a.jsxs("div",{className:"bm-card-screenshot-title",children:[a.jsx("span",{className:"bm-card-screenshot-eyebrow",children:"Benchmark"}),a.jsx("span",{className:"bm-card-screenshot-name",children:p.name})]}),a.jsxs("div",{className:"bm-card-screenshot-brand",children:[a.jsxs("span",{className:"brand",children:[a.jsx("span",{className:"brand-mark"}),a.jsxs("span",{className:"brand-name",children:["Papers ",a.jsx("em",{children:"With Code"})]})]}),a.jsx("span",{className:"bm-card-screenshot-url",children:"paperswithcode.co"})]})]}),a.jsxs("div",{className:"bm-card-head",children:[a.jsx("div",{className:"bm-card-title",children:"Leaderboard"}),a.jsxs("div",{className:"bm-card-actions",children:[I.allowedMetrics.length>1&&a.jsxs("label",{className:"bm-view-select",children:[a.jsx("span",{className:"bm-view-select-label",children:"View"}),a.jsx("select",{value:I.activeMetric,onChange:b=>E(b.target.value),children:o.map(b=>a.jsx("option",{value:b,children:b},b))})]}),a.jsxs("label",{className:"bm-closed-toggle",title:"Show or hide evaluations of closed-source models",children:[a.jsx(Ge,{className:"bm-closed-toggle-switch",checked:!l.hide_closed_source_evals,onCheckedChange:b=>{c(!b)},"aria-label":"Show closed-source models"}),a.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),!K&&!X&&k.isSuccess?a.jsx("span",{className:"bm-parameter-unavailable",children:"Parameter metadata unavailable"}):null,a.jsx(lt,{targetRef:x,label:"leaderboard"})]})]}),!K&&X&&a.jsxs("div",{className:"bm-parameter-filter-bar",children:[a.jsx("span",{className:"bm-parameter-filter-label",children:"Parameters Size"}),a.jsx("div",{className:"bm-parameter-filter-options",role:"group","aria-label":"Filter leaderboard by parameter size",children:I.parameterFilters.map(b=>{const{selected:M,disabled:F}=b;return a.jsx("button",{type:"button",className:`bm-parameter-filter-option${M?" is-active":""}`,"aria-pressed":M,disabled:F,onClick:()=>T(b.maxParametersExclusive),children:b.label},b.label)})}),a.jsxs("span",{className:"bm-parameter-coverage",children:["Parameters known for ",Y.parameter_coverage_known," of ",Y.parameter_coverage_total," entries"]})]}),k.isLoading||K?a.jsx("div",{style:{padding:16},children:Array.from({length:5}).map((b,M)=>a.jsx(ue,{className:"h-10 w-full mb-2"},M))}):I.rows.length===0?i?a.jsxs("div",{className:"no-results",children:["No known parameter counts match this filter. "," ",a.jsx("button",{type:"button",className:"bm-empty-filter-action",onClick:()=>T(void 0),children:"Show all"})]}):a.jsx("div",{className:"no-results",children:"No evaluations submitted yet."}):a.jsxs(a.Fragment,{children:[o.length>P&&a.jsxs("div",{className:"bm-metric-columns-control",children:[a.jsx("button",{type:"button",className:"bm-metric-columns-toggle","aria-expanded":C,"aria-controls":"benchmark-leaderboard",onClick:()=>h(C?null:R),children:C?"Show fewer metrics":`Show more metrics (${o.length-P})`}),C&&a.jsx("span",{children:"Scroll metrics horizontally; model and paper details stay visible."})]}),a.jsx(Wt,{model:I,showHarness:y,setMetric:E,highlightRowRef:d,onFittingMetricCountChange:S})]})]})]})})};export{ma as default};
|
assets/{BenchmarkTrendSparkline-C135_NtS.js → BenchmarkTrendSparkline-DhXxdQ2D.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{
|
|
|
|
| 1 |
+
import{d as C,j as t}from"./index-DyXq7-Tg.js";const g=112,p=42,o=5,m=5,b=new Intl.DateTimeFormat("en",{month:"short",timeZone:"UTC"}),y=(e,d)=>{const r=new Date(`${e}T00:00:00Z`),n=new Date(`${d}T00:00:00Z`);return r.getUTCMonth()===n.getUTCMonth()?`${b.format(r)} ${r.getUTCDate()}–${n.getUTCDate()}`:`${b.format(r)} ${r.getUTCDate()}–${b.format(n)} ${n.getUTCDate()}`},I=({history:e,benchmarkName:d,interactive:r=!1})=>{const[n,x]=C.useState(null),h=e.map(s=>s.paper_count),M=Math.max(1,...h),f=g-o*2,T=p-m*2,v=h.length>1?f/(h.length-1):0,a=h.map((s,c)=>({x:o+v*c,y:m+T-s/M*T})),$=a.map(({x:s,y:c})=>`${s},${c}`).join(" "),_=a.length?`${o},${p-m} ${$} ${a[a.length-1].x},${p-m}`:"",D=h.reduce((s,c)=>s+c,0),u=49,N=14,i=n==null?null:a[n],j=i?Math.min(g-o-u,Math.max(o,i.x-u/2)):0,k=i?i.y>p/2?i.y-N-3:i.y+3:0;return t.jsxs("svg",{className:`benchmark-trend-sparkline${r?" is-interactive":""}`,viewBox:`0 0 ${g} ${p}`,role:r?"group":"img","aria-label":`${d}: ${D} reporting papers across the displayed trend history`,children:[t.jsxs("title",{children:[d,": ",D," reporting papers across the displayed trend history"]}),t.jsx("line",{className:"benchmark-trend-axis",x1:o,y1:p-m,x2:g-o,y2:p-m}),t.jsx("line",{className:"benchmark-trend-axis",x1:o,y1:m,x2:o,y2:p-m}),_&&t.jsx("polygon",{className:"benchmark-trend-area",points:_}),$&&t.jsx("polyline",{className:"benchmark-trend-line",points:$}),r?a.map(({x:s,y:c},l)=>t.jsxs("g",{className:"benchmark-trend-point",tabIndex:0,role:"img","aria-label":`${y(e[l].start_date,e[l].end_date)}: ${e[l].paper_count} ${e[l].paper_count===1?"paper":"papers"}`,onMouseEnter:()=>x(l),onMouseLeave:()=>x(null),onFocus:()=>x(l),onBlur:()=>x(null),children:[t.jsx("circle",{className:"benchmark-trend-point-hit",cx:s,cy:c,r:"5"}),t.jsx("circle",{className:"benchmark-trend-point-mark",cx:s,cy:c,r:"1.8"})]},`${e[l].start_date}-${e[l].end_date}`)):a.length>0&&t.jsx("circle",{className:"benchmark-trend-dot",cx:a[a.length-1].x,cy:a[a.length-1].y,r:"2.6"}),i&&n!=null&&t.jsxs("g",{className:"benchmark-trend-tooltip",pointerEvents:"none",children:[t.jsx("rect",{x:j,y:k,width:u,height:N,rx:"2"}),t.jsx("text",{x:j+3,y:k+5.4,children:y(e[n].start_date,e[n].end_date)}),t.jsxs("text",{className:"benchmark-trend-tooltip-value",x:j+3,y:k+11,children:[e[n].paper_count," ",e[n].paper_count===1?"paper":"papers"]})]})]})};export{I as B};
|
assets/{CatalogEntityPreviewLink-Cvehtzvn.js → CatalogEntityPreviewLink-BktpwL3_.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
-
import{
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
| 5 |
* See the LICENSE file in the root directory of this source tree.
|
| 6 |
-
*/const
|
|
|
|
| 1 |
+
import{s as m,a6 as h,V as d,b as g,j as s,L as f,a3 as k}from"./index-DyXq7-Tg.js";import{H as w,a as y,b as v}from"./hover-card-B45EJIn_.js";import{c as l}from"./catalog-CRar2olQ.js";/**
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
| 5 |
* See the LICENSE file in the root directory of this source tree.
|
| 6 |
+
*/const L=m("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),x=new Set(["github.com","www.github.com"]);function T(r){let t;try{t=new URL(r)}catch{return null}if(t.protocol!=="https:"||!x.has(t.hostname))return null;const n=t.pathname.split("/").filter(Boolean);if(n.length!==2)return null;let e,a;try{e=decodeURIComponent(n[0]),a=decodeURIComponent(n[1]).replace(/\.git$/,"")}catch{return null}if(!/^[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,38})$/.test(e)||!/^[a-zA-Z0-9._-]{1,100}$/.test(a))return null;const o=`${e}/${a}`,i=[e,a].map(encodeURIComponent).join("/");return{owner:e,repository:a,repoId:o,url:`https://github.com/${i}`}}async function M(r,t){const n=[r.owner,r.repository].map(encodeURIComponent).join("/"),e=await fetch(h(`/api/v1/github/repositories/${n}/preview`),{signal:t});if(!e.ok)throw new Error(`GitHub repository lookup failed: ${e.status}`);const a=await e.json();return{description:typeof a.description=="string"?a.description:null,stars:typeof a.stars=="number"?a.stars:0,forks:typeof a.forks=="number"?a.forks:0,language:typeof a.language=="string"?a.language:null,archived:a.archived===!0,avatarUrl:typeof a.avatar_url=="string"?a.avatar_url:""}}function p(r){const t=r.trim();if(!t)return null;let n=t;!n.startsWith("http://")&&!n.startsWith("https://")&&(n=`https://${n}`);try{const e=new URL(n);if(e.hostname.toLowerCase()!=="github.com")return null;const a=e.pathname.split("/").filter(Boolean);if(a.length<2)return null;const o=a[0].toLowerCase();let i=a[1].toLowerCase();return i.endsWith(".git")&&(i=i.slice(0,-4)),`https://github.com/${o}/${i}`}catch{return null}}function A(r,t){const n=p(r),e=p(t);return n&&e?n===e:r.trim()===t.trim()}const C=/^(task|method|benchmark):([A-Za-z0-9][A-Za-z0-9._-]{0,199})$/;function z(r){const t=C.exec(r);return t?{kind:t[1],slug:t[2]}:null}const B=r=>/^(task|method|benchmark):/.test(r),_={task:"/tasks/",method:"/methods/",benchmark:"/benchmark/",framework:"/papers?framework="},b={task:"Task",method:"Method",benchmark:"Benchmark",framework:"Framework"},U={task:["paper","papers"],method:["paper","papers"],benchmark:["entry","entries"],framework:["paper","papers"]};async function j({kind:r,slug:t}){if(r==="task"){const e=await l.getTask(t);return{name:e.name,description:e.description??null,imageUrl:e.image_url??null,count:e.paper_count??null,detail:null}}if(r==="method"){const e=await l.getMethod(t);return{name:e.full_name||e.name,description:e.description??null,imageUrl:e.image_url??null,count:e.paper_count??null,detail:e.introduced_year?`Introduced ${e.introduced_year}`:null}}if(r==="framework"){const a=(await l.frameworkCatalog()).domains.flatMap(o=>o.categories).flatMap(o=>o.frameworks).find(o=>o.slug===t);if(!a)throw new Error(`Unknown framework ${t}`);return{name:a.name,description:a.description,imageUrl:null,count:a.paper_count,detail:a.organization_name??null}}const n=await l.getDatasetBySlug(t);return{name:n.full_name||n.name,description:n.description??null,imageUrl:null,count:n.paper_count??null,detail:n.introduced_year?`Introduced ${n.introduced_year}`:null}}function $(r){return r.replace(/!?\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/[*_`#>]+/g,"").replace(/\s+/g," ").trim()}const I=()=>typeof window.matchMedia=="function"&&window.matchMedia("(hover: none), (pointer: coarse)").matches,N=({kind:r,preview:t})=>{const[n,e]=d.useState(!1),a=k(t.imageUrl),o=[t.count!=null?`${t.count.toLocaleString()} ${U[r][t.count===1?0:1]}`:null,t.detail].filter(Boolean);return s.jsxs("div",{className:"catalog-preview-card",children:[a&&!n&&s.jsx("img",{className:"catalog-preview-image","data-testid":"catalog-preview-image",src:a,alt:"",loading:"lazy",decoding:"async",onError:()=>e(!0)}),s.jsxs("div",{className:"catalog-preview-meta",children:[s.jsx("span",{className:"catalog-preview-kind",children:b[r]}),s.jsx("strong",{children:t.name}),t.description&&s.jsx("p",{children:$(t.description)}),o.length>0&&s.jsx("span",{className:"catalog-preview-stats",children:o.join(" · ")})]})]})},P=({entity:r,children:t,className:n="chat-paper-link",newTab:e=!0,initialPreview:a})=>{const[o,i]=d.useState(!1),c=g({queryKey:["chat-catalog-preview",r.kind,r.slug],queryFn:()=>j(r),initialData:a,enabled:o&&!a,staleTime:10*60*1e3,gcTime:30*60*1e3,retry:!1});return s.jsxs(w,{open:o,onOpenChange:u=>{(!u||!I())&&i(u)},openDelay:150,closeDelay:100,children:[s.jsx(y,{asChild:!0,children:s.jsx(f,{className:n,to:`${_[r.kind]}${encodeURIComponent(r.slug)}`,target:e?"_blank":void 0,rel:e?"noopener noreferrer":void 0,onClick:()=>i(!1),children:t})}),s.jsx(v,{className:"catalog-preview-pop",side:"bottom",align:"start",collisionPadding:12,children:c.data?s.jsx(N,{kind:r.kind,preview:c.data}):c.isError?s.jsx("div",{className:"paper-preview-status",children:"Preview unavailable"}):s.jsx("div",{className:"paper-preview-status","aria-live":"polite",children:"Loading preview…"})})]})};export{P as C,L as T,T as a,M as f,A as g,B as i,p as n,z as p};
|
assets/{ChatView-DlSbJMKT.js → ChatView-D06zYumh.js}
RENAMED
|
The diff for this file is too large to render.
See raw diff
|
|
|
assets/ConferenceDetailView-DgDeLFoO.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{u as y,b as k,d as _,j as e,L as h,T as S}from"./index-DyXq7-Tg.js";import{a as f,A as b,b as E}from"./AreaSection-BxnKzNK0.js";import{M as j}from"./MarkdownText-CUzPoC9Y.js";import{c as A}from"./catalog-CRar2olQ.js";import{i as C}from"./apiErrors-BSvbQBb0.js";import{s as F}from"./areas-Dvi8w2dp.js";import{c as T,h as L}from"./colors-BkWRhvFI.js";import{C as $}from"./conferenceListings-BnmhBx-_.js";import{f as w}from"./deadlines-BH32v7D1.js";import{d as D}from"./transform-D46m70Qr.js";import{S as P}from"./skeleton-C3IIzpSL.js";import{A as M,a as R}from"./alert-gbJBhAVE.js";import{s as B}from"./safeExternalHref-CkBrsh84.js";import I from"./NotFound-DV_nwcxG.js";/* empty css */import"./PaperPreviewLink-CpCZSa8K.js";import"./index-mCi_y_l3.js";import"./index-2CvJmBVB.js";import"./katex-DkKDou_j.js";import"./hover-card-B45EJIn_.js";import"./papers-Dh3ljlL0.js";import"./curation-YeS7FBYf.js";import"./useMutation-UWxBeqtn.js";const ce=()=>{var g,x;const{confSlug:o}=y(),t=k({queryKey:["conference-areas-with-tasks",o],queryFn:()=>A.conferenceAreasWithTasks(o),enabled:!!o,staleTime:S}),m=_.useMemo(()=>{var a;return F(((a=t.data)==null?void 0:a.results)??[])},[t.data]),s=(g=t.data)==null?void 0:g.conference,d=((x=t.data)==null?void 0:x.total_paper_count)??0,N=$.filter(a=>{var r;return(((r=t.data)==null?void 0:r[a.countKey])??0)>0});if(C(t.error))return e.jsx(I,{});if(t.error)return e.jsx("div",{className:"page",children:e.jsx(M,{variant:"destructive",children:e.jsx(R,{children:"Failed to load conference. Please try again."})})});const p=s?w(s.start_date,s.end_date):null,u=s?[s.venue,s.location].filter(Boolean).join(", "):null,n=s==null?void 0:s.name;return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:s!=null&&s.image_url?"task-hero-grid":void 0,children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:"CONFERENCE"}),e.jsx("h1",{className:"feed-title",children:n??e.jsx(P,{className:"h-10 w-64 inline-block"})}),e.jsxs("div",{className:"feed-subtitle",style:{display:"flex",flexDirection:"column",gap:4},children:[p&&e.jsx("span",{children:p}),u&&e.jsx("span",{children:u}),(s==null?void 0:s.url)&&e.jsx("a",{href:B(s.url)??void 0,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent-text)"},children:s.url.replace(/^https?:\/\//,"")}),(s==null?void 0:s.hf_url)&&e.jsxs("a",{className:"bm-action-btn",href:s.hf_url,target:"_blank",rel:"noopener noreferrer",style:{alignSelf:"flex-start",marginTop:4},children:[e.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),(s==null?void 0:s.description)&&e.jsx(j,{className:"method-description",text:s.description})]}),(s==null?void 0:s.image_url)&&e.jsxs("figure",{className:"task-figure-card",children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:s.image_url,alt:n?`${n} visual`:"Conference visual",onError:a=>{var r,c;(c=(r=a.currentTarget.parentElement)==null?void 0:r.parentElement)==null||c.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",n??"Conference",s.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(j,{className:"task-image-credit",text:s.image_credit})]})]})]})]}),!t.isLoading&&d>0&&e.jsx(f,{title:"Browse papers",description:"All accepted papers, plus oral, spotlight, outstanding, and best paper finalists.",meta:`${d.toLocaleString()} papers`,style:{marginTop:48},children:N.map(a=>{var r;return e.jsxs(h,{to:`/conferences/${o}/${a.slug}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:a.dotColor}}),a.label]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(((r=t.data)==null?void 0:r[a.countKey])??0).toLocaleString()," papers"]})})]},a.slug)})}),t.isLoading?e.jsx(b,{tiles:6,tileClassName:"h-24"}):m.map(a=>{const r=a.tasks;if(r.length===0)return null;const c=r.reduce((i,l)=>i+(l.paper_count||0),0);return e.jsx(f,{title:a.name,description:a.description,meta:`${r.length} ${r.length===1?"task":"tasks"} · ${c.toLocaleString()} papers`,children:r.map(i=>{const l=i.slug||"",v=T(L(l));return e.jsxs(h,{to:`/conferences/${o}/${l}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:v.dot}}),D(i.name,l)]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(i.paper_count??0).toLocaleString()," papers"]})})]},i.id)})},a.id)}),e.jsx(E,{areas:m})]})};export{ce as default};
|
assets/ConferenceDetailView-i-HB-ysc.js
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
import{u as y,r as k,j as e,L as h}from"./index-CbgxfyGU.js";import{u as _}from"./useQuery-Bx9s5-D2.js";import{a as f,A as S,b}from"./AreaSection-NWvfO4Sb.js";import{M as j}from"./MarkdownText-Bj-G_S-B.js";import{c as A}from"./catalog-DhK7_9-6.js";import{i as C}from"./apiErrors-BZ5h1Kmb.js";import{s as E}from"./areas-Dvi8w2dp.js";import{c as F,h as L}from"./colors-BkWRhvFI.js";import{C as $}from"./conferenceListings-BnmhBx-_.js";import{f as T}from"./deadlines-BH32v7D1.js";import{d as w}from"./transform-0Udg2p6b.js";import{S as D}from"./skeleton-HwvdxvSN.js";import{A as P,a as R}from"./alert-CFDDvdIM.js";import{s as B}from"./safeExternalHref-CkBrsh84.js";import K from"./NotFound-DtzwOULp.js";/* empty css */import"./PaperPreviewLink-DZDNIh1g.js";import"./index-ZkEATkOr.js";import"./index-BH3yOoza.js";import"./katex-DkKDou_j.js";import"./hover-card-ufez2uMo.js";import"./paperQueryKeys-B8u1BWlI.js";import"./curation-C7Gmmp4z.js";import"./useMutation-P_trTy9i.js";const ce=()=>{var g,x;const{confSlug:o}=y(),t=_({queryKey:["conference-areas-with-tasks",o],queryFn:()=>A.conferenceAreasWithTasks(o),enabled:!!o,staleTime:10*60*1e3}),m=k.useMemo(()=>{var a;return E(((a=t.data)==null?void 0:a.results)??[])},[t.data]),s=(g=t.data)==null?void 0:g.conference,d=((x=t.data)==null?void 0:x.total_paper_count)??0,N=$.filter(a=>{var r;return(((r=t.data)==null?void 0:r[a.countKey])??0)>0});if(C(t.error))return e.jsx(K,{});if(t.error)return e.jsx("div",{className:"page",children:e.jsx(P,{variant:"destructive",children:e.jsx(R,{children:"Failed to load conference. Please try again."})})});const p=s?T(s.start_date,s.end_date):null,u=s?[s.venue,s.location].filter(Boolean).join(", "):null,n=s==null?void 0:s.name;return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:s!=null&&s.image_url?"task-hero-grid":void 0,children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:"CONFERENCE"}),e.jsx("h1",{className:"feed-title",children:n??e.jsx(D,{className:"h-10 w-64 inline-block"})}),e.jsxs("div",{className:"feed-subtitle",style:{display:"flex",flexDirection:"column",gap:4},children:[p&&e.jsx("span",{children:p}),u&&e.jsx("span",{children:u}),(s==null?void 0:s.url)&&e.jsx("a",{href:B(s.url)??void 0,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent-text)"},children:s.url.replace(/^https?:\/\//,"")}),(s==null?void 0:s.hf_url)&&e.jsxs("a",{className:"bm-action-btn",href:s.hf_url,target:"_blank",rel:"noopener noreferrer",style:{alignSelf:"flex-start",marginTop:4},children:[e.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),(s==null?void 0:s.description)&&e.jsx(j,{className:"method-description",text:s.description})]}),(s==null?void 0:s.image_url)&&e.jsxs("figure",{className:"task-figure-card",children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:s.image_url,alt:n?`${n} visual`:"Conference visual",onError:a=>{var r,c;(c=(r=a.currentTarget.parentElement)==null?void 0:r.parentElement)==null||c.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",n??"Conference",s.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(j,{className:"task-image-credit",text:s.image_credit})]})]})]})]}),!t.isLoading&&d>0&&e.jsx(f,{title:"Browse papers",description:"All accepted papers, plus oral, spotlight, outstanding, and best paper finalists.",meta:`${d.toLocaleString()} papers`,style:{marginTop:48},children:N.map(a=>{var r;return e.jsxs(h,{to:`/conferences/${o}/${a.slug}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:a.dotColor}}),a.label]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(((r=t.data)==null?void 0:r[a.countKey])??0).toLocaleString()," papers"]})})]},a.slug)})}),t.isLoading?e.jsx(S,{tiles:6,tileClassName:"h-24"}):m.map(a=>{const r=a.tasks;if(r.length===0)return null;const c=r.reduce((i,l)=>i+(l.paper_count||0),0);return e.jsx(f,{title:a.name,description:a.description,meta:`${r.length} ${r.length===1?"task":"tasks"} · ${c.toLocaleString()} papers`,children:r.map(i=>{const l=i.slug||"",v=F(L(l));return e.jsxs(h,{to:`/conferences/${o}/${l}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:v.dot}}),w(i.name,l)]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(i.paper_count??0).toLocaleString()," papers"]})})]},i.id)})},a.id)}),e.jsx(b,{areas:m})]})};export{ce as default};
|
|
|
|
|
|
assets/ConferenceTaskView-BZBMXZD8.js
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
import{u as S,r as F,j as e,L as x}from"./index-CbgxfyGU.js";import{u as _}from"./useQuery-Bx9s5-D2.js";import{u as T,b as R,a as L}from"./PaperFeed-DMvUfA47.js";import{M as g}from"./MarkdownText-Bj-G_S-B.js";import{c as A}from"./catalog-DhK7_9-6.js";import{p as M,a as q}from"./paperQueryKeys-B8u1BWlI.js";import{i as E}from"./apiErrors-BZ5h1Kmb.js";import{C as B}from"./conferenceListings-BnmhBx-_.js";import{t as O,d as Q}from"./transform-0Udg2p6b.js";import{u as z}from"./usePapers-CJaWLZ3y.js";import{A as H,a as I}from"./alert-CFDDvdIM.js";import K from"./NotFound-DtzwOULp.js";import"./PaperCard-tdTC_dRN.js";import"./AuthorAvatar-CUJMmp_z.js";import"./SotaBadges-C-sTR-EF.js";import"./colors-BkWRhvFI.js";import"./Icon-D-kA0Owz.js";import"./LatexTitle-Z-HGmZ-H.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-DKJYnYjk.js";import"./skeleton-HwvdxvSN.js";import"./useIntersectionObserver-CID9Kkak.js";/* empty css */import"./PaperPreviewLink-DZDNIh1g.js";import"./index-ZkEATkOr.js";import"./index-BH3yOoza.js";import"./katex-DkKDou_j.js";import"./hover-card-ufez2uMo.js";import"./useMutation-P_trTy9i.js";import"./curation-C7Gmmp4z.js";import"./useInfiniteQuery-BAc_4HO5.js";const $={"iclr-2026/outstanding":"ICLR 2026 recognized two Outstanding Papers and one Honorable Mention. [Read the announcement](https://blog.iclr.cc/2026/04/23/announcing-the-iclr-2026-outstanding-papers/).","icml-2026/outstanding":"ICML 2026 recognized two Outstanding Papers and five Honorable Mentions. [Read the announcement](https://blog.icml.cc/2026/07/05/announcing-the-icml-2026-awards/).","cvpr-2026/best-paper-finalists":"CVPR 2026 recognized fifteen Best Paper Award finalists, including the winners. [Read the announcement](https://x.com/CVPR/status/2062912519522717978)."},ye=()=>{var b,v,y,P,k,w;const{confSlug:t,taskSlug:n}=S(),p=T(),a=B.find(s=>s.slug===n),u=!!(a!=null&&a.award),i=_({queryKey:["conference",t],queryFn:()=>A.getConference(t),enabled:!!t,staleTime:10*60*1e3}),c=_({queryKey:["task",n],queryFn:()=>A.getTask(n),enabled:!!n&&!a,staleTime:10*60*1e3}),l=z([...M.feeds.conference,t,n,p.filters],s=>q.forConference(t,{...p.filters,task:a?void 0:n,presentation:a==null?void 0:a.presentation,page:s,page_size:12}),{enabled:!!t}),f=F.useMemo(()=>{var s;return((s=l.data)==null?void 0:s.pages.flatMap(o=>o.results))??[]},[l.data]),h=F.useMemo(()=>f.map(O),[f]),d=(a==null?void 0:a.label)??Q(((b=c.data)==null?void 0:b.name)||n||"",((v=c.data)==null?void 0:v.slug)||n),j=$[`${t}/${n}`],N=((P=(y=l.data)==null?void 0:y.pages[0])==null?void 0:P.count)??((k=i.data)==null?void 0:k.paper_count)??0,r=c.data;return E(i.error)||E(c.error)?e.jsx(K,{}):i.error||c.error||l.error?e.jsx("div",{className:"page",children:e.jsx(H,{variant:"destructive",children:e.jsx(I,{children:"Failed to load conference papers. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(x,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(x,{to:"/conferences",children:"Conferences"}),e.jsx("span",{children:" / "}),e.jsx(x,{to:`/conferences/${t}`,children:((w=i.data)==null?void 0:w.name)??t}),e.jsx("span",{children:" / "}),e.jsx("span",{children:d})]}),e.jsxs("div",{className:!a&&(r!=null&&r.image_url)?"task-hero-grid":void 0,style:{marginTop:16,marginBottom:28},children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:a?"BROWSE PAPERS":"TASK"}),e.jsx("h1",{className:"domain-mega-title",children:d}),j&&e.jsx(g,{className:"task-explainer",text:j}),!a&&(r==null?void 0:r.description)&&e.jsx(g,{className:"task-explainer",text:r.description}),i.data&&e.jsxs("div",{className:"task-quickstats",style:{marginTop:12},children:[e.jsxs("span",{children:[e.jsx("span",{className:"num",children:N.toLocaleString()}),"PAPERS"]}),e.jsx("span",{children:i.data.name})]})]}),!a&&(r==null?void 0:r.image_url)&&e.jsxs("figure",{className:"task-figure-card",children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:r.image_url,alt:`${d} schematic`,onError:s=>{var o,m;(m=(o=s.currentTarget.parentElement)==null?void 0:o.parentElement)==null||m.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",d,r.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(g,{className:"task-image-credit",text:r.image_credit})]})]})]})]}),e.jsxs("div",{className:"task-section-head",children:[e.jsx("div",{className:"task-section-eyebrow",children:u?"Award papers":"Conference papers · sort below"}),e.jsxs("div",{className:"task-section-title",children:["Papers ",e.jsxs("span",{className:"meta",children:["[",N.toLocaleString(),"]"]})]})]}),e.jsx(R,{feed:p,sorts:u?null:void 0,children:!u&&e.jsxs("div",{className:"results-count",children:[h.length," loaded in ",e.jsx("span",{children:d})]})}),e.jsx(L,{query:l,cards:h,empty:"No papers found for this selection.",cardHeader:s=>{var C;const o=(C=f[s])==null?void 0:C.conference_award,m=o==="outstanding"?"Outstanding Paper":o==="honorable_mention"?"Honorable Mention":o==="best_paper_finalist"&&(a==null?void 0:a.presentation)!=="best_paper_finalist"?"Best Paper Finalist":null;return m&&e.jsx("div",{className:"conference-award-label",children:m})}})]})};export{ye as default};
|
|
|
|
|
|
assets/ConferenceTaskView-BvWfAecx.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{u as S,b as _,p as R,d as C,j as e,L as x,o as M,T as E}from"./index-DyXq7-Tg.js";import{u as L,b as Q,a as q}from"./PaperFeed-EBt97iOL.js";import{M as g}from"./MarkdownText-CUzPoC9Y.js";import{c as F}from"./catalog-CRar2olQ.js";import{p as B}from"./papers-Dh3ljlL0.js";import{i as A}from"./apiErrors-BSvbQBb0.js";import{C as O}from"./conferenceListings-BnmhBx-_.js";import{t as z,d as H}from"./transform-D46m70Qr.js";import{u as I}from"./usePapers-B0s20UcU.js";import{A as K,a as $}from"./alert-gbJBhAVE.js";import V from"./NotFound-DV_nwcxG.js";import"./PaperCard-57p1OSGy.js";import"./AuthorAvatar-B-9xS2Wo.js";import"./SotaBadges-vbLLOUtT.js";import"./colors-BkWRhvFI.js";import"./Icon-T4LYkEQj.js";import"./LatexTitle-Bkyz3jCs.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-CTBEUp7Y.js";import"./skeleton-C3IIzpSL.js";import"./useIntersectionObserver-D6_Iig9a.js";/* empty css */import"./PaperPreviewLink-CpCZSa8K.js";import"./index-mCi_y_l3.js";import"./index-2CvJmBVB.js";import"./katex-DkKDou_j.js";import"./hover-card-B45EJIn_.js";import"./useMutation-UWxBeqtn.js";import"./curation-YeS7FBYf.js";import"./useInfiniteQuery-BYh2zN-T.js";const D={"iclr-2026/outstanding":"ICLR 2026 recognized two Outstanding Papers and one Honorable Mention. [Read the announcement](https://blog.iclr.cc/2026/04/23/announcing-the-iclr-2026-outstanding-papers/).","icml-2026/outstanding":"ICML 2026 recognized two Outstanding Papers and five Honorable Mentions. [Read the announcement](https://blog.icml.cc/2026/07/05/announcing-the-icml-2026-awards/).","cvpr-2026/best-paper-finalists":"CVPR 2026 recognized fifteen Best Paper Award finalists, including the winners. [Read the announcement](https://x.com/CVPR/status/2062912519522717978)."},Pe=()=>{var b,y,v,P,k,w;const{confSlug:t,taskSlug:n}=S(),p=L(),a=O.find(r=>r.slug===n),u=!!(a!=null&&a.award),i=_({queryKey:["conference",t],queryFn:()=>F.getConference(t),enabled:!!t,staleTime:E}),c=_({queryKey:M.task(n),queryFn:()=>F.getTask(n),enabled:!!n&&!a,staleTime:E}),l=I([...R.feeds.conference,t,n,p.filters],r=>B.forConference(t,{...p.filters,task:a?void 0:n,presentation:a==null?void 0:a.presentation,page:r,page_size:12}),{enabled:!!t}),f=C.useMemo(()=>{var r;return((r=l.data)==null?void 0:r.pages.flatMap(o=>o.results))??[]},[l.data]),h=C.useMemo(()=>f.map(z),[f]),d=(a==null?void 0:a.label)??H(((b=c.data)==null?void 0:b.name)||n||"",((y=c.data)==null?void 0:y.slug)||n),j=D[`${t}/${n}`],N=((P=(v=l.data)==null?void 0:v.pages[0])==null?void 0:P.count)??((k=i.data)==null?void 0:k.paper_count)??0,s=c.data;return A(i.error)||A(c.error)?e.jsx(V,{}):i.error||c.error||l.error?e.jsx("div",{className:"page",children:e.jsx(K,{variant:"destructive",children:e.jsx($,{children:"Failed to load conference papers. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(x,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(x,{to:"/conferences",children:"Conferences"}),e.jsx("span",{children:" / "}),e.jsx(x,{to:`/conferences/${t}`,children:((w=i.data)==null?void 0:w.name)??t}),e.jsx("span",{children:" / "}),e.jsx("span",{children:d})]}),e.jsxs("div",{className:!a&&(s!=null&&s.image_url)?"task-hero-grid":void 0,style:{marginTop:16,marginBottom:28},children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:a?"BROWSE PAPERS":"TASK"}),e.jsx("h1",{className:"domain-mega-title",children:d}),j&&e.jsx(g,{className:"task-explainer",text:j}),!a&&(s==null?void 0:s.description)&&e.jsx(g,{className:"task-explainer",text:s.description}),i.data&&e.jsxs("div",{className:"task-quickstats",style:{marginTop:12},children:[e.jsxs("span",{children:[e.jsx("span",{className:"num",children:N.toLocaleString()}),"PAPERS"]}),e.jsx("span",{children:i.data.name})]})]}),!a&&(s==null?void 0:s.image_url)&&e.jsxs("figure",{className:"task-figure-card",children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:s.image_url,alt:`${d} schematic`,onError:r=>{var o,m;(m=(o=r.currentTarget.parentElement)==null?void 0:o.parentElement)==null||m.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",d,s.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(g,{className:"task-image-credit",text:s.image_credit})]})]})]})]}),e.jsxs("div",{className:"task-section-head",children:[e.jsx("div",{className:"task-section-eyebrow",children:u?"Award papers":"Conference papers · sort below"}),e.jsxs("div",{className:"task-section-title",children:["Papers ",e.jsxs("span",{className:"meta",children:["[",N.toLocaleString(),"]"]})]})]}),e.jsx(Q,{feed:p,sorts:u?null:void 0,children:!u&&e.jsxs("div",{className:"results-count",children:[h.length," loaded in ",e.jsx("span",{children:d})]})}),e.jsx(q,{query:l,cards:h,empty:"No papers found for this selection.",cardHeader:r=>{var T;const o=(T=f[r])==null?void 0:T.conference_award,m=o==="outstanding"?"Outstanding Paper":o==="honorable_mention"?"Honorable Mention":o==="best_paper_finalist"&&(a==null?void 0:a.presentation)!=="best_paper_finalist"?"Best Paper Finalist":null;return m&&e.jsx("div",{className:"conference-award-label",children:m})}})]})};export{Pe as default};
|
assets/ConferencesIndexView-Cw6IrAk5.js
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
import{r as d,j as e,L as c}from"./index-CbgxfyGU.js";import{u as m}from"./useQuery-Bx9s5-D2.js";import{c as p}from"./catalog-DhK7_9-6.js";import{f as u}from"./deadlines-BH32v7D1.js";import{A as f,a as h}from"./alert-CFDDvdIM.js";import{A as x,a as g}from"./AreaSection-NWvfO4Sb.js";import{T as j}from"./TaxonomySuggestionTile-DIw_GKfA.js";import"./skeleton-HwvdxvSN.js";import"./SignInToEditDialog-CNIcNqbK.js";import"./button-Bv9oZ-QU.js";import"./input-B6pxtfPe.js";import"./textarea-Bf06GTSH.js";import"./searchable-select-DNdBIahG.js";import"./popover-DKJYnYjk.js";import"./dialog-Cfp_d3CC.js";import"./search-CLtAJGOp.js";import"./loader-circle-CWMja8Zn.js";import"./useMutation-P_trTy9i.js";import"./submissions-aWj7YtuZ.js";import"./plus-UK0TEjgd.js";const v=r=>{var t;if(r.year!=null)return r.year;if(r.start_date)return Number(r.start_date.slice(0,4));const a=(t=r.slug.match(/-(\d{4})$/))==null?void 0:t[1];return a?Number(a):0},N=(r,a)=>{if(r.start_date&&a.start_date){const t=r.start_date.localeCompare(a.start_date);if(t!==0)return t}else{if(r.start_date)return-1;if(a.start_date)return 1}return r.name.localeCompare(a.name)},R=()=>{const r=m({queryKey:["conferences"],queryFn:()=>p.conferences(),staleTime:6e5}),a=d.useMemo(()=>{var i;if(!((i=r.data)!=null&&i.results))return null;const t={};return r.data.results.forEach(n=>{const s=v(n);(t[s]||(t[s]=[])).push(n)}),Object.values(t).forEach(n=>n.sort(N)),Object.keys(t).map(Number).sort((n,s)=>s-n).map(n=>({year:n,conferences:t[n]}))},[r.data]);return r.error?e.jsx("div",{className:"page",children:e.jsx(f,{variant:"destructive",children:e.jsx(h,{children:"Failed to load conferences. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["All ",e.jsx("em",{children:"Conferences"})]}),e.jsx("div",{className:"feed-subtitle",children:"Browse accepted papers from major AI conferences, grouped by research area and task."}),e.jsxs("div",{className:"conference-deadlines-link",children:["Find deadlines for upcoming conferences"," ",e.jsx(c,{to:"/ai-deadlines",className:"underline underline-offset-2 hover:text-foreground",children:"here"}),". Conference information is based on"," ",e.jsx("a",{href:"https://huggingface.co/ai-conferences",target:"_blank",rel:"noreferrer",className:"underline underline-offset-2 hover:text-foreground",children:"Hugging Face AI Conferences"}),"."]})]})}),r.isLoading?e.jsx(x,{sections:2,tiles:3,tileClassName:"h-32"}):a==null?void 0:a.map(({year:t,conferences:i})=>{const n=i.reduce((s,o)=>s+(o.paper_count??0),0);return e.jsxs(g,{title:t>0?String(t):"Unknown year",meta:`${i.length} ${i.length===1?"conference":"conferences"} · ${n.toLocaleString()} papers`,children:[i.map(s=>{const o=u(s.start_date,s.end_date),l=[s.venue,s.location].filter(Boolean).join(", ");return e.jsxs(c,{to:`/conferences/${s.slug}`,className:"tag-cell",children:[e.jsx("div",{className:"name",children:s.name}),e.jsxs("div",{className:"meta",style:{display:"flex",flexDirection:"column",gap:4},children:[o&&e.jsx("span",{children:o}),l&&e.jsx("span",{children:l}),e.jsxs("span",{children:[(s.paper_count??0).toLocaleString()," papers"]})]})]},s.id)}),e.jsx(j,{kind:"conference"})]},t)})]})};export{R as default};
|
|
|
|
|
|
assets/ConferencesIndexView-DJVYKUiz.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{b as d,d as m,j as e,L as c,T as p}from"./index-DyXq7-Tg.js";import{c as u}from"./catalog-CRar2olQ.js";import{f}from"./deadlines-BH32v7D1.js";import{A as h,a as x}from"./alert-gbJBhAVE.js";import{A as g,a as j}from"./AreaSection-BxnKzNK0.js";import{T as N}from"./TaxonomySuggestionTile-jIiLMp4q.js";import"./skeleton-C3IIzpSL.js";import"./SignInToEditDialog-B-oWVno5.js";import"./button-DZeAbOf2.js";import"./input-DJqCAbs7.js";import"./textarea-DPixlM5U.js";import"./searchable-select-DiDLwvbI.js";import"./popover-CTBEUp7Y.js";import"./dialog-CfM0Uql2.js";import"./search-8ssWDP68.js";import"./loader-circle-C75KLEgx.js";import"./useMutation-UWxBeqtn.js";import"./submissions-Cz_J-Ha2.js";import"./plus-Yh42pKZz.js";const v=r=>{var t;if(r.year!=null)return r.year;if(r.start_date)return Number(r.start_date.slice(0,4));const a=(t=r.slug.match(/-(\d{4})$/))==null?void 0:t[1];return a?Number(a):0},_=(r,a)=>{if(r.start_date&&a.start_date){const t=r.start_date.localeCompare(a.start_date);if(t!==0)return t}else{if(r.start_date)return-1;if(a.start_date)return 1}return r.name.localeCompare(a.name)},Q=()=>{const r=d({queryKey:["conferences"],queryFn:()=>u.conferences(),staleTime:p}),a=m.useMemo(()=>{var i;if(!((i=r.data)!=null&&i.results))return null;const t={};return r.data.results.forEach(n=>{const s=v(n);(t[s]||(t[s]=[])).push(n)}),Object.values(t).forEach(n=>n.sort(_)),Object.keys(t).map(Number).sort((n,s)=>s-n).map(n=>({year:n,conferences:t[n]}))},[r.data]);return r.error?e.jsx("div",{className:"page",children:e.jsx(h,{variant:"destructive",children:e.jsx(x,{children:"Failed to load conferences. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["All ",e.jsx("em",{children:"Conferences"})]}),e.jsx("div",{className:"feed-subtitle",children:"Browse accepted papers from major AI conferences, grouped by research area and task."}),e.jsxs("div",{className:"conference-deadlines-link",children:["Find deadlines for upcoming conferences"," ",e.jsx(c,{to:"/ai-deadlines",className:"underline underline-offset-2 hover:text-foreground",children:"here"}),". Conference information is based on"," ",e.jsx("a",{href:"https://huggingface.co/ai-conferences",target:"_blank",rel:"noreferrer",className:"underline underline-offset-2 hover:text-foreground",children:"Hugging Face AI Conferences"}),"."]})]})}),r.isLoading?e.jsx(g,{sections:2,tiles:3,tileClassName:"h-32"}):a==null?void 0:a.map(({year:t,conferences:i})=>{const n=i.reduce((s,o)=>s+(o.paper_count??0),0);return e.jsxs(j,{title:t>0?String(t):"Unknown year",meta:`${i.length} ${i.length===1?"conference":"conferences"} · ${n.toLocaleString()} papers`,children:[i.map(s=>{const o=f(s.start_date,s.end_date),l=[s.venue,s.location].filter(Boolean).join(", ");return e.jsxs(c,{to:`/conferences/${s.slug}`,className:"tag-cell",children:[e.jsx("div",{className:"name",children:s.name}),e.jsxs("div",{className:"meta",style:{display:"flex",flexDirection:"column",gap:4},children:[o&&e.jsx("span",{children:o}),l&&e.jsx("span",{children:l}),e.jsxs("span",{children:[(s.paper_count??0).toLocaleString()," papers"]})]})]},s.id)}),e.jsx(N,{kind:"conference"})]},t)})]})};export{Q as default};
|
assets/CronDashboard-CC1lPV3k.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
| 1 |
-
import{n as D,r as x,F as is,w as cs,j as e,v as ie,a9 as ls,R as ds,I as os,y as oe,P as ms,A as us,G as Re,B as $,f as xe,K as Te,L as pe,a as hs,m as xs}from"./index-CbgxfyGU.js";import{u as z}from"./useQuery-Bx9s5-D2.js";import{u as L}from"./useMutation-P_trTy9i.js";import{t as ge,f as v,a as S,S as Ae,o as ue,C as g,b as f,c as N,d as P,e as j,g as C}from"./CronDashboard-B3Xofwvu.js";import{B as I}from"./badge-Klg-RRGs.js";import{B as y}from"./button-Bv9oZ-QU.js";import{C as ps,a as gs}from"./chevron-up-Cpt5JLeI.js";import{D as fe}from"./database-CTvEb5JG.js";import{T as js}from"./trending-up-B3K5RlyX.js";import{A as ne}from"./activity-dcKMRXBy.js";import{F as Ne}from"./file-text-BK_7Q2rV.js";import{T as Ee,I as vs}from"./triangle-alert-U7T_j3JE.js";import{E as X}from"./external-link-DZIH4GGr.js";import{C as Y,R as be}from"./refresh-cw-Cps6nypW.js";import{L as R}from"./loader-circle-CWMja8Zn.js";import{C as je}from"./circle-check-Bci9ZTu9.js";import{c as E,A as _s}from"./codex-Bl7j51l-.js";import{u as fs}from"./useInfiniteQuery-BAc_4HO5.js";import{p as Me}from"./paperEdits-C5GTaRR8.js";import{c as me}from"./catalog-DhK7_9-6.js";import{c as ye}from"./chat-DzTo2WUO.js";/**
|
| 2 |
-
* @license lucide-react v0.462.0 - ISC
|
| 3 |
-
*
|
| 4 |
-
* This source code is licensed under the ISC license.
|
| 5 |
-
* See the LICENSE file in the root directory of this source tree.
|
| 6 |
-
*/const we=D("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
|
| 7 |
-
* @license lucide-react v0.462.0 - ISC
|
| 8 |
-
*
|
| 9 |
-
* This source code is licensed under the ISC license.
|
| 10 |
-
* See the LICENSE file in the root directory of this source tree.
|
| 11 |
-
*/const Ns=D("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
| 12 |
-
* @license lucide-react v0.462.0 - ISC
|
| 13 |
-
*
|
| 14 |
-
* This source code is licensed under the ISC license.
|
| 15 |
-
* See the LICENSE file in the root directory of this source tree.
|
| 16 |
-
*/const bs=D("CirclePlay",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]]);/**
|
| 17 |
-
* @license lucide-react v0.462.0 - ISC
|
| 18 |
-
*
|
| 19 |
-
* This source code is licensed under the ISC license.
|
| 20 |
-
* See the LICENSE file in the root directory of this source tree.
|
| 21 |
-
*/const ys=D("CircleSlash2",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M22 2 2 22",key:"y4kqgn"}]]);/**
|
| 22 |
-
* @license lucide-react v0.462.0 - ISC
|
| 23 |
-
*
|
| 24 |
-
* This source code is licensed under the ISC license.
|
| 25 |
-
* See the LICENSE file in the root directory of this source tree.
|
| 26 |
-
*/const ws=D("Clock3",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16.5 12",key:"1aq6pp"}]]);/**
|
| 27 |
-
* @license lucide-react v0.462.0 - ISC
|
| 28 |
-
*
|
| 29 |
-
* This source code is licensed under the ISC license.
|
| 30 |
-
* See the LICENSE file in the root directory of this source tree.
|
| 31 |
-
*/const qe=D("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
| 32 |
-
* @license lucide-react v0.462.0 - ISC
|
| 33 |
-
*
|
| 34 |
-
* This source code is licensed under the ISC license.
|
| 35 |
-
* See the LICENSE file in the root directory of this source tree.
|
| 36 |
-
*/const ks=D("FileClock",[["path",{d:"M16 22h2a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3",key:"37hlfg"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"8",cy:"16",r:"6",key:"10v15b"}],["path",{d:"M9.5 17.5 8 16.25V14",key:"1o80t2"}]]);var ce="Tabs",[Cs]=us(ce,[Re]),Ie=Re(),[Ss,ve]=Cs(ce),De=x.forwardRef((s,r)=>{const{__scopeTabs:n,value:l,onValueChange:i,defaultValue:o,orientation:m="horizontal",dir:_,activationMode:p="automatic",...h}=s,c=is(_),[t,b]=cs({prop:l,onChange:i,defaultProp:o??"",caller:ce});return e.jsx(Ss,{scope:n,baseId:ls(),value:t,onValueChange:b,orientation:m,dir:c,activationMode:p,children:e.jsx(ie.div,{dir:c,"data-orientation":m,...h,ref:r})})});De.displayName=ce;var Oe="TabsList",Je=x.forwardRef((s,r)=>{const{__scopeTabs:n,loop:l=!0,...i}=s,o=ve(Oe,n),m=Ie(n);return e.jsx(ds,{asChild:!0,...m,orientation:o.orientation,dir:o.dir,loop:l,children:e.jsx(ie.div,{role:"tablist","aria-orientation":o.orientation,...i,ref:r})})});Je.displayName=Oe;var Be="TabsTrigger",Ue=x.forwardRef((s,r)=>{const{__scopeTabs:n,value:l,disabled:i=!1,...o}=s,m=ve(Be,n),_=Ie(n),p=Ke(m.baseId,l),h=ze(m.baseId,l),c=l===m.value;return e.jsx(os,{asChild:!0,..._,focusable:!i,active:c,children:e.jsx(ie.button,{type:"button",role:"tab","aria-selected":c,"aria-controls":h,"data-state":c?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:p,...o,ref:r,onMouseDown:oe(s.onMouseDown,t=>{!i&&t.button===0&&t.ctrlKey===!1?m.onValueChange(l):t.preventDefault()}),onKeyDown:oe(s.onKeyDown,t=>{[" ","Enter"].includes(t.key)&&m.onValueChange(l)}),onFocus:oe(s.onFocus,()=>{const t=m.activationMode!=="manual";!c&&!i&&t&&m.onValueChange(l)})})})});Ue.displayName=Be;var He="TabsContent",We=x.forwardRef((s,r)=>{const{__scopeTabs:n,value:l,forceMount:i,children:o,...m}=s,_=ve(He,n),p=Ke(_.baseId,l),h=ze(_.baseId,l),c=l===_.value,t=x.useRef(c);return x.useEffect(()=>{const b=requestAnimationFrame(()=>t.current=!1);return()=>cancelAnimationFrame(b)},[]),e.jsx(ms,{present:i||c,children:({present:b})=>e.jsx(ie.div,{"data-state":c?"active":"inactive","data-orientation":_.orientation,role:"tabpanel","aria-labelledby":p,hidden:!b,id:h,tabIndex:0,...m,ref:r,style:{...s.style,animationDuration:t.current?"0s":void 0},children:b&&o})})});We.displayName=He;function Ke(s,r){return`${s}-trigger-${r}`}function ze(s,r){return`${s}-content-${r}`}var $s=De,Ge=Je,Qe=Ue,Ve=We;const Ls=$s,Xe=x.forwardRef(({className:s,...r},n)=>e.jsx(Ge,{ref:n,className:$("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",s),...r}));Xe.displayName=Ge.displayName;const U=x.forwardRef(({className:s,...r},n)=>e.jsx(Qe,{ref:n,className:$("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",s),...r}));U.displayName=Qe.displayName;const H=x.forwardRef(({className:s,...r},n)=>e.jsx(Ve,{ref:n,className:$("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",s),...r}));H.displayName=Ve.displayName;function F({tone:s,className:r,...n}){return e.jsx(I,{variant:"outline",className:$(ge(s),r),...n})}function te(s){return s==null?"N/A":s<60?`${s.toFixed(1)}s`:s<3600?`${(s/60).toFixed(1)}m`:`${(s/3600).toFixed(1)}h`}function Ye(s){return s.available?s.status==="completed"?s.conclusion??"completed":s.status??"unknown":"Unavailable"}function V(s){return s.replace(/_/g," ").replace(/\b\w/g,r=>r.toUpperCase())}function ke({title:s,budget:r,profile:n}){const l=r.cost_policy==="unmetered_hf"||r.budget_enforced===!1,i=Math.min(100,r.current_exposure_usd/r.ceiling_usd*100),o=l?"Unmetered HF":r.affordable_jobs===0&&r.desired_jobs>0?"No shard fits":r.affordable_jobs<r.desired_jobs?`${r.affordable_jobs} of ${r.desired_jobs} planned shards fit`:`${r.affordable_jobs} planned ${r.affordable_jobs===1?"shard fits":"shards fit"}`;return e.jsxs("div",{className:`cron-metric-card space-y-3 ${r.can_launch_planned?"":"cron-status--broken"}`,children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"font-semibold",children:s}),e.jsx("div",{className:"text-xs cron-muted",children:r.window==="rolling_30_days"?"Rolling 30-day window":"All history · no automatic reset"})]}),e.jsx(F,{tone:r.can_launch_planned?"healthy":"broken",children:o})]}),!l&&e.jsx("div",{role:"progressbar","aria-label":`${s} current budget exposure`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(i),className:"h-2 rounded bg-muted",children:e.jsx("div",{className:"h-2 rounded bg-primary",style:{width:`${i}%`}})}),e.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3 text-sm",children:[e.jsxs("div",{children:[e.jsx("span",{className:"cron-label",children:"Completed-job estimate"}),e.jsx("div",{children:S(r.spent_usd)})]}),e.jsxs("div",{children:[e.jsx("span",{className:"cron-label",children:"Active reservations"}),e.jsx("div",{children:S(r.active_reserved_usd)})]}),e.jsxs("div",{children:[e.jsx("span",{className:"cron-label",children:"Current exposure"}),e.jsx("div",{children:S(r.current_exposure_usd)})]}),e.jsxs("div",{children:[e.jsx("span",{className:"cron-label",children:"Admission policy"}),e.jsx("div",{children:l?"HF-owned · no monetary gate":`${S(r.ceiling_usd)} cap · ${S(r.headroom_usd)} headroom`})]}),e.jsxs("div",{children:[e.jsx("span",{className:"cron-label",children:"Affordable plan reserves"}),e.jsx("div",{children:S(r.planned_reserved_usd)})]}),e.jsxs("div",{children:[e.jsx("span",{className:"cron-label",children:"Projected exposure"}),e.jsx("div",{children:S(r.projected_usd)})]}),e.jsxs("div",{children:[e.jsx("span",{className:"cron-label",children:"Rate assumption"}),e.jsxs("div",{children:[S(r.hourly_rate_usd),"/hour · ",r.reservation_hours_per_job,"h"]})]}),e.jsxs("div",{children:[e.jsx("span",{className:"cron-label",children:"Next admission"}),e.jsx("div",{children:l?"Now, subject to capacity":r.next_admission_at?v(r.next_admission_at):r.affordable_jobs>0?"Now":"No scheduled admission"})]}),e.jsxs("div",{children:[e.jsx("span",{className:"cron-label",children:"Unknown terminal reserve"}),e.jsxs("div",{children:[S(r.unknown_terminal_reservation_usd??0)," · ",(r.unknown_terminal_reservation_count??0).toLocaleString()," jobs"]})]})]}),n&&e.jsxs("div",{className:"text-xs cron-muted",children:["Profile ",e.jsx("strong",{children:n.profile_id})," · max ",n.max_papers.toLocaleString()," papers · hard ",te(n.hard_timeout_seconds)," · soft ",te(n.soft_deadline_seconds)]}),e.jsx("p",{className:"text-xs cron-muted",children:l?"HF owns this workload, so monetary admission is disabled; concurrency and timeout limits still apply. Runtime cost remains an operational estimate.":"Projected exposure is an admission-control estimate, not a provider invoice. Each launch reserves the full timeout until actual runtime is known."})]})}const Ps={healthy:je,degraded:Ee,broken:Y,running:R,stuck:Y,unknown:Ns};function Fs({status:s,isRunning:r}){const n=r?"running":s,l=Ps[n];return e.jsx(l,{className:`cron-status-icon ${ge(n)}${n==="running"?" animate-spin":""}`})}function Ce({label:s,axis:r}){return e.jsxs(F,{tone:r.status,title:r.reason,children:[s,": ",r.status]})}function Se({icon:s,title:r,metrics:n}){return e.jsxs("div",{children:[e.jsxs("div",{className:"cron-section-heading",children:[e.jsx(s,{className:"h-4 w-4"}),e.jsx("h4",{children:r})]}),e.jsx("div",{className:"grid grid-cols-2 gap-3",children:Object.entries(n).map(([l,i])=>e.jsxs("div",{className:"cron-metric-card",children:[e.jsx("div",{className:"cron-label",children:V(l)}),e.jsx("div",{className:"text-lg font-semibold",children:typeof i=="number"?i.toLocaleString():i})]},l))})]})}function Rs({workflow:s}){return e.jsxs("div",{children:[e.jsxs("div",{className:"cron-section-heading",children:[e.jsx(ne,{className:"h-4 w-4"}),e.jsx("h4",{children:"GitHub Actions"})]}),e.jsxs("div",{className:"cron-metric-card space-y-2 text-sm",children:[[["Workflow",s.workflow_file],["Run",s.run_id??"N/A"],["Status",Ye(s)],...s.updated_at?[["Updated",v(s.updated_at)]]:[]].map(([r,n])=>e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx("span",{className:"cron-label",children:r}),e.jsx("span",{className:r==="Workflow"?"font-mono text-xs":void 0,children:n})]},r)),s.failed_jobs&&s.failed_jobs.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"cron-label mb-1",children:"Failed jobs"}),e.jsx("div",{className:"flex gap-2 flex-wrap",children:s.failed_jobs.map(r=>e.jsx(F,{tone:"broken",children:r},r))})]}),s.job_conclusions&&Object.keys(s.job_conclusions).length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"cron-label mb-1",children:"Job conclusions"}),e.jsx("div",{className:"flex gap-2 flex-wrap",children:Object.entries(s.job_conclusions).map(([r,n])=>e.jsxs(I,{variant:"outline",children:[r,": ",n??"running"]},r))})]}),(s.error||s.view_error)&&e.jsx("div",{className:"cron-message cron-message--error",children:s.error??s.view_error})]})]})}const Ts={COMPLETED:"healthy",ERROR:"broken",CANCELED:"broken",RUNNING:"running"},$e={success:"healthy",partial:"degraded",interrupted:"degraded",infrastructure_failure:"broken",worker_failure:"broken",active:"running"};function As({job:s}){const r=s.progress,n=(r==null?void 0:r.omitted_images)??0,l=r!=null&&r.total_papers?Math.min(100,r.processed_papers/r.total_papers*100):0;return e.jsxs("div",{className:"cron-metric-card space-y-3",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"font-semibold",children:[s.mode??"unknown"," · shard ",s.shard_id??"N/A"," · attempt ",s.provider_attempt??1]}),e.jsx("div",{className:"font-mono text-xs cron-muted truncate",children:s.id})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(F,{tone:Ts[s.stage]??"unknown",children:s.stage.toLowerCase()}),s.effective_outcome&&e.jsxs(F,{tone:$e[s.effective_outcome]??"unknown",children:["output: ",s.effective_outcome.replace(/_/g," ")]}),s.failure_cause&&e.jsxs(F,{tone:$e[s.effective_outcome??""]??"unknown",children:["cause: ",s.failure_cause.replace(/_/g," ")]}),s.url&&e.jsx("a",{href:s.url,target:"_blank",rel:"noreferrer","aria-label":`Open Hugging Face Job ${s.id}`,className:"cron-info-text",children:e.jsx(X,{className:"h-4 w-4"})})]})]}),r?e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between gap-3 text-xs cron-muted mb-1",children:[e.jsxs("span",{children:[r.processed_papers.toLocaleString()," / ",r.total_papers.toLocaleString()," papers"]}),e.jsxs("span",{children:[l.toFixed(0),"%"]})]}),e.jsx("div",{className:"cron-progress-track",children:e.jsx("div",{className:"cron-progress-value",style:{width:`${l}%`}})})]}),e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-2 text-sm",children:[e.jsxs("span",{children:[e.jsx("strong",{children:r.succeeded_papers.toLocaleString()})," succeeded"]}),e.jsxs("span",{children:[e.jsx("strong",{children:r.failed_papers.toLocaleString()})," failed"]}),e.jsxs("span",{children:[e.jsx("strong",{children:r.already_existed_papers.toLocaleString()})," skipped"]}),e.jsxs("span",{children:[e.jsx("strong",{children:r.extracted_images.toLocaleString()})," images"]})]}),n>0&&e.jsxs("div",{className:"text-xs cron-muted",children:[e.jsx("strong",{children:n.toLocaleString()})," unresolved image references omitted after final retry"]}),r.updated_at&&e.jsxs("div",{className:"text-xs cron-muted",children:["Progress updated ",v(r.updated_at)]}),(r.fatal_error||r.error_samples.length>0)&&e.jsxs("div",{className:"cron-message cron-message--error space-y-1",children:[r.fatal_error&&e.jsx("div",{children:r.fatal_error}),r.error_samples.map(i=>e.jsxs("div",{children:[e.jsx("span",{className:"font-mono",children:i.arxiv_id}),": ",i.error]},`${i.arxiv_id}:${i.error}`))]})]}):e.jsx("div",{className:"text-sm cron-muted",children:"Waiting for the shard progress checkpoint."}),e.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-1 text-xs cron-muted",children:[s.hardware&&e.jsx("span",{children:s.hardware}),s.created_at&&e.jsxs("span",{children:["Created ",v(s.created_at)]}),s.duration_seconds!=null&&e.jsxs("span",{children:["Duration ",te(s.duration_seconds)]})]}),s.stage_message&&e.jsx("div",{className:"cron-message cron-message--warning",children:s.stage_message})]})}function Es({monitor:s,loading:r,error:n}){var l,i;return e.jsxs("div",{className:"md:col-span-2",children:[e.jsxs("div",{className:"cron-section-heading",children:[e.jsx(vs,{className:"h-4 w-4"}),e.jsx("h4",{children:"Hugging Face OCR shards"})]}),r&&e.jsxs("div",{className:"cron-metric-card flex items-center gap-2 text-sm cron-muted",children:[e.jsx(R,{className:"h-4 w-4 animate-spin"})," Loading remote Jobs…"]}),!!n&&e.jsx("div",{className:"cron-message cron-message--error",children:"Could not load Hugging Face Jobs."}),s&&!s.available&&e.jsx("div",{className:"cron-message cron-message--warning",children:s.error??"Hugging Face monitoring is unavailable."}),(s==null?void 0:s.available)&&e.jsxs(e.Fragment,{children:[s.budgets.live&&s.budgets.backfill&&e.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-3 mb-3",children:[e.jsx(ke,{title:"Live paper Markdown GPU policy",budget:s.budgets.live,profile:(l=s.selected_profiles)==null?void 0:l.live}),e.jsx(ke,{title:"Full backfill GPU policy",budget:s.budgets.backfill,profile:(i=s.selected_profiles)==null?void 0:i.backfill})]}),e.jsxs("div",{className:`cron-message mb-3 ${(s.summary.unresolved_mount_failures??0)>0?"cron-message--error":""}`,children:[e.jsx("strong",{children:"Logical shard health:"})," ",(s.summary.logical_shards??0).toLocaleString()," logical shards / ",(s.summary.provider_attempts??0).toLocaleString()," provider attempts · ",(s.summary.recovered_mount_failures??0).toLocaleString()," recovered mount failures · ",(s.summary.unresolved_mount_failures??0).toLocaleString()," unresolved"]}),e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3 mb-3",children:Object.entries(s.summary).map(([o,m])=>e.jsxs("div",{className:"cron-metric-card",children:[e.jsx("div",{className:"cron-label",children:V(o)}),e.jsx("div",{className:"text-lg font-semibold",children:m.toLocaleString()})]},o))}),e.jsx("p",{className:"text-xs cron-muted mb-3",children:"Efficiency and backlog-clearance costs are admission-control estimates, not provider invoices."}),s.coverage&&Object.keys(s.coverage).length>0&&e.jsx("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-3 mb-3",children:Object.values(s.coverage).map(o=>e.jsxs("div",{className:"cron-metric-card space-y-2 text-sm",children:[e.jsx("div",{className:"font-semibold",children:o.scope==="full"?"Full catalog coverage":"Recent 14-day coverage"}),e.jsxs("div",{className:"text-lg font-semibold",children:[o.coverage_percentage.toFixed(2),"%"]}),e.jsxs("div",{children:[o.canonical_markdown_count.toLocaleString()," canonical / ",o.eligible_papers.toLocaleString()," eligible · ",o.missing_count.toLocaleString()," missing"]}),e.jsxs("div",{className:"cron-muted",children:["Copied from upstream this reconciliation: ",o.copied_from_upstream_count.toLocaleString()]}),e.jsxs("div",{className:"cron-muted",children:["7-day Δ eligible ",o.eligible_delta_7d??"collecting"," · canonical ",o.canonical_delta_7d??"collecting"," · missing ",o.missing_delta_7d??"collecting"]})]},o.scope))}),s.jobs.length===0?e.jsx("div",{className:"cron-metric-card text-sm cron-muted",children:"No OCR shards have been launched yet."}):e.jsx("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-3",children:s.jobs.map(o=>e.jsx(As,{job:o},o.id))})]})]})}function Ms({job:s,expanded:r,onToggle:n,autoRefresh:l=!1}){var c;const i=!!(s.work_metrics&&Object.keys(s.work_metrics).length),o=!!(s.db_metrics&&Object.keys(s.db_metrics).length),m=s.job_name==="paper_markdown_backfill",_=z({queryKey:["admin","paperMarkdownJobs"],queryFn:()=>ue.getPaperMarkdownJobs(),enabled:m,refetchInterval:l?3e4:!1,retry:!1}),p=m?(c=_.data)==null?void 0:c.budgets.live:void 0,h=(p==null?void 0:p.cost_policy)==="unmetered_hf"||(p==null?void 0:p.budget_enforced)===!1;return e.jsxs("div",{className:"cron-job-card",children:[e.jsx("button",{type:"button",className:"cron-job-summary",onClick:n,"aria-expanded":r,children:e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"flex items-start gap-3 flex-1 min-w-0",children:[e.jsx(Fs,{status:s.status,isRunning:s.is_running}),e.jsxs("div",{className:"flex-1 min-w-0 text-left",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1 flex-wrap",children:[e.jsx("h3",{className:"font-semibold",children:s.display_name}),s.critical&&e.jsx(I,{variant:"outline",className:"text-[10px] uppercase tracking-wide",children:"Critical"}),s.lock_stale&&e.jsx(F,{tone:"broken",children:"Held lock"}),e.jsx(Ce,{label:"Execution",axis:s.execution_health}),e.jsx(Ce,{label:"Output",axis:s.output_health}),r?e.jsx(ps,{className:"h-4 w-4 cron-muted"}):e.jsx(gs,{className:"h-4 w-4 cron-muted"})]}),e.jsx("p",{className:"text-sm cron-muted mb-2",children:s.status_reason}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-2 text-sm cron-muted",children:[e.jsxs("span",{className:"cron-fact",children:[e.jsx(qe,{}),"Log: ",v(s.last_run)]}),e.jsxs("span",{className:"cron-fact",children:[e.jsx(fe,{}),"DB: ",v(s.last_db_write)]}),s.recent_write_count!=null&&e.jsxs("span",{className:"cron-fact",children:[e.jsx(js,{}),"Recent writes: ",s.recent_write_count.toLocaleString()]}),s.duration!=null&&e.jsxs("span",{className:"cron-fact",children:[e.jsx(ne,{}),"Duration: ",te(s.duration)]}),s.schedule&&e.jsxs("span",{className:"cron-fact md:col-span-2",children:[e.jsx(we,{}),e.jsx("span",{className:"font-mono text-xs",children:s.schedule})]}),s.log_status&&e.jsxs("span",{className:"cron-fact",children:[e.jsx(Ne,{}),"Log status: ",s.log_status]}),s.workflow_status&&e.jsxs("span",{className:"cron-fact",children:[e.jsx(ne,{}),"Actions: ",Ye(s.workflow_status)]})]}),s.work_summary&&e.jsx("div",{className:"cron-message",children:s.work_summary}),s.error&&e.jsxs("div",{className:"cron-message cron-message--error",children:[e.jsx("strong",{children:"Error: "}),s.error]}),s.diagnostics&&e.jsx("div",{className:"cron-message cron-message--warning",children:s.diagnostics}),p&&e.jsxs("div",{className:`cron-message ${p.can_launch_planned?"":"cron-message--error"}`,children:[e.jsx("strong",{children:"Live GPU policy:"})," ",h?"unmetered on HF":`${S(p.current_exposure_usd)} current / ${S(p.ceiling_usd)} cap`," · ",p.affordable_jobs," of ",p.desired_jobs," planned",h?"":` · projects ${S(p.projected_usd)} · rolling 30 days`]})]})]}),e.jsx(F,{tone:s.status,children:s.status})]})}),r&&e.jsx("div",{className:"cron-job-details",children:e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"cron-section-heading",children:[e.jsx(we,{className:"h-4 w-4"}),e.jsx("h4",{children:"Scheduler evidence"})]}),e.jsx("div",{className:"cron-metric-card space-y-2 text-sm",children:[["Scheduler",s.execution_health.scheduler??"unknown"],["Last expected",v(s.execution_health.last_expected_at??null)],["Last started",v(s.execution_health.last_started_at??null)],["Last completed",v(s.execution_health.last_completed_at??null)],["Next expected",v(s.execution_health.next_expected_at??null)]].map(([t,b])=>e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx("span",{className:"cron-label",children:t}),e.jsx("span",{children:b})]},t))})]}),s.work_metrics&&i&&e.jsx(Se,{icon:Ne,title:"Log Metrics",metrics:s.work_metrics}),s.db_metrics&&o&&e.jsx(Se,{icon:fe,title:"Database Metrics",metrics:s.db_metrics}),s.workflow_status&&e.jsx(Rs,{workflow:s.workflow_status}),m&&e.jsx(Es,{monitor:_.data,loading:_.isLoading,error:_.error}),s.diagnostic_groups&&Object.values(s.diagnostic_groups).some(t=>t.length>0)&&e.jsxs("div",{className:"md:col-span-2",children:[e.jsxs("div",{className:"cron-section-heading",children:[e.jsx(Ee,{className:"h-4 w-4"}),e.jsx("h4",{children:"Diagnostics by cause"})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:Object.entries(s.diagnostic_groups).filter(([,t])=>t.length>0).map(([t,b])=>e.jsxs("div",{className:"cron-metric-card",children:[e.jsx("div",{className:"cron-label mb-1",children:V(t)}),e.jsx("ul",{className:"list-disc pl-4 text-sm space-y-1",children:b.map(k=>e.jsx("li",{children:k},k))})]},t))})]}),s.health_findings&&s.health_findings.some(t=>t.state!=="healthy")&&e.jsxs("div",{className:"md:col-span-2",children:[e.jsxs("div",{className:"cron-section-heading",children:[e.jsx(Ae,{className:"h-4 w-4"}),e.jsx("h4",{children:"Deterministic contract findings"})]}),e.jsxs("div",{className:"cron-metric-card space-y-3 text-sm",children:[s.health_findings.filter(t=>t.state!=="healthy").map(t=>e.jsxs("div",{children:[e.jsx(F,{tone:t.state,children:t.state})," ",e.jsx("strong",{children:V(t.contract)}),": ",t.summary,Object.entries(t.evidence).length>0&&e.jsx("div",{className:"mt-1 text-xs cron-muted",children:Object.entries(t.evidence).map(([b,k])=>e.jsxs("span",{className:"mr-3",children:[V(b),": ",String(k)]},b))})]},`${t.plane}-${t.contract}`)),e.jsxs("div",{className:"flex gap-4",children:[s.operator_url&&e.jsxs("a",{className:"cron-info-text inline-flex items-center gap-1",href:s.operator_url,children:["Open operator ",e.jsx(X,{className:"h-3.5 w-3.5"})]}),s.run_url&&e.jsxs("a",{className:"cron-info-text inline-flex items-center gap-1",href:s.run_url,target:"_blank",rel:"noreferrer",children:["Open run ",e.jsx(X,{className:"h-3.5 w-3.5"})]})]})]})]})]})})]})}const Ze=x.forwardRef(({className:s,...r},n)=>e.jsx("div",{className:"relative w-full overflow-auto",children:e.jsx("table",{ref:n,className:$("w-full caption-bottom text-sm",s),...r})}));Ze.displayName="Table";const es=x.forwardRef(({className:s,...r},n)=>e.jsx("thead",{ref:n,className:$("[&_tr]:border-b",s),...r}));es.displayName="TableHeader";const ss=x.forwardRef(({className:s,...r},n)=>e.jsx("tbody",{ref:n,className:$("[&_tr:last-child]:border-0",s),...r}));ss.displayName="TableBody";const qs=x.forwardRef(({className:s,...r},n)=>e.jsx("tfoot",{ref:n,className:$("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",s),...r}));qs.displayName="TableFooter";const he=x.forwardRef(({className:s,...r},n)=>e.jsx("tr",{ref:n,className:$("border-b transition-colors data-[state=selected]:bg-muted hover:bg-muted/50",s),...r}));he.displayName="TableRow";const W=x.forwardRef(({className:s,...r},n)=>e.jsx("th",{ref:n,className:$("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",s),...r}));W.displayName="TableHead";const K=x.forwardRef(({className:s,...r},n)=>e.jsx("td",{ref:n,className:$("p-4 align-middle [&:has([role=checkbox])]:pr-0",s),...r}));K.displayName="TableCell";const Is=x.forwardRef(({className:s,...r},n)=>e.jsx("caption",{ref:n,className:$("mt-4 text-sm text-muted-foreground",s),...r}));Is.displayName="TableCaption";const as={queued:"unknown",dispatching:"running",running:"running",completed:"healthy",failed:"broken",canceled:"unknown",awaiting_markdown:"unknown"},rs={queued:"queued",dispatching:"dispatching",running:"running",completed:"completed",failed:"failed",canceled:"canceled",awaiting_markdown:"waiting for Markdown"},Le={"add-evals":"Add evals","enrich-paper":"Enrich paper","resolve-model-paper":"Resolve model release","review-benchmark-gaps":"Review benchmark gaps","add-benchmark":"Add benchmark"},Ds={queued:ws,dispatching:R,running:bs,completed:je,failed:Y,canceled:ys,awaiting_markdown:ks};function Os({status:s}){const r=Ds[s];return e.jsxs(F,{tone:as[s],children:[e.jsx(r,{className:`mr-1 h-3.5 w-3.5 ${s==="dispatching"?"animate-spin":""}`}),rs[s]]})}function Js(s){return s.status==="awaiting_markdown"?_s:s.error?s.error:s.report?s.report:s.status==="completed"&&s.applied_at?"Changes applied to the paper.":s.status==="completed"?"Completed without a recorded mutation.":null}function Pe({mutationResult:s}){const r=s==null?void 0:s.skipped_configured_leaderboards;return!Array.isArray(r)||r.length===0?null:e.jsxs("div",{className:"mt-2 rounded border border-amber-500 bg-amber-50 p-2 text-xs text-amber-900",children:[e.jsxs("div",{className:"font-medium",children:["Skipped configured leaderboards (",r.length,")"]}),e.jsx("ul",{className:"mt-1 list-disc space-y-1 pl-4",children:r.map((n,l)=>e.jsxs("li",{children:[n.benchmark," · ",n.disposition," · task ",n.task_id," / dataset ",n.dataset_id,n.metric?` / ${n.metric}`:"",n.value!=null?` = ${n.value}`:"",n.detail?` — ${n.detail}`:""]},l))})]})}function Bs({autoRefresh:s}){var q;const r=xe(),[n,l]=x.useState(""),[i,o]=x.useState(""),[m,_]=x.useState(""),[p,h]=x.useState(""),[c,t]=x.useState(""),[b,k]=x.useState({}),O={trigger:n,status:i,policy_version:m,cohort_date:p,review_status:c},{data:u,isLoading:G,isFetching:Z,error:J}=z({queryKey:["admin","codexPaperJobs",O],queryFn:()=>E.listJobs(100,O),refetchInterval:s?1e4:!1,retry:!1}),T=()=>r.invalidateQueries({queryKey:["admin","codexPaperJobs"]}),ee=L({mutationFn:a=>E.retryJob(a),onSuccess:T}),le=L({mutationFn:a=>E.cancelJob(a),onSuccess:T}),de=L({mutationFn:a=>E.retryTrace(a),onSuccess:T}),Q=L({mutationFn:a=>E.setScheduler(a),onSuccess:T}),M=L({mutationFn:({id:a,dataset:d,task:w,metric:ae})=>E.promoteBenchmarkCandidate(a,{dataset_id:Number(d),task_id:Number(w),best_metric:ae.trim()}),onSuccess:T}),A=L({mutationFn:a=>E.rollbackBenchmarkCandidate(a),onSuccess:T}),se=J instanceof Te&&J.status===404;return e.jsxs(g,{className:"mb-8",children:[e.jsx(f,{children:e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx(N,{className:"text-xl",children:"Codex paper jobs"}),e.jsx(P,{children:"Durable queue, two-stage daily workflows, traces, and benchmark-gap follow-up"})]}),Z&&!G&&e.jsxs("span",{className:"flex items-center gap-2 text-xs cron-muted",children:[e.jsx(R,{className:"h-3.5 w-3.5 animate-spin"})," Syncing with Hugging Face"]})]})}),e.jsxs(j,{children:[G&&e.jsxs("div",{className:"flex items-center justify-center py-10 cron-muted",children:[e.jsx(R,{className:"mr-2 h-5 w-5 animate-spin"})," Loading paper jobs…"]}),J&&!se&&e.jsx("div",{className:"cron-message cron-message--error mb-4",children:J.message}),se&&e.jsx("p",{className:"py-4 text-sm cron-muted",children:"Codex paper jobs are not enabled in this environment."}),u&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:`cron-message mb-5 ${u.scheduler.paused_at?"cron-message--error":""}`,children:e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[e.jsxs("div",{children:[e.jsxs("strong",{children:["Scheduled dispatch: ",u.scheduler.paused_at?"paused":u.scheduler.dispatch_enabled?"enabled":"disabled"]}),u.scheduler.pause_reason&&e.jsx("div",{className:"mt-1 text-xs",children:u.scheduler.pause_reason}),e.jsxs("div",{className:"mt-1 text-xs cron-muted",children:["Canary ",u.scheduler.canary_released?"released":"active"," · Queue age ",u.scheduler.queue_age_level]}),e.jsxs("div",{className:"mt-1 text-xs cron-muted",children:["Scheduled usage today ",u.scheduler.usage.current_day_tokens.toLocaleString()," tokens · ",u.scheduler.usage.mode==="enforced"?`pause threshold ${((q=u.scheduler.usage.pause_threshold_tokens)==null?void 0:q.toLocaleString())??"not established"}`:"first-week alert-only baseline"," · trailing median ",u.scheduler.usage.trailing_seven_day_median_tokens.toLocaleString()]})]}),e.jsx(y,{size:"sm",variant:u.scheduler.paused_at||!u.scheduler.dispatch_enabled?"default":"outline",disabled:Q.isPending,onClick:()=>Q.mutate(u.scheduler.paused_at||!u.scheduler.dispatch_enabled?"resume":"pause"),children:u.scheduler.paused_at?"Acknowledge & resume":u.scheduler.dispatch_enabled?"Pause scheduled dispatch":"Enable scheduled dispatch"})]})}),e.jsxs("div",{className:"mb-5 grid grid-cols-2 gap-3 sm:grid-cols-4 lg:grid-cols-8",children:[["queued","awaiting_markdown","dispatching","running","completed","failed","canceled"].map(a=>e.jsxs("div",{className:"cron-metric-card",children:[e.jsx("div",{className:"cron-label capitalize",children:rs[a]}),e.jsx("div",{className:"mt-1 text-xl font-semibold",children:u.summary[a]})]},a)),e.jsxs("div",{className:"cron-metric-card",children:[e.jsx("div",{className:"cron-label",children:"Total"}),e.jsx("div",{className:"mt-1 text-xl font-semibold",children:u.summary.total})]})]}),e.jsxs("div",{className:"mb-5 grid gap-3 sm:grid-cols-5",children:[e.jsxs("select",{"aria-label":"Trigger",className:"rounded border px-2 py-1 text-sm",value:n,onChange:a=>l(a.target.value),children:[e.jsx("option",{value:"",children:"All triggers"}),e.jsx("option",{value:"admin",children:"Admin"}),e.jsx("option",{value:"hf-daily-cron",children:"HF daily cron"}),e.jsx("option",{value:"hf-trending-cron",children:"HF trending cron"}),e.jsx("option",{value:"benchmark-gap-cron",children:"Benchmark gap cron"}),e.jsx("option",{value:"model-release-radar",children:"Release radar"})]}),e.jsxs("select",{"aria-label":"Status",className:"rounded border px-2 py-1 text-sm",value:i,onChange:a=>o(a.target.value),children:[e.jsx("option",{value:"",children:"All statuses"}),Object.keys(as).map(a=>e.jsx("option",{children:a},a))]}),e.jsx("input",{"aria-label":"Policy version",className:"rounded border px-2 py-1 text-sm",placeholder:"Policy version",value:m,onChange:a=>_(a.target.value)}),e.jsx("input",{"aria-label":"Cohort date",type:"date",className:"rounded border px-2 py-1 text-sm",value:p,onChange:a=>h(a.target.value)}),e.jsxs("select",{"aria-label":"Review status",className:"rounded border px-2 py-1 text-sm",value:c,onChange:a=>t(a.target.value),children:[e.jsx("option",{value:"",children:"All review states"}),e.jsx("option",{value:"unreviewed",children:"Unreviewed"}),e.jsx("option",{value:"approved",children:"Approved"}),e.jsx("option",{value:"corrected",children:"Corrected"})]})]}),u.jobs.length===0?e.jsx("p",{className:"py-8 text-center text-sm cron-muted",children:"No paper curation jobs have been submitted yet."}):e.jsxs(Ze,{children:[e.jsx(es,{children:e.jsxs(he,{children:[e.jsx(W,{children:"Status"}),e.jsx(W,{children:"Paper"}),e.jsx(W,{children:"Action"}),e.jsx(W,{children:"Requested"}),e.jsx(W,{children:"Execution"})]})}),e.jsx(ss,{children:u.jobs.map(a=>{const d=Js(a);return e.jsxs(he,{children:[e.jsx(K,{className:"align-top",children:e.jsx(Os,{status:a.status})}),e.jsx(K,{className:"min-w-[260px] align-top",children:a.paper_route?e.jsxs(e.Fragment,{children:[e.jsx(pe,{to:`/paper/${encodeURIComponent(a.paper_route)}`,className:"font-medium hover:underline",children:a.paper_title}),e.jsxs("div",{className:"mt-1 text-xs cron-muted",children:["Paper #",a.paper_id]})]}):a.kind==="review-benchmark-gaps"?e.jsx("span",{className:"font-medium",children:"Benchmark-gap backlog"}):a.kind==="add-benchmark"?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"font-medium",children:"Benchmark candidate"}),e.jsx("div",{className:"mt-1 text-xs cron-muted",children:a.benchmark_candidate_id})]}):a.release_signal_id?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"font-medium",children:"Release radar signal"}),e.jsxs("div",{className:"mt-1 text-xs cron-muted",children:["Signal ",a.release_signal_id]})]}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"font-medium",children:"Trending model discovery"}),e.jsxs("div",{className:"mt-1 text-xs cron-muted",children:["Candidate ",a.candidate_id]})]})}),e.jsxs(K,{className:"whitespace-nowrap align-top",children:[Le[a.kind],a.applied_at&&e.jsxs("div",{className:"mt-1 flex items-center gap-1 text-xs cron-status--healthy",children:[e.jsx(je,{className:"h-3.5 w-3.5"})," Applied"]})]}),e.jsxs(K,{className:"whitespace-nowrap align-top",children:[e.jsx("div",{children:v(a.created_at)}),e.jsxs("div",{className:"mt-1 text-xs cron-muted",children:["@",a.requested_by]})]}),e.jsxs(K,{className:"max-w-[360px] align-top",children:[a.hf_job_url?e.jsxs("a",{href:a.hf_job_url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 hover:underline",children:["Hugging Face Job ",e.jsx(X,{className:"h-3.5 w-3.5"})]}):e.jsx("span",{className:"cron-muted",children:"Waiting to dispatch"}),d&&e.jsx("p",{className:`mt-2 line-clamp-3 text-xs ${a.error&&a.status!=="awaiting_markdown"?"text-red-700":"cron-muted"}`,title:d,children:d}),e.jsx(Pe,{mutationResult:a.mutation_result}),e.jsxs("div",{className:"mt-2 flex gap-2",children:[["failed","canceled"].includes(a.status)&&e.jsx(y,{size:"sm",variant:"outline",onClick:()=>ee.mutate(a.id),children:"Retry"}),["queued","awaiting_markdown","dispatching","running"].includes(a.status)&&e.jsx(y,{size:"sm",variant:"outline",onClick:()=>le.mutate(a.id),children:"Cancel"}),a.trace_status==="finalize_failed"&&e.jsx(y,{size:"sm",variant:"outline",onClick:()=>de.mutate(a.id),children:"Retry trace"})]})]})]},a.id)})})]}),u.workflows.length>0&&e.jsxs("div",{className:"mt-8 space-y-3",children:[e.jsx("h3",{className:"text-base font-semibold",children:"Scheduled paper workflows"}),u.workflows.map(a=>e.jsxs("details",{className:"rounded-md border p-3",children:[e.jsxs("summary",{className:"cursor-pointer text-sm font-medium",children:["Paper #",a.paper_id," · ",a.cohort_date," · ",a.status," · ",a.policy_version]}),e.jsxs("div",{className:"mt-3 space-y-3 text-xs",children:[a.error&&e.jsx("div",{className:"text-red-700",children:a.error}),a.stages.map(d=>{var w;return e.jsxs("div",{className:"rounded border p-3",children:[e.jsxs("div",{className:"font-medium",children:[Le[d.kind]," · ",d.status," · trace ",d.trace_status," · review ",d.audit_status]}),e.jsxs("div",{className:"mt-1 cron-muted",children:["model ",d.model??"—"," · reasoning ",d.reasoning_effort??"—"," · tokens ",(d.input_tokens??0)+(d.output_tokens??0)," · duration ",d.duration_ms??0," ms · attempts ",d.attempt_count]}),d.error&&e.jsx("div",{className:"mt-2 text-red-700",children:d.error}),d.report&&e.jsx("div",{className:"mt-2 whitespace-pre-wrap rounded border p-2",children:d.report}),d.url_candidates&&e.jsxs("details",{className:"mt-2",children:[e.jsx("summary",{children:"URL candidates and provenance"}),e.jsx("pre",{className:"mt-2 max-h-52 overflow-auto whitespace-pre-wrap",children:JSON.stringify(d.url_candidates,null,2)})]}),d.validation_summary&&e.jsx("pre",{className:"mt-2 max-h-40 overflow-auto whitespace-pre-wrap",children:JSON.stringify(d.validation_summary,null,2)}),Array.isArray((w=d.validation_summary)==null?void 0:w.manual_or_legacy_evaluation_rows_affected)&&d.validation_summary.manual_or_legacy_evaluation_rows_affected.length>0&&e.jsxs("div",{className:"mt-2 rounded border border-amber-500 bg-amber-50 p-2 font-medium text-amber-900",children:["Manual or legacy evaluation rows changed: ",d.validation_summary.manual_or_legacy_evaluation_rows_affected.join(", "),". Review the evidence and before/after diff."]}),d.proposal&&e.jsx("pre",{className:"mt-2 max-h-52 overflow-auto whitespace-pre-wrap",children:JSON.stringify(d.proposal,null,2)}),e.jsx(Pe,{mutationResult:d.mutation_result}),d.mutation_result&&e.jsxs("details",{className:"mt-2",children:[e.jsx("summary",{children:"Accepted callback result and before/after state"}),e.jsx("pre",{className:"mt-2 max-h-64 overflow-auto whitespace-pre-wrap",children:JSON.stringify(d.mutation_result,null,2)})]}),d.trace_status==="complete"&&e.jsxs("a",{className:"mt-2 inline-flex items-center gap-1 hover:underline",href:E.traceUrl(d.id),target:"_blank",rel:"noreferrer",children:["Authenticated trace manifest ",e.jsx(X,{className:"h-3.5 w-3.5"})]})]},d.id)})]})]},a.id))]}),u.benchmark_candidates.length>0&&e.jsxs("div",{className:"mt-8 space-y-3",children:[e.jsx("h3",{className:"text-base font-semibold",children:"Benchmark-gap backlog"}),u.benchmark_candidates.map(a=>{var ae,_e;const d=b[a.id]??{dataset:"",task:((ae=a.task_ids[0])==null?void 0:ae.toString())??"",metric:""},w=Number(d.dataset)>0&&Number(d.task)>0&&d.metric.trim().length>0;return e.jsxs("div",{className:"rounded-md border p-3 text-xs",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs("div",{className:"font-medium",children:[a.canonical_name," · ",a.gap_type," · ",a.status]}),e.jsxs("div",{className:"cron-muted",children:[a.distinct_paper_count," paper",a.distinct_paper_count===1?"":"s"," · ",a.confidence??"unknown"," confidence"]})]}),a.canonical_url&&e.jsx("a",{className:"mt-1 block hover:underline",href:a.canonical_url,target:"_blank",rel:"noreferrer",children:a.canonical_url}),e.jsxs("div",{className:"mt-1 cron-muted",children:["Task evidence: ",a.task_ids.join(", ")||"none"," · Papers: ",a.evidence_paper_ids.join(", ")]}),a.review_reason&&e.jsxs("div",{className:"mt-1",children:["Review",a.reviewed_at?` ${v(a.reviewed_at)}`:"",": ",a.review_reason,a.deferred_until&&` · deferred until ${v(a.deferred_until)}`]}),a.resolution&&e.jsxs("div",{className:"mt-1 cron-muted",children:["Dataset #",a.resolution.dataset_id," · task #",a.resolution.task_id," · ",a.resolution.primary_metric,a.resolution.rolled_back_at&&` · rolled back ${v(a.resolution.rolled_back_at)}`]}),a.status==="promoted"&&((_e=a.resolution)==null?void 0:_e.created)&&!a.resolution.rolled_back_at&&e.jsx(y,{className:"mt-2",size:"sm",variant:"outline",disabled:A.isPending,onClick:()=>A.mutate(a.id),children:"Roll back automatic benchmark"}),!["promoted","merged"].includes(a.status)&&e.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",children:[["dataset","task","metric"].map(B=>e.jsx("input",{"aria-label":`${a.canonical_name} ${B}`,className:"w-36 rounded border px-2 py-1",placeholder:B==="metric"?"Exact metric":`${B} ID`,value:d[B],onChange:ns=>k(ts=>({...ts,[a.id]:{...d,[B]:ns.target.value}}))},B)),e.jsx(y,{size:"sm",variant:"outline",disabled:!w||M.isPending,onClick:()=>M.mutate({id:a.id,...d}),children:"Promote & requeue evidence papers"})]})]},a.id)}),M.error&&e.jsx("div",{className:"cron-message cron-message--error",children:M.error.message}),A.error&&e.jsx("div",{className:"cron-message cron-message--error",children:A.error.message})]}),e.jsxs("p",{className:"mt-4 text-xs cron-muted",children:["Showing the 100 most recent jobs · Queue totals include full history · Updated ",v(u.timestamp)]})]})]})]})}function Us(){const[s,r]=x.useState(()=>new Date().toISOString().slice(0,10)),[n,l]=x.useState(1),i=z({queryKey:["paper-edit-digest",s,n],queryFn:()=>Me.digest(s,n),enabled:!!s});return e.jsxs("section",{className:"space-y-3 rounded border p-4",children:[e.jsx("h2",{className:"text-lg font-semibold",children:"Daily paper edits"}),e.jsxs("label",{className:"flex items-center gap-2",children:["UTC date ",e.jsx("input",{type:"date",value:s,onChange:o=>{r(o.target.value),l(1)}})]}),i.isLoading&&e.jsx("p",{children:"Loading daily summary…"}),i.error&&e.jsx("p",{role:"alert",children:i.error.message}),i.data&&e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:[i.data.edits," published changes · ",i.data.papers," papers · ",i.data.contributors," contributors"]}),e.jsx("ul",{className:"space-y-1",children:i.data.rows.map((o,m)=>e.jsxs("li",{children:[e.jsxs(pe,{className:"underline",to:`/paper/${o.paper_id}`,children:["Paper ",o.paper_id]})," · @",o.actor_username??"admin"," · ",o.edits," changes"]},m))}),e.jsxs("div",{className:"flex gap-2",children:[n>1&&e.jsx(y,{variant:"outline",onClick:()=>l(n-1),children:"Previous"}),i.data.has_more&&e.jsx(y,{variant:"outline",onClick:()=>l(n+1),children:"Next"})]})]})]})}const Hs=()=>{var m,_,p,h;const s=xe(),r=fs({queryKey:["catalog-audit"],queryFn:({pageParam:c})=>me.audit(c),initialPageParam:void 0,getNextPageParam:c=>c.next_cursor??void 0}),n=((m=r.data)==null?void 0:m.pages.flatMap(c=>c.events))??[],l=L({mutationFn:()=>me.acknowledgeAudit(),onSuccess:()=>s.invalidateQueries({queryKey:["catalog-audit"]})}),i=L({mutationFn:c=>me.rollbackEvent(c),onSuccess:()=>s.invalidateQueries({queryKey:["catalog-audit"]})}),o=L({mutationFn:({subject:c,suspended:t})=>Me.suspend(c,t),onSuccess:()=>s.invalidateQueries({queryKey:["catalog-audit"]})});return e.jsxs("div",{className:"space-y-4",children:[e.jsx(Us,{}),(i.error||o.error)&&e.jsx("p",{role:"alert",children:(_=i.error||o.error)==null?void 0:_.message}),e.jsxs(g,{children:[e.jsxs(f,{className:"flex-row items-center justify-between",children:[e.jsx(N,{children:"Catalog mutation audit"}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"text-sm font-medium",children:[((h=(p=r.data)==null?void 0:p.pages[0])==null?void 0:h.unread_contributor_count)??0," unread contributor changes"]}),e.jsx(y,{variant:"outline",size:"sm",onClick:()=>l.mutate(),disabled:l.isPending,children:"Mark read"})]})]}),e.jsxs(j,{className:"space-y-3",children:[r.isLoading&&e.jsx("p",{children:"Loading audit history…"}),r.error&&e.jsx("p",{className:"text-destructive",children:"Audit history unavailable."}),n.map(c=>e.jsxs("article",{className:`rounded-md border p-3 ${c.operation==="delete"||c.rollback_eligible===!1?"border-red-500 bg-red-50/50":""}`,children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs("strong",{children:[c.operation," ",c.entity_type," ",c.entity_id]}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:["@",c.actor_username??c.actor_role," ·"," ",new Date(c.created_at).toLocaleString()]})]}),e.jsxs("details",{className:"mt-2 text-xs",children:[e.jsx("summary",{children:"Inspect snapshots"}),e.jsx("pre",{className:"mt-2 max-h-80 overflow-auto rounded bg-muted p-3",children:JSON.stringify({before:c.before,after:c.after},null,2)})]}),c.actor_role==="contributor"&&c.actor_hf_subject&&e.jsx(y,{className:"mt-3 mr-2",variant:"outline",size:"sm",disabled:o.isPending,onClick:()=>o.mutate({subject:c.actor_hf_subject,suspended:!c.editing_suspended}),children:c.editing_suspended?"Restore editing access":"Suspend editing access"}),!c.rollback_of_event_id&&e.jsx(y,{className:"mt-3",variant:"outline",size:"sm",onClick:()=>i.mutate(c.id),disabled:i.isPending||c.rollback_eligible===!1,children:c.rollback_eligible===!1?"Rollback conflict":"Roll back if unchanged"})]},c.id)),r.hasNextPage&&e.jsx(y,{variant:"outline",onClick:()=>r.fetchNextPage(),disabled:r.isFetchingNextPage,children:r.isFetchingNextPage?"Loading…":"Load older events"})]})]})]})},Fe={hourly:"running",daily:"healthy",weekly:"degraded",systemd:"running"},re=["admin","cronStatus"],Ws=({data:s,loading:r,error:n})=>{const[l,i]=x.useState("staging-current"),o={"staging-current":"Starter staging · $75 warning / $100 trip / no Environment cap","staging-production-era":"Staging with production · $15 / $20 / $25",production:"Production · $175 / $200 / $225"};if(r)return e.jsxs("div",{className:"flex items-center py-12",children:[e.jsx(R,{className:"h-6 w-6 animate-spin mr-3"}),"Loading chat compute…"]});if(n||!s)return e.jsx(g,{className:"cron-status--broken",children:e.jsx(j,{className:"pt-6",children:"Chat compute accounting is unavailable."})});const m=Math.min(100,s.effective_microusd/s.application_cap_microusd*100),_=s.circuit_state==="tripped"?"Chat disabled":s.circuit_state==="warning"?"Operator warning":"Enabled",p=s.reconciliation_state==="fresh"?"Fresh":s.reconciliation_state==="stale"?"Stale":"Unavailable";return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"grid md:grid-cols-4 gap-4",children:[e.jsxs(g,{className:s.circuit_state==="tripped"?"cron-status--broken":s.circuit_state==="warning"?"cron-status--degraded":"",children:[e.jsx(f,{children:e.jsx(N,{className:"text-sm",children:"Circuit"})}),e.jsxs(j,{children:[e.jsx("div",{className:"text-2xl font-bold",children:_}),e.jsx("p",{className:"text-xs cron-muted",children:s.trip_reason??"Policy armed"})]})]}),e.jsxs(g,{children:[e.jsx(f,{children:e.jsx(N,{className:"text-sm",children:"Month to date"})}),e.jsxs(j,{children:[e.jsx("div",{className:"text-2xl font-bold",children:C(s.effective_microusd)}),e.jsx("div",{role:"progressbar","aria-label":"Application cap used","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(m),className:"h-2 rounded bg-muted mt-3",children:e.jsx("div",{className:"h-2 rounded bg-primary",style:{width:`${m}%`}})})]})]}),e.jsxs(g,{children:[e.jsx(f,{children:e.jsx(N,{className:"text-sm",children:"Application headroom"})}),e.jsxs(j,{children:[e.jsx("div",{className:"text-2xl font-bold",children:C(s.remaining_microusd)}),e.jsxs("p",{className:"text-xs cron-muted",children:["Cap ",C(s.application_cap_microusd)]})]})]}),e.jsxs(g,{children:[e.jsx(f,{children:e.jsx(N,{className:"text-sm",children:"Live compute"})}),e.jsxs(j,{children:[e.jsx("div",{className:"text-2xl font-bold",children:s.live_count}),e.jsxs("p",{className:"text-xs cron-muted",children:[s.termination_uncertain_count," termination uncertain"]})]})]})]}),e.jsxs(g,{children:[e.jsxs(f,{children:[e.jsx(N,{children:"Accounting and policy"}),e.jsxs(P,{children:[s.environment," · cycle ",s.billing_cycle]})]}),e.jsxs(j,{className:"grid md:grid-cols-3 gap-4 text-sm",children:[e.jsxs("div",{children:[e.jsx("strong",{children:"Environment record"}),e.jsx("br",{}),s.environment," · ",s.provider_mode==="starter_workspace"?"Starter Workspace":"Team isolated"]}),e.jsxs("label",{children:[e.jsx("strong",{children:"Policy profile"}),e.jsxs("select",{"aria-label":"Chat compute policy profile",value:l,onChange:h=>i(h.target.value),className:"block mt-1",children:[e.jsx("option",{value:"staging-current",children:"Staging now"}),e.jsx("option",{value:"staging-production-era",children:"Staging with production"}),e.jsx("option",{value:"production",children:"Production"})]}),e.jsxs("span",{className:"text-xs cron-muted",children:[o[l]," · Workspace $250"]})]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Conservative estimate"}),e.jsx("br",{}),C(s.estimated_microusd)]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Provider-reported floor"}),e.jsx("br",{}),C(s.provider_floor_microusd)," · ",e.jsx(I,{children:p})]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Provider backstops"}),e.jsx("br",{}),s.environment_cap_microusd===null?"Starter: no Environment cap":`Environment ${C(s.environment_cap_microusd)}`," · Workspace ",C(s.workspace_cap_microusd)]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Active thresholds"}),e.jsx("br",{}),"Warning ",C(s.warning_microusd)," · trip ",C(s.application_cap_microusd)]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Policy allocation"}),e.jsx("br",{}),"Starter staging $75/$100 with no Environment cap · future Team staging $15/$20/$25 · production $175/$200/$225 · workspace $250"]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Cycle end"}),e.jsx("br",{}),v(s.cycle_end_at)]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Last metered"}),e.jsx("br",{}),s.last_metered_at?v(s.last_metered_at):"Unavailable"]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Provider reconciliation"}),e.jsx("br",{}),s.last_reconciled_at?v(s.last_reconciled_at):"Unavailable",s.last_reconciliation_attempt_at?` · attempted ${v(s.last_reconciliation_attempt_at)}`:"",s.next_reconciliation_at?` · next ${v(s.next_reconciliation_at)}`:""]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Burn projection"}),e.jsx("br",{}),s.burn_rate_microusd_per_hour===null?"Not enough data":`${C(s.burn_rate_microusd_per_hour)}/hour${s.projected_cap_hit_at?` · cap ${v(s.projected_cap_hit_at)}`:""}`]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Prior cycle"}),e.jsx("br",{}),s.prior_cycle?`${s.prior_cycle.billing_cycle} · ${C(s.prior_cycle.effective_microusd)}`:"Not enough data"]})]})]}),e.jsxs(g,{children:[e.jsx(f,{children:e.jsx(N,{children:"Live lifecycle"})}),e.jsx(j,{className:"text-sm",children:Object.entries(s.live_states).map(([h,c])=>e.jsxs("span",{className:"mr-4",children:[h,": ",c]},h))})]}),e.jsxs(g,{children:[e.jsx(f,{children:e.jsx(N,{children:"Daily spend"})}),e.jsx(j,{children:s.daily_spend.length?e.jsx("ul",{className:"space-y-1 text-sm",children:s.daily_spend.map(h=>e.jsxs("li",{children:[h.date,": blank ",C(h.blank_pool_microusd)," · assigned ",C(h.assigned_microusd)]},h.date))}):e.jsx("p",{className:"cron-muted",children:"No compute recorded in this cycle."})})]}),e.jsxs(g,{children:[e.jsxs(f,{children:[e.jsx(N,{children:"Recent circuit events"}),e.jsx(P,{children:"Runbook: docs/chat-sandbox-spend-runbook.md"})]}),e.jsx(j,{children:s.events.length?e.jsx("ul",{className:"space-y-2 text-sm",children:s.events.map(h=>e.jsxs("li",{children:[e.jsx(I,{children:h.severity})," ",h.type," · ",v(h.created_at)]},h.id))}):e.jsx("p",{className:"cron-muted",children:"No events in this cycle."})})]})]})},Ks=({data:s,loading:r,error:n})=>{if(r)return e.jsxs("div",{className:"flex items-center py-8",children:[e.jsx(R,{className:"h-5 w-5 animate-spin mr-3"}),"Loading web-search budget…"]});if(n||!s)return e.jsx(g,{className:"cron-status--broken",children:e.jsx(j,{className:"pt-6",children:"Web-search budget accounting is unavailable."})});const l=Math.min(100,s.call_count/s.hard_limit_calls*100);return e.jsxs(g,{className:s.circuit_state==="tripped"?"cron-status--broken":s.circuit_state==="warning"||s.circuit_state==="cooldown"?"cron-status--degraded":"",children:[e.jsxs(f,{children:[e.jsx(N,{children:"Web search"}),e.jsxs(P,{children:[s.environment," · UTC cycle ",s.billing_cycle," · provider details are admin-only"]})]}),e.jsxs(j,{className:"space-y-4",children:[e.jsxs("div",{className:"grid md:grid-cols-4 gap-4 text-sm",children:[e.jsxs("div",{children:[e.jsx("strong",{children:"Circuit"}),e.jsx("br",{}),s.circuit_state,s.trip_reason?` · ${s.trip_reason}`:""]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Calls"}),e.jsx("br",{}),s.call_count," / ",s.hard_limit_calls," · ",s.success_count," successful"]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Remaining"}),e.jsx("br",{}),s.remaining_calls]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Warning"}),e.jsx("br",{}),s.warning_calls," calls"]})]}),e.jsx("div",{role:"progressbar","aria-label":"Web-search monthly budget used","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(l),className:"h-2 rounded bg-muted",children:e.jsx("div",{className:"h-2 rounded bg-primary",style:{width:`${l}%`}})}),e.jsxs("p",{className:"text-xs cron-muted",children:["Cycle ends ",v(s.cycle_end_at)," · provider-reported cost $",(s.provider_cost_microusd/1e6).toFixed(4),s.last_latency_ms!==null?` · last ${s.last_latency_ms} ms / ${s.last_result_count??0} results`:"",s.cooldown_until?` · cooldown until ${v(s.cooldown_until)}`:"",s.last_provider_error_class?` · last provider error ${s.last_provider_error_class}`:""]}),s.events.length>0&&e.jsx("ul",{className:"space-y-1 text-sm",children:s.events.map(i=>e.jsxs("li",{children:[i.type," · ",v(i.created_at),i.error_class?` · ${i.error_class}`:""]},i.id))})]})]})},zs=({data:s})=>s!=null&&s.snapshot_stale?e.jsx(g,{className:"mb-6 cron-status--degraded",role:"status",children:e.jsx(j,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center gap-3 text-sm",children:[e.jsx(R,{className:"h-4 w-4 animate-spin"}),e.jsxs("span",{children:["Refreshing status… Current snapshot is ",Math.ceil(s.snapshot_age_seconds)," seconds old."]})]})})}):null,Gs=(s,r)=>s!=null&&s.snapshot_stale||s!=null&&s.refreshing?5e3:r?3e4:!1,ga=()=>{const s=xs(),r=xe(),[n,l]=x.useState(!0),[i,o]=x.useState(""),[m,_]=x.useState(""),[p,h]=x.useState(new Set),{user:c}=hs(),{data:t,isLoading:b,error:k}=z({queryKey:re,queryFn:()=>ue.getCronStatus(),refetchInterval:a=>Gs(a.state.data,n),retry:!1}),O=z({queryKey:["admin","chatSandboxSpend",m],queryFn:()=>ye.getSandboxSpend(m||void 0),refetchInterval:n?3e4:!1,retry:!1}),u=z({queryKey:["admin","chatWebSearchBudget"],queryFn:()=>ye.getWebSearchBudget(),enabled:s,refetchInterval:n?3e4:!1,retry:!1}),G=L({mutationFn:()=>Promise.all([r.cancelQueries({queryKey:re}).then(()=>r.fetchQuery({queryKey:re,queryFn:()=>ue.getCronStatus(!0),retry:!1})),r.refetchQueries({queryKey:["admin"],type:"active",predicate:a=>a.queryKey[1]!==re[1]})])}),Z=k instanceof Te&&k.status===401?"Unauthorized. Sign in with an allowlisted Hugging Face admin account.":k instanceof Error?k.message:void 0,J=a=>{h(d=>{const w=new Set(d);return w.has(a)?w.delete(a):w.add(a),w})},T=(t==null?void 0:t.jobs.filter(a=>a.dashboard_group==="leaderboard_sync"))??[],ee=(t==null?void 0:t.jobs.filter(a=>a.category!=="manual"&&a.dashboard_group!=="leaderboard_sync"))??[],le=ee.filter(a=>a.critical),de=ee.filter(a=>!a.critical),Q=(t==null?void 0:t.manual_operations)??[],M=!!(b||G.isPending||t!=null&&t.refreshing),A=de.reduce((a,d)=>(a[d.category]||(a[d.category]=[]),a[d.category].push(d),a),{}),se=Object.keys(A).sort((a,d)=>{const w=["systemd","hourly","daily","weekly","backfill"];return w.indexOf(a)-w.indexOf(d)}),q=a=>e.jsx(Ms,{job:a,expanded:p.has(a.job_name),onToggle:()=>J(a.job_name),autoRefresh:n},a.job_name);return e.jsx("div",{className:"cron-dashboard","data-shadcn":!0,children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[e.jsx("div",{className:"mb-8",children:e.jsxs("div",{className:"flex items-center justify-between gap-4 flex-wrap",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"text-3xl font-bold flex items-center gap-3",children:[e.jsx(ne,{className:"h-8 w-8 cron-info-text"}),"Admin Dashboard"]}),e.jsx("p",{className:"mt-2 cron-muted",children:"Paper curation queue and operational health for scheduled jobs"})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(y,{asChild:!0,variant:"outline",size:"sm",children:e.jsx(pe,{to:"/autonomous-operations",children:"Autonomous operations"})}),e.jsxs(y,{variant:"outline",size:"sm",onClick:()=>l(!n),className:n?"cron-status--running":"",children:[e.jsx(be,{className:`h-4 w-4 mr-2 ${n?"animate-spin":""}`}),"Auto-refresh ",n?"ON":"OFF"]}),e.jsxs(y,{variant:"outline",size:"sm",onClick:()=>G.mutate(),disabled:M,children:[e.jsx(be,{className:`h-4 w-4 mr-2 ${M?"animate-spin":""}`}),"Refresh"]})]})]})}),e.jsx(g,{className:"mb-6",children:e.jsx(j,{className:"pt-6",children:e.jsxs("p",{className:"text-sm cron-muted",children:["Signed in as ",e.jsxs("span",{className:"font-semibold",children:["@",c==null?void 0:c.username]}),". Health checks prefer database freshness over log completion so silent no-work failures surface as degraded or broken. Expanded jobs include deterministic scheduler, log, lock, durable-data, throughput, backlog, and semantic contract evidence with direct operator and run links."]})})}),e.jsx(zs,{data:t}),e.jsxs(Ls,{defaultValue:"critical-jobs",children:[e.jsxs(Xe,{className:"grid h-auto w-full grid-cols-2 sm:w-auto sm:grid-cols-5",children:[e.jsx(U,{value:"critical-jobs",children:"Critical Jobs"}),e.jsx(U,{value:"leaderboard-syncs",children:"Leaderboard Syncs"}),e.jsx(U,{value:"codex-paper-jobs",children:"Codex Paper Jobs"}),e.jsx(U,{value:"catalog-audit",children:"Catalog Audit"}),e.jsx(U,{value:"chat-compute",children:"Chat Compute"})]}),e.jsxs(H,{value:"critical-jobs",className:"mt-6",children:[b&&e.jsxs("div",{className:"flex items-center justify-center py-12",children:[e.jsx(R,{className:"h-8 w-8 animate-spin cron-info-text"}),e.jsx("span",{className:"ml-3 cron-muted",children:"Loading CRON jobs status..."})]}),k&&e.jsx(g,{className:"cron-status--broken",children:e.jsx(j,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(Y,{className:"h-5 w-5"}),e.jsx("p",{children:Z??"Failed to load CRON jobs status. Please try again."})]})})}),t&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-4 mb-6",children:["healthy","degraded","broken","running","stuck","unknown"].map(a=>e.jsxs(g,{children:[e.jsx(f,{className:"pb-2",children:e.jsx(N,{className:"text-sm font-medium cron-muted capitalize",children:a})}),e.jsx(j,{children:e.jsx("div",{className:"text-2xl font-bold",children:t.summary[a]})})]},a))}),t.summary.critical_issues.length>0&&e.jsxs(g,{className:"mb-6 cron-status--broken",children:[e.jsx(f,{children:e.jsxs(N,{className:"flex items-center gap-2",children:[e.jsx(Ae,{className:"h-5 w-5"}),"Critical job issues"]})}),e.jsx(j,{children:e.jsx("ul",{className:"list-disc pl-5 space-y-1 text-sm",children:t.summary.critical_issues.map(a=>e.jsx("li",{children:a},a))})})]}),e.jsxs(g,{className:"mb-8",children:[e.jsx(f,{children:e.jsx(N,{className:"text-base",children:"What to check next"})}),e.jsxs(j,{children:[e.jsx("p",{className:"text-sm cron-muted",children:t.summary.what_to_check_next}),e.jsxs("p",{className:"mt-2 text-xs cron-muted flex items-center gap-2",children:[e.jsx(qe,{className:"h-4 w-4"}),"Last updated: ",v(t.timestamp)," · Health score:"," ",t.summary.health_score.toFixed(0),"%"]})]})]}),e.jsxs(g,{className:`mb-8 ${t.summary.coverage.coverage_gaps?"cron-status--broken":""}`,children:[e.jsxs(f,{children:[e.jsx(N,{className:"text-base",children:"Coverage"}),e.jsx(P,{children:"Registry and deployed scheduler inventory"})]}),e.jsxs(j,{className:"grid grid-cols-2 md:grid-cols-4 gap-4 text-sm",children:[e.jsxs("div",{children:[e.jsx("span",{className:"cron-label",children:"Registered"}),e.jsx("div",{className:"text-2xl font-bold",children:t.summary.coverage.registered_scheduled_duties})]}),e.jsxs("div",{children:[e.jsx("span",{className:"cron-label",children:"Discovered"}),e.jsx("div",{className:"text-2xl font-bold",children:t.summary.coverage.discovered_scheduled_duties})]}),e.jsxs("div",{children:[e.jsx("span",{className:"cron-label",children:"Monitored"}),e.jsx("div",{className:"text-2xl font-bold",children:t.summary.coverage.monitored_duties})]}),e.jsxs("div",{children:[e.jsx("span",{className:"cron-label",children:"Gaps"}),e.jsx("div",{className:"text-2xl font-bold",children:t.summary.coverage.coverage_gaps})]})]})]}),e.jsxs(g,{className:"mb-8",children:[e.jsxs(f,{children:[e.jsx(N,{className:"text-xl",children:"Critical jobs"}),e.jsx(P,{children:"Writers whose stale output breaks the live site"})]}),e.jsx(j,{className:"space-y-4",children:le.map(q)})]}),e.jsx("div",{className:"space-y-6",children:se.map(a=>e.jsxs(g,{children:[e.jsx(f,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(N,{className:"text-xl capitalize flex items-center gap-2",children:[e.jsx(I,{className:ge(Fe[a]??Fe.hourly),children:a}),e.jsx("span",{children:"Supporting jobs"})]}),e.jsxs(P,{children:[A[a].length," job",A[a].length!==1?"s":""]})]})}),e.jsx(j,{className:"space-y-4",children:A[a].map(q)})]},a))}),Q.length>0&&e.jsxs(g,{className:"mt-6",children:[e.jsxs(f,{children:[e.jsx(N,{className:"text-xl",children:"Manual operations"}),e.jsx(P,{children:"Visible invocation history; excluded from scheduled health and coverage"})]}),e.jsx(j,{className:"space-y-4",children:Q.map(q)})]})]})]}),e.jsxs(H,{value:"leaderboard-syncs",className:"mt-6",children:[b&&e.jsxs("div",{className:"flex items-center justify-center py-12",children:[e.jsx(R,{className:"h-8 w-8 animate-spin cron-info-text"}),e.jsx("span",{className:"ml-3 cron-muted",children:"Loading leaderboard sync status..."})]}),k&&e.jsx(g,{className:"cron-status--broken",children:e.jsx(j,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(Y,{className:"h-5 w-5"}),e.jsx("p",{children:Z??"Failed to load leaderboard sync status. Please try again."})]})})}),t&&e.jsxs(g,{children:[e.jsx(f,{children:e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx(N,{className:"text-xl",children:"Leaderboard syncs"}),e.jsx(P,{children:"Recurring imports from externally maintained benchmark leaderboards"})]}),e.jsxs(I,{children:[T.length," jobs"]})]})}),e.jsx(j,{className:"space-y-4",children:T.map(q)})]})]}),e.jsx(H,{value:"codex-paper-jobs",className:"mt-6",children:e.jsx(Bs,{autoRefresh:n})}),e.jsx(H,{value:"catalog-audit",className:"mt-6",children:e.jsx(Hs,{})}),e.jsxs(H,{value:"chat-compute",className:"mt-6",children:[e.jsxs(g,{className:"mb-6",children:[e.jsxs(f,{children:[e.jsx(N,{children:"Environment record"}),e.jsx(P,{children:"Leave blank for live staging, or enter the isolated environment printed by the spend qualification command."})]}),e.jsxs(j,{className:"flex gap-2",children:[e.jsx("input",{"aria-label":"Chat compute environment record",value:i,onChange:a=>o(a.target.value),placeholder:"staging-q-example",className:"flex-1 rounded border px-3 py-2"}),e.jsx(y,{onClick:()=>_(i.trim()),children:"Load"})]})]}),e.jsx(Ws,{data:O.data,loading:O.isLoading,error:O.error}),s&&e.jsx("div",{className:"mt-6",children:e.jsx(Ks,{data:u.data,loading:u.isLoading,error:u.error})})]})]})]})})};export{Ws as ChatComputePanel,zs as CronSnapshotNotice,Gs as cronStatusRefetchInterval,ga as default};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/CronDashboard-kqcQ1rzf.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import{s as O,d as h,M as is,A as cs,j as e,z as ie,af as ls,R as ds,N as os,D as oe,P as ms,F as us,O as Ae,G as L,b as G,I as $,i as xe,U as Re,L as pe,a as hs,q as xs}from"./index-DyXq7-Tg.js";import{u as P}from"./useMutation-UWxBeqtn.js";import{t as ge,f as v,a as S,S as Te,o as ue,C as g,b as N,c as b,d as F,e as j,g as C}from"./CronDashboard-qYV75PLc.js";import{B as I}from"./badge-e6t3GCyf.js";import{B as y}from"./button-DZeAbOf2.js";import{C as ps,a as gs}from"./chevron-up-DYSYRyvz.js";import{D as fe}from"./database-DflzbaZ5.js";import{T as js}from"./trending-up-OM6wBVvQ.js";import{A as ne}from"./activity-S-FQ6Anu.js";import{F as Ne}from"./file-text-dvKtHbmD.js";import{T as Ee,I as vs}from"./triangle-alert-uZ3fXFkp.js";import{E as Y}from"./external-link-orY1Xz1I.js";import{C as Z,R as be}from"./refresh-cw-DYXzpRir.js";import{L as R}from"./loader-circle-C75KLEgx.js";import{C as je}from"./circle-check-GGlu5UCV.js";import{c as M,A as _s}from"./codex-DFj4KHqP.js";import{u as fs}from"./useInfiniteQuery-BYh2zN-T.js";import{p as Me}from"./paperEdits-CIjFYfYE.js";import{c as me}from"./catalog-CRar2olQ.js";import{c as ye}from"./chat-Ix1IrIwq.js";/**
|
| 2 |
+
* @license lucide-react v0.462.0 - ISC
|
| 3 |
+
*
|
| 4 |
+
* This source code is licensed under the ISC license.
|
| 5 |
+
* See the LICENSE file in the root directory of this source tree.
|
| 6 |
+
*/const we=O("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
|
| 7 |
+
* @license lucide-react v0.462.0 - ISC
|
| 8 |
+
*
|
| 9 |
+
* This source code is licensed under the ISC license.
|
| 10 |
+
* See the LICENSE file in the root directory of this source tree.
|
| 11 |
+
*/const Ns=O("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
| 12 |
+
* @license lucide-react v0.462.0 - ISC
|
| 13 |
+
*
|
| 14 |
+
* This source code is licensed under the ISC license.
|
| 15 |
+
* See the LICENSE file in the root directory of this source tree.
|
| 16 |
+
*/const bs=O("CirclePlay",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]]);/**
|
| 17 |
+
* @license lucide-react v0.462.0 - ISC
|
| 18 |
+
*
|
| 19 |
+
* This source code is licensed under the ISC license.
|
| 20 |
+
* See the LICENSE file in the root directory of this source tree.
|
| 21 |
+
*/const ys=O("CircleSlash2",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M22 2 2 22",key:"y4kqgn"}]]);/**
|
| 22 |
+
* @license lucide-react v0.462.0 - ISC
|
| 23 |
+
*
|
| 24 |
+
* This source code is licensed under the ISC license.
|
| 25 |
+
* See the LICENSE file in the root directory of this source tree.
|
| 26 |
+
*/const ws=O("Clock3",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16.5 12",key:"1aq6pp"}]]);/**
|
| 27 |
+
* @license lucide-react v0.462.0 - ISC
|
| 28 |
+
*
|
| 29 |
+
* This source code is licensed under the ISC license.
|
| 30 |
+
* See the LICENSE file in the root directory of this source tree.
|
| 31 |
+
*/const qe=O("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
| 32 |
+
* @license lucide-react v0.462.0 - ISC
|
| 33 |
+
*
|
| 34 |
+
* This source code is licensed under the ISC license.
|
| 35 |
+
* See the LICENSE file in the root directory of this source tree.
|
| 36 |
+
*/const ks=O("FileClock",[["path",{d:"M16 22h2a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3",key:"37hlfg"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"8",cy:"16",r:"6",key:"10v15b"}],["path",{d:"M9.5 17.5 8 16.25V14",key:"1o80t2"}]]);var ce="Tabs",[Cs]=us(ce,[Ae]),De=Ae(),[Ss,ve]=Cs(ce),Ie=h.forwardRef((s,r)=>{const{__scopeTabs:t,value:c,onValueChange:i,defaultValue:d,orientation:o="horizontal",dir:_,activationMode:x="automatic",...u}=s,p=is(_),[n,f]=cs({prop:c,onChange:i,defaultProp:d??"",caller:ce});return e.jsx(Ss,{scope:t,baseId:ls(),value:n,onValueChange:f,orientation:o,dir:p,activationMode:x,children:e.jsx(ie.div,{dir:p,"data-orientation":o,...u,ref:r})})});Ie.displayName=ce;var Oe="TabsList",Je=h.forwardRef((s,r)=>{const{__scopeTabs:t,loop:c=!0,...i}=s,d=ve(Oe,t),o=De(t);return e.jsx(ds,{asChild:!0,...o,orientation:d.orientation,dir:d.dir,loop:c,children:e.jsx(ie.div,{role:"tablist","aria-orientation":d.orientation,...i,ref:r})})});Je.displayName=Oe;var Be="TabsTrigger",Ue=h.forwardRef((s,r)=>{const{__scopeTabs:t,value:c,disabled:i=!1,...d}=s,o=ve(Be,t),_=De(t),x=ze(o.baseId,c),u=Ke(o.baseId,c),p=c===o.value;return e.jsx(os,{asChild:!0,..._,focusable:!i,active:p,children:e.jsx(ie.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":u,"data-state":p?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:x,...d,ref:r,onMouseDown:oe(s.onMouseDown,n=>{!i&&n.button===0&&n.ctrlKey===!1?o.onValueChange(c):n.preventDefault()}),onKeyDown:oe(s.onKeyDown,n=>{[" ","Enter"].includes(n.key)&&o.onValueChange(c)}),onFocus:oe(s.onFocus,()=>{const n=o.activationMode!=="manual";!p&&!i&&n&&o.onValueChange(c)})})})});Ue.displayName=Be;var He="TabsContent",We=h.forwardRef((s,r)=>{const{__scopeTabs:t,value:c,forceMount:i,children:d,...o}=s,_=ve(He,t),x=ze(_.baseId,c),u=Ke(_.baseId,c),p=c===_.value,n=h.useRef(p);return h.useEffect(()=>{const f=requestAnimationFrame(()=>n.current=!1);return()=>cancelAnimationFrame(f)},[]),e.jsx(ms,{present:i||p,children:({present:f})=>e.jsx(ie.div,{"data-state":p?"active":"inactive","data-orientation":_.orientation,role:"tabpanel","aria-labelledby":x,hidden:!f,id:u,tabIndex:0,...o,ref:r,style:{...s.style,animationDuration:n.current?"0s":void 0},children:f&&d})})});We.displayName=He;function ze(s,r){return`${s}-trigger-${r}`}function Ke(s,r){return`${s}-content-${r}`}var $s=Ie,Ge=Je,Qe=Ue,Ve=We;const Ls=$s,Xe=h.forwardRef(({className:s,...r},t)=>e.jsx(Ge,{ref:t,className:L("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",s),...r}));Xe.displayName=Ge.displayName;const H=h.forwardRef(({className:s,...r},t)=>e.jsx(Qe,{ref:t,className:L("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",s),...r}));H.displayName=Qe.displayName;const W=h.forwardRef(({className:s,...r},t)=>e.jsx(Ve,{ref:t,className:L("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",s),...r}));W.displayName=Ve.displayName;function A({tone:s,className:r,...t}){return e.jsx(I,{variant:"outline",className:L(ge(s),r),...t})}function te(s){return s==null?"N/A":s<60?`${s.toFixed(1)}s`:s<3600?`${(s/60).toFixed(1)}m`:`${(s/3600).toFixed(1)}h`}function Ye(s){return s.available?s.status==="completed"?s.conclusion??"completed":s.status??"unknown":"Unavailable"}function X(s){return s.replace(/_/g," ").replace(/\b\w/g,r=>r.toUpperCase())}function ke({title:s,budget:r,profile:t}){const c=r.cost_policy==="unmetered_hf"||r.budget_enforced===!1,i=Math.min(100,r.current_exposure_usd/r.ceiling_usd*100),d=c?"Unmetered HF":r.affordable_jobs===0&&r.desired_jobs>0?"No shard fits":r.affordable_jobs<r.desired_jobs?`${r.affordable_jobs} of ${r.desired_jobs} planned shards fit`:`${r.affordable_jobs} planned ${r.affordable_jobs===1?"shard fits":"shards fit"}`;return e.jsxs("div",{className:`cron-metric-card space-y-3 ${r.can_launch_planned?"":"cron-status--broken"}`,children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"font-semibold",children:s}),e.jsx("div",{className:"text-xs cron-muted",children:r.window==="rolling_30_days"?"Rolling 30-day window":"All history · no automatic reset"})]}),e.jsx(A,{tone:r.can_launch_planned?"healthy":"broken",children:d})]}),!c&&e.jsx("div",{role:"progressbar","aria-label":`${s} current budget exposure`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(i),className:"h-2 rounded bg-muted",children:e.jsx("div",{className:"h-2 rounded bg-primary",style:{width:`${i}%`}})}),e.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3 text-sm",children:[e.jsxs("div",{children:[e.jsx("span",{className:"cron-label",children:"Completed-job estimate"}),e.jsx("div",{children:S(r.spent_usd)})]}),e.jsxs("div",{children:[e.jsx("span",{className:"cron-label",children:"Active reservations"}),e.jsx("div",{children:S(r.active_reserved_usd)})]}),e.jsxs("div",{children:[e.jsx("span",{className:"cron-label",children:"Current exposure"}),e.jsx("div",{children:S(r.current_exposure_usd)})]}),e.jsxs("div",{children:[e.jsx("span",{className:"cron-label",children:"Admission policy"}),e.jsx("div",{children:c?"HF-owned · no monetary gate":`${S(r.ceiling_usd)} cap · ${S(r.headroom_usd)} headroom`})]}),e.jsxs("div",{children:[e.jsx("span",{className:"cron-label",children:"Affordable plan reserves"}),e.jsx("div",{children:S(r.planned_reserved_usd)})]}),e.jsxs("div",{children:[e.jsx("span",{className:"cron-label",children:"Projected exposure"}),e.jsx("div",{children:S(r.projected_usd)})]}),e.jsxs("div",{children:[e.jsx("span",{className:"cron-label",children:"Rate assumption"}),e.jsxs("div",{children:[S(r.hourly_rate_usd),"/hour · ",r.reservation_hours_per_job,"h"]})]}),e.jsxs("div",{children:[e.jsx("span",{className:"cron-label",children:"Next admission"}),e.jsx("div",{children:c?"Now, subject to capacity":r.next_admission_at?v(r.next_admission_at):r.affordable_jobs>0?"Now":"No scheduled admission"})]}),e.jsxs("div",{children:[e.jsx("span",{className:"cron-label",children:"Unknown terminal reserve"}),e.jsxs("div",{children:[S(r.unknown_terminal_reservation_usd??0)," · ",(r.unknown_terminal_reservation_count??0).toLocaleString()," jobs"]})]})]}),t&&e.jsxs("div",{className:"text-xs cron-muted",children:["Profile ",e.jsx("strong",{children:t.profile_id})," · max ",t.max_papers.toLocaleString()," papers · hard ",te(t.hard_timeout_seconds)," · soft ",te(t.soft_deadline_seconds)]}),e.jsx("p",{className:"text-xs cron-muted",children:c?"HF owns this workload, so monetary admission is disabled; concurrency and timeout limits still apply. Runtime cost remains an operational estimate.":"Projected exposure is an admission-control estimate, not a provider invoice. Each launch reserves the full timeout until actual runtime is known."})]})}const Ps={healthy:je,degraded:Ee,broken:Z,running:R,stuck:Z,unknown:Ns};function Fs({status:s,isRunning:r}){const t=r?"running":s,c=Ps[t];return e.jsx(c,{className:`cron-status-icon ${ge(t)}${t==="running"?" animate-spin":""}`})}function Ce({label:s,axis:r}){return e.jsxs(A,{tone:r.status,title:r.reason,children:[s,": ",r.status]})}function Se({icon:s,title:r,metrics:t}){return e.jsxs("div",{children:[e.jsxs("div",{className:"cron-section-heading",children:[e.jsx(s,{className:"h-4 w-4"}),e.jsx("h4",{children:r})]}),e.jsx("div",{className:"grid grid-cols-2 gap-3",children:Object.entries(t).map(([c,i])=>e.jsxs("div",{className:"cron-metric-card",children:[e.jsx("div",{className:"cron-label",children:X(c)}),e.jsx("div",{className:"text-lg font-semibold",children:typeof i=="number"?i.toLocaleString():i})]},c))})]})}function As({workflow:s}){return e.jsxs("div",{children:[e.jsxs("div",{className:"cron-section-heading",children:[e.jsx(ne,{className:"h-4 w-4"}),e.jsx("h4",{children:"GitHub Actions"})]}),e.jsxs("div",{className:"cron-metric-card space-y-2 text-sm",children:[[["Workflow",s.workflow_file],["Run",s.run_id??"N/A"],["Status",Ye(s)],...s.updated_at?[["Updated",v(s.updated_at)]]:[]].map(([r,t])=>e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx("span",{className:"cron-label",children:r}),e.jsx("span",{className:r==="Workflow"?"font-mono text-xs":void 0,children:t})]},r)),s.failed_jobs&&s.failed_jobs.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"cron-label mb-1",children:"Failed jobs"}),e.jsx("div",{className:"flex gap-2 flex-wrap",children:s.failed_jobs.map(r=>e.jsx(A,{tone:"broken",children:r},r))})]}),s.job_conclusions&&Object.keys(s.job_conclusions).length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"cron-label mb-1",children:"Job conclusions"}),e.jsx("div",{className:"flex gap-2 flex-wrap",children:Object.entries(s.job_conclusions).map(([r,t])=>e.jsxs(I,{variant:"outline",children:[r,": ",t??"running"]},r))})]}),(s.error||s.view_error)&&e.jsx("div",{className:"cron-message cron-message--error",children:s.error??s.view_error})]})]})}const Rs={COMPLETED:"healthy",ERROR:"broken",CANCELED:"broken",RUNNING:"running"},$e={success:"healthy",partial:"degraded",interrupted:"degraded",infrastructure_failure:"broken",worker_failure:"broken",active:"running"};function Ts({job:s}){const r=s.progress,t=(r==null?void 0:r.omitted_images)??0,c=r!=null&&r.total_papers?Math.min(100,r.processed_papers/r.total_papers*100):0;return e.jsxs("div",{className:"cron-metric-card space-y-3",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"font-semibold",children:[s.mode??"unknown"," · shard ",s.shard_id??"N/A"," · attempt ",s.provider_attempt??1]}),e.jsx("div",{className:"font-mono text-xs cron-muted truncate",children:s.id})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(A,{tone:Rs[s.stage]??"unknown",children:s.stage.toLowerCase()}),s.effective_outcome&&e.jsxs(A,{tone:$e[s.effective_outcome]??"unknown",children:["output: ",s.effective_outcome.replace(/_/g," ")]}),s.failure_cause&&e.jsxs(A,{tone:$e[s.effective_outcome??""]??"unknown",children:["cause: ",s.failure_cause.replace(/_/g," ")]}),s.url&&e.jsx("a",{href:s.url,target:"_blank",rel:"noreferrer","aria-label":`Open Hugging Face Job ${s.id}`,className:"cron-info-text",children:e.jsx(Y,{className:"h-4 w-4"})})]})]}),r?e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between gap-3 text-xs cron-muted mb-1",children:[e.jsxs("span",{children:[r.processed_papers.toLocaleString()," / ",r.total_papers.toLocaleString()," papers"]}),e.jsxs("span",{children:[c.toFixed(0),"%"]})]}),e.jsx("div",{className:"cron-progress-track",children:e.jsx("div",{className:"cron-progress-value",style:{width:`${c}%`}})})]}),e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-2 text-sm",children:[e.jsxs("span",{children:[e.jsx("strong",{children:r.succeeded_papers.toLocaleString()})," succeeded"]}),e.jsxs("span",{children:[e.jsx("strong",{children:r.failed_papers.toLocaleString()})," failed"]}),e.jsxs("span",{children:[e.jsx("strong",{children:r.already_existed_papers.toLocaleString()})," skipped"]}),e.jsxs("span",{children:[e.jsx("strong",{children:r.extracted_images.toLocaleString()})," images"]})]}),t>0&&e.jsxs("div",{className:"text-xs cron-muted",children:[e.jsx("strong",{children:t.toLocaleString()})," unresolved image references omitted after final retry"]}),r.updated_at&&e.jsxs("div",{className:"text-xs cron-muted",children:["Progress updated ",v(r.updated_at)]}),(r.fatal_error||r.error_samples.length>0)&&e.jsxs("div",{className:"cron-message cron-message--error space-y-1",children:[r.fatal_error&&e.jsx("div",{children:r.fatal_error}),r.error_samples.map(i=>e.jsxs("div",{children:[e.jsx("span",{className:"font-mono",children:i.arxiv_id}),": ",i.error]},`${i.arxiv_id}:${i.error}`))]})]}):e.jsx("div",{className:"text-sm cron-muted",children:"Waiting for the shard progress checkpoint."}),e.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-1 text-xs cron-muted",children:[s.hardware&&e.jsx("span",{children:s.hardware}),s.created_at&&e.jsxs("span",{children:["Created ",v(s.created_at)]}),s.duration_seconds!=null&&e.jsxs("span",{children:["Duration ",te(s.duration_seconds)]})]}),s.stage_message&&e.jsx("div",{className:"cron-message cron-message--warning",children:s.stage_message})]})}function Es({monitor:s,loading:r,error:t}){var c,i;return e.jsxs("div",{className:"md:col-span-2",children:[e.jsxs("div",{className:"cron-section-heading",children:[e.jsx(vs,{className:"h-4 w-4"}),e.jsx("h4",{children:"Hugging Face OCR shards"})]}),r&&e.jsxs("div",{className:"cron-metric-card flex items-center gap-2 text-sm cron-muted",children:[e.jsx(R,{className:"h-4 w-4 animate-spin"})," Loading remote Jobs…"]}),!!t&&e.jsx("div",{className:"cron-message cron-message--error",children:"Could not load Hugging Face Jobs."}),s&&!s.available&&e.jsx("div",{className:"cron-message cron-message--warning",children:s.error??"Hugging Face monitoring is unavailable."}),(s==null?void 0:s.available)&&e.jsxs(e.Fragment,{children:[s.budgets.live&&s.budgets.backfill&&e.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-3 mb-3",children:[e.jsx(ke,{title:"Live paper Markdown GPU policy",budget:s.budgets.live,profile:(c=s.selected_profiles)==null?void 0:c.live}),e.jsx(ke,{title:"Full backfill GPU policy",budget:s.budgets.backfill,profile:(i=s.selected_profiles)==null?void 0:i.backfill})]}),e.jsxs("div",{className:`cron-message mb-3 ${(s.summary.unresolved_mount_failures??0)>0?"cron-message--error":""}`,children:[e.jsx("strong",{children:"Logical shard health:"})," ",(s.summary.logical_shards??0).toLocaleString()," logical shards / ",(s.summary.provider_attempts??0).toLocaleString()," provider attempts · ",(s.summary.recovered_mount_failures??0).toLocaleString()," recovered mount failures · ",(s.summary.unresolved_mount_failures??0).toLocaleString()," unresolved"]}),e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3 mb-3",children:Object.entries(s.summary).map(([d,o])=>e.jsxs("div",{className:"cron-metric-card",children:[e.jsx("div",{className:"cron-label",children:X(d)}),e.jsx("div",{className:"text-lg font-semibold",children:o.toLocaleString()})]},d))}),e.jsx("p",{className:"text-xs cron-muted mb-3",children:"Efficiency and backlog-clearance costs are admission-control estimates, not provider invoices."}),s.coverage&&Object.keys(s.coverage).length>0&&e.jsx("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-3 mb-3",children:Object.values(s.coverage).map(d=>e.jsxs("div",{className:"cron-metric-card space-y-2 text-sm",children:[e.jsx("div",{className:"font-semibold",children:d.scope==="full"?"Full catalog coverage":"Recent 14-day coverage"}),e.jsxs("div",{className:"text-lg font-semibold",children:[d.coverage_percentage.toFixed(2),"%"]}),e.jsxs("div",{children:[d.canonical_markdown_count.toLocaleString()," canonical / ",d.eligible_papers.toLocaleString()," eligible · ",d.missing_count.toLocaleString()," missing"]}),e.jsxs("div",{className:"cron-muted",children:["Copied from upstream this reconciliation: ",d.copied_from_upstream_count.toLocaleString()]}),e.jsxs("div",{className:"cron-muted",children:["7-day Δ eligible ",d.eligible_delta_7d??"collecting"," · canonical ",d.canonical_delta_7d??"collecting"," · missing ",d.missing_delta_7d??"collecting"]})]},d.scope))}),s.jobs.length===0?e.jsx("div",{className:"cron-metric-card text-sm cron-muted",children:"No OCR shards have been launched yet."}):e.jsx("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-3",children:s.jobs.map(d=>e.jsx(Ts,{job:d},d.id))})]})]})}function Ms({job:s,expanded:r,onToggle:t,autoRefresh:c=!1}){var p;const i=!!(s.work_metrics&&Object.keys(s.work_metrics).length),d=!!(s.db_metrics&&Object.keys(s.db_metrics).length),o=s.job_name==="paper_markdown_backfill",_=G({queryKey:$.paperMarkdownJobs,queryFn:()=>ue.getPaperMarkdownJobs(),enabled:o,refetchInterval:c?3e4:!1,retry:!1}),x=o?(p=_.data)==null?void 0:p.budgets.live:void 0,u=(x==null?void 0:x.cost_policy)==="unmetered_hf"||(x==null?void 0:x.budget_enforced)===!1;return e.jsxs("div",{className:"cron-job-card",children:[e.jsx("button",{type:"button",className:"cron-job-summary",onClick:t,"aria-expanded":r,children:e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"flex items-start gap-3 flex-1 min-w-0",children:[e.jsx(Fs,{status:s.status,isRunning:s.is_running}),e.jsxs("div",{className:"flex-1 min-w-0 text-left",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1 flex-wrap",children:[e.jsx("h3",{className:"font-semibold",children:s.display_name}),s.critical&&e.jsx(I,{variant:"outline",className:"text-[10px] uppercase tracking-wide",children:"Critical"}),s.lock_stale&&e.jsx(A,{tone:"broken",children:"Held lock"}),e.jsx(Ce,{label:"Execution",axis:s.execution_health}),e.jsx(Ce,{label:"Output",axis:s.output_health}),r?e.jsx(ps,{className:"h-4 w-4 cron-muted"}):e.jsx(gs,{className:"h-4 w-4 cron-muted"})]}),e.jsx("p",{className:"text-sm cron-muted mb-2",children:s.status_reason}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-2 text-sm cron-muted",children:[e.jsxs("span",{className:"cron-fact",children:[e.jsx(qe,{}),"Log: ",v(s.last_run)]}),e.jsxs("span",{className:"cron-fact",children:[e.jsx(fe,{}),"DB: ",v(s.last_db_write)]}),s.recent_write_count!=null&&e.jsxs("span",{className:"cron-fact",children:[e.jsx(js,{}),"Recent writes: ",s.recent_write_count.toLocaleString()]}),s.duration!=null&&e.jsxs("span",{className:"cron-fact",children:[e.jsx(ne,{}),"Duration: ",te(s.duration)]}),s.schedule&&e.jsxs("span",{className:"cron-fact md:col-span-2",children:[e.jsx(we,{}),e.jsx("span",{className:"font-mono text-xs",children:s.schedule})]}),s.log_status&&e.jsxs("span",{className:"cron-fact",children:[e.jsx(Ne,{}),"Log status: ",s.log_status]}),s.workflow_status&&e.jsxs("span",{className:"cron-fact",children:[e.jsx(ne,{}),"Actions: ",Ye(s.workflow_status)]})]}),s.work_summary&&e.jsx("div",{className:"cron-message",children:s.work_summary}),s.error&&e.jsxs("div",{className:"cron-message cron-message--error",children:[e.jsx("strong",{children:"Error: "}),s.error]}),s.diagnostics&&e.jsx("div",{className:"cron-message cron-message--warning",children:s.diagnostics}),x&&e.jsxs("div",{className:`cron-message ${x.can_launch_planned?"":"cron-message--error"}`,children:[e.jsx("strong",{children:"Live GPU policy:"})," ",u?"unmetered on HF":`${S(x.current_exposure_usd)} current / ${S(x.ceiling_usd)} cap`," · ",x.affordable_jobs," of ",x.desired_jobs," planned",u?"":` · projects ${S(x.projected_usd)} · rolling 30 days`]})]})]}),e.jsx(A,{tone:s.status,children:s.status})]})}),r&&e.jsx("div",{className:"cron-job-details",children:e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"cron-section-heading",children:[e.jsx(we,{className:"h-4 w-4"}),e.jsx("h4",{children:"Scheduler evidence"})]}),e.jsx("div",{className:"cron-metric-card space-y-2 text-sm",children:[["Scheduler",s.execution_health.scheduler??"unknown"],["Last expected",v(s.execution_health.last_expected_at??null)],["Last started",v(s.execution_health.last_started_at??null)],["Last completed",v(s.execution_health.last_completed_at??null)],["Next expected",v(s.execution_health.next_expected_at??null)]].map(([n,f])=>e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx("span",{className:"cron-label",children:n}),e.jsx("span",{children:f})]},n))})]}),s.work_metrics&&i&&e.jsx(Se,{icon:Ne,title:"Log Metrics",metrics:s.work_metrics}),s.db_metrics&&d&&e.jsx(Se,{icon:fe,title:"Database Metrics",metrics:s.db_metrics}),s.workflow_status&&e.jsx(As,{workflow:s.workflow_status}),o&&e.jsx(Es,{monitor:_.data,loading:_.isLoading,error:_.error}),s.diagnostic_groups&&Object.values(s.diagnostic_groups).some(n=>n.length>0)&&e.jsxs("div",{className:"md:col-span-2",children:[e.jsxs("div",{className:"cron-section-heading",children:[e.jsx(Ee,{className:"h-4 w-4"}),e.jsx("h4",{children:"Diagnostics by cause"})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:Object.entries(s.diagnostic_groups).filter(([,n])=>n.length>0).map(([n,f])=>e.jsxs("div",{className:"cron-metric-card",children:[e.jsx("div",{className:"cron-label mb-1",children:X(n)}),e.jsx("ul",{className:"list-disc pl-4 text-sm space-y-1",children:f.map(k=>e.jsx("li",{children:k},k))})]},n))})]}),s.health_findings&&s.health_findings.some(n=>n.state!=="healthy")&&e.jsxs("div",{className:"md:col-span-2",children:[e.jsxs("div",{className:"cron-section-heading",children:[e.jsx(Te,{className:"h-4 w-4"}),e.jsx("h4",{children:"Deterministic contract findings"})]}),e.jsxs("div",{className:"cron-metric-card space-y-3 text-sm",children:[s.health_findings.filter(n=>n.state!=="healthy").map(n=>e.jsxs("div",{children:[e.jsx(A,{tone:n.state,children:n.state})," ",e.jsx("strong",{children:X(n.contract)}),": ",n.summary,Object.entries(n.evidence).length>0&&e.jsx("div",{className:"mt-1 text-xs cron-muted",children:Object.entries(n.evidence).map(([f,k])=>e.jsxs("span",{className:"mr-3",children:[X(f),": ",String(k)]},f))})]},`${n.plane}-${n.contract}`)),e.jsxs("div",{className:"flex gap-4",children:[s.operator_url&&e.jsxs("a",{className:"cron-info-text inline-flex items-center gap-1",href:s.operator_url,children:["Open operator ",e.jsx(Y,{className:"h-3.5 w-3.5"})]}),s.run_url&&e.jsxs("a",{className:"cron-info-text inline-flex items-center gap-1",href:s.run_url,target:"_blank",rel:"noreferrer",children:["Open run ",e.jsx(Y,{className:"h-3.5 w-3.5"})]})]})]})]})]})})]})}const Ze=h.forwardRef(({className:s,...r},t)=>e.jsx("div",{className:"relative w-full overflow-auto",children:e.jsx("table",{ref:t,className:L("w-full caption-bottom text-sm",s),...r})}));Ze.displayName="Table";const es=h.forwardRef(({className:s,...r},t)=>e.jsx("thead",{ref:t,className:L("[&_tr]:border-b",s),...r}));es.displayName="TableHeader";const ss=h.forwardRef(({className:s,...r},t)=>e.jsx("tbody",{ref:t,className:L("[&_tr:last-child]:border-0",s),...r}));ss.displayName="TableBody";const qs=h.forwardRef(({className:s,...r},t)=>e.jsx("tfoot",{ref:t,className:L("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",s),...r}));qs.displayName="TableFooter";const he=h.forwardRef(({className:s,...r},t)=>e.jsx("tr",{ref:t,className:L("border-b transition-colors data-[state=selected]:bg-muted hover:bg-muted/50",s),...r}));he.displayName="TableRow";const z=h.forwardRef(({className:s,...r},t)=>e.jsx("th",{ref:t,className:L("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",s),...r}));z.displayName="TableHead";const K=h.forwardRef(({className:s,...r},t)=>e.jsx("td",{ref:t,className:L("p-4 align-middle [&:has([role=checkbox])]:pr-0",s),...r}));K.displayName="TableCell";const Ds=h.forwardRef(({className:s,...r},t)=>e.jsx("caption",{ref:t,className:L("mt-4 text-sm text-muted-foreground",s),...r}));Ds.displayName="TableCaption";const as={queued:"unknown",dispatching:"running",running:"running",completed:"healthy",failed:"broken",canceled:"unknown",awaiting_markdown:"unknown"},rs={queued:"queued",dispatching:"dispatching",running:"running",completed:"completed",failed:"failed",canceled:"canceled",awaiting_markdown:"waiting for Markdown"},Le={"add-evals":"Add evals","enrich-paper":"Enrich paper","resolve-model-paper":"Resolve model release","review-benchmark-gaps":"Review benchmark gaps","add-benchmark":"Add benchmark"},Is={queued:ws,dispatching:R,running:bs,completed:je,failed:Z,canceled:ys,awaiting_markdown:ks};function Os({status:s}){const r=Is[s];return e.jsxs(A,{tone:as[s],children:[e.jsx(r,{className:`mr-1 h-3.5 w-3.5 ${s==="dispatching"?"animate-spin":""}`}),rs[s]]})}function Js(s){return s.status==="awaiting_markdown"?_s:s.error?s.error:s.report?s.report:s.status==="completed"&&s.applied_at?"Changes applied to the paper.":s.status==="completed"?"Completed without a recorded mutation.":null}function Pe({mutationResult:s}){const r=s==null?void 0:s.skipped_configured_leaderboards;return!Array.isArray(r)||r.length===0?null:e.jsxs("div",{className:"mt-2 rounded border border-amber-500 bg-amber-50 p-2 text-xs text-amber-900",children:[e.jsxs("div",{className:"font-medium",children:["Skipped configured leaderboards (",r.length,")"]}),e.jsx("ul",{className:"mt-1 list-disc space-y-1 pl-4",children:r.map((t,c)=>e.jsxs("li",{children:[t.benchmark," · ",t.disposition," · task ",t.task_id," / dataset ",t.dataset_id,t.metric?` / ${t.metric}`:"",t.value!=null?` = ${t.value}`:"",t.detail?` — ${t.detail}`:""]},c))})]})}function Bs({autoRefresh:s}){var D;const r=xe(),[t,c]=h.useState(""),[i,d]=h.useState(""),[o,_]=h.useState(""),[x,u]=h.useState(""),[p,n]=h.useState(""),[f,k]=h.useState({}),J={trigger:t,status:i,policy_version:o,cohort_date:x,review_status:p},{data:m,isLoading:Q,isFetching:ee,error:B}=G({queryKey:[...$.codexPaperJobs,J],queryFn:()=>M.listJobs(100,J),refetchInterval:s?1e4:!1,retry:!1}),T=()=>r.invalidateQueries({queryKey:$.codexPaperJobs}),se=P({mutationFn:a=>M.retryJob(a),onSuccess:T}),le=P({mutationFn:a=>M.cancelJob(a),onSuccess:T}),de=P({mutationFn:a=>M.retryTrace(a),onSuccess:T}),V=P({mutationFn:a=>M.setScheduler(a),onSuccess:T}),q=P({mutationFn:({id:a,dataset:l,task:w,metric:re})=>M.promoteBenchmarkCandidate(a,{dataset_id:Number(l),task_id:Number(w),best_metric:re.trim()}),onSuccess:T}),E=P({mutationFn:a=>M.rollbackBenchmarkCandidate(a),onSuccess:T}),ae=B instanceof Re&&B.status===404;return e.jsxs(g,{className:"mb-8",children:[e.jsx(N,{children:e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx(b,{className:"text-xl",children:"Codex paper jobs"}),e.jsx(F,{children:"Durable queue, two-stage daily workflows, traces, and benchmark-gap follow-up"})]}),ee&&!Q&&e.jsxs("span",{className:"flex items-center gap-2 text-xs cron-muted",children:[e.jsx(R,{className:"h-3.5 w-3.5 animate-spin"})," Syncing with Hugging Face"]})]})}),e.jsxs(j,{children:[Q&&e.jsxs("div",{className:"flex items-center justify-center py-10 cron-muted",children:[e.jsx(R,{className:"mr-2 h-5 w-5 animate-spin"})," Loading paper jobs…"]}),B&&!ae&&e.jsx("div",{className:"cron-message cron-message--error mb-4",children:B.message}),ae&&e.jsx("p",{className:"py-4 text-sm cron-muted",children:"Codex paper jobs are not enabled in this environment."}),m&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:`cron-message mb-5 ${m.scheduler.paused_at?"cron-message--error":""}`,children:e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[e.jsxs("div",{children:[e.jsxs("strong",{children:["Scheduled dispatch: ",m.scheduler.paused_at?"paused":m.scheduler.dispatch_enabled?"enabled":"disabled"]}),m.scheduler.pause_reason&&e.jsx("div",{className:"mt-1 text-xs",children:m.scheduler.pause_reason}),e.jsxs("div",{className:"mt-1 text-xs cron-muted",children:["Canary ",m.scheduler.canary_released?"released":"active"," · Queue age ",m.scheduler.queue_age_level]}),e.jsxs("div",{className:"mt-1 text-xs cron-muted",children:["Scheduled usage today ",m.scheduler.usage.current_day_tokens.toLocaleString()," tokens · ",m.scheduler.usage.mode==="enforced"?`pause threshold ${((D=m.scheduler.usage.pause_threshold_tokens)==null?void 0:D.toLocaleString())??"not established"}`:"first-week alert-only baseline"," · trailing median ",m.scheduler.usage.trailing_seven_day_median_tokens.toLocaleString()]})]}),e.jsx(y,{size:"sm",variant:m.scheduler.paused_at||!m.scheduler.dispatch_enabled?"default":"outline",disabled:V.isPending,onClick:()=>V.mutate(m.scheduler.paused_at||!m.scheduler.dispatch_enabled?"resume":"pause"),children:m.scheduler.paused_at?"Acknowledge & resume":m.scheduler.dispatch_enabled?"Pause scheduled dispatch":"Enable scheduled dispatch"})]})}),e.jsxs("div",{className:"mb-5 grid grid-cols-2 gap-3 sm:grid-cols-4 lg:grid-cols-8",children:[["queued","awaiting_markdown","dispatching","running","completed","failed","canceled"].map(a=>e.jsxs("div",{className:"cron-metric-card",children:[e.jsx("div",{className:"cron-label capitalize",children:rs[a]}),e.jsx("div",{className:"mt-1 text-xl font-semibold",children:m.summary[a]})]},a)),e.jsxs("div",{className:"cron-metric-card",children:[e.jsx("div",{className:"cron-label",children:"Total"}),e.jsx("div",{className:"mt-1 text-xl font-semibold",children:m.summary.total})]})]}),e.jsxs("div",{className:"mb-5 grid gap-3 sm:grid-cols-5",children:[e.jsxs("select",{"aria-label":"Trigger",className:"rounded border px-2 py-1 text-sm",value:t,onChange:a=>c(a.target.value),children:[e.jsx("option",{value:"",children:"All triggers"}),e.jsx("option",{value:"admin",children:"Admin"}),e.jsx("option",{value:"hf-daily-cron",children:"HF daily cron"}),e.jsx("option",{value:"hf-trending-cron",children:"HF trending cron"}),e.jsx("option",{value:"benchmark-gap-cron",children:"Benchmark gap cron"}),e.jsx("option",{value:"model-release-radar",children:"Release radar"})]}),e.jsxs("select",{"aria-label":"Status",className:"rounded border px-2 py-1 text-sm",value:i,onChange:a=>d(a.target.value),children:[e.jsx("option",{value:"",children:"All statuses"}),Object.keys(as).map(a=>e.jsx("option",{children:a},a))]}),e.jsx("input",{"aria-label":"Policy version",className:"rounded border px-2 py-1 text-sm",placeholder:"Policy version",value:o,onChange:a=>_(a.target.value)}),e.jsx("input",{"aria-label":"Cohort date",type:"date",className:"rounded border px-2 py-1 text-sm",value:x,onChange:a=>u(a.target.value)}),e.jsxs("select",{"aria-label":"Review status",className:"rounded border px-2 py-1 text-sm",value:p,onChange:a=>n(a.target.value),children:[e.jsx("option",{value:"",children:"All review states"}),e.jsx("option",{value:"unreviewed",children:"Unreviewed"}),e.jsx("option",{value:"approved",children:"Approved"}),e.jsx("option",{value:"corrected",children:"Corrected"})]})]}),m.jobs.length===0?e.jsx("p",{className:"py-8 text-center text-sm cron-muted",children:"No paper curation jobs have been submitted yet."}):e.jsxs(Ze,{children:[e.jsx(es,{children:e.jsxs(he,{children:[e.jsx(z,{children:"Status"}),e.jsx(z,{children:"Paper"}),e.jsx(z,{children:"Action"}),e.jsx(z,{children:"Requested"}),e.jsx(z,{children:"Execution"})]})}),e.jsx(ss,{children:m.jobs.map(a=>{const l=Js(a);return e.jsxs(he,{children:[e.jsx(K,{className:"align-top",children:e.jsx(Os,{status:a.status})}),e.jsx(K,{className:"min-w-[260px] align-top",children:a.paper_route?e.jsxs(e.Fragment,{children:[e.jsx(pe,{to:`/paper/${encodeURIComponent(a.paper_route)}`,className:"font-medium hover:underline",children:a.paper_title}),e.jsxs("div",{className:"mt-1 text-xs cron-muted",children:["Paper #",a.paper_id]})]}):a.kind==="review-benchmark-gaps"?e.jsx("span",{className:"font-medium",children:"Benchmark-gap backlog"}):a.kind==="add-benchmark"?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"font-medium",children:"Benchmark candidate"}),e.jsx("div",{className:"mt-1 text-xs cron-muted",children:a.benchmark_candidate_id})]}):a.release_signal_id?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"font-medium",children:"Release radar signal"}),e.jsxs("div",{className:"mt-1 text-xs cron-muted",children:["Signal ",a.release_signal_id]})]}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"font-medium",children:"Trending model discovery"}),e.jsxs("div",{className:"mt-1 text-xs cron-muted",children:["Candidate ",a.candidate_id]})]})}),e.jsxs(K,{className:"whitespace-nowrap align-top",children:[Le[a.kind],a.applied_at&&e.jsxs("div",{className:"mt-1 flex items-center gap-1 text-xs cron-status--healthy",children:[e.jsx(je,{className:"h-3.5 w-3.5"})," Applied"]})]}),e.jsxs(K,{className:"whitespace-nowrap align-top",children:[e.jsx("div",{children:v(a.created_at)}),e.jsxs("div",{className:"mt-1 text-xs cron-muted",children:["@",a.requested_by]})]}),e.jsxs(K,{className:"max-w-[360px] align-top",children:[a.hf_job_url?e.jsxs("a",{href:a.hf_job_url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 hover:underline",children:["Hugging Face Job ",e.jsx(Y,{className:"h-3.5 w-3.5"})]}):e.jsx("span",{className:"cron-muted",children:"Waiting to dispatch"}),l&&e.jsx("p",{className:`mt-2 line-clamp-3 text-xs ${a.error&&a.status!=="awaiting_markdown"?"text-red-700":"cron-muted"}`,title:l,children:l}),e.jsx(Pe,{mutationResult:a.mutation_result}),e.jsxs("div",{className:"mt-2 flex gap-2",children:[["failed","canceled"].includes(a.status)&&e.jsx(y,{size:"sm",variant:"outline",onClick:()=>se.mutate(a.id),children:"Retry"}),["queued","awaiting_markdown","dispatching","running"].includes(a.status)&&e.jsx(y,{size:"sm",variant:"outline",onClick:()=>le.mutate(a.id),children:"Cancel"}),a.trace_status==="finalize_failed"&&e.jsx(y,{size:"sm",variant:"outline",onClick:()=>de.mutate(a.id),children:"Retry trace"})]})]})]},a.id)})})]}),m.workflows.length>0&&e.jsxs("div",{className:"mt-8 space-y-3",children:[e.jsx("h3",{className:"text-base font-semibold",children:"Scheduled paper workflows"}),m.workflows.map(a=>e.jsxs("details",{className:"rounded-md border p-3",children:[e.jsxs("summary",{className:"cursor-pointer text-sm font-medium",children:["Paper #",a.paper_id," · ",a.cohort_date," · ",a.status," · ",a.policy_version]}),e.jsxs("div",{className:"mt-3 space-y-3 text-xs",children:[a.error&&e.jsx("div",{className:"text-red-700",children:a.error}),a.stages.map(l=>{var w;return e.jsxs("div",{className:"rounded border p-3",children:[e.jsxs("div",{className:"font-medium",children:[Le[l.kind]," · ",l.status," · trace ",l.trace_status," · review ",l.audit_status]}),e.jsxs("div",{className:"mt-1 cron-muted",children:["model ",l.model??"—"," · reasoning ",l.reasoning_effort??"—"," · tokens ",(l.input_tokens??0)+(l.output_tokens??0)," · duration ",l.duration_ms??0," ms · attempts ",l.attempt_count]}),l.error&&e.jsx("div",{className:"mt-2 text-red-700",children:l.error}),l.report&&e.jsx("div",{className:"mt-2 whitespace-pre-wrap rounded border p-2",children:l.report}),l.url_candidates&&e.jsxs("details",{className:"mt-2",children:[e.jsx("summary",{children:"URL candidates and provenance"}),e.jsx("pre",{className:"mt-2 max-h-52 overflow-auto whitespace-pre-wrap",children:JSON.stringify(l.url_candidates,null,2)})]}),l.validation_summary&&e.jsx("pre",{className:"mt-2 max-h-40 overflow-auto whitespace-pre-wrap",children:JSON.stringify(l.validation_summary,null,2)}),Array.isArray((w=l.validation_summary)==null?void 0:w.manual_or_legacy_evaluation_rows_affected)&&l.validation_summary.manual_or_legacy_evaluation_rows_affected.length>0&&e.jsxs("div",{className:"mt-2 rounded border border-amber-500 bg-amber-50 p-2 font-medium text-amber-900",children:["Manual or legacy evaluation rows changed: ",l.validation_summary.manual_or_legacy_evaluation_rows_affected.join(", "),". Review the evidence and before/after diff."]}),l.proposal&&e.jsx("pre",{className:"mt-2 max-h-52 overflow-auto whitespace-pre-wrap",children:JSON.stringify(l.proposal,null,2)}),e.jsx(Pe,{mutationResult:l.mutation_result}),l.mutation_result&&e.jsxs("details",{className:"mt-2",children:[e.jsx("summary",{children:"Accepted callback result and before/after state"}),e.jsx("pre",{className:"mt-2 max-h-64 overflow-auto whitespace-pre-wrap",children:JSON.stringify(l.mutation_result,null,2)})]}),l.trace_status==="complete"&&e.jsxs("a",{className:"mt-2 inline-flex items-center gap-1 hover:underline",href:M.traceUrl(l.id),target:"_blank",rel:"noreferrer",children:["Authenticated trace manifest ",e.jsx(Y,{className:"h-3.5 w-3.5"})]})]},l.id)})]})]},a.id))]}),m.benchmark_candidates.length>0&&e.jsxs("div",{className:"mt-8 space-y-3",children:[e.jsx("h3",{className:"text-base font-semibold",children:"Benchmark-gap backlog"}),m.benchmark_candidates.map(a=>{var re,_e;const l=f[a.id]??{dataset:"",task:((re=a.task_ids[0])==null?void 0:re.toString())??"",metric:""},w=Number(l.dataset)>0&&Number(l.task)>0&&l.metric.trim().length>0;return e.jsxs("div",{className:"rounded-md border p-3 text-xs",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs("div",{className:"font-medium",children:[a.canonical_name," · ",a.gap_type," · ",a.status]}),e.jsxs("div",{className:"cron-muted",children:[a.distinct_paper_count," paper",a.distinct_paper_count===1?"":"s"," · ",a.confidence??"unknown"," confidence"]})]}),a.canonical_url&&e.jsx("a",{className:"mt-1 block hover:underline",href:a.canonical_url,target:"_blank",rel:"noreferrer",children:a.canonical_url}),e.jsxs("div",{className:"mt-1 cron-muted",children:["Task evidence: ",a.task_ids.join(", ")||"none"," · Papers: ",a.evidence_paper_ids.join(", ")]}),a.review_reason&&e.jsxs("div",{className:"mt-1",children:["Review",a.reviewed_at?` ${v(a.reviewed_at)}`:"",": ",a.review_reason,a.deferred_until&&` · deferred until ${v(a.deferred_until)}`]}),a.resolution&&e.jsxs("div",{className:"mt-1 cron-muted",children:["Dataset #",a.resolution.dataset_id," · task #",a.resolution.task_id," · ",a.resolution.primary_metric,a.resolution.rolled_back_at&&` · rolled back ${v(a.resolution.rolled_back_at)}`]}),a.status==="promoted"&&((_e=a.resolution)==null?void 0:_e.created)&&!a.resolution.rolled_back_at&&e.jsx(y,{className:"mt-2",size:"sm",variant:"outline",disabled:E.isPending,onClick:()=>E.mutate(a.id),children:"Roll back automatic benchmark"}),!["promoted","merged"].includes(a.status)&&e.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",children:[["dataset","task","metric"].map(U=>e.jsx("input",{"aria-label":`${a.canonical_name} ${U}`,className:"w-36 rounded border px-2 py-1",placeholder:U==="metric"?"Exact metric":`${U} ID`,value:l[U],onChange:ns=>k(ts=>({...ts,[a.id]:{...l,[U]:ns.target.value}}))},U)),e.jsx(y,{size:"sm",variant:"outline",disabled:!w||q.isPending,onClick:()=>q.mutate({id:a.id,...l}),children:"Promote & requeue evidence papers"})]})]},a.id)}),q.error&&e.jsx("div",{className:"cron-message cron-message--error",children:q.error.message}),E.error&&e.jsx("div",{className:"cron-message cron-message--error",children:E.error.message})]}),e.jsxs("p",{className:"mt-4 text-xs cron-muted",children:["Showing the 100 most recent jobs · Queue totals include full history · Updated ",v(m.timestamp)]})]})]})]})}function Us(){const[s,r]=h.useState(()=>new Date().toISOString().slice(0,10)),[t,c]=h.useState(1),i=G({queryKey:["paper-edit-digest",s,t],queryFn:()=>Me.digest(s,t),enabled:!!s});return e.jsxs("section",{className:"space-y-3 rounded border p-4",children:[e.jsx("h2",{className:"text-lg font-semibold",children:"Daily paper edits"}),e.jsxs("label",{className:"flex items-center gap-2",children:["UTC date ",e.jsx("input",{type:"date",value:s,onChange:d=>{r(d.target.value),c(1)}})]}),i.isLoading&&e.jsx("p",{children:"Loading daily summary…"}),i.error&&e.jsx("p",{role:"alert",children:i.error.message}),i.data&&e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:[i.data.edits," published changes · ",i.data.papers," papers · ",i.data.contributors," contributors"]}),e.jsx("ul",{className:"space-y-1",children:i.data.rows.map((d,o)=>e.jsxs("li",{children:[e.jsxs(pe,{className:"underline",to:`/paper/${d.paper_id}`,children:["Paper ",d.paper_id]})," · @",d.actor_username??"admin"," · ",d.edits," changes"]},o))}),e.jsxs("div",{className:"flex gap-2",children:[t>1&&e.jsx(y,{variant:"outline",onClick:()=>c(t-1),children:"Previous"}),i.data.has_more&&e.jsx(y,{variant:"outline",onClick:()=>c(t+1),children:"Next"})]})]})]})}const Hs=()=>{var _,x,u,p;const s=xe(),r=fs({queryKey:$.catalogAudit,queryFn:({pageParam:n})=>me.audit(n),initialPageParam:void 0,getNextPageParam:n=>n.next_cursor??void 0}),t=((_=r.data)==null?void 0:_.pages.flatMap(n=>n.events))??[],c=()=>s.invalidateQueries({queryKey:$.catalogAudit}),i=P({mutationFn:()=>me.acknowledgeAudit(),onSuccess:c}),d=P({mutationFn:n=>me.rollbackEvent(n),onSuccess:c}),o=P({mutationFn:({subject:n,suspended:f})=>Me.suspend(n,f),onSuccess:c});return e.jsxs("div",{className:"space-y-4",children:[e.jsx(Us,{}),(d.error||o.error)&&e.jsx("p",{role:"alert",children:(x=d.error||o.error)==null?void 0:x.message}),e.jsxs(g,{children:[e.jsxs(N,{className:"flex-row items-center justify-between",children:[e.jsx(b,{children:"Catalog mutation audit"}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"text-sm font-medium",children:[((p=(u=r.data)==null?void 0:u.pages[0])==null?void 0:p.unread_contributor_count)??0," unread contributor changes"]}),e.jsx(y,{variant:"outline",size:"sm",onClick:()=>i.mutate(),disabled:i.isPending,children:"Mark read"})]})]}),e.jsxs(j,{className:"space-y-3",children:[r.isLoading&&e.jsx("p",{children:"Loading audit history…"}),r.error&&e.jsx("p",{className:"text-destructive",children:"Audit history unavailable."}),t.map(n=>e.jsxs("article",{className:`rounded-md border p-3 ${n.operation==="delete"||n.rollback_eligible===!1?"border-red-500 bg-red-50/50":""}`,children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs("strong",{children:[n.operation," ",n.entity_type," ",n.entity_id]}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:["@",n.actor_username??n.actor_role," ·"," ",new Date(n.created_at).toLocaleString()]})]}),e.jsxs("details",{className:"mt-2 text-xs",children:[e.jsx("summary",{children:"Inspect snapshots"}),e.jsx("pre",{className:"mt-2 max-h-80 overflow-auto rounded bg-muted p-3",children:JSON.stringify({before:n.before,after:n.after},null,2)})]}),n.actor_role==="contributor"&&n.actor_hf_subject&&e.jsx(y,{className:"mt-3 mr-2",variant:"outline",size:"sm",disabled:o.isPending,onClick:()=>o.mutate({subject:n.actor_hf_subject,suspended:!n.editing_suspended}),children:n.editing_suspended?"Restore editing access":"Suspend editing access"}),!n.rollback_of_event_id&&e.jsx(y,{className:"mt-3",variant:"outline",size:"sm",onClick:()=>d.mutate(n.id),disabled:d.isPending||n.rollback_eligible===!1,children:n.rollback_eligible===!1?"Rollback conflict":"Roll back if unchanged"})]},n.id)),r.hasNextPage&&e.jsx(y,{variant:"outline",onClick:()=>r.fetchNextPage(),disabled:r.isFetchingNextPage,children:r.isFetchingNextPage?"Loading…":"Load older events"})]})]})]})},Fe={hourly:"running",daily:"healthy",weekly:"degraded",systemd:"running"},Ws=({data:s,loading:r,error:t})=>{const[c,i]=h.useState("staging-current"),d={"staging-current":"Starter staging · $75 warning / $100 trip / no Environment cap","staging-production-era":"Staging with production · $15 / $20 / $25",production:"Production · $175 / $200 / $225"};if(r)return e.jsxs("div",{className:"flex items-center py-12",children:[e.jsx(R,{className:"h-6 w-6 animate-spin mr-3"}),"Loading chat compute…"]});if(t||!s)return e.jsx(g,{className:"cron-status--broken",children:e.jsx(j,{className:"pt-6",children:"Chat compute accounting is unavailable."})});const o=Math.min(100,s.effective_microusd/s.application_cap_microusd*100),_=s.circuit_state==="tripped"?"Chat disabled":s.circuit_state==="warning"?"Operator warning":"Enabled",x=s.reconciliation_state==="fresh"?"Fresh":s.reconciliation_state==="stale"?"Stale":"Unavailable";return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"grid md:grid-cols-4 gap-4",children:[e.jsxs(g,{className:s.circuit_state==="tripped"?"cron-status--broken":s.circuit_state==="warning"?"cron-status--degraded":"",children:[e.jsx(N,{children:e.jsx(b,{className:"text-sm",children:"Circuit"})}),e.jsxs(j,{children:[e.jsx("div",{className:"text-2xl font-bold",children:_}),e.jsx("p",{className:"text-xs cron-muted",children:s.trip_reason??"Policy armed"})]})]}),e.jsxs(g,{children:[e.jsx(N,{children:e.jsx(b,{className:"text-sm",children:"Month to date"})}),e.jsxs(j,{children:[e.jsx("div",{className:"text-2xl font-bold",children:C(s.effective_microusd)}),e.jsx("div",{role:"progressbar","aria-label":"Application cap used","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(o),className:"h-2 rounded bg-muted mt-3",children:e.jsx("div",{className:"h-2 rounded bg-primary",style:{width:`${o}%`}})})]})]}),e.jsxs(g,{children:[e.jsx(N,{children:e.jsx(b,{className:"text-sm",children:"Application headroom"})}),e.jsxs(j,{children:[e.jsx("div",{className:"text-2xl font-bold",children:C(s.remaining_microusd)}),e.jsxs("p",{className:"text-xs cron-muted",children:["Cap ",C(s.application_cap_microusd)]})]})]}),e.jsxs(g,{children:[e.jsx(N,{children:e.jsx(b,{className:"text-sm",children:"Live compute"})}),e.jsxs(j,{children:[e.jsx("div",{className:"text-2xl font-bold",children:s.live_count}),e.jsxs("p",{className:"text-xs cron-muted",children:[s.termination_uncertain_count," termination uncertain"]})]})]})]}),e.jsxs(g,{children:[e.jsxs(N,{children:[e.jsx(b,{children:"Accounting and policy"}),e.jsxs(F,{children:[s.environment," · cycle ",s.billing_cycle]})]}),e.jsxs(j,{className:"grid md:grid-cols-3 gap-4 text-sm",children:[e.jsxs("div",{children:[e.jsx("strong",{children:"Environment record"}),e.jsx("br",{}),s.environment," · ",s.provider_mode==="starter_workspace"?"Starter Workspace":"Team isolated"]}),e.jsxs("label",{children:[e.jsx("strong",{children:"Policy profile"}),e.jsxs("select",{"aria-label":"Chat compute policy profile",value:c,onChange:u=>i(u.target.value),className:"block mt-1",children:[e.jsx("option",{value:"staging-current",children:"Staging now"}),e.jsx("option",{value:"staging-production-era",children:"Staging with production"}),e.jsx("option",{value:"production",children:"Production"})]}),e.jsxs("span",{className:"text-xs cron-muted",children:[d[c]," · Workspace $250"]})]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Conservative estimate"}),e.jsx("br",{}),C(s.estimated_microusd)]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Provider-reported floor"}),e.jsx("br",{}),C(s.provider_floor_microusd)," · ",e.jsx(I,{children:x})]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Provider backstops"}),e.jsx("br",{}),s.environment_cap_microusd===null?"Starter: no Environment cap":`Environment ${C(s.environment_cap_microusd)}`," · Workspace ",C(s.workspace_cap_microusd)]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Active thresholds"}),e.jsx("br",{}),"Warning ",C(s.warning_microusd)," · trip ",C(s.application_cap_microusd)]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Policy allocation"}),e.jsx("br",{}),"Starter staging $75/$100 with no Environment cap · future Team staging $15/$20/$25 · production $175/$200/$225 · workspace $250"]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Cycle end"}),e.jsx("br",{}),v(s.cycle_end_at)]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Last metered"}),e.jsx("br",{}),s.last_metered_at?v(s.last_metered_at):"Unavailable"]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Provider reconciliation"}),e.jsx("br",{}),s.last_reconciled_at?v(s.last_reconciled_at):"Unavailable",s.last_reconciliation_attempt_at?` · attempted ${v(s.last_reconciliation_attempt_at)}`:"",s.next_reconciliation_at?` · next ${v(s.next_reconciliation_at)}`:""]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Burn projection"}),e.jsx("br",{}),s.burn_rate_microusd_per_hour===null?"Not enough data":`${C(s.burn_rate_microusd_per_hour)}/hour${s.projected_cap_hit_at?` · cap ${v(s.projected_cap_hit_at)}`:""}`]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Prior cycle"}),e.jsx("br",{}),s.prior_cycle?`${s.prior_cycle.billing_cycle} · ${C(s.prior_cycle.effective_microusd)}`:"Not enough data"]})]})]}),e.jsxs(g,{children:[e.jsx(N,{children:e.jsx(b,{children:"Live lifecycle"})}),e.jsx(j,{className:"text-sm",children:Object.entries(s.live_states).map(([u,p])=>e.jsxs("span",{className:"mr-4",children:[u,": ",p]},u))})]}),e.jsxs(g,{children:[e.jsx(N,{children:e.jsx(b,{children:"Daily spend"})}),e.jsx(j,{children:s.daily_spend.length?e.jsx("ul",{className:"space-y-1 text-sm",children:s.daily_spend.map(u=>e.jsxs("li",{children:[u.date,": blank ",C(u.blank_pool_microusd)," · assigned ",C(u.assigned_microusd)]},u.date))}):e.jsx("p",{className:"cron-muted",children:"No compute recorded in this cycle."})})]}),e.jsxs(g,{children:[e.jsxs(N,{children:[e.jsx(b,{children:"Recent circuit events"}),e.jsx(F,{children:"Runbook: docs/chat-sandbox-spend-runbook.md"})]}),e.jsx(j,{children:s.events.length?e.jsx("ul",{className:"space-y-2 text-sm",children:s.events.map(u=>e.jsxs("li",{children:[e.jsx(I,{children:u.severity})," ",u.type," · ",v(u.created_at)]},u.id))}):e.jsx("p",{className:"cron-muted",children:"No events in this cycle."})})]})]})},zs=({data:s,loading:r,error:t})=>{if(r)return e.jsxs("div",{className:"flex items-center py-8",children:[e.jsx(R,{className:"h-5 w-5 animate-spin mr-3"}),"Loading web-search budget…"]});if(t||!s)return e.jsx(g,{className:"cron-status--broken",children:e.jsx(j,{className:"pt-6",children:"Web-search budget accounting is unavailable."})});const c=Math.min(100,s.call_count/s.hard_limit_calls*100);return e.jsxs(g,{className:s.circuit_state==="tripped"?"cron-status--broken":s.circuit_state==="warning"||s.circuit_state==="cooldown"?"cron-status--degraded":"",children:[e.jsxs(N,{children:[e.jsx(b,{children:"Web search"}),e.jsxs(F,{children:[s.environment," · UTC cycle ",s.billing_cycle," · provider details are admin-only"]})]}),e.jsxs(j,{className:"space-y-4",children:[e.jsxs("div",{className:"grid md:grid-cols-4 gap-4 text-sm",children:[e.jsxs("div",{children:[e.jsx("strong",{children:"Circuit"}),e.jsx("br",{}),s.circuit_state,s.trip_reason?` · ${s.trip_reason}`:""]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Calls"}),e.jsx("br",{}),s.call_count," / ",s.hard_limit_calls," · ",s.success_count," successful"]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Remaining"}),e.jsx("br",{}),s.remaining_calls]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Warning"}),e.jsx("br",{}),s.warning_calls," calls"]})]}),e.jsx("div",{role:"progressbar","aria-label":"Web-search monthly budget used","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(c),className:"h-2 rounded bg-muted",children:e.jsx("div",{className:"h-2 rounded bg-primary",style:{width:`${c}%`}})}),e.jsxs("p",{className:"text-xs cron-muted",children:["Cycle ends ",v(s.cycle_end_at)," · provider-reported cost $",(s.provider_cost_microusd/1e6).toFixed(4),s.last_latency_ms!==null?` · last ${s.last_latency_ms} ms / ${s.last_result_count??0} results`:"",s.cooldown_until?` · cooldown until ${v(s.cooldown_until)}`:"",s.last_provider_error_class?` · last provider error ${s.last_provider_error_class}`:""]}),s.events.length>0&&e.jsx("ul",{className:"space-y-1 text-sm",children:s.events.map(i=>e.jsxs("li",{children:[i.type," · ",v(i.created_at),i.error_class?` · ${i.error_class}`:""]},i.id))})]})]})},Ks=({data:s})=>s!=null&&s.snapshot_stale?e.jsx(g,{className:"mb-6 cron-status--degraded",role:"status",children:e.jsx(j,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center gap-3 text-sm",children:[e.jsx(R,{className:"h-4 w-4 animate-spin"}),e.jsxs("span",{children:["Refreshing status… Current snapshot is ",Math.ceil(s.snapshot_age_seconds)," seconds old."]})]})})}):null,Gs=(s,r)=>s!=null&&s.snapshot_stale||s!=null&&s.refreshing?5e3:r?3e4:!1,pa=()=>{const s=xs(),r=xe(),[t,c]=h.useState(!0),[i,d]=h.useState(""),[o,_]=h.useState(""),[x,u]=h.useState(new Set),{user:p}=hs(),{data:n,isLoading:f,error:k}=G({queryKey:$.cronStatus,queryFn:()=>ue.getCronStatus(),refetchInterval:a=>Gs(a.state.data,t),retry:!1}),J=G({queryKey:$.chatSandboxSpend(o),queryFn:()=>ye.getSandboxSpend(o||void 0),refetchInterval:t?3e4:!1,retry:!1}),m=G({queryKey:$.chatWebSearchBudget,queryFn:()=>ye.getWebSearchBudget(),enabled:s,refetchInterval:t?3e4:!1,retry:!1}),Q=P({mutationFn:()=>Promise.all([r.cancelQueries({queryKey:$.cronStatus}).then(()=>r.fetchQuery({queryKey:$.cronStatus,queryFn:()=>ue.getCronStatus(!0),retry:!1})),r.refetchQueries({queryKey:$.all,type:"active",predicate:a=>a.queryKey[1]!==$.cronStatus[1]})])}),ee=k instanceof Re&&k.status===401?"Unauthorized. Sign in with an allowlisted Hugging Face admin account.":k instanceof Error?k.message:void 0,B=a=>{u(l=>{const w=new Set(l);return w.has(a)?w.delete(a):w.add(a),w})},T=(n==null?void 0:n.jobs.filter(a=>a.dashboard_group==="leaderboard_sync"))??[],se=(n==null?void 0:n.jobs.filter(a=>a.category!=="manual"&&a.dashboard_group!=="leaderboard_sync"))??[],le=se.filter(a=>a.critical),de=se.filter(a=>!a.critical),V=(n==null?void 0:n.manual_operations)??[],q=!!(f||Q.isPending||n!=null&&n.refreshing),E=de.reduce((a,l)=>(a[l.category]||(a[l.category]=[]),a[l.category].push(l),a),{}),ae=Object.keys(E).sort((a,l)=>{const w=["systemd","hourly","daily","weekly","backfill"];return w.indexOf(a)-w.indexOf(l)}),D=a=>e.jsx(Ms,{job:a,expanded:x.has(a.job_name),onToggle:()=>B(a.job_name),autoRefresh:t},a.job_name);return e.jsx("div",{className:"cron-dashboard","data-shadcn":!0,children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[e.jsx("div",{className:"mb-8",children:e.jsxs("div",{className:"flex items-center justify-between gap-4 flex-wrap",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"text-3xl font-bold flex items-center gap-3",children:[e.jsx(ne,{className:"h-8 w-8 cron-info-text"}),"Admin Dashboard"]}),e.jsx("p",{className:"mt-2 cron-muted",children:"Paper curation queue and operational health for scheduled jobs"})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(y,{asChild:!0,variant:"outline",size:"sm",children:e.jsx(pe,{to:"/autonomous-operations",children:"Autonomous operations"})}),e.jsxs(y,{variant:"outline",size:"sm",onClick:()=>c(!t),className:t?"cron-status--running":"",children:[e.jsx(be,{className:`h-4 w-4 mr-2 ${t?"animate-spin":""}`}),"Auto-refresh ",t?"ON":"OFF"]}),e.jsxs(y,{variant:"outline",size:"sm",onClick:()=>Q.mutate(),disabled:q,children:[e.jsx(be,{className:`h-4 w-4 mr-2 ${q?"animate-spin":""}`}),"Refresh"]})]})]})}),e.jsx(g,{className:"mb-6",children:e.jsx(j,{className:"pt-6",children:e.jsxs("p",{className:"text-sm cron-muted",children:["Signed in as ",e.jsxs("span",{className:"font-semibold",children:["@",p==null?void 0:p.username]}),". Health checks prefer database freshness over log completion so silent no-work failures surface as degraded or broken. Expanded jobs include deterministic scheduler, log, lock, durable-data, throughput, backlog, and semantic contract evidence with direct operator and run links."]})})}),e.jsx(Ks,{data:n}),e.jsxs(Ls,{defaultValue:"critical-jobs",children:[e.jsxs(Xe,{className:"grid h-auto w-full grid-cols-2 sm:w-auto sm:grid-cols-5",children:[e.jsx(H,{value:"critical-jobs",children:"Critical Jobs"}),e.jsx(H,{value:"leaderboard-syncs",children:"Leaderboard Syncs"}),e.jsx(H,{value:"codex-paper-jobs",children:"Codex Paper Jobs"}),e.jsx(H,{value:"catalog-audit",children:"Catalog Audit"}),e.jsx(H,{value:"chat-compute",children:"Chat Compute"})]}),e.jsxs(W,{value:"critical-jobs",className:"mt-6",children:[f&&e.jsxs("div",{className:"flex items-center justify-center py-12",children:[e.jsx(R,{className:"h-8 w-8 animate-spin cron-info-text"}),e.jsx("span",{className:"ml-3 cron-muted",children:"Loading CRON jobs status..."})]}),k&&e.jsx(g,{className:"cron-status--broken",children:e.jsx(j,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(Z,{className:"h-5 w-5"}),e.jsx("p",{children:ee??"Failed to load CRON jobs status. Please try again."})]})})}),n&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-4 mb-6",children:["healthy","degraded","broken","running","stuck","unknown"].map(a=>e.jsxs(g,{children:[e.jsx(N,{className:"pb-2",children:e.jsx(b,{className:"text-sm font-medium cron-muted capitalize",children:a})}),e.jsx(j,{children:e.jsx("div",{className:"text-2xl font-bold",children:n.summary[a]})})]},a))}),n.summary.critical_issues.length>0&&e.jsxs(g,{className:"mb-6 cron-status--broken",children:[e.jsx(N,{children:e.jsxs(b,{className:"flex items-center gap-2",children:[e.jsx(Te,{className:"h-5 w-5"}),"Critical job issues"]})}),e.jsx(j,{children:e.jsx("ul",{className:"list-disc pl-5 space-y-1 text-sm",children:n.summary.critical_issues.map(a=>e.jsx("li",{children:a},a))})})]}),e.jsxs(g,{className:"mb-8",children:[e.jsx(N,{children:e.jsx(b,{className:"text-base",children:"What to check next"})}),e.jsxs(j,{children:[e.jsx("p",{className:"text-sm cron-muted",children:n.summary.what_to_check_next}),e.jsxs("p",{className:"mt-2 text-xs cron-muted flex items-center gap-2",children:[e.jsx(qe,{className:"h-4 w-4"}),"Last updated: ",v(n.timestamp)," · Health score:"," ",n.summary.health_score.toFixed(0),"%"]})]})]}),e.jsxs(g,{className:`mb-8 ${n.summary.coverage.coverage_gaps?"cron-status--broken":""}`,children:[e.jsxs(N,{children:[e.jsx(b,{className:"text-base",children:"Coverage"}),e.jsx(F,{children:"Registry and deployed scheduler inventory"})]}),e.jsxs(j,{className:"grid grid-cols-2 md:grid-cols-4 gap-4 text-sm",children:[e.jsxs("div",{children:[e.jsx("span",{className:"cron-label",children:"Registered"}),e.jsx("div",{className:"text-2xl font-bold",children:n.summary.coverage.registered_scheduled_duties})]}),e.jsxs("div",{children:[e.jsx("span",{className:"cron-label",children:"Discovered"}),e.jsx("div",{className:"text-2xl font-bold",children:n.summary.coverage.discovered_scheduled_duties})]}),e.jsxs("div",{children:[e.jsx("span",{className:"cron-label",children:"Monitored"}),e.jsx("div",{className:"text-2xl font-bold",children:n.summary.coverage.monitored_duties})]}),e.jsxs("div",{children:[e.jsx("span",{className:"cron-label",children:"Gaps"}),e.jsx("div",{className:"text-2xl font-bold",children:n.summary.coverage.coverage_gaps})]})]})]}),e.jsxs(g,{className:"mb-8",children:[e.jsxs(N,{children:[e.jsx(b,{className:"text-xl",children:"Critical jobs"}),e.jsx(F,{children:"Writers whose stale output breaks the live site"})]}),e.jsx(j,{className:"space-y-4",children:le.map(D)})]}),e.jsx("div",{className:"space-y-6",children:ae.map(a=>e.jsxs(g,{children:[e.jsx(N,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(b,{className:"text-xl capitalize flex items-center gap-2",children:[e.jsx(I,{className:ge(Fe[a]??Fe.hourly),children:a}),e.jsx("span",{children:"Supporting jobs"})]}),e.jsxs(F,{children:[E[a].length," job",E[a].length!==1?"s":""]})]})}),e.jsx(j,{className:"space-y-4",children:E[a].map(D)})]},a))}),V.length>0&&e.jsxs(g,{className:"mt-6",children:[e.jsxs(N,{children:[e.jsx(b,{className:"text-xl",children:"Manual operations"}),e.jsx(F,{children:"Visible invocation history; excluded from scheduled health and coverage"})]}),e.jsx(j,{className:"space-y-4",children:V.map(D)})]})]})]}),e.jsxs(W,{value:"leaderboard-syncs",className:"mt-6",children:[f&&e.jsxs("div",{className:"flex items-center justify-center py-12",children:[e.jsx(R,{className:"h-8 w-8 animate-spin cron-info-text"}),e.jsx("span",{className:"ml-3 cron-muted",children:"Loading leaderboard sync status..."})]}),k&&e.jsx(g,{className:"cron-status--broken",children:e.jsx(j,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(Z,{className:"h-5 w-5"}),e.jsx("p",{children:ee??"Failed to load leaderboard sync status. Please try again."})]})})}),n&&e.jsxs(g,{children:[e.jsx(N,{children:e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx(b,{className:"text-xl",children:"Leaderboard syncs"}),e.jsx(F,{children:"Recurring imports from externally maintained benchmark leaderboards"})]}),e.jsxs(I,{children:[T.length," jobs"]})]})}),e.jsx(j,{className:"space-y-4",children:T.map(D)})]})]}),e.jsx(W,{value:"codex-paper-jobs",className:"mt-6",children:e.jsx(Bs,{autoRefresh:t})}),e.jsx(W,{value:"catalog-audit",className:"mt-6",children:e.jsx(Hs,{})}),e.jsxs(W,{value:"chat-compute",className:"mt-6",children:[e.jsxs(g,{className:"mb-6",children:[e.jsxs(N,{children:[e.jsx(b,{children:"Environment record"}),e.jsx(F,{children:"Leave blank for live staging, or enter the isolated environment printed by the spend qualification command."})]}),e.jsxs(j,{className:"flex gap-2",children:[e.jsx("input",{"aria-label":"Chat compute environment record",value:i,onChange:a=>d(a.target.value),placeholder:"staging-q-example",className:"flex-1 rounded border px-3 py-2"}),e.jsx(y,{onClick:()=>_(i.trim()),children:"Load"})]})]}),e.jsx(Ws,{data:J.data,loading:J.isLoading,error:J.error}),s&&e.jsx("div",{className:"mt-6",children:e.jsx(zs,{data:m.data,loading:m.isLoading,error:m.error})})]})]})]})})};export{Ws as ChatComputePanel,Ks as CronSnapshotNotice,Gs as cronStatusRefetchInterval,pa as default};
|
assets/{CronDashboard-B3Xofwvu.js → CronDashboard-qYV75PLc.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
-
import{
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
| 5 |
* See the LICENSE file in the root directory of this source tree.
|
| 6 |
-
*/const N=c("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]),f=
|
|
|
|
| 1 |
+
import{s as c,d as a,j as r,G as n,ac as u}from"./index-DyXq7-Tg.js";/**
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
| 5 |
* See the LICENSE file in the root directory of this source tree.
|
| 6 |
+
*/const N=c("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]),f=a.forwardRef(({className:o,...e},t)=>r.jsx("div",{ref:t,className:n("rounded-lg border bg-card text-card-foreground shadow-sm",o),...e}));f.displayName="Card";const m=a.forwardRef(({className:o,...e},t)=>r.jsx("div",{ref:t,className:n("flex flex-col space-y-1.5 p-6",o),...e}));m.displayName="CardHeader";const p=a.forwardRef(({className:o,...e},t)=>r.jsx("h3",{ref:t,className:n("text-2xl font-semibold leading-none tracking-tight",o),...e}));p.displayName="CardTitle";const l=a.forwardRef(({className:o,...e},t)=>r.jsx("p",{ref:t,className:n("text-sm text-muted-foreground",o),...e}));l.displayName="CardDescription";const h=a.forwardRef(({className:o,...e},t)=>r.jsx("div",{ref:t,className:n("p-6 pt-0",o),...e}));h.displayName="CardContent";const C=a.forwardRef(({className:o,...e},t)=>r.jsx("div",{ref:t,className:n("flex items-center p-6 pt-0",o),...e}));C.displayName="CardFooter";const b=o=>`cron-status--${o}`,x=o=>`$${o.toFixed(2)}`,w=o=>x(o/1e6);function M(o){if(!o)return"Never";const e=new Date(o);if(Number.isNaN(e.getTime()))return o;const t=Date.now()-e.getTime(),s=Math.floor(t/6e4),i=Math.floor(t/36e5),d=Math.floor(t/864e5);return s<1?"Just now":s<60?`${s}m ago`:i<24?`${i}h ago`:d<7?`${d}d ago`:e.toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}class g{constructor(e){this.request=e}getCronStatus(e=!1){const t=e?"?force_refresh=true":"";return this.request(`/cron/status${t}`,{cache:"no-store"})}getPaperMarkdownJobs(){return this.request("/cron/paper-markdown-jobs",{cache:"no-store"})}getAutonomousOperations(){return this.request("/admin/autonomous-operations",{cache:"no-store"})}setAutonomousManualMode(e,t,s){return this.request("/admin/autonomous-operations/manual-mode",{method:"PATCH",body:JSON.stringify({enabled:e,expected_revision:t,confirmation:s})})}setAutonomousOperator(e,t,s,i){return this.request(`/admin/autonomous-operations/operators/${e}`,{method:"PATCH",body:JSON.stringify({enabled:t,expected_revision:s,confirmation:i})})}qualifyAutonomousChatBaseline(e,t,s){return this.request("/admin/autonomous-operations/chat-baseline",{method:"POST",body:JSON.stringify({sha:e,expected_revision:t,confirmation:s})})}}const q=new g(u);export{f as C,N as S,x as a,m as b,p as c,l as d,h as e,M as f,w as g,q as o,b as t};
|
assets/{ExternalSourceEvalBadge-npO6bZ8N.js → ExternalSourceEvalBadge-K3r45EmO.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{p as o}from"./curation-
|
|
|
|
| 1 |
+
import{p as o}from"./curation-YeS7FBYf.js";import{ac as g,j as a,L as l}from"./index-DyXq7-Tg.js";import{H as u,a as c,b as d}from"./hover-card-B45EJIn_.js";import{s as m}from"./safeExternalHref-CkBrsh84.js";class b{constructor(e){this.request=e}list(e={}){const t=new URLSearchParams(Object.entries(e).filter(r=>r[1]!==void 0).map(([r,n])=>[r,String(n)])).toString();return this.request(`/evaluations/${t?`?${t}`:""}`,{cache:"no-store"})}get(e){return this.request(`/evaluations/${e}`)}async byPaper(e){return this.allPages({paper_id:Number(e),ordering:"-benchmark_popularity"})}async byDataset(e,t){return this.allPages({dataset_id:Number(e),best_metric:t,ordering:"best_rank"})}async byLeaderboard(e,t,r={}){return this.allPages({dataset_id:Number(e),task_id:Number(t),ordering:"best_rank",...r})}create(e){return this.request("/evaluations/",{method:"POST",body:JSON.stringify(e)})}update(e,t){return this.request(`/evaluations/${e}`,{method:"PUT",body:JSON.stringify(t)})}delete(e){return this.request(`/evaluations/${e}`,{method:"DELETE"})}primeCurationState(e,t=!1){return o.primeEvaluations(e,t)}batch(e,t){return o.mutateEvaluations(e,t,"/evaluations/batch",{method:"POST",body:JSON.stringify({paper_id:e,operations:t})})}async allPages(e){const r=await this.list({...e,page_size:100});if(!r.next_page)return r.results;const n=Math.ceil(r.count/100),p=await Promise.all(Array.from({length:n-1},(i,h)=>this.list({...e,page:h+2,page_size:100})));return[r,...p].flatMap(i=>i.results)}}const w=new b(g),j=()=>a.jsxs(u,{openDelay:120,closeDelay:120,children:[a.jsx(c,{asChild:!0,children:a.jsx("button",{type:"button",className:"bm-closed-source-tag","aria-label":"Closed-source model",children:"closed"})}),a.jsxs(d,{side:"top",align:"start",className:"w-auto max-w-[260px] p-3 text-sm leading-snug",children:["This is an evaluation of a closed-source model. You can disable viewing these in your"," ",a.jsx(l,{to:"/settings",className:"closed-eval-tooltip-link",children:"settings"}),"."]})]});function x(s){if(!s)return"Evaluation sourced outside this paper";const e=s.toLowerCase();if(e.includes("open-asr-leaderboard"))return"Open ASR Leaderboard";if(e.includes("arcprize.org"))return"ARC Prize Leaderboard";if(e.includes("frontierswe.com"))return"FrontierSWE";if(e.includes("deepswe.datacurve.ai"))return"DeepSWE";try{const t=new URL(s,"https://paperswithcode.co");return t.pathname.startsWith("/paper/")?"Source paper":t.hostname.replace(/^www\./,"")}catch{return s}}const E=({sourceUrl:s})=>{const e=m(s),t=typeof s=="string"&&s.startsWith("/paper/")?s:null,r=x(s);return a.jsxs(u,{openDelay:120,closeDelay:120,children:[a.jsx(c,{asChild:!0,children:a.jsx("button",{type:"button",className:"bm-external-source-tag","aria-label":`Externally sourced evaluation: ${r}`,children:"External"})}),a.jsxs(d,{side:"top",align:"start",className:"w-auto max-w-[280px] p-3 text-sm leading-snug",children:["This score was sourced outside this paper.",t?a.jsxs(a.Fragment,{children:[" ",a.jsx(l,{to:t,target:"_blank",rel:"noopener noreferrer",className:"external-eval-tooltip-link",children:r}),"."]}):e?a.jsxs(a.Fragment,{children:[" ",a.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"external-eval-tooltip-link",children:r}),"."]}):a.jsxs(a.Fragment,{children:[" ",r,"."]})]})]})};export{j as C,E,w as e};
|
assets/FeedView-BR2dQQ-K.js
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
import{j as e,L as E,a as Se,b as Te,r as h,h as _e,C as Pe,c as be,d as Ce,e as Fe,f as Ee,i as Le,g as ne,k as ye,l as Ae}from"./index-CbgxfyGU.js";import{S as De}from"./sparkles-BqBXJPmy.js";import{u as R}from"./useQuery-Bx9s5-D2.js";import{D as Re,a as qe,b as Me}from"./dialog-Cfp_d3CC.js";import{c as ee}from"./catalog-DhK7_9-6.js";import{T as pe,r as B}from"./research-DgpyzSy_.js";import{d as ie,t as Ie}from"./transform-0Udg2p6b.js";import{u as je,a as ve,s as Oe,b as He,r as he,c as me,d as $e}from"./researchTopic-CteUev4M.js";import{P as ze}from"./plus-UK0TEjgd.js";import{A as Ke}from"./arrow-right-DotD9yNb.js";import{r as Be,P as Ue,w as Ge,a as Qe}from"./PaperFeed-DMvUfA47.js";import{M as We}from"./McpShowcase-CMLfdJM2.js";import{u as Xe,a as Ye,P as Ze,i as Ve,A as Je,b as es,S as $,c as ss,D as se,q as ts,d as as}from"./chatSessions-DwLUbLRo.js";import{c as os}from"./chat-DzTo2WUO.js";import{u as ns}from"./usePapers-CJaWLZ3y.js";import{p as J,a as ge}from"./paperQueryKeys-B8u1BWlI.js";import{S as te}from"./skeleton-HwvdxvSN.js";import{A as ae,a as oe}from"./alert-CFDDvdIM.js";import"./useMutation-P_trTy9i.js";import"./PaperCard-tdTC_dRN.js";import"./AuthorAvatar-CUJMmp_z.js";import"./SotaBadges-C-sTR-EF.js";import"./colors-BkWRhvFI.js";import"./Icon-D-kA0Owz.js";import"./LatexTitle-Z-HGmZ-H.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-DKJYnYjk.js";import"./useIntersectionObserver-CID9Kkak.js";import"./AgentLogos-BBl9UNVD.js";import"./useInfiniteQuery-BAc_4HO5.js";import"./curation-C7Gmmp4z.js";function is({onBuild:r}){return e.jsxs("section",{className:"following-intro","aria-labelledby":"following-intro-title",children:[e.jsx("h2",{id:"following-intro-title",children:"Build your personal research feed"}),e.jsx("p",{className:"following-intro-lead",children:"Describe a topic in your own words, or follow the tasks, benchmarks, authors, and organizations you care about, and this page collects their latest papers and results in one place."}),r&&e.jsxs("button",{type:"button",className:"research-topic-save following-intro-topic",onClick:r,children:[e.jsx(De,{"aria-hidden":"true"}),"Build your feed"]}),e.jsxs("p",{className:"following-intro-note",children:["Matching papers also arrive as a weekly email, which you can turn off in"," ",e.jsx(E,{to:"/settings",children:"Settings"}),"."]})]})}const fe=16;function rs({open:r,onOpenChange:a}){return e.jsx(Re,{open:r,onOpenChange:a,children:e.jsx(qe,{className:"topic-dialog","aria-describedby":void 0,children:e.jsx(ls,{onDone:()=>a(!1)})})})}function ls({onDone:r}){var W,X,Y,Z,H,z,U;const{user:a}=Se(),m=Te(),l=R({queryKey:["research-topic",a==null?void 0:a.hf_subject],queryFn:B.topic,enabled:!!a}),s=R({queryKey:["research-follows",a==null?void 0:a.hf_subject],queryFn:B.follows,enabled:!!a}),w=R({queryKey:["trending-tasks-follow"],queryFn:()=>ee.trendingTasks({limit:fe,level:0}),staleTime:10*60*1e3}),y=R({queryKey:["trending-methods-follow"],queryFn:()=>ee.trendingMethods({limit:fe}),staleTime:10*60*1e3}),c=R({queryKey:["research-follow-suggestions"],queryFn:B.followSuggestions,staleTime:10*60*1e3}),j=(i=[])=>i.map(p=>({id:String(p.entity_id),name:p.name,image:p.image_url})),[k,L]=h.useState(null),[_,v]=h.useState([]),P=je(),M=ve(),b=((W=l.data)==null?void 0:W.text)??"",n=k??b,d=n.trim().replace(/\s+/g," "),C=((X=l.data)==null?void 0:X.status)==="failed"&&d===b,A=d.length>=3&&(d!==b||C),D=P.isPending||M.isPending,o=(i,p)=>{var N;return((N=s.data)==null?void 0:N.some(S=>S.kind===i&&String(S.entity_id)===p))??!1},g=(i,p)=>{var N;return((N=_.find(S=>S.kind===i&&S.id===p))==null?void 0:N.follow)??o(i,p)},f=_.filter(i=>i.follow!==o(i.kind,i.id)),F=!D&&(A||f.length>0),q=(i,p,N)=>v(S=>[...S.filter(G=>G.kind!==i||G.id!==p),{kind:i,id:p,name:N,follow:!g(i,p)}]),I=()=>{if(!F)return;if(!a){A&&Oe(d),f.length&&He(f),window.location.href=_e(`${m.pathname}${m.search}`);return}const i=[...f.length?[M.mutateAsync(f)]:[],...A?[P.mutateAsync(d)]:[]];Promise.allSettled(i).then(p=>{p.every(N=>N.status==="fulfilled")&&r()})},O=(i,p,N,S)=>{const V=[...(s.data??[]).filter(x=>x.kind===p).map(x=>({id:String(x.entity_id),name:x.name,slug:x.url.split("/").pop(),image:x.image_url})),...N.filter(x=>!o(p,x.id)).map(x=>({...x,suggested:!0}))];return V.length>0&&e.jsxs("div",{className:"topic-dialog-group",children:[e.jsx("h3",{children:i}),e.jsxs(cs,{children:[V.map(x=>{const Q=g(p,x.id),K=p==="task"?ie(x.name,x.slug??void 0):x.name;return e.jsxs("button",{type:"button",className:"topic-dialog-chip","aria-pressed":Q,disabled:D,"data-suggested":"suggested"in x||void 0,onClick:()=>q(p,x.id,K),children:[Q?e.jsx(Pe,{"aria-hidden":"true"}):e.jsx(ze,{"aria-hidden":"true"}),(p==="author"||p==="organization")&&e.jsx(ds,{kind:p,name:K,src:x.image}),K]},x.id)}),S&&e.jsxs(E,{to:S.to,className:"topic-dialog-browse",children:[S.label,e.jsx(Ke,{"aria-hidden":"true"})]})]})]})};return e.jsxs("form",{className:"topic-dialog-form",onSubmit:i=>{i.preventDefault(),I()},children:[e.jsx(Me,{className:"topic-dialog-title",children:b||(Y=s.data)!=null&&Y.length?"Edit your research feed":"Build your research feed"}),e.jsxs("div",{className:"topic-dialog-group",children:[e.jsx("h3",{children:e.jsx("label",{htmlFor:"topic-dialog-input",children:"Describe a topic in your own words"})}),e.jsx("p",{className:"topic-dialog-hint",children:"A model reads every new paper and adds the ones that match to your Following feed."}),e.jsx("textarea",{id:"topic-dialog-input",className:"research-topic-input",rows:4,maxLength:pe,"aria-label":"Research topic",placeholder:"e.g. diffusion policies for robot manipulation, or speculative decoding for LLM inference",value:n,onChange:i=>L(i.target.value),onKeyDown:i=>{i.key==="Enter"&&!i.shiftKey&&!i.nativeEvent.isComposing&&(i.preventDefault(),I())}}),e.jsxs("span",{className:"research-topic-count",children:[n.length,"/",pe]})]}),O("Trending tasks","task",((Z=w.data)==null?void 0:Z.results)??[],{to:"/tasks",label:"Browse tasks"}),O("Trending methods","method",((H=y.data)==null?void 0:H.results)??[],{to:"/methods",label:"Browse methods"}),O("Benchmarks","benchmark",[],{to:"/tasks",label:"Browse benchmarks"}),O("Popular authors","author",j((z=c.data)==null?void 0:z.authors)),O("Popular organizations","organization",j((U=c.data)==null?void 0:U.organizations),{to:"/organizations",label:"Browse organizations"}),(P.error||M.error)&&e.jsx("p",{className:"settings-token-error",role:"alert",children:"Could not save your feed. Please try again."}),e.jsxs("div",{className:"topic-dialog-actions",children:[b&&e.jsx("button",{type:"button",className:"research-follow-action topic-dialog-remove",disabled:D,onClick:()=>P.mutate(null,{onSuccess:r}),children:"Remove topic"}),e.jsx("button",{type:"button",className:"research-follow-action",disabled:D,onClick:r,children:"Cancel"}),e.jsx("button",{type:"submit",className:"research-topic-save",disabled:!F,children:f.some(i=>i.follow===!1)?"Save":f.length?"Follow":C?"Retry":b?"Update topic":"Follow"})]})]})}function cs({children:r}){const a=h.useRef(null);return h.useLayoutEffect(()=>{const m=a.current;if(!m)return;const l=()=>{const s=[...m.children],w=s.filter(c=>c.dataset.suggested);w.forEach(c=>{c.hidden=!1});const y=()=>new Set(s.filter(c=>!c.hidden).map(c=>c.offsetTop)).size;for(let c=w.length-1;c>=0&&y()>2;c--)w[c].hidden=!0};return l(),window.addEventListener("resize",l),()=>window.removeEventListener("resize",l)}),e.jsx("div",{ref:a,className:"topic-dialog-chips",children:r})}function ds({kind:r,name:a,src:m}){const[l,s]=h.useState(!1);if(m&&!l)return e.jsx("img",{className:`topic-dialog-chip-image is-${r}`,src:m,alt:"",loading:"lazy",onError:()=>s(!0)});if(r!=="author")return null;const w=a.split(/\s+/).filter(Boolean).map(y=>y[0]).slice(0,2).join("").toUpperCase();return e.jsx("span",{className:"topic-dialog-chip-image is-author is-initials","aria-hidden":"true",children:w})}const xe=45,us=1800,ps=25,hs=350,ms=r=>{const[a,m]=h.useState($[0].slice(0,1)),[l,s]=h.useState(0);return h.useEffect(()=>{var L,_;if(!r)return;if((_=(L=window.matchMedia)==null?void 0:L.call(window,"(prefers-reduced-motion: reduce)"))!=null&&_.matches){m($[0]),s(0);return}let w=0,y=1,c=!1,j;m($[0].slice(0,y)),s(0);const k=()=>{const v=$[w];if(!c){if(y+=1,m(v.slice(0,y)),y===v.length){c=!0,j=window.setTimeout(k,us);return}j=window.setTimeout(k,xe);return}if(y-=1,m(v.slice(0,y)),y===0){c=!1,w=(w+1)%$.length,s(w),j=window.setTimeout(k,hs);return}j=window.setTimeout(k,ps)};return j=window.setTimeout(k,xe),()=>window.clearTimeout(j)},[r]),{placeholder:a,prompt:$[l]}},gs=()=>{var D;const r=be(),a=ye(),[m,l]=h.useState({text:"",paperMentions:[]}),s=m.text,[w,y]=h.useState(0),[c,j]=h.useState(!1),[k,L]=h.useState(null),{placeholder:_,prompt:v}=ms(!s),P=h.useRef(null),M=R({queryKey:["chatAvailability"],queryFn:()=>os.getAvailability(),retry:!1,enabled:ne()}),b=ne()&&((D=M.data)==null?void 0:D.paper_mentions_enabled)!==!1,n=Xe({draft:m,onChange:l,enabled:b,textareaRef:P}),d=Ye(m,n.open),C=s?d.completion:v;h.useLayoutEffect(()=>{const o=P.current;if(!o)return;const g=()=>{if(o.style.height="auto",s){o.style.height=`${Math.min(ss(o),160)}px`;return}const f=o.placeholder,F=$.reduce((q,I)=>(o.placeholder=I,Math.max(q,o.scrollHeight)),0);o.placeholder=f,o.style.height=`${Math.min(F,160)}px`};return g(),window.addEventListener("resize",g),()=>window.removeEventListener("resize",g)},[s,C]);const A=async(o=m)=>{const g=o.text.trim();if(!(!g||c)){if(a){const f=new URLSearchParams({q:g,model:se}),F=`${Ae}?${f}`,q=window.open(F,"_blank");if(!q){L(F);return}q.opener=null,L(null),l({text:"",paperMentions:[]});return}j(!0),ts(o,se);try{const f=await as(se);r(`/chat/${f.id}`)}catch{r("/chat")}}};return e.jsxs(e.Fragment,{children:[!a&&e.jsx("div",{className:"ask-home-new",children:"Hint: type @ to bring papers into context, or press Tab to use a suggestion"}),e.jsxs("div",{className:"ask-home",children:[e.jsxs("div",{className:"ask-home-row",children:[e.jsxs("div",{className:"ask-home-textarea-wrap",children:[e.jsx(Ze,{text:m.text,mentions:m.paperMentions,scrollTop:w,variant:"home",completion:s?C:""}),e.jsx("textarea",{ref:P,rows:1,value:s,placeholder:_,"aria-label":"Ask the assistant",disabled:c,onChange:o=>{n.updateText(o.target.value,o.target.selectionStart),d.trackCaret(o.target)},onSelect:o=>{n.refresh(o.currentTarget.selectionStart),d.trackCaret(o.currentTarget)},onClick:o=>{n.refresh(o.currentTarget.selectionStart),d.trackCaret(o.currentTarget)},onScroll:o=>y(o.currentTarget.scrollTop),onBlur:o=>{var g,f;(f=(g=o.relatedTarget)==null?void 0:g.closest)!=null&&f.call(g,".chat-paper-picker")||window.setTimeout(n.close,0)},onKeyDown:o=>{if(!n.keyDown(o)){if(Ve(o)&&C){o.preventDefault();const g=s+C;n.updateText(g,g.length),window.requestAnimationFrame(()=>{var f;return(f=P.current)==null?void 0:f.setSelectionRange(g.length,g.length)});return}o.key==="Enter"&&!o.shiftKey&&(o.preventDefault(),A())}},role:b?"combobox":void 0,"aria-expanded":b?n.open:void 0,"aria-controls":n.open?n.pickerId:void 0,"aria-activedescendant":n.open&&n.results.length?`${n.optionIdPrefix}-${n.activeIndex}`:void 0,"aria-autocomplete":b?"list":void 0,"aria-describedby":n.message?"ask-home-paper-mention-message":void 0})]}),e.jsx("button",{type:"button",className:`chat-send${s.trim()?" chat-send-on":""}`,onClick:()=>void A(),disabled:!s.trim()||c,"aria-label":"Ask the assistant",children:e.jsx(Je,{})})]}),k&&e.jsx("div",{className:"chat-paper-mention-message",role:"alert",children:e.jsx("a",{href:k,target:"_blank",rel:"noreferrer",children:"Open this question on paperswithcode.co"})}),n.message&&e.jsx("div",{id:"ask-home-paper-mention-message",className:"chat-paper-mention-message",role:"alert",children:n.message}),e.jsx(es,{open:n.open,query:n.query,results:n.results,activeIndex:n.activeIndex,loading:n.loading,error:n.error,onSelect:n.select,id:n.pickerId,optionIdPrefix:n.optionIdPrefix})]})]})},Ne={task:"Tasks",method:"Methods",benchmark:"Benchmarks",author:"Authors",organization:"Orgs"},fs=Object.keys(Ne),xs=30,we=40,ws=async r=>{const a=await r;return{results:a.results.map(m=>({paper:m})),next_page:a.next_page}},bs=({mode:r})=>{var Q,K,re,le,ce,de,ue;const a=r==="following",m=be(),l=Ce(),s=l==null?void 0:l.user,[w,y]=Fe(),c=Be(w,void 0,a?"month":"week"),j=t=>{const u=new URLSearchParams(w);u.delete("order_by"),u.delete("only");const T=u.toString();m(T?`${t}?${T}`:t)},k=t=>{const u=new URLSearchParams(w);t?u.set("only","topic"):u.delete("only");const T=u.toString();return T?`/following?${T}`:"/following"},L=R({queryKey:["top-tasks-sidebar"],queryFn:()=>ee.topTasks(8),staleTime:10*60*1e3}),_=R({queryKey:["trending-tasks-sidebar"],queryFn:()=>ee.trendingTasks({limit:8,level:0}),staleTime:10*60*1e3}),v=a&&w.get("only")==="topic",P={start_date:c.startDate,end_date:c.endDate},M={...c,topicOnly:v},b=ns(a?[...J.feeds.following,s==null?void 0:s.hf_subject,M]:[...r==="x"?J.feeds.xTrending:J.feeds.trending,P],async t=>{if(a){const T=await B.following(t,M),ke=T.length===we?t+we:null;return{results:T,next_page:ke}}const u={...P,page:t,page_size:xs,include_resources:!0};return ws(r==="x"?ge.xTrending(u):ge.list({...u,order_by:"trending",order_dir:"desc",latest_only:!0}))},{enabled:!a||!!s,initialPage:a?0:1}),n=R({queryKey:["research-follows",s==null?void 0:s.hf_subject],queryFn:B.follows,enabled:a&&!!s}),d=R({queryKey:["research-topic",s==null?void 0:s.hf_subject],queryFn:B.topic,enabled:a&&!!s,refetchInterval:t=>t.state.data&&["pending","running"].includes(t.state.data.status)?1e4:!1}),C=!!d.data&&["pending","running"].includes(d.data.status),A=d.data?d.data.label??d.data.text:"",[D,o]=h.useState(!1),g=Ee(),f=h.useRef(!1);h.useEffect(()=>{f.current&&!C&&g.invalidateQueries({queryKey:[...J.feeds.following,s==null?void 0:s.hf_subject]}),f.current=C},[C,g,s==null?void 0:s.hf_subject]);const F=a&&!!s&&((Q=n.data)==null?void 0:Q.length)===0&&d.isSuccess&&!d.data,q=a&&!(l!=null&&l.isLoading)&&!s||F,I=!!s||!Le(),[O,W]=h.useState(!1),[X]=h.useState(()=>!!he()||me().length>0),[Y,Z]=h.useState(!1);!O&&(d.data||(K=n.data)!=null&&K.length)&&W(!0),q&&!Y&&(Z(!0),I&&!O&&!X&&o(!0));const H=je(),{mutate:z}=H,U=h.useRef(!1);h.useEffect(()=>{var u;const t=he();!s||!d.isSuccess||!t||U.current||(U.current=!0,t===((u=d.data)==null?void 0:u.text)?$e():z(t))},[s,d.isSuccess,d.data,z]);const i=ve(),{mutate:p}=i,N=h.useRef(!1);h.useEffect(()=>{const t=me();!s||!t.length||N.current||(N.current=!0,p(t))},[s,p]);const S=h.useMemo(()=>fs.map(t=>{var u;return{kind:t,follows:a?((u=n.data)==null?void 0:u.filter(T=>T.kind===t))??[]:[]}}).filter(t=>t.follows.length>0),[a,n.data]),G=a&&(!!(l!=null&&l.isLoading)||!!s&&!F),V=h.useMemo(()=>{var t;return((t=b.data)==null?void 0:t.pages.flatMap(u=>u.results.map(T=>({...Ie(T.paper),followReasons:T.reasons}))))??[]},[b.data]),x=b.error;return e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Trending ",e.jsx("em",{children:"Research"})]}),e.jsx("div",{className:"feed-subtitle",children:r==="x"?"Papers people share most on X, picked daily":"Curated daily from arXiv and Hugging Face"})]})}),e.jsxs("div",{className:"layout-with-sidebar",children:[e.jsxs("aside",{className:"sidebar feed-sidebar",children:[G?e.jsxs("div",{className:"sidebar-section sidebar-section-follows",children:[e.jsx("div",{className:"sidebar-label",children:"You follow"}),((l==null?void 0:l.isLoading)||n.isLoading)&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:4}).map((t,u)=>e.jsx(te,{className:"h-5 w-full"},u))}),n.isError&&e.jsx("div",{style:{fontSize:12,color:"var(--ink-faint)"},children:"Couldn't load your follows."}),e.jsxs("div",{className:"sidebar-links",children:[d.data&&e.jsxs("div",{className:`sidebar-follow-topic ${v?"active":""}`,children:[e.jsxs(E,{to:k(!v),className:"sidebar-link sidebar-follow-link",title:v?"Show papers from everything you follow":`Show only papers about “${d.data.text}”`,"aria-current":v?"true":void 0,children:[e.jsx("span",{className:"sidebar-follow-kind",children:"Topic"}),e.jsx("span",{className:"sidebar-follow-name",children:A})]}),e.jsx("button",{type:"button",className:"sidebar-follow-edit","aria-label":"Edit topic","aria-expanded":D,onClick:()=>o(!0),children:"edit"})]}),S.map(t=>e.jsxs("div",{className:"sidebar-follow-group",children:[e.jsx("span",{className:"sidebar-follow-kind",children:Ne[t.kind]}),t.follows.map(u=>e.jsx(E,{to:u.url,className:"sidebar-link sidebar-follow-link",children:e.jsx("span",{className:"sidebar-follow-name",children:u.name})},u.entity_id))]},t.kind))]}),e.jsx(E,{to:"/settings",className:"sidebar-follow-manage",children:"Manage in Settings"})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"sidebar-section sidebar-section-top-domains",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),L.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((t,u)=>e.jsx(te,{className:"h-5 w-full"},u))}),e.jsxs("div",{className:"sidebar-links",children:[(re=L.data)==null?void 0:re.map(t=>e.jsxs(E,{to:`/tasks/${t.slug}`,className:"sidebar-link",children:[ie(t.name,t.slug),t.paper_count!=null&&e.jsx("span",{className:"count",children:t.paper_count})]},t.id)),e.jsx(E,{to:"/tasks",className:"sidebar-link sidebar-link-more",children:"all domains →"})]})]}),e.jsxs("div",{className:"sidebar-section sidebar-section-trending-domains",children:[e.jsx("div",{className:"sidebar-label",children:"Trending Domains"}),_.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((t,u)=>e.jsx(te,{className:"h-5 w-full"},u))}),((ce=(le=_.data)==null?void 0:le.results)==null?void 0:ce.length)===0&&!_.isLoading&&e.jsx("div",{style:{fontSize:12,color:"var(--ink-faint)"},children:"No domains gaining momentum right now."}),e.jsx("div",{className:"sidebar-links",children:(ue=(de=_.data)==null?void 0:de.results)==null?void 0:ue.map(t=>e.jsxs(E,{to:`/tasks/${t.slug}`,className:"sidebar-link",children:[ie(t.name,t.slug),e.jsxs("span",{className:"count",children:[t.share_lift.toFixed(1),"x"]})]},t.id))})]})]}),e.jsx(We,{})]}),e.jsxs("div",{className:"feed-main",children:[(ne()||ye())&&e.jsx("div",{className:"feed-chat",children:e.jsx(gs,{})}),e.jsxs("div",{className:"feed-content",children:[e.jsxs("div",{className:"sort-bar home-feed-sort-bar",children:[e.jsx("div",{className:"paper-feed-toolbar-controls",children:e.jsxs("div",{className:"sort-options",children:[e.jsx("button",{className:`sort-btn ${r==="trending"?"active":""}`,onClick:()=>j("/"),children:"trending"}),e.jsx("button",{className:`sort-btn ${r==="x"?"active":""}`,onClick:()=>j("/x-trending"),children:"trending (X)"}),e.jsx("button",{className:`sort-btn ${a?"active":""}`,onClick:()=>j("/following"),children:"following"})]})}),e.jsx(Ue,{startDate:c.startDate,endDate:c.endDate,onChange:t=>y(Ge(w,t))})]}),x&&e.jsx(ae,{variant:"destructive",className:"mb-4",children:e.jsxs(oe,{children:["Failed to load papers. ",e.jsx("button",{type:"button",onClick:()=>void b.refetch(),children:"Try again"})]})}),H.isError&&H.variables&&e.jsx(ae,{variant:"destructive",className:"mb-4",children:e.jsxs(oe,{children:["Could not follow “",H.variables,"”. ",e.jsx("button",{type:"button",onClick:()=>z(H.variables),children:"Try again"})]})}),i.isError&&i.variables&&e.jsx(ae,{variant:"destructive",className:"mb-4",children:e.jsxs(oe,{children:["Could not follow ",i.variables.map(t=>t.name).join(", "),". ",e.jsx("button",{type:"button",onClick:()=>p(i.variables),children:"Try again"})]})}),a&&!!s&&d.isSuccess&&!n.isPending&&!F&&(d.data?C?e.jsxs("div",{className:"following-topic-note",role:"status",children:["Showing the closest papers about “",A,"” now. A model is reading papers to refine these matches, which takes a few minutes."]}):null:e.jsxs("div",{className:"following-topic-note",role:"status",children:["Describe a topic in your own words, and a model adds matching new papers to this feed."," ",e.jsx("button",{type:"button",className:"link-button",onClick:()=>o(!0),children:"Follow a topic"})]})),a&&I&&e.jsx(rs,{open:D,onOpenChange:o}),v&&d.data&&e.jsxs("div",{className:"following-topic-note following-topic-filter",role:"status",children:["Showing only papers about “",A,"”."," ",e.jsx(E,{to:k(!1),children:"Show everything you follow"})]}),q?e.jsx(is,{onBuild:I?()=>o(!0):void 0}):e.jsx(Qe,{query:b,isLoading:b.isLoading||a&&!!(l!=null&&l.isLoading),cards:V,skeleton:"card",rootMargin:"400px",empty:x?null:v?e.jsxs(e.Fragment,{children:["No papers about your topic match these filters. Widen the date range or ",e.jsx("button",{type:"button",className:"link-button",onClick:()=>o(!0),children:"edit your topic"}),"."]}):a?e.jsxs(e.Fragment,{children:["No papers from your topic or follows match these filters. Widen the date range, or follow more from ",e.jsx(E,{to:"/tasks",children:"tasks"}),", ",e.jsx(E,{to:"/methods",children:"methods"}),", benchmark, author, or organization pages."]}):r==="x"?"No papers shared on X in this window.":"No papers in this window."})]})]})]})]})},Zs=({xTrending:r=!1})=>e.jsx(bs,{mode:r?"x":"trending"});export{gs as AskAssistant,bs as HomeFeed,Zs as default};
|
|
|
|
|
|
assets/FeedView-tA68x8iy.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{j as e,L as F,a as _e,c as Ce,b as H,r as ne,d as h,h as Ee,C as Fe,T as Q,e as je,f as Le,g as Ae,p as se,i as De,k as Re,l as re,m as ve,n as Me,o as qe}from"./index-DyXq7-Tg.js";import{S as Ie}from"./sparkles-CcIiUzzc.js";import{D as Oe,a as He,b as $e}from"./dialog-CfM0Uql2.js";import{c as J}from"./catalog-CRar2olQ.js";import{u as Ne,a as Se,b as ke,T as me,s as ze,c as Ke,r as ee,d as ge,e as fe,f as Be}from"./researchTopic-DbX0eko-.js";import{d as le,t as Ue}from"./transform-D46m70Qr.js";import{P as Ge}from"./plus-Yh42pKZz.js";import{A as Qe}from"./arrow-right-BzPanrWZ.js";import{r as We,P as Xe,w as Ye,a as Ze}from"./PaperFeed-EBt97iOL.js";import{M as Ve}from"./McpShowcase-CLO4HLon.js";import{u as Je,a as es,P as ss,i as ts,A as as,b as os,S as $,c as is,D as te,q as ns,d as rs}from"./chatSessions-Ck_dyM0d.js";import{c as ls}from"./chat-Ix1IrIwq.js";import{u as cs}from"./usePapers-B0s20UcU.js";import{p as xe}from"./papers-Dh3ljlL0.js";import{S as ae}from"./skeleton-C3IIzpSL.js";import{A as oe,a as ie}from"./alert-gbJBhAVE.js";import"./useMutation-UWxBeqtn.js";import"./PaperCard-57p1OSGy.js";import"./AuthorAvatar-B-9xS2Wo.js";import"./SotaBadges-vbLLOUtT.js";import"./colors-BkWRhvFI.js";import"./Icon-T4LYkEQj.js";import"./LatexTitle-Bkyz3jCs.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-CTBEUp7Y.js";import"./useIntersectionObserver-D6_Iig9a.js";import"./AgentLogos-j-Qekw7T.js";import"./useInfiniteQuery-BYh2zN-T.js";import"./curation-YeS7FBYf.js";function ds({onBuild:r}){return e.jsxs("section",{className:"following-intro","aria-labelledby":"following-intro-title",children:[e.jsx("h2",{id:"following-intro-title",children:"Build your personal research feed"}),e.jsx("p",{className:"following-intro-lead",children:"Describe a topic in your own words, or follow the tasks, benchmarks, authors, and organizations you care about, and this page collects their latest papers and results in one place."}),r&&e.jsxs("button",{type:"button",className:"research-topic-save following-intro-topic",onClick:r,children:[e.jsx(Ie,{"aria-hidden":"true"}),"Build your feed"]}),e.jsxs("p",{className:"following-intro-note",children:["Matching papers also arrive as a weekly email, which you can turn off in"," ",e.jsx(F,{to:"/settings",children:"Settings"}),"."]})]})}const we=16;function us({open:r,onOpenChange:o}){return e.jsx(Oe,{open:r,onOpenChange:o,children:e.jsx(He,{className:"topic-dialog","aria-describedby":void 0,children:e.jsx(ps,{onDone:()=>o(!1)})})})}function ps({onDone:r}){var W,X,Y,Z,O,z,B;const{user:o}=_e(),m=Ce(),l=H({queryKey:ne.topic(o==null?void 0:o.hf_subject),queryFn:ee.topic,enabled:!!o}),t=Ne(),w=H({queryKey:["trending-tasks-follow"],queryFn:()=>J.trendingTasks({limit:we,level:0}),staleTime:Q}),y=H({queryKey:["trending-methods-follow"],queryFn:()=>J.trendingMethods({limit:we}),staleTime:Q}),c=H({queryKey:["research-follow-suggestions"],queryFn:ee.followSuggestions,staleTime:Q}),j=(n=[])=>n.map(p=>({id:String(p.entity_id),name:p.name,image:p.image_url})),[S,L]=h.useState(null),[P,v]=h.useState([]),_=Se(),M=ke(),b=((W=l.data)==null?void 0:W.text)??"",i=S??b,d=i.trim().replace(/\s+/g," "),C=((X=l.data)==null?void 0:X.status)==="failed"&&d===b,A=d.length>=3&&(d!==b||C),D=_.isPending||M.isPending,a=(n,p)=>{var N;return((N=t.data)==null?void 0:N.some(k=>k.kind===n&&String(k.entity_id)===p))??!1},g=(n,p)=>{var N;return((N=P.find(k=>k.kind===n&&k.id===p))==null?void 0:N.follow)??a(n,p)},f=P.filter(n=>n.follow!==a(n.kind,n.id)),E=!D&&(A||f.length>0),R=(n,p,N)=>v(k=>[...k.filter(U=>U.kind!==n||U.id!==p),{kind:n,id:p,name:N,follow:!g(n,p)}]),q=()=>{if(!E)return;if(!o){A&&ze(d),f.length&&Ke(f),window.location.href=Ee(`${m.pathname}${m.search}`);return}const n=[...f.length?[M.mutateAsync(f)]:[],...A?[_.mutateAsync(d)]:[]];Promise.allSettled(n).then(p=>{p.every(N=>N.status==="fulfilled")&&r()})},I=(n,p,N,k)=>{const V=[...(t.data??[]).filter(x=>x.kind===p).map(x=>({id:String(x.entity_id),name:x.name,slug:x.url.split("/").pop(),image:x.image_url})),...N.filter(x=>!a(p,x.id)).map(x=>({...x,suggested:!0}))];return V.length>0&&e.jsxs("div",{className:"topic-dialog-group",children:[e.jsx("h3",{children:n}),e.jsxs(hs,{children:[V.map(x=>{const G=g(p,x.id),K=p==="task"?le(x.name,x.slug??void 0):x.name;return e.jsxs("button",{type:"button",className:"topic-dialog-chip","aria-pressed":G,disabled:D,"data-suggested":"suggested"in x||void 0,onClick:()=>R(p,x.id,K),children:[G?e.jsx(Fe,{"aria-hidden":"true"}):e.jsx(Ge,{"aria-hidden":"true"}),(p==="author"||p==="organization")&&e.jsx(ms,{kind:p,name:K,src:x.image}),K]},x.id)}),k&&e.jsxs(F,{to:k.to,className:"topic-dialog-browse",children:[k.label,e.jsx(Qe,{"aria-hidden":"true"})]})]})]})};return e.jsxs("form",{className:"topic-dialog-form",onSubmit:n=>{n.preventDefault(),q()},children:[e.jsx($e,{className:"topic-dialog-title",children:b||(Y=t.data)!=null&&Y.length?"Edit your research feed":"Build your research feed"}),e.jsxs("div",{className:"topic-dialog-group",children:[e.jsx("h3",{children:e.jsx("label",{htmlFor:"topic-dialog-input",children:"Describe a topic in your own words"})}),e.jsx("p",{className:"topic-dialog-hint",children:"A model reads every new paper and adds the ones that match to your Following feed."}),e.jsx("textarea",{id:"topic-dialog-input",className:"research-topic-input",rows:4,maxLength:me,"aria-label":"Research topic",placeholder:"e.g. diffusion policies for robot manipulation, or speculative decoding for LLM inference",value:i,onChange:n=>L(n.target.value),onKeyDown:n=>{n.key==="Enter"&&!n.shiftKey&&!n.nativeEvent.isComposing&&(n.preventDefault(),q())}}),e.jsxs("span",{className:"research-topic-count",children:[i.length,"/",me]})]}),I("Trending tasks","task",((Z=w.data)==null?void 0:Z.results)??[],{to:"/tasks",label:"Browse tasks"}),I("Trending methods","method",((O=y.data)==null?void 0:O.results)??[],{to:"/methods",label:"Browse methods"}),I("Benchmarks","benchmark",[],{to:"/tasks",label:"Browse benchmarks"}),I("Popular authors","author",j((z=c.data)==null?void 0:z.authors)),I("Popular organizations","organization",j((B=c.data)==null?void 0:B.organizations),{to:"/organizations",label:"Browse organizations"}),(_.error||M.error)&&e.jsx("p",{className:"settings-token-error",role:"alert",children:"Could not save your feed. Please try again."}),e.jsxs("div",{className:"topic-dialog-actions",children:[b&&e.jsx("button",{type:"button",className:"research-follow-action topic-dialog-remove",disabled:D,onClick:()=>_.mutate(null,{onSuccess:r}),children:"Remove topic"}),e.jsx("button",{type:"button",className:"research-follow-action",disabled:D,onClick:r,children:"Cancel"}),e.jsx("button",{type:"submit",className:"research-topic-save",disabled:!E,children:f.some(n=>n.follow===!1)?"Save":f.length?"Follow":C?"Retry":b?"Update topic":"Follow"})]})]})}function hs({children:r}){const o=h.useRef(null);return h.useLayoutEffect(()=>{const m=o.current;if(!m)return;const l=()=>{const t=[...m.children],w=t.filter(c=>c.dataset.suggested);w.forEach(c=>{c.hidden=!1});const y=()=>new Set(t.filter(c=>!c.hidden).map(c=>c.offsetTop)).size;for(let c=w.length-1;c>=0&&y()>2;c--)w[c].hidden=!0};return l(),window.addEventListener("resize",l),()=>window.removeEventListener("resize",l)}),e.jsx("div",{ref:o,className:"topic-dialog-chips",children:r})}function ms({kind:r,name:o,src:m}){const[l,t]=h.useState(!1);if(m&&!l)return e.jsx("img",{className:`topic-dialog-chip-image is-${r}`,src:m,alt:"",loading:"lazy",onError:()=>t(!0)});if(r!=="author")return null;const w=o.split(/\s+/).filter(Boolean).map(y=>y[0]).slice(0,2).join("").toUpperCase();return e.jsx("span",{className:"topic-dialog-chip-image is-author is-initials","aria-hidden":"true",children:w})}const be=45,gs=1800,fs=25,xs=350,ws=r=>{const[o,m]=h.useState($[0].slice(0,1)),[l,t]=h.useState(0);return h.useEffect(()=>{var L,P;if(!r)return;if((P=(L=window.matchMedia)==null?void 0:L.call(window,"(prefers-reduced-motion: reduce)"))!=null&&P.matches){m($[0]),t(0);return}let w=0,y=1,c=!1,j;m($[0].slice(0,y)),t(0);const S=()=>{const v=$[w];if(!c){if(y+=1,m(v.slice(0,y)),y===v.length){c=!0,j=window.setTimeout(S,gs);return}j=window.setTimeout(S,be);return}if(y-=1,m(v.slice(0,y)),y===0){c=!1,w=(w+1)%$.length,t(w),j=window.setTimeout(S,xs);return}j=window.setTimeout(S,fs)};return j=window.setTimeout(S,be),()=>window.clearTimeout(j)},[r]),{placeholder:o,prompt:$[l]}},bs=()=>{var D;const r=je(),o=ve(),[m,l]=h.useState({text:"",paperMentions:[]}),t=m.text,[w,y]=h.useState(0),[c,j]=h.useState(!1),[S,L]=h.useState(null),{placeholder:P,prompt:v}=ws(!t),_=h.useRef(null),M=H({queryKey:["chatAvailability"],queryFn:()=>ls.getAvailability(),retry:!1,enabled:re()}),b=re()&&((D=M.data)==null?void 0:D.paper_mentions_enabled)!==!1,i=Je({draft:m,onChange:l,enabled:b,textareaRef:_}),d=es(m,i.open),C=t?d.completion:v;h.useLayoutEffect(()=>{const a=_.current;if(!a)return;const g=()=>{if(a.style.height="auto",t){a.style.height=`${Math.min(is(a),160)}px`;return}const f=a.placeholder,E=$.reduce((R,q)=>(a.placeholder=q,Math.max(R,a.scrollHeight)),0);a.placeholder=f,a.style.height=`${Math.min(E,160)}px`};return g(),window.addEventListener("resize",g),()=>window.removeEventListener("resize",g)},[t,C]);const A=async(a=m)=>{const g=a.text.trim();if(!(!g||c)){if(o){const f=new URLSearchParams({q:g,model:te}),E=`${Me}?${f}`,R=window.open(E,"_blank");if(!R){L(E);return}R.opener=null,L(null),l({text:"",paperMentions:[]});return}j(!0),ns(a,te);try{const f=await rs(te);r(`/chat/${f.id}`)}catch{r("/chat")}}};return e.jsxs(e.Fragment,{children:[!o&&e.jsx("div",{className:"ask-home-new",children:"Hint: type @ to bring papers into context, or press Tab to use a suggestion"}),e.jsxs("div",{className:"ask-home",children:[e.jsxs("div",{className:"ask-home-row",children:[e.jsxs("div",{className:"ask-home-textarea-wrap",children:[e.jsx(ss,{text:m.text,mentions:m.paperMentions,scrollTop:w,variant:"home",completion:t?C:""}),e.jsx("textarea",{ref:_,rows:1,value:t,placeholder:P,"aria-label":"Ask the assistant",disabled:c,onChange:a=>{i.updateText(a.target.value,a.target.selectionStart),d.trackCaret(a.target)},onSelect:a=>{i.refresh(a.currentTarget.selectionStart),d.trackCaret(a.currentTarget)},onClick:a=>{i.refresh(a.currentTarget.selectionStart),d.trackCaret(a.currentTarget)},onScroll:a=>y(a.currentTarget.scrollTop),onBlur:a=>{var g,f;(f=(g=a.relatedTarget)==null?void 0:g.closest)!=null&&f.call(g,".chat-paper-picker")||window.setTimeout(i.close,0)},onKeyDown:a=>{if(!i.keyDown(a)){if(ts(a)&&C){a.preventDefault();const g=t+C;i.updateText(g,g.length),window.requestAnimationFrame(()=>{var f;return(f=_.current)==null?void 0:f.setSelectionRange(g.length,g.length)});return}a.key==="Enter"&&!a.shiftKey&&(a.preventDefault(),A())}},role:b?"combobox":void 0,"aria-expanded":b?i.open:void 0,"aria-controls":i.open?i.pickerId:void 0,"aria-activedescendant":i.open&&i.results.length?`${i.optionIdPrefix}-${i.activeIndex}`:void 0,"aria-autocomplete":b?"list":void 0,"aria-describedby":i.message?"ask-home-paper-mention-message":void 0})]}),e.jsx("button",{type:"button",className:`chat-send${t.trim()?" chat-send-on":""}`,onClick:()=>void A(),disabled:!t.trim()||c,"aria-label":"Ask the assistant",children:e.jsx(as,{})})]}),S&&e.jsx("div",{className:"chat-paper-mention-message",role:"alert",children:e.jsx("a",{href:S,target:"_blank",rel:"noreferrer",children:"Open this question on paperswithcode.co"})}),i.message&&e.jsx("div",{id:"ask-home-paper-mention-message",className:"chat-paper-mention-message",role:"alert",children:i.message}),e.jsx(os,{open:i.open,query:i.query,results:i.results,activeIndex:i.activeIndex,loading:i.loading,error:i.error,onSelect:i.select,id:i.pickerId,optionIdPrefix:i.optionIdPrefix})]})]})},Te={task:"Tasks",method:"Methods",benchmark:"Benchmarks",author:"Authors",organization:"Orgs"},ys=Object.keys(Te),js=30,ye=40,vs=async r=>{const o=await r;return{results:o.results.map(m=>({paper:m})),next_page:o.next_page}},Ns=({mode:r})=>{var G,K,ce,de,ue,pe,he;const o=r==="following",m=je(),l=Le(),t=l==null?void 0:l.user,[w,y]=Ae(),c=We(w,void 0,o?"month":"week"),j=s=>{const u=new URLSearchParams(w);u.delete("order_by"),u.delete("only");const T=u.toString();m(T?`${s}?${T}`:s)},S=s=>{const u=new URLSearchParams(w);s?u.set("only","topic"):u.delete("only");const T=u.toString();return T?`/following?${T}`:"/following"},L=H({queryKey:qe.topTasksSidebar,queryFn:()=>J.topTasks(8),staleTime:Q}),P=H({queryKey:["trending-tasks-sidebar"],queryFn:()=>J.trendingTasks({limit:8,level:0}),staleTime:Q}),v=o&&w.get("only")==="topic",_={start_date:c.startDate,end_date:c.endDate},M={...c,topicOnly:v},b=cs(o?[...se.feeds.following,t==null?void 0:t.hf_subject,M]:[...r==="x"?se.feeds.xTrending:se.feeds.trending,_],async s=>{if(o){const T=await ee.following(s,M),Pe=T.length===ye?s+ye:null;return{results:T,next_page:Pe}}const u={..._,page:s,page_size:js,include_resources:!0};return vs(r==="x"?xe.xTrending(u):xe.list({...u,order_by:"trending",order_dir:"desc",latest_only:!0}))},{enabled:!o||!!t,initialPage:o?0:1}),i=Ne(o),d=H({queryKey:ne.topic(t==null?void 0:t.hf_subject),queryFn:ee.topic,enabled:o&&!!t,refetchInterval:s=>s.state.data&&["pending","running"].includes(s.state.data.status)?1e4:!1}),C=!!d.data&&["pending","running"].includes(d.data.status),A=d.data?d.data.label??d.data.text:"",[D,a]=h.useState(!1),g=De(),f=h.useRef(!1);h.useEffect(()=>{f.current&&!C&&g.invalidateQueries({queryKey:ne.feed(t==null?void 0:t.hf_subject)}),f.current=C},[C,g,t==null?void 0:t.hf_subject]);const E=o&&!!t&&((G=i.data)==null?void 0:G.length)===0&&d.isSuccess&&!d.data,R=o&&!(l!=null&&l.isLoading)&&!t||E,q=!!t||!Re(),[I,W]=h.useState(!1),[X]=h.useState(()=>!!ge()||fe().length>0),[Y,Z]=h.useState(!1);!I&&(d.data||(K=i.data)!=null&&K.length)&&W(!0),R&&!Y&&(Z(!0),q&&!I&&!X&&a(!0));const O=Se(),{mutate:z}=O,B=h.useRef(!1);h.useEffect(()=>{var u;const s=ge();!t||!d.isSuccess||!s||B.current||(B.current=!0,s===((u=d.data)==null?void 0:u.text)?Be():z(s))},[t,d.isSuccess,d.data,z]);const n=ke(),{mutate:p}=n,N=h.useRef(!1);h.useEffect(()=>{const s=fe();!t||!s.length||N.current||(N.current=!0,p(s))},[t,p]);const k=h.useMemo(()=>ys.map(s=>{var u;return{kind:s,follows:o?((u=i.data)==null?void 0:u.filter(T=>T.kind===s))??[]:[]}}).filter(s=>s.follows.length>0),[o,i.data]),U=o&&(!!(l!=null&&l.isLoading)||!!t&&!E),V=h.useMemo(()=>{var s;return((s=b.data)==null?void 0:s.pages.flatMap(u=>u.results.map(T=>({...Ue(T.paper),followReasons:T.reasons}))))??[]},[b.data]),x=b.error;return e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Trending ",e.jsx("em",{children:"Research"})]}),e.jsx("div",{className:"feed-subtitle",children:r==="x"?"Papers people share most on X, picked daily":"Curated daily from arXiv and Hugging Face"})]})}),e.jsxs("div",{className:"layout-with-sidebar",children:[e.jsxs("aside",{className:"sidebar feed-sidebar",children:[U?e.jsxs("div",{className:"sidebar-section sidebar-section-follows",children:[e.jsx("div",{className:"sidebar-label",children:"You follow"}),((l==null?void 0:l.isLoading)||i.isLoading)&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:4}).map((s,u)=>e.jsx(ae,{className:"h-5 w-full"},u))}),i.isError&&e.jsx("div",{style:{fontSize:12,color:"var(--ink-faint)"},children:"Couldn't load your follows."}),e.jsxs("div",{className:"sidebar-links",children:[d.data&&e.jsxs("div",{className:`sidebar-follow-topic ${v?"active":""}`,children:[e.jsxs(F,{to:S(!v),className:"sidebar-link sidebar-follow-link",title:v?"Show papers from everything you follow":`Show only papers about “${d.data.text}”`,"aria-current":v?"true":void 0,children:[e.jsx("span",{className:"sidebar-follow-kind",children:"Topic"}),e.jsx("span",{className:"sidebar-follow-name",children:A})]}),e.jsx("button",{type:"button",className:"sidebar-follow-edit","aria-label":"Edit topic","aria-expanded":D,onClick:()=>a(!0),children:"edit"})]}),k.map(s=>e.jsxs("div",{className:"sidebar-follow-group",children:[e.jsx("span",{className:"sidebar-follow-kind",children:Te[s.kind]}),s.follows.map(u=>e.jsx(F,{to:u.url,className:"sidebar-link sidebar-follow-link",children:e.jsx("span",{className:"sidebar-follow-name",children:u.name})},u.entity_id))]},s.kind))]}),e.jsx(F,{to:"/settings",className:"sidebar-follow-manage",children:"Manage in Settings"})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"sidebar-section sidebar-section-top-domains",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),L.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,u)=>e.jsx(ae,{className:"h-5 w-full"},u))}),e.jsxs("div",{className:"sidebar-links",children:[(ce=L.data)==null?void 0:ce.map(s=>e.jsxs(F,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[le(s.name,s.slug),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count})]},s.id)),e.jsx(F,{to:"/tasks",className:"sidebar-link sidebar-link-more",children:"all domains →"})]})]}),e.jsxs("div",{className:"sidebar-section sidebar-section-trending-domains",children:[e.jsx("div",{className:"sidebar-label",children:"Trending Domains"}),P.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,u)=>e.jsx(ae,{className:"h-5 w-full"},u))}),((ue=(de=P.data)==null?void 0:de.results)==null?void 0:ue.length)===0&&!P.isLoading&&e.jsx("div",{style:{fontSize:12,color:"var(--ink-faint)"},children:"No domains gaining momentum right now."}),e.jsx("div",{className:"sidebar-links",children:(he=(pe=P.data)==null?void 0:pe.results)==null?void 0:he.map(s=>e.jsxs(F,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[le(s.name,s.slug),e.jsxs("span",{className:"count",children:[s.share_lift.toFixed(1),"x"]})]},s.id))})]})]}),e.jsx(Ve,{})]}),e.jsxs("div",{className:"feed-main",children:[(re()||ve())&&e.jsx("div",{className:"feed-chat",children:e.jsx(bs,{})}),e.jsxs("div",{className:"feed-content",children:[e.jsxs("div",{className:"sort-bar home-feed-sort-bar",children:[e.jsx("div",{className:"paper-feed-toolbar-controls",children:e.jsxs("div",{className:"sort-options",children:[e.jsx("button",{className:`sort-btn ${r==="trending"?"active":""}`,onClick:()=>j("/"),children:"trending"}),e.jsx("button",{className:`sort-btn ${r==="x"?"active":""}`,onClick:()=>j("/x-trending"),children:"trending (X)"}),e.jsx("button",{className:`sort-btn ${o?"active":""}`,onClick:()=>j("/following"),children:"following"})]})}),e.jsx(Xe,{startDate:c.startDate,endDate:c.endDate,onChange:s=>y(Ye(w,s))})]}),x&&e.jsx(oe,{variant:"destructive",className:"mb-4",children:e.jsxs(ie,{children:["Failed to load papers. ",e.jsx("button",{type:"button",onClick:()=>void b.refetch(),children:"Try again"})]})}),O.isError&&O.variables&&e.jsx(oe,{variant:"destructive",className:"mb-4",children:e.jsxs(ie,{children:["Could not follow “",O.variables,"”. ",e.jsx("button",{type:"button",onClick:()=>z(O.variables),children:"Try again"})]})}),n.isError&&n.variables&&e.jsx(oe,{variant:"destructive",className:"mb-4",children:e.jsxs(ie,{children:["Could not follow ",n.variables.map(s=>s.name).join(", "),". ",e.jsx("button",{type:"button",onClick:()=>p(n.variables),children:"Try again"})]})}),o&&!!t&&d.isSuccess&&!i.isPending&&!E&&(d.data?C?e.jsxs("div",{className:"following-topic-note",role:"status",children:["Showing the closest papers about “",A,"” now. A model is reading papers to refine these matches, which takes a few minutes."]}):null:e.jsxs("div",{className:"following-topic-note",role:"status",children:["Describe a topic in your own words, and a model adds matching new papers to this feed."," ",e.jsx("button",{type:"button",className:"link-button",onClick:()=>a(!0),children:"Follow a topic"})]})),o&&q&&e.jsx(us,{open:D,onOpenChange:a}),v&&d.data&&e.jsxs("div",{className:"following-topic-note following-topic-filter",role:"status",children:["Showing only papers about “",A,"”."," ",e.jsx(F,{to:S(!1),children:"Show everything you follow"})]}),R?e.jsx(ds,{onBuild:q?()=>a(!0):void 0}):e.jsx(Ze,{query:b,isLoading:b.isLoading||o&&!!(l!=null&&l.isLoading),cards:V,skeleton:"card",rootMargin:"400px",empty:x?null:v?e.jsxs(e.Fragment,{children:["No papers about your topic match these filters. Widen the date range or ",e.jsx("button",{type:"button",className:"link-button",onClick:()=>a(!0),children:"edit your topic"}),"."]}):o?e.jsxs(e.Fragment,{children:["No papers from your topic or follows match these filters. Widen the date range, or follow more from ",e.jsx(F,{to:"/tasks",children:"tasks"}),", ",e.jsx(F,{to:"/methods",children:"methods"}),", benchmark, author, or organization pages."]}):r==="x"?"No papers shared on X in this window.":"No papers in this window."})]})]})]})]})},Js=({xTrending:r=!1})=>e.jsx(Ns,{mode:r?"x":"trending"});export{bs as AskAssistant,Ns as HomeFeed,Js as default};
|
assets/FollowingView-Ctbw54vk.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{j as o}from"./index-DyXq7-Tg.js";import{HomeFeed as r}from"./FeedView-tA68x8iy.js";import"./sparkles-CcIiUzzc.js";import"./dialog-CfM0Uql2.js";import"./catalog-CRar2olQ.js";import"./researchTopic-DbX0eko-.js";import"./useMutation-UWxBeqtn.js";import"./transform-D46m70Qr.js";import"./plus-Yh42pKZz.js";import"./arrow-right-BzPanrWZ.js";import"./PaperFeed-EBt97iOL.js";import"./PaperCard-57p1OSGy.js";import"./AuthorAvatar-B-9xS2Wo.js";import"./SotaBadges-vbLLOUtT.js";import"./colors-BkWRhvFI.js";import"./Icon-T4LYkEQj.js";import"./LatexTitle-Bkyz3jCs.js";import"./papers-Dh3ljlL0.js";import"./curation-YeS7FBYf.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-CTBEUp7Y.js";import"./skeleton-C3IIzpSL.js";import"./useIntersectionObserver-D6_Iig9a.js";import"./McpShowcase-CLO4HLon.js";import"./AgentLogos-j-Qekw7T.js";import"./chatSessions-Ck_dyM0d.js";import"./chat-Ix1IrIwq.js";import"./usePapers-B0s20UcU.js";import"./useInfiniteQuery-BYh2zN-T.js";import"./alert-gbJBhAVE.js";function B(){return o.jsx(r,{mode:"following"})}export{B as default};
|
assets/FollowingView-nVVViEvV.js
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
import{j as o}from"./index-CbgxfyGU.js";import{HomeFeed as r}from"./FeedView-BR2dQQ-K.js";import"./sparkles-BqBXJPmy.js";import"./useQuery-Bx9s5-D2.js";import"./dialog-Cfp_d3CC.js";import"./catalog-DhK7_9-6.js";import"./research-DgpyzSy_.js";import"./transform-0Udg2p6b.js";import"./researchTopic-CteUev4M.js";import"./useMutation-P_trTy9i.js";import"./plus-UK0TEjgd.js";import"./arrow-right-DotD9yNb.js";import"./PaperFeed-DMvUfA47.js";import"./PaperCard-tdTC_dRN.js";import"./AuthorAvatar-CUJMmp_z.js";import"./SotaBadges-C-sTR-EF.js";import"./colors-BkWRhvFI.js";import"./Icon-D-kA0Owz.js";import"./LatexTitle-Z-HGmZ-H.js";import"./paperQueryKeys-B8u1BWlI.js";import"./curation-C7Gmmp4z.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-DKJYnYjk.js";import"./skeleton-HwvdxvSN.js";import"./useIntersectionObserver-CID9Kkak.js";import"./McpShowcase-CMLfdJM2.js";import"./AgentLogos-BBl9UNVD.js";import"./chatSessions-DwLUbLRo.js";import"./chat-DzTo2WUO.js";import"./usePapers-CJaWLZ3y.js";import"./useInfiniteQuery-BAc_4HO5.js";import"./alert-CFDDvdIM.js";function D(){return o.jsx(r,{mode:"following"})}export{D as default};
|
|
|
|
|
|
assets/FrameworksIndexView-CQtYg5mA.js
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
import{c as d,j as e,L as c,M as m}from"./index-CbgxfyGU.js";import{u as h}from"./useQuery-Bx9s5-D2.js";import{I as p}from"./Icon-D-kA0Owz.js";import{c as u}from"./catalog-DhK7_9-6.js";import{c as g,h as x}from"./colors-BkWRhvFI.js";import{P as f}from"./frameworks-DDA0P4Tf.js";const j={fontFamily:"var(--mono)",fontSize:13,fontWeight:600,letterSpacing:"0.04em",textTransform:"uppercase",color:"var(--ink)",marginBottom:6},k=({platform:s})=>{const n=g(x(s));return e.jsx("span",{className:"framework-platform-chip",style:{background:n.bg,color:n.text},children:f[s]})},_=({framework:s})=>{const n=d(),t=`/papers?framework=${encodeURIComponent(s.slug)}`;return e.jsxs("article",{id:`framework-${s.slug}`,className:"framework-card framework-card-clickable",role:"link",tabIndex:0,"aria-label":`View papers implemented by ${s.name}`,onClick:a=>{a.target.closest("a, button")||n(t)},onKeyDown:a=>{a.target===a.currentTarget&&(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),n(t))},children:[e.jsxs("div",{className:"framework-card-head",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"framework-card-name",children:s.name}),s.organization_name&&e.jsx("div",{className:"framework-card-org",children:s.organization_name})]}),s.platforms&&s.platforms.length>0&&e.jsx("div",{className:"framework-platform-row",children:s.platforms.map(a=>e.jsx(k,{platform:a},a))})]}),e.jsx("p",{className:"framework-card-desc",children:s.description}),s.when_to_use&&e.jsxs("div",{className:"framework-card-when",children:[e.jsx("span",{className:"framework-card-when-label",children:"When to use"}),s.when_to_use]}),(s.github_url||s.docs_url||s.introducing_paper_arxiv_id)&&e.jsxs("div",{className:"framework-card-links",children:[s.introducing_paper_arxiv_id&&e.jsx(c,{to:`/paper/${s.introducing_paper_arxiv_id}`,className:"framework-link",children:"Introducing paper"}),s.github_url&&s.paper_count>0&&e.jsxs(c,{to:t,className:"framework-link",children:["Implements ",s.paper_count," ",s.paper_count===1?"paper":"papers"]}),s.github_url&&s.paper_count===0&&e.jsx("span",{className:"framework-link framework-link-disabled","aria-disabled":"true",children:"Implements 0 papers"}),s.github_url&&e.jsxs("a",{href:s.github_url,target:"_blank",rel:"noopener noreferrer",className:"framework-link",children:[e.jsx(p,{name:"github",size:13}),"GitHub"]}),s.docs_url&&s.docs_url!==s.github_url&&e.jsx("a",{href:s.docs_url,target:"_blank",rel:"noopener noreferrer",className:"framework-link",children:"Docs"})]})]})},F=()=>{var a;const s=h({queryKey:["framework-catalog"],queryFn:()=>u.frameworkCatalog()}),n=((a=s.data)==null?void 0:a.domains)??[],t=n.reduce((i,r)=>i+r.categories.reduce((l,o)=>l+o.frameworks.length,0),0);return m.useEffect(()=>{var r;const i=window.location.hash.slice(1);i&&((r=document.getElementById(i))==null||r.scrollIntoView())},[s.data]),e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["AI ",e.jsx("em",{children:"Frameworks"})]}),e.jsx("div",{className:"feed-subtitle",children:"Curated libraries and tools to run, serve, and train models — pick the right stack for your hardware and workload."})]})}),s.isLoading&&e.jsx("div",{className:"empty",children:"Loading frameworks…"}),s.isError&&e.jsx("div",{className:"empty",children:"Could not load frameworks."}),n.map(i=>e.jsxs("section",{style:{marginBottom:56},children:[e.jsxs("div",{className:"area-section-head",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"area-section-title",children:i.name}),e.jsx("div",{className:"area-section-description",children:i.description})]}),e.jsxs("div",{className:"area-section-meta",children:[i.categories.length," ",i.categories.length===1?"category":"categories"," ·"," ",i.categories.reduce((r,l)=>r+l.frameworks.length,0)," frameworks"]})]}),i.categories.map(r=>e.jsxs("div",{className:"framework-category",children:[e.jsxs("div",{className:"framework-category-head",children:[e.jsxs("div",{children:[e.jsx("h3",{style:j,children:r.name}),r.description&&e.jsx("p",{className:"framework-category-blurb",children:r.description}),r.guide_url&&e.jsxs("a",{href:r.guide_url,target:"_blank",rel:"noopener noreferrer",className:"framework-guide-link",children:[r.guide_label??"Read guide"," →"]})]}),e.jsxs("div",{className:"framework-category-meta",children:[r.frameworks.length," ",r.frameworks.length===1?"framework":"frameworks"]})]}),e.jsx("div",{className:"framework-grid",children:r.frameworks.map(l=>e.jsx(_,{framework:l},l.slug))})]},r.slug))]},i.slug)),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:8},children:[t," frameworks across ",n.length," ",n.length===1?"domain":"domains",". More areas coming soon."]})]})};export{_ as FrameworkCard,F as default};
|
|
|
|
|
|
assets/FrameworksIndexView-CZmHXkeL.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{e as d,j as e,L as c,b as m,V as h}from"./index-DyXq7-Tg.js";import{I as p}from"./Icon-T4LYkEQj.js";import{c as u}from"./catalog-CRar2olQ.js";import{c as g,h as x}from"./colors-BkWRhvFI.js";import{P as f}from"./frameworks-DDA0P4Tf.js";const j={fontFamily:"var(--mono)",fontSize:13,fontWeight:600,letterSpacing:"0.04em",textTransform:"uppercase",color:"var(--ink)",marginBottom:6},k=({platform:s})=>{const n=g(x(s));return e.jsx("span",{className:"framework-platform-chip",style:{background:n.bg,color:n.text},children:f[s]})},_=({framework:s})=>{const n=d(),t=`/papers?framework=${encodeURIComponent(s.slug)}`;return e.jsxs("article",{id:`framework-${s.slug}`,className:"framework-card framework-card-clickable",role:"link",tabIndex:0,"aria-label":`View papers implemented by ${s.name}`,onClick:a=>{a.target.closest("a, button")||n(t)},onKeyDown:a=>{a.target===a.currentTarget&&(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),n(t))},children:[e.jsxs("div",{className:"framework-card-head",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"framework-card-name",children:s.name}),s.organization_name&&e.jsx("div",{className:"framework-card-org",children:s.organization_name})]}),s.platforms&&s.platforms.length>0&&e.jsx("div",{className:"framework-platform-row",children:s.platforms.map(a=>e.jsx(k,{platform:a},a))})]}),e.jsx("p",{className:"framework-card-desc",children:s.description}),s.when_to_use&&e.jsxs("div",{className:"framework-card-when",children:[e.jsx("span",{className:"framework-card-when-label",children:"When to use"}),s.when_to_use]}),(s.github_url||s.docs_url||s.introducing_paper_arxiv_id)&&e.jsxs("div",{className:"framework-card-links",children:[s.introducing_paper_arxiv_id&&e.jsx(c,{to:`/paper/${s.introducing_paper_arxiv_id}`,className:"framework-link",children:"Introducing paper"}),s.github_url&&s.paper_count>0&&e.jsxs(c,{to:t,className:"framework-link",children:["Implements ",s.paper_count," ",s.paper_count===1?"paper":"papers"]}),s.github_url&&s.paper_count===0&&e.jsx("span",{className:"framework-link framework-link-disabled","aria-disabled":"true",children:"Implements 0 papers"}),s.github_url&&e.jsxs("a",{href:s.github_url,target:"_blank",rel:"noopener noreferrer",className:"framework-link",children:[e.jsx(p,{name:"github",size:13}),"GitHub"]}),s.docs_url&&s.docs_url!==s.github_url&&e.jsx("a",{href:s.docs_url,target:"_blank",rel:"noopener noreferrer",className:"framework-link",children:"Docs"})]})]})},I=()=>{var a;const s=m({queryKey:["framework-catalog"],queryFn:()=>u.frameworkCatalog()}),n=((a=s.data)==null?void 0:a.domains)??[],t=n.reduce((i,r)=>i+r.categories.reduce((l,o)=>l+o.frameworks.length,0),0);return h.useEffect(()=>{var r;const i=window.location.hash.slice(1);i&&((r=document.getElementById(i))==null||r.scrollIntoView())},[s.data]),e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["AI ",e.jsx("em",{children:"Frameworks"})]}),e.jsx("div",{className:"feed-subtitle",children:"Curated libraries and tools to run, serve, and train models — pick the right stack for your hardware and workload."})]})}),s.isLoading&&e.jsx("div",{className:"empty",children:"Loading frameworks…"}),s.isError&&e.jsx("div",{className:"empty",children:"Could not load frameworks."}),n.map(i=>e.jsxs("section",{style:{marginBottom:56},children:[e.jsxs("div",{className:"area-section-head",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"area-section-title",children:i.name}),e.jsx("div",{className:"area-section-description",children:i.description})]}),e.jsxs("div",{className:"area-section-meta",children:[i.categories.length," ",i.categories.length===1?"category":"categories"," ·"," ",i.categories.reduce((r,l)=>r+l.frameworks.length,0)," frameworks"]})]}),i.categories.map(r=>e.jsxs("div",{className:"framework-category",children:[e.jsxs("div",{className:"framework-category-head",children:[e.jsxs("div",{children:[e.jsx("h3",{style:j,children:r.name}),r.description&&e.jsx("p",{className:"framework-category-blurb",children:r.description}),r.guide_url&&e.jsxs("a",{href:r.guide_url,target:"_blank",rel:"noopener noreferrer",className:"framework-guide-link",children:[r.guide_label??"Read guide"," →"]})]}),e.jsxs("div",{className:"framework-category-meta",children:[r.frameworks.length," ",r.frameworks.length===1?"framework":"frameworks"]})]}),e.jsx("div",{className:"framework-grid",children:r.frameworks.map(l=>e.jsx(_,{framework:l},l.slug))})]},r.slug))]},i.slug)),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:8},children:[t," frameworks across ",n.length," ",n.length===1?"domain":"domains",". More areas coming soon."]})]})};export{_ as FrameworkCard,I as default};
|
assets/{Icon-D-kA0Owz.js → Icon-T4LYkEQj.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{j as o}from"./index-
|
|
|
|
| 1 |
+
import{j as o}from"./index-DyXq7-Tg.js";const s=({name:t,size:r=14})=>{const e={search:o.jsx("path",{d:"M11 11l3 3M7 12.5a5.5 5.5 0 110-11 5.5 5.5 0 010 11z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round"}),arrowUp:o.jsx("path",{d:"M8 3l5 6H3l5-6z",fill:"currentColor"}),arrowLeft:o.jsx("path",{d:"M9 3l-4 5 4 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),arrowRight:o.jsx("path",{d:"M7 3l4 5-4 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),external:o.jsx("path",{d:"M5 3h-2v8h8v-2M9 3h3v3M7 9l5-5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),github:o.jsx("path",{d:"M8 1a7 7 0 00-2.21 13.64c.35.06.48-.15.48-.34v-1.2c-1.95.42-2.36-.94-2.36-.94-.32-.81-.78-1.03-.78-1.03-.64-.43.05-.43.05-.43.7.05 1.07.72 1.07.72.62 1.07 1.64.76 2.04.58.06-.45.24-.76.44-.94-1.55-.18-3.18-.78-3.18-3.46 0-.76.27-1.39.72-1.88-.07-.18-.31-.89.07-1.86 0 0 .59-.19 1.92.72.56-.15 1.16-.23 1.75-.24.59 0 1.19.08 1.75.24 1.33-.9 1.92-.72 1.92-.72.38.97.14 1.68.07 1.86.45.49.72 1.12.72 1.88 0 2.69-1.64 3.28-3.19 3.45.25.22.48.65.48 1.32v1.95c0 .19.13.41.49.34A7 7 0 008 1z",fill:"currentColor"}),citation:o.jsx("path",{d:"M3 4h3v3H3zM4 7v1.5a1.5 1.5 0 01-1.5 1.5M9 4h3v3H9zM10 7v1.5a1.5 1.5 0 01-1.5 1.5",stroke:"currentColor",strokeWidth:"1.2",fill:"none"}),bookmark:o.jsx("path",{d:"M4 2h8v12l-4-3-4 3V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),chart:o.jsx("path",{d:"M2 13h12M3 11l3-4 3 2 4-5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),chat:o.jsx("path",{d:"M3 3h10v7H7l-3 3v-3H3V3z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),pdf:o.jsx("path",{d:"M5 2h5l3 3v9H5V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),copy:o.jsx("path",{d:"M5 5h7v8H5V5zM3 3h7v2M3 3v8h2",stroke:"currentColor",strokeWidth:"1.2",fill:"none",strokeLinejoin:"round"}),sparkle:o.jsx("path",{d:"M8 2l1.2 3.8L13 7l-3.8 1.2L8 12l-1.2-3.8L3 7l3.8-1.2L8 2z",fill:"currentColor"}),user:o.jsx("path",{d:"M8 8a3 3 0 100-6 3 3 0 000 6zM2 14c0-3 2.5-5 6-5s6 2 6 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round"}),globe:o.jsx("path",{d:"M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM1.5 8h13M8 1.5c1.7 1.9 2.6 4.2 2.6 6.5s-.9 4.6-2.6 6.5M8 1.5C6.3 3.4 5.4 5.7 5.4 8s.9 4.6 2.6 6.5",stroke:"currentColor",strokeWidth:"1.2",fill:"none",strokeLinecap:"round"}),menu:o.jsx("path",{d:"M2 4h12M2 8h12M2 12h12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),close:o.jsx("path",{d:"M3 3l10 10M13 3L3 13",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),pencil:o.jsx("path",{d:"M10.5 2.5l3 3L6 13H3v-3l7.5-7.5zM9 4l3 3",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})};return o.jsx("svg",{className:r===11?"icon-sm":"icon",viewBox:"0 0 16 16",width:r,height:r,children:e[t]})};export{s as I};
|
assets/{LatexTitle-Z-HGmZ-H.js → LatexTitle-Bkyz3jCs.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
| 1 |
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/katex-wklAmtGL.css"])))=>i.map(i=>d[i]);
|
| 2 |
-
import{j as u,
|
|
|
|
| 1 |
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/katex-wklAmtGL.css"])))=>i.map(i=>d[i]);
|
| 2 |
+
import{j as u,d as A,a7 as L}from"./index-DyXq7-Tg.js";let g=null,$=null;function M(){return $??($=Promise.all([L(()=>import("./katex-DkKDou_j.js"),[]),L(()=>Promise.resolve({}),__vite__mapDeps([0]))]).then(([n])=>(g=n.default,g))),$}const O=new Set([",",";",":","!"," ","quad","qquad","enspace","thinspace"]),S={a:"á",e:"é",i:"í",o:"ó",u:"ú",y:"ý",A:"Á",E:"É",I:"Í",O:"Ó",U:"Ú",Y:"Ý"},b={a:"à",e:"è",i:"ì",o:"ò",u:"ù",A:"À",E:"È",I:"Ì",O:"Ò",U:"Ù"},w={a:"â",e:"ê",i:"î",o:"ô",u:"û",A:"Â",E:"Ê",I:"Î",O:"Ô",U:"Û"},k={a:"ä",e:"ë",i:"ï",o:"ö",u:"ü",y:"ÿ",A:"Ä",E:"Ë",I:"Ï",O:"Ö",U:"Ü",Y:"Ÿ"},N={"'":S,"`":b,"^":w,'"':k,"~":{n:"ñ",N:"Ñ"}},T={ss:"ß",ae:"æ",AE:"Æ",oe:"œ",OE:"Œ",o:"ø",O:"Ø",l:"ł",L:"Ł"};function I(n,i){var e;return((e=N[n])==null?void 0:e[i])??null}function v(n){const i=[];let e=0,t="";const r=()=>{t&&(i.push({type:"text",content:t}),t="")};for(;e<n.length;){if(n[e]==="$"&&n[e+1]==="$"){r();const o=n.indexOf("$$",e+2);if(o===-1){t+=n.slice(e);break}i.push({type:"display",content:n.slice(e+2,o)}),e=o+2;continue}if(n[e]==="$"){r();const o=n.indexOf("$",e+1);if(o===-1){t+=n.slice(e);break}i.push({type:"inline",content:n.slice(e+1,o)}),e=o+1;continue}t+=n[e],e+=1}return r(),i}function d(n,i){if(n[i]!=="{")return null;let e=0;for(let t=i;t<n.length;t+=1)if(n[t]==="{")e+=1;else if(n[t]==="}"&&(e-=1,e===0))return{content:n.slice(i+1,t),end:t+1};return null}function j(n,i){let e=i+1;if(e>=n.length)return{name:"",end:e};if(!/[a-zA-Z]/.test(n[e]))return{name:n[e],end:e+1};const t=e;for(;e<n.length&&/[a-zA-Z]/.test(n[e]);)e+=1;return{name:n.slice(t,e),end:e}}function U(n,i){const e=n[i];if(e!=="^"&&e!=="_"||i+1>=n.length)return null;if(n[i+1]==="{"){const t=d(n,i+1);return t?{end:t.end}:null}return/[A-Za-z0-9+\-=.]/.test(n[i+1])?{end:i+2}:null}function y(n,i){let e=i;if(n[e]==="\\"){const{name:o,end:s}=j(n,e);if(!o)return null;if(e=s,n[e]==="{"){const a=d(n,e);a&&(e=a.end)}}else if(/[A-Za-z0-9]/.test(n[e])){let o=e+1;for(;o<n.length&&/[A-Za-z0-9]/.test(n[o]);)o+=1;if(n[o]!=="^"&&n[o]!=="_")return null;e=o}else return null;const t=i;let r=0;for(;e<n.length;){const o=U(n,e);if(!o)break;r+=1,e=o.end}return r===0?null:{latex:n.slice(t,e),end:e}}function z(n){return Array.from(new Set((n||"").trim().split(/\s+/).filter(Boolean))).sort((i,e)=>e.length-i.length)}function X(n,i,e){const t=z(i);if(!t.length)return[n];const r=t.map(s=>s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),o=new RegExp(`(${r.join("|")})`,"gi");return n.split(o).filter(Boolean).map((s,a)=>t.some(p=>p.toLocaleLowerCase()===s.toLocaleLowerCase())?u.jsx("mark",{children:s},`${e}-mark-${a}`):s)}function m(n,i,e){const t=[];let r=0,o=0;const s=()=>`${i}-${o++}`,a=(p,f)=>p==="strong"?u.jsx("strong",{children:f},s()):u.jsx("em",{children:f},s());for(;r<n.length;){if(n[r]==="\\"){const{name:l,end:C}=j(n,r);if(r=C,T[l]){t.push(T[l]);continue}if(l.length===1&&r<n.length&&/[A-Za-z]/.test(n[r])){const c=I(l,n[r]);if(c){t.push(c),r+=1;continue}}if(l==="c"){const c=d(n,r);if((c==null?void 0:c.content.length)===1){const h={c:"ç",C:"Ç"}[c.content];if(h){t.push(h),r=c.end;continue}}}if(l==="textbf"||l==="mathbf"){const c=d(n,r);if(c){r=c.end,t.push(a("strong",m(c.content,s(),e)));continue}}if(l==="emph"||l==="textit"||l==="textsl"||l==="texttt"){const c=d(n,r);if(c){r=c.end,t.push(a("em",m(c.content,s(),e)));continue}}if(l==="color"||l==="textcolor"){const c=d(n,r);if(c){r=c.end;const h=d(n,r);h&&(r=h.end,t.push(...m(h.content,s(),e)));continue}}if(O.has(l)){t.push(" ");continue}if(l==="~"){t.push(" ");continue}const E=d(n,r);if(E){r=E.end,t.push(...m(E.content,s(),e));continue}t.push(`\\${l}`);continue}if(n[r]==="~"){t.push(" "),r+=1;continue}const p=y(n,r);if(p){t.push(u.jsx(_,{latex:p.latex,display:!1},s())),r=p.end;continue}let f=r;for(;f<n.length&&n[f]!=="\\"&&n[f]!=="~"&&!y(n,f);)f+=1;f>r&&t.push(...X(n.slice(r,f),e,s())),r=f}return t}function _({latex:n,display:i}){const[e,t]=A.useState(g);A.useEffect(()=>{if(e)return;let o=!0;return M().then(s=>{o&&t(()=>s)}),()=>{o=!1}},[e]);const r=A.useMemo(()=>{if(e)try{return e.renderToString(n.trim(),{displayMode:i,throwOnError:!1})}catch{return null}},[e,n,i]);return r===void 0?u.jsx(u.Fragment,{children:n}):r?u.jsx("span",{className:i?"katex-display":void 0,dangerouslySetInnerHTML:{__html:r}}):u.jsx(u.Fragment,{children:i?`$$${n}$$`:`$${n}$`})}function D(n,i){const e=v(n),t=[];return e.forEach((r,o)=>{const s=`latex-${o}`;if(r.type==="text"){const a=m(r.content,s,i);a.length===1?t.push(a[0]):a.length>1&&t.push(u.jsx(A.Fragment,{children:a},s));return}if(r.type==="display"){t.push(u.jsx(_,{latex:r.content,display:!0},s));return}t.push(u.jsx(_,{latex:r.content,display:!1},s))}),t.length===1?t[0]:u.jsx(u.Fragment,{children:t})}const P=({text:n,className:i="",highlight:e})=>{const t=A.useMemo(()=>D(n,e),[n,e]);return u.jsx("span",{className:i,children:t})},Z=({title:n,className:i="",highlight:e})=>u.jsx(P,{text:n,className:i,highlight:e});export{Z as L,P as a};
|
assets/{MarkdownText-Bj-G_S-B.js → MarkdownText-CUzPoC9Y.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{
|
|
|
|
| 1 |
+
import{w as c,j as o,L as u}from"./index-DyXq7-Tg.js";/* empty css */import{r as p,a as m,P as d}from"./PaperPreviewLink-CpCZSa8K.js";import{M as h}from"./index-mCi_y_l3.js";import{r as f}from"./index-2CvJmBVB.js";function w(e){return(e??"").split(",").map(a=>a.trim().toLowerCase()).filter(Boolean)}const x=new Set(["paperswithcode.co","www.paperswithcode.co","localhost","127.0.0.1",...w(void 0)]),P=["/methods","/paper","/papers","/tasks","/benchmark","/conferences"];function k(e,a=window.location.origin){if(!e)return null;let t;if(e.startsWith("/"))t=e;else try{const n=new URL(e,a);if(!x.has(n.hostname))return null;t=`${n.pathname}${n.search}${n.hash}`}catch{return null}const r=t.split(/[?#]/,1)[0];return P.some(n=>r===n||r.startsWith(`${n}/`))?t:null}function I(e){const t=e.split(/[?#]/,1)[0].match(/^\/papers?\/([^/]+)$/);if(!t||t[1].includes("%"))return null;const r=t[1],n=/^\d{4}[.-]\d{4,5}(?:v\d+)?$/.test(r),s=/^[1-9]\d*$/.test(r);return!n&&!s?null:c(r)}const M=({text:e,className:a=""})=>o.jsx("div",{className:a,children:o.jsx(h,{remarkPlugins:[f,m],rehypePlugins:[p],components:{a:({href:t,children:r,node:n,...s})=>{const i=k(t);if(i){const l=I(i);return l?o.jsx(d,{routeId:l,to:i,...s,children:r}):o.jsx(u,{to:i,...s,children:r})}return o.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",...s,children:r})}},children:e})});export{M,k as r};
|
assets/{McpShowcase-CMLfdJM2.js → McpShowcase-CLO4HLon.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{j as e,L as t}from"./index-
|
|
|
|
| 1 |
+
import{j as e,L as t}from"./index-DyXq7-Tg.js";import{A as a}from"./AgentLogos-j-Qekw7T.js";function n({className:s="",canNavigate:r}){return e.jsxs("div",{className:`sidebar-section sidebar-section-tools ${s}`.trim(),children:[e.jsx("div",{className:"sidebar-label",children:"Use PwC with your agent"}),e.jsxs(t,{to:"/mcp",className:"action-btn sidebar-tools-mcp",title:"Connect Claude, Codex, Cursor, or OpenCode to the PwC MCP server",onClick:o=>{r&&!r()&&o.preventDefault()},children:["MCP server",e.jsx(a,{})]}),e.jsxs("p",{className:"sidebar-tools-copy",children:["Search papers, benchmarks, and leaderboards from any MCP client, or from the terminal with the"," ",e.jsxs("a",{href:"https://github.com/huggingface/pwc-cli",target:"_blank",rel:"noreferrer",children:[e.jsx("code",{children:"pwc"})," CLI"]}),"."]})]})}export{n as M};
|
assets/McpView-BrXaRo4V.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
| 1 |
-
import{n as b,M as h,j as e,C as x}from"./index-CbgxfyGU.js";import{u as j}from"./useQuery-Bx9s5-D2.js";import{f,D as g}from"./latexPlainText-DI8YEXVe.js";import{q as y}from"./queryOptions-C9woPjwX.js";import{G as v}from"./github-BYklgHDz.js";import{E as i}from"./external-link-DZIH4GGr.js";import{C as w}from"./copy-bzw7JVus.js";/**
|
| 2 |
-
* @license lucide-react v0.462.0 - ISC
|
| 3 |
-
*
|
| 4 |
-
* This source code is licensed under the ISC license.
|
| 5 |
-
* See the LICENSE file in the root directory of this source tree.
|
| 6 |
-
*/const k=b("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]),m="https://paperswithcode.co/mcp",C="https://staging.paperswithcode.co/mcp";function u(s){const a=typeof window>"u"?void 0:window.location;return a?a.hostname==="staging.paperswithcode.co"?C:a.hostname==="paperswithcode.co"||a.hostname==="www.paperswithcode.co"?m:`${a.origin.replace(/\/$/,"")}/mcp`:m}function N(s){if(!s||typeof s!="object"||s.status!=="ok"||s.service!=="pwc-mcp"||typeof s.version!="string"||typeof s.protocol!="string")throw new Error("MCP health response is invalid");return s}async function P(s){const a=new AbortController,c=()=>a.abort();s==null||s.addEventListener("abort",c,{once:!0});const n=window.setTimeout(c,5e3);try{const t=await fetch(`${u()}/health`,{headers:{Accept:"application/json"},signal:a.signal,credentials:"omit"});if(!t.ok)throw new Error("MCP service is unavailable");return N(await t.json())}finally{window.clearTimeout(n),s==null||s.removeEventListener("abort",c)}}const _=()=>y({queryKey:["mcp","health"],queryFn:({signal:s})=>P(s),retry:!1,staleTime:3e4,refetchInterval:6e4,refetchOnWindowFocus:!1}),S=[["search_papers","Search by topic, title, author, or arXiv ID."],["list_papers","Filter and order papers by taxonomy, venue, date, or organization."],["get_paper_info","Read canonical metadata, authors, abstract, links, and resources."],["read_paper","Read stored paper Markdown with safe continuation for long papers."],["list_recent_papers","Browse the most recently indexed research."],["get_related_papers","Find related work already indexed in the catalogue."],["list_trending_papers","Discover papers with recent repository momentum."],["get_paper_evaluations","Inspect benchmark results reported by one paper."],["get_paper_lineage","Follow explicit predecessor and successor relationships."],["list_tasks","Search tasks and retrieve stable slugs for exact lookup."],["get_task","Inspect a research task and its benchmark coverage."],["list_methods","Search methods and retrieve stable slugs for exact lookup."],["get_method","Inspect a method, its source paper, and catalogue metadata."],["list_conferences","Browse conferences with imported papers."],["get_conference","Inspect one exact conference edition."],["list_organizations","Browse research organizations."],["get_organization","Inspect one exact research organization."],["list_frameworks","Browse frameworks by domain, category, or platform."],["get_framework","Inspect one exact research framework."],["list_benchmarks","Browse and filter benchmark leaderboards."],["get_benchmark","Read one benchmark, metrics, datasets, and leading results."]],T=["pwc://papers/{paper}","pwc://papers/{paper}/markdown","pwc://tasks/{task}","pwc://benchmarks/{benchmark}"],I=["Find recent papers on test-time compute and summarize the main approaches.","Compare the methods and reported benchmarks in these three arXiv papers.","What are the leading benchmarks for text-to-video generation?","Trace the predecessor and successor papers for Mamba."],d=[{key:"chatgpt",label:"ChatGPT",summary:"In workspace developer settings, add a custom MCP app and paste the server URL. Availability and admin approval vary by plan."},{key:"claude",label:"Claude",summary:"Open Settings → Connectors → Add custom connector, paste the URL, then enable Papers With Code from Search and tools."},{key:"claude-code",label:"Claude Code",summary:"Add the anonymous Streamable HTTP server from a terminal.",code:s=>`claude mcp add --transport http paperswithcode ${s}`},{key:"cursor",label:"Cursor",summary:"Add this entry to your project or user MCP configuration.",code:s=>JSON.stringify({mcpServers:{paperswithcode:{url:s}}},null,2)},{key:"vscode",label:"VS Code",summary:"Add this Streamable HTTP server to .vscode/mcp.json.",code:s=>JSON.stringify({servers:{paperswithcode:{type:"http",url:s}}},null,2)},{key:"generic",label:"Generic",summary:"Configure an anonymous, stateless Streamable HTTP server using the URL below. No API key or OAuth flow is required."}],l=({value:s,label:a})=>{const[c,n]=h.useState(!1),t=async()=>{var o;(o=navigator.clipboard)!=null&&o.writeText&&(await navigator.clipboard.writeText(s),n(!0),window.setTimeout(()=>n(!1),1500))};return e.jsxs("button",{className:"action-btn mcp-copy",type:"button",onClick:()=>void t(),"aria-label":a,children:[c?e.jsx(x,{size:16,"aria-hidden":!0}):e.jsx(w,{size:16,"aria-hidden":!0}),c?"Copied":"Copy"]})},U=()=>{var o;const s=u(),a=j(_()),[c,n]=h.useState("chatgpt"),t=d.find(r=>r.key===c)??d[0];return h.useEffect(()=>(document.title=f("MCP Server"),()=>{document.title=g}),[]),e.jsxs("article",{className:"page mcp-page",children:[e.jsxs("a",{className:"mcp-repo-banner",href:"https://github.com/huggingface/pwc-cli",target:"_blank",rel:"noreferrer",children:[e.jsx(v,{size:20,"aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("strong",{children:"huggingface/pwc-cli"}),e.jsxs("span",{children:["Open-source MCP server and ",e.jsx("code",{children:"pwc"})," command-line client"]})]}),e.jsxs("span",{className:"mcp-repo-cta",children:["View on GitHub ",e.jsx(k,{size:14,"aria-hidden":!0})]})]}),e.jsxs("header",{className:"mcp-hero",children:[e.jsxs("div",{children:[e.jsx("p",{className:"sidebar-label mcp-kicker",children:"Model Context Protocol"}),e.jsx("h1",{className:"feed-title",children:"Use Papers With Code in your AI assistant"}),e.jsx("p",{className:"mcp-lede",children:"Search research, inspect methods and benchmarks, and read complete papers through one anonymous, read-only MCP connection."}),e.jsxs("div",{className:"mcp-status","aria-live":"polite",children:[e.jsx("span",{className:a.isSuccess?"is-up":"is-unknown","aria-hidden":!0}),a.isSuccess?"Operational":"Status unavailable",a.data?` · v${a.data.version}`:""]})]}),e.jsxs("div",{className:"mcp-endpoint-card",children:[e.jsx("span",{children:"Remote MCP URL"}),e.jsx("code",{children:s}),e.jsx(l,{value:s,label:"Copy MCP server URL"})]})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-connect",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Connect"}),e.jsx("h2",{id:"mcp-connect",children:"One URL, your preferred client"}),e.jsx("span",{children:"Setup matrix reviewed September 13, 2026; staging qualification pending."})]}),e.jsx("div",{className:"mcp-client-tabs",role:"tablist","aria-label":"MCP client setup",children:d.map(r=>e.jsx("button",{type:"button",role:"tab","aria-selected":c===r.key,onClick:()=>n(r.key),children:r.label},r.key))}),e.jsxs("div",{className:"mcp-setup",role:"tabpanel",children:[e.jsx("p",{children:t.summary}),t.code?e.jsxs("div",{className:"mcp-code-row",children:[e.jsx("pre",{children:e.jsx("code",{children:t.code(s)})}),e.jsx(l,{value:t.code(s),label:`Copy ${t.label} setup`})]}):e.jsxs("div",{className:"mcp-code-row",children:[e.jsx("pre",{children:e.jsx("code",{children:s})}),e.jsx(l,{value:s,label:`Copy ${t.label} endpoint`})]})]})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-capabilities",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Capabilities"}),e.jsx("h2",{id:"mcp-capabilities",children:"Research context, structured for assistants"})]}),e.jsx("div",{className:"mcp-capability-grid",children:[["Discover","Search recent and established work with catalogue filters."],["Read","Continue through long stored papers without presenting a partial document as complete."],["Connect","Explore related work, paper lineage, tasks, and methods."],["Compare","Inspect benchmarks, datasets, metrics, and reported evaluations."]].map(([r,p])=>e.jsxs("div",{children:[e.jsx("h3",{children:r}),e.jsx("p",{children:p})]},r))})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-tools",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Catalogue"}),e.jsx("h2",{id:"mcp-tools",children:"Twenty-one focused, read-only tools"})]}),e.jsx("div",{className:"mcp-tool-grid",children:S.map(([r,p])=>e.jsxs("div",{className:"mcp-tool",children:[e.jsx("code",{children:r}),e.jsx("p",{children:p})]},r))}),e.jsx("h3",{className:"mcp-subheading",children:"Resource templates"}),e.jsx("div",{className:"mcp-resource-list",children:T.map(r=>e.jsx("code",{children:r},r))})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-prompts",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Try asking"}),e.jsx("h2",{id:"mcp-prompts",children:"Prompts that start useful research"})]}),e.jsx("div",{className:"mcp-prompt-list",children:I.map(r=>e.jsxs("div",{children:[e.jsx("p",{children:r}),e.jsx(l,{value:r,label:"Copy example prompt"})]},r))})]}),e.jsxs("section",{className:"mcp-section mcp-notes","aria-labelledby":"mcp-limits",children:[e.jsxs("div",{children:[e.jsx("p",{className:"sidebar-label mcp-kicker",children:"Limits & privacy"}),e.jsx("h2",{id:"mcp-limits",children:"Public by design"}),e.jsx("p",{children:"No account, API key, or write access. Fair-use limits are 60 total requests per minute, 10 semantic searches per minute, four concurrent requests per client, and 25 list results per call."}),e.jsx("p",{children:"MCP telemetry retains tool name, status, latency, response size, protocol, and server version—not prompts, paper IDs, cursors, resource URIs, raw IPs, authorization values, or bodies. Catalogue infrastructure has its own operational logging policy."})]}),e.jsxs("div",{children:[e.jsx("p",{className:"sidebar-label mcp-kicker",children:"Protocol & troubleshooting"}),e.jsx("h2",{children:"Streamable HTTP"}),e.jsxs("p",{children:["Primary protocol: ",((o=a.data)==null?void 0:o.protocol)??"verified during connection setup",". If setup fails, confirm your client supports remote Streamable HTTP, that custom servers are enabled by your workspace administrator, and that you pasted the URL exactly."]}),e.jsxs("nav",{className:"mcp-links","aria-label":"MCP documentation links",children:[e.jsxs("a",{href:"https://github.com/huggingface/pwc-cli",target:"_blank",rel:"noreferrer",children:["CLI repository ",e.jsx(i,{size:13})]}),e.jsxs("a",{href:"https://modelcontextprotocol.io/docs/2026-07-28/learn/server-concepts",target:"_blank",rel:"noreferrer",children:["MCP specification ",e.jsx(i,{size:13})]}),e.jsxs("a",{href:"/docs",target:"_blank",rel:"noreferrer",children:["Public API ",e.jsx(i,{size:13})]}),e.jsxs("a",{href:"/mcp/schema",target:"_blank",rel:"noreferrer",children:["MCP tool schema ",e.jsx(i,{size:13})]}),e.jsxs("a",{href:"/llms.txt",target:"_blank",rel:"noreferrer",children:["llms.txt ",e.jsx(i,{size:13})]})]})]})]})]})};export{U as default};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/McpView-DYa6GKrp.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import{s as b,b as x,V as m,j as e,C as j}from"./index-DyXq7-Tg.js";import{u as g,f as y}from"./useDocumentTitle-DcxM2Zv_.js";import{q as f}from"./queryOptions-C9woPjwX.js";import{G as v}from"./github-RNrgGHRT.js";import{E as o}from"./external-link-orY1Xz1I.js";import{C as w}from"./copy-CxR0OKx2.js";/**
|
| 2 |
+
* @license lucide-react v0.462.0 - ISC
|
| 3 |
+
*
|
| 4 |
+
* This source code is licensed under the ISC license.
|
| 5 |
+
* See the LICENSE file in the root directory of this source tree.
|
| 6 |
+
*/const k=b("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]),h="https://paperswithcode.co/mcp",C="https://staging.paperswithcode.co/mcp";function u(s){const a=typeof window>"u"?void 0:window.location;return a?a.hostname==="staging.paperswithcode.co"?C:a.hostname==="paperswithcode.co"||a.hostname==="www.paperswithcode.co"?h:`${a.origin.replace(/\/$/,"")}/mcp`:h}function N(s){if(!s||typeof s!="object"||s.status!=="ok"||s.service!=="pwc-mcp"||typeof s.version!="string"||typeof s.protocol!="string")throw new Error("MCP health response is invalid");return s}async function P(s){const a=new AbortController,c=()=>a.abort();s==null||s.addEventListener("abort",c,{once:!0});const n=window.setTimeout(c,5e3);try{const t=await fetch(`${u()}/health`,{headers:{Accept:"application/json"},signal:a.signal,credentials:"omit"});if(!t.ok)throw new Error("MCP service is unavailable");return N(await t.json())}finally{window.clearTimeout(n),s==null||s.removeEventListener("abort",c)}}const _=()=>f({queryKey:["mcp","health"],queryFn:({signal:s})=>P(s),retry:!1,staleTime:3e4,refetchInterval:6e4}),S=[["search_papers","Search by topic, title, author, or arXiv ID."],["list_papers","Filter and order papers by taxonomy, venue, date, or organization."],["get_paper_info","Read canonical metadata, authors, abstract, links, and resources."],["read_paper","Read stored paper Markdown with safe continuation for long papers."],["list_recent_papers","Browse the most recently indexed research."],["get_related_papers","Find related work already indexed in the catalogue."],["list_trending_papers","Discover papers with recent repository momentum."],["get_paper_evaluations","Inspect benchmark results reported by one paper."],["get_paper_lineage","Follow explicit predecessor and successor relationships."],["list_tasks","Search tasks and retrieve stable slugs for exact lookup."],["get_task","Inspect a research task and its benchmark coverage."],["list_methods","Search methods and retrieve stable slugs for exact lookup."],["get_method","Inspect a method, its source paper, and catalogue metadata."],["list_conferences","Browse conferences with imported papers."],["get_conference","Inspect one exact conference edition."],["list_organizations","Browse research organizations."],["get_organization","Inspect one exact research organization."],["list_frameworks","Browse frameworks by domain, category, or platform."],["get_framework","Inspect one exact research framework."],["list_benchmarks","Browse and filter benchmark leaderboards."],["get_benchmark","Read one benchmark, metrics, datasets, and leading results."]],T=["pwc://papers/{paper}","pwc://papers/{paper}/markdown","pwc://tasks/{task}","pwc://benchmarks/{benchmark}"],I=["Find recent papers on test-time compute and summarize the main approaches.","Compare the methods and reported benchmarks in these three arXiv papers.","What are the leading benchmarks for text-to-video generation?","Trace the predecessor and successor papers for Mamba."],d=[{key:"chatgpt",label:"ChatGPT",summary:"In workspace developer settings, add a custom MCP app and paste the server URL. Availability and admin approval vary by plan."},{key:"claude",label:"Claude",summary:"Open Settings → Connectors → Add custom connector, paste the URL, then enable Papers With Code from Search and tools."},{key:"claude-code",label:"Claude Code",summary:"Add the anonymous Streamable HTTP server from a terminal.",code:s=>`claude mcp add --transport http paperswithcode ${s}`},{key:"cursor",label:"Cursor",summary:"Add this entry to your project or user MCP configuration.",code:s=>JSON.stringify({mcpServers:{paperswithcode:{url:s}}},null,2)},{key:"vscode",label:"VS Code",summary:"Add this Streamable HTTP server to .vscode/mcp.json.",code:s=>JSON.stringify({servers:{paperswithcode:{type:"http",url:s}}},null,2)},{key:"generic",label:"Generic",summary:"Configure an anonymous, stateless Streamable HTTP server using the URL below. No API key or OAuth flow is required."}],l=({value:s,label:a})=>{const[c,n]=m.useState(!1),t=async()=>{var i;(i=navigator.clipboard)!=null&&i.writeText&&(await navigator.clipboard.writeText(s),n(!0),window.setTimeout(()=>n(!1),1500))};return e.jsxs("button",{className:"action-btn mcp-copy",type:"button",onClick:()=>void t(),"aria-label":a,children:[c?e.jsx(j,{size:16,"aria-hidden":!0}):e.jsx(w,{size:16,"aria-hidden":!0}),c?"Copied":"Copy"]})},O=()=>{var i;const s=u(),a=x(_()),[c,n]=m.useState("chatgpt"),t=d.find(r=>r.key===c)??d[0];return g(y("MCP Server")),e.jsxs("article",{className:"page mcp-page",children:[e.jsxs("a",{className:"mcp-repo-banner",href:"https://github.com/huggingface/pwc-cli",target:"_blank",rel:"noreferrer",children:[e.jsx(v,{size:20,"aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("strong",{children:"huggingface/pwc-cli"}),e.jsxs("span",{children:["Open-source MCP server and ",e.jsx("code",{children:"pwc"})," command-line client"]})]}),e.jsxs("span",{className:"mcp-repo-cta",children:["View on GitHub ",e.jsx(k,{size:14,"aria-hidden":!0})]})]}),e.jsxs("header",{className:"mcp-hero",children:[e.jsxs("div",{children:[e.jsx("p",{className:"sidebar-label mcp-kicker",children:"Model Context Protocol"}),e.jsx("h1",{className:"feed-title",children:"Use Papers With Code in your AI assistant"}),e.jsx("p",{className:"mcp-lede",children:"Search research, inspect methods and benchmarks, and read complete papers through one anonymous, read-only MCP connection."}),e.jsxs("div",{className:"mcp-status","aria-live":"polite",children:[e.jsx("span",{className:a.isSuccess?"is-up":"is-unknown","aria-hidden":!0}),a.isSuccess?"Operational":"Status unavailable",a.data?` · v${a.data.version}`:""]})]}),e.jsxs("div",{className:"mcp-endpoint-card",children:[e.jsx("span",{children:"Remote MCP URL"}),e.jsx("code",{children:s}),e.jsx(l,{value:s,label:"Copy MCP server URL"})]})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-connect",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Connect"}),e.jsx("h2",{id:"mcp-connect",children:"One URL, your preferred client"}),e.jsx("span",{children:"Setup matrix reviewed September 13, 2026; staging qualification pending."})]}),e.jsx("div",{className:"mcp-client-tabs",role:"tablist","aria-label":"MCP client setup",children:d.map(r=>e.jsx("button",{type:"button",role:"tab","aria-selected":c===r.key,onClick:()=>n(r.key),children:r.label},r.key))}),e.jsxs("div",{className:"mcp-setup",role:"tabpanel",children:[e.jsx("p",{children:t.summary}),t.code?e.jsxs("div",{className:"mcp-code-row",children:[e.jsx("pre",{children:e.jsx("code",{children:t.code(s)})}),e.jsx(l,{value:t.code(s),label:`Copy ${t.label} setup`})]}):e.jsxs("div",{className:"mcp-code-row",children:[e.jsx("pre",{children:e.jsx("code",{children:s})}),e.jsx(l,{value:s,label:`Copy ${t.label} endpoint`})]})]})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-capabilities",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Capabilities"}),e.jsx("h2",{id:"mcp-capabilities",children:"Research context, structured for assistants"})]}),e.jsx("div",{className:"mcp-capability-grid",children:[["Discover","Search recent and established work with catalogue filters."],["Read","Continue through long stored papers without presenting a partial document as complete."],["Connect","Explore related work, paper lineage, tasks, and methods."],["Compare","Inspect benchmarks, datasets, metrics, and reported evaluations."]].map(([r,p])=>e.jsxs("div",{children:[e.jsx("h3",{children:r}),e.jsx("p",{children:p})]},r))})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-tools",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Catalogue"}),e.jsx("h2",{id:"mcp-tools",children:"Twenty-one focused, read-only tools"})]}),e.jsx("div",{className:"mcp-tool-grid",children:S.map(([r,p])=>e.jsxs("div",{className:"mcp-tool",children:[e.jsx("code",{children:r}),e.jsx("p",{children:p})]},r))}),e.jsx("h3",{className:"mcp-subheading",children:"Resource templates"}),e.jsx("div",{className:"mcp-resource-list",children:T.map(r=>e.jsx("code",{children:r},r))})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-prompts",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Try asking"}),e.jsx("h2",{id:"mcp-prompts",children:"Prompts that start useful research"})]}),e.jsx("div",{className:"mcp-prompt-list",children:I.map(r=>e.jsxs("div",{children:[e.jsx("p",{children:r}),e.jsx(l,{value:r,label:"Copy example prompt"})]},r))})]}),e.jsxs("section",{className:"mcp-section mcp-notes","aria-labelledby":"mcp-limits",children:[e.jsxs("div",{children:[e.jsx("p",{className:"sidebar-label mcp-kicker",children:"Limits & privacy"}),e.jsx("h2",{id:"mcp-limits",children:"Public by design"}),e.jsx("p",{children:"No account, API key, or write access. Fair-use limits are 60 total requests per minute, 10 semantic searches per minute, four concurrent requests per client, and 25 list results per call."}),e.jsx("p",{children:"MCP telemetry retains tool name, status, latency, response size, protocol, and server version—not prompts, paper IDs, cursors, resource URIs, raw IPs, authorization values, or bodies. Catalogue infrastructure has its own operational logging policy."})]}),e.jsxs("div",{children:[e.jsx("p",{className:"sidebar-label mcp-kicker",children:"Protocol & troubleshooting"}),e.jsx("h2",{children:"Streamable HTTP"}),e.jsxs("p",{children:["Primary protocol: ",((i=a.data)==null?void 0:i.protocol)??"verified during connection setup",". If setup fails, confirm your client supports remote Streamable HTTP, that custom servers are enabled by your workspace administrator, and that you pasted the URL exactly."]}),e.jsxs("nav",{className:"mcp-links","aria-label":"MCP documentation links",children:[e.jsxs("a",{href:"https://github.com/huggingface/pwc-cli",target:"_blank",rel:"noreferrer",children:["CLI repository ",e.jsx(o,{size:13})]}),e.jsxs("a",{href:"https://modelcontextprotocol.io/docs/2026-07-28/learn/server-concepts",target:"_blank",rel:"noreferrer",children:["MCP specification ",e.jsx(o,{size:13})]}),e.jsxs("a",{href:"/docs",target:"_blank",rel:"noreferrer",children:["Public API ",e.jsx(o,{size:13})]}),e.jsxs("a",{href:"/mcp/schema",target:"_blank",rel:"noreferrer",children:["MCP tool schema ",e.jsx(o,{size:13})]}),e.jsxs("a",{href:"/llms.txt",target:"_blank",rel:"noreferrer",children:["llms.txt ",e.jsx(o,{size:13})]})]})]})]})]})};export{O as default};
|
assets/MethodDetailView-5wFkSBs8.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{j as e,d as I,u as P,b as k,p as V,L as _,o as A,T as v}from"./index-DyXq7-Tg.js";import{R as H}from"./ResearchFollowButton-Dv316ClR.js";import{M as Q}from"./SotaBadges-vbLLOUtT.js";import{u as q,b as K,a as R}from"./PaperFeed-EBt97iOL.js";import{r as G,M as L}from"./MarkdownText-CUzPoC9Y.js";import{c as b}from"./catalog-CRar2olQ.js";import{p as U}from"./papers-Dh3ljlL0.js";import{i as O}from"./apiErrors-BSvbQBb0.js";import{s as W}from"./slug-BpH-Nkvz.js";import{t as Z}from"./transform-D46m70Qr.js";import{u as X}from"./usePapers-B0s20UcU.js";import{S as N}from"./skeleton-C3IIzpSL.js";import{A as Y,a as J}from"./alert-gbJBhAVE.js";import{s as ee}from"./safeExternalHref-CkBrsh84.js";import te from"./NotFound-DV_nwcxG.js";import"./researchTopic-DbX0eko-.js";import"./useMutation-UWxBeqtn.js";import"./plus-Yh42pKZz.js";import"./colors-BkWRhvFI.js";import"./PaperCard-57p1OSGy.js";import"./AuthorAvatar-B-9xS2Wo.js";import"./Icon-T4LYkEQj.js";import"./LatexTitle-Bkyz3jCs.js";import"./popover-CTBEUp7Y.js";import"./useIntersectionObserver-D6_Iig9a.js";/* empty css */import"./PaperPreviewLink-CpCZSa8K.js";import"./index-mCi_y_l3.js";import"./index-2CvJmBVB.js";import"./katex-DkKDou_j.js";import"./hover-card-B45EJIn_.js";import"./curation-YeS7FBYf.js";import"./useInfiniteQuery-BYh2zN-T.js";const t={pink:"#F8D7D9",pinkS:"#D9B0B3",yellow:"#FBEFC2",yellowS:"#C9B97D",orange:"#F8D7B3",orangeS:"#C99466",blue:"#CDE2EE",blueS:"#7FA4BA",purple:"#D4D2EA",purpleS:"#8E8AC0",green:"#CCE2C5",greenS:"#7DA475",ink:"#1A1814",faint:"#8E8678"},n=({x:s,y:r,w:l,h:d,fill:o,stroke:p,label:h,fontSize:c=10})=>e.jsxs("g",{children:[e.jsx("rect",{x:s,y:r,width:l,height:d,rx:"3",ry:"3",fill:o,stroke:p,strokeWidth:"1"}),e.jsx("text",{x:s+l/2,y:r+d/2,fontSize:c,fontFamily:"var(--sans)",fill:t.ink,textAnchor:"middle",dominantBaseline:"middle",children:h})]}),se=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Scaled Dot-Product Attention"}),e.jsx(n,{x:140,y:40,w:80,h:26,fill:t.yellow,stroke:t.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M180 66 L180 80",stroke:t.ink}),e.jsx(n,{x:140,y:80,w:80,h:26,fill:t.green,stroke:t.greenS,label:"SoftMax",fontSize:11}),e.jsx("path",{d:"M180 106 L180 120",stroke:t.ink}),e.jsx(n,{x:140,y:120,w:80,h:26,fill:t.purple,stroke:t.purpleS,label:"Mask (opt.)",fontSize:11}),e.jsx("path",{d:"M180 146 L180 160",stroke:t.ink}),e.jsx(n,{x:140,y:160,w:80,h:26,fill:t.blue,stroke:t.blueS,label:"Scale ÷√dₖ",fontSize:11}),e.jsx("path",{d:"M180 186 L180 200",stroke:t.ink}),e.jsx(n,{x:140,y:200,w:80,h:26,fill:t.yellow,stroke:t.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M156 226 L120 270",stroke:t.ink}),e.jsx("path",{d:"M180 226 L180 270",stroke:t.ink}),e.jsx("path",{d:"M204 226 L240 270",stroke:t.ink}),e.jsx(n,{x:100,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"Q",fontSize:13}),e.jsx(n,{x:160,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"K",fontSize:13}),e.jsx(n,{x:220,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"V",fontSize:13}),e.jsxs("text",{x:"180",y:"330",fontSize:"14",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:["softmax(QK",e.jsx("tspan",{fontSize:"9",baselineShift:"super",children:"⊤"})," / √d) V"]})]}),ae=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Contrastive learning"}),e.jsx(n,{x:120,y:40,w:120,h:26,fill:t.blue,stroke:t.blueS,label:"Input x",fontSize:11}),e.jsx("path",{d:"M180 66 V76 M90 76 H270 M90 76 V88 M270 76 V88",stroke:t.ink}),e.jsx(n,{x:35,y:88,w:110,h:26,fill:t.yellow,stroke:t.yellowS,label:"Augment t₁",fontSize:11}),e.jsx(n,{x:215,y:88,w:110,h:26,fill:t.yellow,stroke:t.yellowS,label:"Augment t₂",fontSize:11}),e.jsx("path",{d:"M90 114 V138 M270 114 V138",stroke:t.ink}),e.jsx(n,{x:35,y:138,w:110,h:26,fill:t.orange,stroke:t.orangeS,label:"Encoder f",fontSize:11}),e.jsx(n,{x:215,y:138,w:110,h:26,fill:t.orange,stroke:t.orangeS,label:"Encoder f",fontSize:11}),e.jsx("text",{x:"180",y:"155",fontSize:"9",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"shared weights"}),e.jsx("path",{d:"M90 164 V188 M270 164 V188",stroke:t.ink}),e.jsx(n,{x:35,y:188,w:110,h:26,fill:t.purple,stroke:t.purpleS,label:"Projection g",fontSize:11}),e.jsx(n,{x:215,y:188,w:110,h:26,fill:t.purple,stroke:t.purpleS,label:"Projection g",fontSize:11}),e.jsx("path",{d:"M90 214 V238 M270 214 V238",stroke:t.ink}),e.jsx(n,{x:35,y:238,w:110,h:26,fill:t.pink,stroke:t.pinkS,label:"z₁",fontSize:13}),e.jsx(n,{x:215,y:238,w:110,h:26,fill:t.pink,stroke:t.pinkS,label:"z₂",fontSize:13}),e.jsx("path",{d:"M145 251 H215",stroke:t.greenS,strokeWidth:"1.5",strokeDasharray:"4 3"}),e.jsx("text",{x:"180",y:"244",fontSize:"9",fontFamily:"var(--sans)",fill:t.greenS,textAnchor:"middle",children:"attract"}),e.jsx("text",{x:"180",y:"318",fontSize:"12",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:"Positive pair: pull together"}),e.jsx("text",{x:"180",y:"336",fontSize:"12",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:"Other samples: push apart"}),e.jsx("text",{x:"180",y:"370",fontSize:"11",fontFamily:"var(--serif)",fill:t.faint,textAnchor:"middle",children:"InfoNCE: maximize sim(z₁, z₂) / τ"})]}),re=[["my-skill/",""],["├── SKILL.md","# Required: metadata + instructions"],["├── scripts/","# Optional: executable code"],["├── references/","# Optional: documentation"],["├── assets/","# Optional: templates, resources"],["└── ...","# Any additional files or directories"]],le=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Skill package layout"}),e.jsx("rect",{x:"28",y:"48",width:"304",height:"318",rx:"8",fill:"#FFFDF8",stroke:t.faint,strokeWidth:"1"}),re.map(([s,r],l)=>{const d=92+l*44;return e.jsxs("g",{children:[e.jsx("text",{x:"44",y:d,fontSize:"11",fontFamily:"var(--mono)",fill:t.ink,dominantBaseline:"middle",children:s}),r?e.jsx("text",{x:"138",y:d,fontSize:"8.5",fontFamily:"var(--mono)",fill:t.faint,dominantBaseline:"middle",children:r}):null]},s)})]}),ie={attention:se,"contrastive-learning":ae,"agent-skills":le},ne=({method:s})=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:s.name||"method"}),e.jsx(n,{x:80,y:70,w:200,h:50,fill:t.blue,stroke:t.blueS,label:"Input",fontSize:12}),e.jsx("path",{d:"M180 120 L180 150",stroke:t.ink}),e.jsx(n,{x:80,y:150,w:200,h:70,fill:t.orange,stroke:t.orangeS,label:s.name||"transform",fontSize:13}),e.jsx("path",{d:"M180 220 L180 250",stroke:t.ink}),e.jsx(n,{x:80,y:250,w:200,h:50,fill:t.purple,stroke:t.purpleS,label:"Output",fontSize:12})]}),oe=({method:s})=>{const r=(s.slug||"").toLowerCase(),l=ie[r];if(l)return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(l,{})});if(s.image_url){const d=r==="transformer"||r==="gpt-4"||r==="gpt-4o"||r==="multi-head-attention"?" method-figure-svg--compact":r==="rpn"?" method-figure-svg--scaled-80":"";return e.jsx("div",{className:`method-figure-svg method-figure-svg--image${d}`,children:e.jsx("img",{className:"method-figure-img",src:s.image_url,alt:`${s.name} figure`})})}return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(ne,{method:s})})},w=720,M=138,x={top:8,right:10,bottom:25,left:36},E=56,ce=new Intl.DateTimeFormat("en",{month:"short",year:"2-digit",timeZone:"UTC"}),de=new Intl.DateTimeFormat("en",{year:"numeric",timeZone:"UTC"}),F=s=>ce.format(new Date(`${s}T00:00:00Z`)),me=(s,r)=>{if(s===0)return new Set;const l=s>48?12:s>36?6:s>18?3:2,d=Math.max(1,Math.ceil(E/r)),o=Math.max(l,d),p=s-1,h=new Set([0,p]);for(let c=o;c<p;c+=o)(p-c)*r>=E&&h.add(c);return h},T=s=>{if(s.coverage_status===void 0||["complete","not_applicable"].includes(s.coverage_status))return null;const r=s.processed_paper_count!==void 0&&s.eligible_paper_count!==void 0?`; ${s.processed_paper_count.toLocaleString()} of ${s.eligible_paper_count.toLocaleString()} eligible papers processed`:"";return`Historical tagging ${s.coverage_status==="failed"?"needs retry":"in progress"}${r}`},he=({history:s,methodName:r})=>{const[l,d]=I.useState(null),o=Math.max(1,...s.map(i=>i.paper_count)),p=w-x.left-x.right,h=M-x.top-x.bottom,c=s.length?p/s.length:p,a=Math.max(2,c*.68),g=me(s.length,c),j=Array.from(new Set([0,Math.ceil(o/2),o])),f=l==null?null:s[l],y=f?T(f):null;return e.jsxs("div",{className:"method-usage-chart-wrap",children:[e.jsxs("svg",{className:"method-usage-chart",viewBox:`0 0 ${w} ${M}`,role:"group","aria-label":`${r}: papers mentioning this method by publication month`,children:[e.jsxs("title",{children:[r,": papers mentioning this method by publication month"]}),j.map(i=>{const m=x.top+h-i/o*h;return e.jsxs("g",{children:[e.jsx("line",{className:"method-usage-gridline",x1:x.left,x2:w-x.right,y1:m,y2:m}),e.jsx("text",{className:"method-usage-y-label",x:x.left-8,y:m+3,textAnchor:"end",children:i})]},i)}),s.map((i,m)=>{const u=i.paper_count/o*h,S=i.paper_count>0?Math.max(1,u):0,C=x.left+c*m+(c-a)/2,D=x.top+h-S,$=l===m,B=m===s.length-1,z=T(i);return e.jsxs("g",{className:`method-usage-bar${$?" is-active":""}${B?" is-current":""}`,tabIndex:0,role:"img","aria-label":`${F(i.start_date)}: ${i.paper_count} ${i.paper_count===1?"paper":"papers"}${z?`. ${z}`:""}`,onMouseEnter:()=>d(m),onMouseLeave:()=>d(null),onFocus:()=>d(m),onBlur:()=>d(null),children:[e.jsx("rect",{className:"method-usage-bar-hit",x:x.left+c*m,y:x.top,width:c,height:h}),e.jsx("rect",{className:"method-usage-bar-mark",x:C,y:D,width:a,height:S,rx:"1.5"})]},i.start_date)}),s.map((i,m)=>g.has(m)?e.jsx("text",{className:"method-usage-x-label",x:x.left+c*(m+.5),y:M-11,textAnchor:"middle",children:s.length>48?de.format(new Date(`${i.start_date}T00:00:00Z`)):F(i.start_date)},i.start_date):null)]}),f&&e.jsxs("div",{className:"method-usage-tooltip",role:"status",children:[e.jsx("strong",{children:F(f.start_date)}),e.jsxs("span",{children:[f.paper_count," ",f.paper_count===1?"paper":"papers",l===s.length-1?" · month to date":""]}),e.jsxs("span",{children:[(f.catalog_share??0).toFixed(2),"% of"," ",(f.catalog_paper_count??0).toLocaleString()," catalog papers"]}),y&&e.jsx("span",{children:y})]})]})},Ge=()=>{var y,i,m;const{methodSlug:s}=P(),r=q(),l=k({queryKey:A.method(s),queryFn:()=>b.getMethod(s),enabled:!!s,staleTime:v}),d=k({queryKey:A.areas,queryFn:()=>b.listAreas({page_size:50,ordering:"name"}),enabled:!!((y=l.data)!=null&&y.area_id),staleTime:v}),o=k({queryKey:["method-trend",s],queryFn:()=>b.methodTrend(s),enabled:!!s,staleTime:v}),p=X([...V.feeds.method,s,r.filters],u=>U.forMethod(s,{...r.filters,page:u,page_size:20,repository_limit:1}),{enabled:!!s}),h=k({queryKey:["related-methods",s],queryFn:()=>b.relatedMethods(s),enabled:!!s,staleTime:v}),c=I.useMemo(()=>{var u;return((u=p.data)==null?void 0:u.pages.flatMap(S=>S.results.map(Z)))??[]},[p.data]);if(l.isLoading)return e.jsxs("div",{className:"page",children:[e.jsx(N,{className:"h-12 w-1/2 mb-4"}),e.jsx(N,{className:"h-64 w-full"})]});if(O(l.error))return e.jsx(te,{});if(l.error||!l.data)return e.jsx("div",{className:"page",children:e.jsx(Y,{variant:"destructive",children:e.jsx(J,{children:"Method not found."})})});const a=l.data,g=(i=d.data)==null?void 0:i.results.find(u=>u.id===a.area_id),j=G(a.source_url),f=j?null:ee(a.source_url);return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(_,{to:"/methods",children:"Methods"}),g&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(_,{to:`/methods#area-${W(g.name)}`,children:g.name})]}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:a.name})]}),e.jsxs("div",{className:`tag-hero method-hero-grid${a.slug==="grokking"||a.slug==="latent-reasoning"||a.slug==="world-action-models"?" method-hero-grid--wide-figure":""}`,children:[e.jsxs("div",{children:[e.jsx("div",{className:"tag-hero-eyebrow",children:"METHOD"}),e.jsx("h1",{className:"tag-hero-title method-hero-title",children:a.name}),e.jsx(H,{kind:"method",entityId:a.id}),a.full_name&&!a.name.includes(a.full_name)&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontSize:16,fontStyle:"italic",color:"var(--ink-soft)",marginTop:8},children:a.full_name}),a.description&&e.jsx(L,{className:"method-description",text:a.description}),a.source_url&&a.source_title&&e.jsxs("div",{className:"method-source",children:[e.jsx("span",{className:"method-source-label",children:"Source"}),j?e.jsxs(_,{className:"method-source-link",to:j,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:a.source_title}),a.introduced_year&&e.jsx("span",{className:"method-source-meta",children:a.introduced_year})]}):f?e.jsxs("a",{className:"method-source-link",href:f,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:a.source_title}),a.introduced_year&&e.jsx("span",{className:"method-source-meta",children:a.introduced_year})]}):e.jsxs("div",{className:"method-source-link is-static",children:[e.jsx("span",{className:"method-source-title",children:a.source_title}),a.introduced_year&&e.jsx("span",{className:"method-source-meta",children:a.introduced_year})]})]}),e.jsxs("div",{className:"tag-hero-meta",children:[e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Papers mentioning"}),e.jsx("span",{className:"value",children:(a.paper_count??0).toLocaleString()})]}),o.data&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Recent mentions"}),e.jsxs("span",{className:"value",children:[(o.data.recent_paper_count*30/o.data.recent_days).toFixed(1),e.jsx("small",{children:"/mo"})]}),!o.data.comparison_complete&&e.jsx("span",{title:"Tagging is still catching up. This rate reflects mentions found so far.",children:"Partial coverage"})]}),a.introduced_year!=null&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Introduced"}),e.jsx("span",{className:"value",children:a.introduced_year})]})]}),o.isLoading?e.jsx(N,{className:"h-36 w-full method-trend-skeleton"}):o.data?e.jsxs("section",{className:"method-trend-panel method-trend-panel--compact",children:[e.jsxs("div",{className:"method-trend-header",children:[e.jsx("div",{children:e.jsx("div",{className:"method-trend-eyebrow",children:"Usage trend"})}),e.jsxs("div",{className:"method-trend-summary",children:[e.jsx("strong",{children:o.data.recent_paper_count}),e.jsxs("span",{children:["papers / ",o.data.recent_days,"d"]})]})]}),e.jsx(he,{history:o.data.history,methodName:a.name})]}):null]}),e.jsxs("figure",{className:"method-figure-card",children:[e.jsx(oe,{method:a}),a.image_credit&&e.jsx("figcaption",{children:e.jsx(L,{className:"method-image-credit",text:a.image_credit})})]})]}),(((m=h.data)==null?void 0:m.results.length)??0)>0&&e.jsxs("div",{className:"filter-row",children:[e.jsx("span",{className:"label",children:"Related methods"}),h.data.results.map(u=>e.jsx(Q,{method:{slug:u.slug,name:u.name}},u.id))]}),e.jsx(K,{feed:r,children:e.jsxs("div",{className:"results-count",children:[c.length," papers mentioning ",a.name]})}),e.jsx(R,{query:p,cards:c,empty:"No papers tagged with this method yet."})]})};export{Ge as default};
|
assets/MethodDetailView-CEUGGyVV.js
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
import{j as e,r as E,u as $,L as b}from"./index-CbgxfyGU.js";import{R as B}from"./ResearchFollowButton-D2BXlDtQ.js";import{p as P,a as V}from"./paperQueryKeys-B8u1BWlI.js";import{u as k}from"./useQuery-Bx9s5-D2.js";import{M as H}from"./SotaBadges-C-sTR-EF.js";import{u as q,b as Q,a as K}from"./PaperFeed-DMvUfA47.js";import{r as R,M as z}from"./MarkdownText-Bj-G_S-B.js";import{c as v}from"./catalog-DhK7_9-6.js";import{i as G}from"./apiErrors-BZ5h1Kmb.js";import{s as O}from"./slug-BpH-Nkvz.js";import{t as U}from"./transform-0Udg2p6b.js";import{u as W}from"./usePapers-CJaWLZ3y.js";import{S as _}from"./skeleton-HwvdxvSN.js";import{A as Z,a as X}from"./alert-CFDDvdIM.js";import{s as Y}from"./safeExternalHref-CkBrsh84.js";import J from"./NotFound-DtzwOULp.js";import"./useMutation-P_trTy9i.js";import"./research-DgpyzSy_.js";import"./plus-UK0TEjgd.js";import"./curation-C7Gmmp4z.js";import"./colors-BkWRhvFI.js";import"./PaperCard-tdTC_dRN.js";import"./AuthorAvatar-CUJMmp_z.js";import"./Icon-D-kA0Owz.js";import"./LatexTitle-Z-HGmZ-H.js";import"./popover-DKJYnYjk.js";import"./useIntersectionObserver-CID9Kkak.js";/* empty css */import"./PaperPreviewLink-DZDNIh1g.js";import"./index-ZkEATkOr.js";import"./index-BH3yOoza.js";import"./katex-DkKDou_j.js";import"./hover-card-ufez2uMo.js";import"./useInfiniteQuery-BAc_4HO5.js";const t={pink:"#F8D7D9",pinkS:"#D9B0B3",yellow:"#FBEFC2",yellowS:"#C9B97D",orange:"#F8D7B3",orangeS:"#C99466",blue:"#CDE2EE",blueS:"#7FA4BA",purple:"#D4D2EA",purpleS:"#8E8AC0",green:"#CCE2C5",greenS:"#7DA475",ink:"#1A1814",faint:"#8E8678"},n=({x:s,y:r,w:l,h:d,fill:o,stroke:p,label:h,fontSize:c=10})=>e.jsxs("g",{children:[e.jsx("rect",{x:s,y:r,width:l,height:d,rx:"3",ry:"3",fill:o,stroke:p,strokeWidth:"1"}),e.jsx("text",{x:s+l/2,y:r+d/2,fontSize:c,fontFamily:"var(--sans)",fill:t.ink,textAnchor:"middle",dominantBaseline:"middle",children:h})]}),ee=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Scaled Dot-Product Attention"}),e.jsx(n,{x:140,y:40,w:80,h:26,fill:t.yellow,stroke:t.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M180 66 L180 80",stroke:t.ink}),e.jsx(n,{x:140,y:80,w:80,h:26,fill:t.green,stroke:t.greenS,label:"SoftMax",fontSize:11}),e.jsx("path",{d:"M180 106 L180 120",stroke:t.ink}),e.jsx(n,{x:140,y:120,w:80,h:26,fill:t.purple,stroke:t.purpleS,label:"Mask (opt.)",fontSize:11}),e.jsx("path",{d:"M180 146 L180 160",stroke:t.ink}),e.jsx(n,{x:140,y:160,w:80,h:26,fill:t.blue,stroke:t.blueS,label:"Scale ÷√dₖ",fontSize:11}),e.jsx("path",{d:"M180 186 L180 200",stroke:t.ink}),e.jsx(n,{x:140,y:200,w:80,h:26,fill:t.yellow,stroke:t.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M156 226 L120 270",stroke:t.ink}),e.jsx("path",{d:"M180 226 L180 270",stroke:t.ink}),e.jsx("path",{d:"M204 226 L240 270",stroke:t.ink}),e.jsx(n,{x:100,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"Q",fontSize:13}),e.jsx(n,{x:160,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"K",fontSize:13}),e.jsx(n,{x:220,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"V",fontSize:13}),e.jsxs("text",{x:"180",y:"330",fontSize:"14",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:["softmax(QK",e.jsx("tspan",{fontSize:"9",baselineShift:"super",children:"⊤"})," / √d) V"]})]}),te=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Contrastive learning"}),e.jsx(n,{x:120,y:40,w:120,h:26,fill:t.blue,stroke:t.blueS,label:"Input x",fontSize:11}),e.jsx("path",{d:"M180 66 V76 M90 76 H270 M90 76 V88 M270 76 V88",stroke:t.ink}),e.jsx(n,{x:35,y:88,w:110,h:26,fill:t.yellow,stroke:t.yellowS,label:"Augment t₁",fontSize:11}),e.jsx(n,{x:215,y:88,w:110,h:26,fill:t.yellow,stroke:t.yellowS,label:"Augment t₂",fontSize:11}),e.jsx("path",{d:"M90 114 V138 M270 114 V138",stroke:t.ink}),e.jsx(n,{x:35,y:138,w:110,h:26,fill:t.orange,stroke:t.orangeS,label:"Encoder f",fontSize:11}),e.jsx(n,{x:215,y:138,w:110,h:26,fill:t.orange,stroke:t.orangeS,label:"Encoder f",fontSize:11}),e.jsx("text",{x:"180",y:"155",fontSize:"9",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"shared weights"}),e.jsx("path",{d:"M90 164 V188 M270 164 V188",stroke:t.ink}),e.jsx(n,{x:35,y:188,w:110,h:26,fill:t.purple,stroke:t.purpleS,label:"Projection g",fontSize:11}),e.jsx(n,{x:215,y:188,w:110,h:26,fill:t.purple,stroke:t.purpleS,label:"Projection g",fontSize:11}),e.jsx("path",{d:"M90 214 V238 M270 214 V238",stroke:t.ink}),e.jsx(n,{x:35,y:238,w:110,h:26,fill:t.pink,stroke:t.pinkS,label:"z₁",fontSize:13}),e.jsx(n,{x:215,y:238,w:110,h:26,fill:t.pink,stroke:t.pinkS,label:"z₂",fontSize:13}),e.jsx("path",{d:"M145 251 H215",stroke:t.greenS,strokeWidth:"1.5",strokeDasharray:"4 3"}),e.jsx("text",{x:"180",y:"244",fontSize:"9",fontFamily:"var(--sans)",fill:t.greenS,textAnchor:"middle",children:"attract"}),e.jsx("text",{x:"180",y:"318",fontSize:"12",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:"Positive pair: pull together"}),e.jsx("text",{x:"180",y:"336",fontSize:"12",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:"Other samples: push apart"}),e.jsx("text",{x:"180",y:"370",fontSize:"11",fontFamily:"var(--serif)",fill:t.faint,textAnchor:"middle",children:"InfoNCE: maximize sim(z₁, z₂) / τ"})]}),se=[["my-skill/",""],["├── SKILL.md","# Required: metadata + instructions"],["├── scripts/","# Optional: executable code"],["├── references/","# Optional: documentation"],["├── assets/","# Optional: templates, resources"],["└── ...","# Any additional files or directories"]],ae=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Skill package layout"}),e.jsx("rect",{x:"28",y:"48",width:"304",height:"318",rx:"8",fill:"#FFFDF8",stroke:t.faint,strokeWidth:"1"}),se.map(([s,r],l)=>{const d=92+l*44;return e.jsxs("g",{children:[e.jsx("text",{x:"44",y:d,fontSize:"11",fontFamily:"var(--mono)",fill:t.ink,dominantBaseline:"middle",children:s}),r?e.jsx("text",{x:"138",y:d,fontSize:"8.5",fontFamily:"var(--mono)",fill:t.faint,dominantBaseline:"middle",children:r}):null]},s)})]}),re={attention:ee,"contrastive-learning":te,"agent-skills":ae},le=({method:s})=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:s.name||"method"}),e.jsx(n,{x:80,y:70,w:200,h:50,fill:t.blue,stroke:t.blueS,label:"Input",fontSize:12}),e.jsx("path",{d:"M180 120 L180 150",stroke:t.ink}),e.jsx(n,{x:80,y:150,w:200,h:70,fill:t.orange,stroke:t.orangeS,label:s.name||"transform",fontSize:13}),e.jsx("path",{d:"M180 220 L180 250",stroke:t.ink}),e.jsx(n,{x:80,y:250,w:200,h:50,fill:t.purple,stroke:t.purpleS,label:"Output",fontSize:12})]}),ie=({method:s})=>{const r=(s.slug||"").toLowerCase(),l=re[r];if(l)return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(l,{})});if(s.image_url){const d=r==="transformer"||r==="gpt-4"||r==="gpt-4o"||r==="multi-head-attention"?" method-figure-svg--compact":r==="rpn"?" method-figure-svg--scaled-80":"";return e.jsx("div",{className:`method-figure-svg method-figure-svg--image${d}`,children:e.jsx("img",{className:"method-figure-img",src:s.image_url,alt:`${s.name} figure`})})}return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(le,{method:s})})},N=720,w=138,x={top:8,right:10,bottom:25,left:36},A=56,ne=new Intl.DateTimeFormat("en",{month:"short",year:"2-digit",timeZone:"UTC"}),oe=new Intl.DateTimeFormat("en",{year:"numeric",timeZone:"UTC"}),M=s=>ne.format(new Date(`${s}T00:00:00Z`)),ce=(s,r)=>{if(s===0)return new Set;const l=s>48?12:s>36?6:s>18?3:2,d=Math.max(1,Math.ceil(A/r)),o=Math.max(l,d),p=s-1,h=new Set([0,p]);for(let c=o;c<p;c+=o)(p-c)*r>=A&&h.add(c);return h},L=s=>{if(s.coverage_status===void 0||["complete","not_applicable"].includes(s.coverage_status))return null;const r=s.processed_paper_count!==void 0&&s.eligible_paper_count!==void 0?`; ${s.processed_paper_count.toLocaleString()} of ${s.eligible_paper_count.toLocaleString()} eligible papers processed`:"";return`Historical tagging ${s.coverage_status==="failed"?"needs retry":"in progress"}${r}`},de=({history:s,methodName:r})=>{const[l,d]=E.useState(null),o=Math.max(1,...s.map(i=>i.paper_count)),p=N-x.left-x.right,h=w-x.top-x.bottom,c=s.length?p/s.length:p,a=Math.max(2,c*.68),g=ce(s.length,c),j=Array.from(new Set([0,Math.ceil(o/2),o])),f=l==null?null:s[l],y=f?L(f):null;return e.jsxs("div",{className:"method-usage-chart-wrap",children:[e.jsxs("svg",{className:"method-usage-chart",viewBox:`0 0 ${N} ${w}`,role:"group","aria-label":`${r}: papers mentioning this method by publication month`,children:[e.jsxs("title",{children:[r,": papers mentioning this method by publication month"]}),j.map(i=>{const m=x.top+h-i/o*h;return e.jsxs("g",{children:[e.jsx("line",{className:"method-usage-gridline",x1:x.left,x2:N-x.right,y1:m,y2:m}),e.jsx("text",{className:"method-usage-y-label",x:x.left-8,y:m+3,textAnchor:"end",children:i})]},i)}),s.map((i,m)=>{const u=i.paper_count/o*h,S=i.paper_count>0?Math.max(1,u):0,I=x.left+c*m+(c-a)/2,C=x.top+h-S,D=l===m,T=m===s.length-1,F=L(i);return e.jsxs("g",{className:`method-usage-bar${D?" is-active":""}${T?" is-current":""}`,tabIndex:0,role:"img","aria-label":`${M(i.start_date)}: ${i.paper_count} ${i.paper_count===1?"paper":"papers"}${F?`. ${F}`:""}`,onMouseEnter:()=>d(m),onMouseLeave:()=>d(null),onFocus:()=>d(m),onBlur:()=>d(null),children:[e.jsx("rect",{className:"method-usage-bar-hit",x:x.left+c*m,y:x.top,width:c,height:h}),e.jsx("rect",{className:"method-usage-bar-mark",x:I,y:C,width:a,height:S,rx:"1.5"})]},i.start_date)}),s.map((i,m)=>g.has(m)?e.jsx("text",{className:"method-usage-x-label",x:x.left+c*(m+.5),y:w-11,textAnchor:"middle",children:s.length>48?oe.format(new Date(`${i.start_date}T00:00:00Z`)):M(i.start_date)},i.start_date):null)]}),f&&e.jsxs("div",{className:"method-usage-tooltip",role:"status",children:[e.jsx("strong",{children:M(f.start_date)}),e.jsxs("span",{children:[f.paper_count," ",f.paper_count===1?"paper":"papers",l===s.length-1?" · month to date":""]}),e.jsxs("span",{children:[(f.catalog_share??0).toFixed(2),"% of"," ",(f.catalog_paper_count??0).toLocaleString()," catalog papers"]}),y&&e.jsx("span",{children:y})]})]})},Re=()=>{var y,i,m;const{methodSlug:s}=$(),r=q(),l=k({queryKey:["method",s],queryFn:()=>v.getMethod(s),enabled:!!s,staleTime:10*60*1e3}),d=k({queryKey:["areas-all"],queryFn:()=>v.listAreas({page_size:50,ordering:"name"}),enabled:!!((y=l.data)!=null&&y.area_id),staleTime:10*60*1e3}),o=k({queryKey:["method-trend",s],queryFn:()=>v.methodTrend(s),enabled:!!s,staleTime:10*60*1e3}),p=W([...P.feeds.method,s,r.filters],u=>V.forMethod(s,{...r.filters,page:u,page_size:20,repository_limit:1}),{enabled:!!s}),h=k({queryKey:["related-methods",s],queryFn:()=>v.relatedMethods(s),enabled:!!s,staleTime:10*60*1e3}),c=E.useMemo(()=>{var u;return((u=p.data)==null?void 0:u.pages.flatMap(S=>S.results.map(U)))??[]},[p.data]);if(l.isLoading)return e.jsxs("div",{className:"page",children:[e.jsx(_,{className:"h-12 w-1/2 mb-4"}),e.jsx(_,{className:"h-64 w-full"})]});if(G(l.error))return e.jsx(J,{});if(l.error||!l.data)return e.jsx("div",{className:"page",children:e.jsx(Z,{variant:"destructive",children:e.jsx(X,{children:"Method not found."})})});const a=l.data,g=(i=d.data)==null?void 0:i.results.find(u=>u.id===a.area_id),j=R(a.source_url),f=j?null:Y(a.source_url);return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(b,{to:"/methods",children:"Methods"}),g&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(b,{to:`/methods#area-${O(g.name)}`,children:g.name})]}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:a.name})]}),e.jsxs("div",{className:`tag-hero method-hero-grid${a.slug==="grokking"||a.slug==="latent-reasoning"||a.slug==="world-action-models"?" method-hero-grid--wide-figure":""}`,children:[e.jsxs("div",{children:[e.jsx("div",{className:"tag-hero-eyebrow",children:"METHOD"}),e.jsx("h1",{className:"tag-hero-title method-hero-title",children:a.name}),e.jsx(B,{kind:"method",entityId:a.id}),a.full_name&&!a.name.includes(a.full_name)&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontSize:16,fontStyle:"italic",color:"var(--ink-soft)",marginTop:8},children:a.full_name}),a.description&&e.jsx(z,{className:"method-description",text:a.description}),a.source_url&&a.source_title&&e.jsxs("div",{className:"method-source",children:[e.jsx("span",{className:"method-source-label",children:"Source"}),j?e.jsxs(b,{className:"method-source-link",to:j,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:a.source_title}),a.introduced_year&&e.jsx("span",{className:"method-source-meta",children:a.introduced_year})]}):f?e.jsxs("a",{className:"method-source-link",href:f,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:a.source_title}),a.introduced_year&&e.jsx("span",{className:"method-source-meta",children:a.introduced_year})]}):e.jsxs("div",{className:"method-source-link is-static",children:[e.jsx("span",{className:"method-source-title",children:a.source_title}),a.introduced_year&&e.jsx("span",{className:"method-source-meta",children:a.introduced_year})]})]}),e.jsxs("div",{className:"tag-hero-meta",children:[e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Papers mentioning"}),e.jsx("span",{className:"value",children:(a.paper_count??0).toLocaleString()})]}),o.data&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Recent mentions"}),e.jsxs("span",{className:"value",children:[(o.data.recent_paper_count*30/o.data.recent_days).toFixed(1),e.jsx("small",{children:"/mo"})]}),!o.data.comparison_complete&&e.jsx("span",{title:"Tagging is still catching up. This rate reflects mentions found so far.",children:"Partial coverage"})]}),a.introduced_year!=null&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Introduced"}),e.jsx("span",{className:"value",children:a.introduced_year})]})]}),o.isLoading?e.jsx(_,{className:"h-36 w-full method-trend-skeleton"}):o.data?e.jsxs("section",{className:"method-trend-panel method-trend-panel--compact",children:[e.jsxs("div",{className:"method-trend-header",children:[e.jsx("div",{children:e.jsx("div",{className:"method-trend-eyebrow",children:"Usage trend"})}),e.jsxs("div",{className:"method-trend-summary",children:[e.jsx("strong",{children:o.data.recent_paper_count}),e.jsxs("span",{children:["papers / ",o.data.recent_days,"d"]})]})]}),e.jsx(de,{history:o.data.history,methodName:a.name})]}):null]}),e.jsxs("figure",{className:"method-figure-card",children:[e.jsx(ie,{method:a}),a.image_credit&&e.jsx("figcaption",{children:e.jsx(z,{className:"method-image-credit",text:a.image_credit})})]})]}),(((m=h.data)==null?void 0:m.results.length)??0)>0&&e.jsxs("div",{className:"filter-row",children:[e.jsx("span",{className:"label",children:"Related methods"}),h.data.results.map(u=>e.jsx(H,{method:{slug:u.slug,name:u.name}},u.id))]}),e.jsx(Q,{feed:r,children:e.jsxs("div",{className:"results-count",children:[c.length," papers mentioning ",a.name]})}),e.jsx(K,{query:p,cards:c,empty:"No papers tagged with this method yet."})]})};export{Re as default};
|
|
|
|
|
|
assets/MethodsIndexView-DYp0dUSa.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
| 1 |
-
import{n as y,r as c,j as s,L as f}from"./index-CbgxfyGU.js";import{u as l}from"./useQuery-Bx9s5-D2.js";import{c as m}from"./catalog-DhK7_9-6.js";import{s as _}from"./areas-Dvi8w2dp.js";import{s as v}from"./slug-BpH-Nkvz.js";import{A as N,a as L}from"./alert-CFDDvdIM.js";import{A as T,a as A}from"./AreaSection-NWvfO4Sb.js";import{T as F}from"./TaxonomySuggestionTile-DIw_GKfA.js";import{u as M,T as q}from"./useHashScrollOnReady-DgB3XFQL.js";import"./skeleton-HwvdxvSN.js";import"./SignInToEditDialog-CNIcNqbK.js";import"./button-Bv9oZ-QU.js";import"./input-B6pxtfPe.js";import"./textarea-Bf06GTSH.js";import"./searchable-select-DNdBIahG.js";import"./popover-DKJYnYjk.js";import"./dialog-Cfp_d3CC.js";import"./search-CLtAJGOp.js";import"./loader-circle-CWMja8Zn.js";import"./useMutation-P_trTy9i.js";import"./submissions-aWj7YtuZ.js";import"./plus-UK0TEjgd.js";import"./trending-up-B3K5RlyX.js";/**
|
| 2 |
-
* @license lucide-react v0.462.0 - ISC
|
| 3 |
-
*
|
| 4 |
-
* This source code is licensed under the ISC license.
|
| 5 |
-
* See the LICENSE file in the root directory of this source tree.
|
| 6 |
-
*/const S=y("Flame",[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]]),Z=()=>{var p,u,h;const n=l({queryKey:["areas-all"],queryFn:()=>m.listAreas({page_size:50,ordering:"name"}),staleTime:6e5}),i=l({queryKey:["methods-all"],queryFn:async()=>(await m.methodIndex()).results,staleTime:10*60*1e3}),o=l({queryKey:["trending-methods-directory"],queryFn:()=>m.trendingMethods({limit:12}),staleTime:10*60*1e3}),x=c.useMemo(()=>{var t,a;const r=new Map((((t=n.data)==null?void 0:t.results)??[]).map(e=>[e.id,e.name]));return(a=o.data)==null?void 0:a.results.map(e=>({id:e.id,name:e.name,href:`/methods/${e.slug||e.id}`,areaName:e.area_id?r.get(e.area_id):void 0,recentPaperCount:e.recent_paper_count,shareLift:e.share_lift}))},[o.data,n.data]),d=c.useMemo(()=>{if(!i.data||!n.data)return null;const r={};return i.data.forEach(t=>{const a=t.area_id??"_unassigned";(r[a]||(r[a]=[])).push(t)}),Object.values(r).forEach(t=>t.sort((a,e)=>(e.trend_score||0)-(a.trend_score||0)||(e.paper_count||0)-(a.paper_count||0)||a.name.localeCompare(e.name))),r},[i.data,n.data]),g=c.useMemo(()=>{const r=(i.data||[]).filter(a=>(a.trend_score||0)>0).sort((a,e)=>(e.trend_score||0)-(a.trend_score||0)),t=Math.ceil(r.length*.25);return new Set(r.slice(0,t).map(a=>a.id))},[i.data]);return M(!!n.data&&!!i.data&&!o.isLoading),n.error||i.error?s.jsx("div",{className:"page",children:s.jsx(N,{variant:"destructive",children:s.jsx(L,{children:"Failed to load methods."})})}):s.jsxs("div",{className:"page",children:[s.jsx("div",{className:"feed-header",children:s.jsxs("div",{children:[s.jsxs("h1",{className:"feed-title",children:["Methods ",s.jsx("em",{children:"library"})]}),s.jsx("div",{className:"feed-subtitle",children:"Common techniques used across AI research. Trend scores show papers using each method per 30 days, measured over the latest 90 days; the flame marks the top quartile."})]})}),s.jsx(q,{noun:"method",items:x,recentDays:(p=o.data)==null?void 0:p.recent_days,baselineDays:(u=o.data)==null?void 0:u.baseline_days,isLoading:o.isLoading,error:o.error,mono:!0}),n.isLoading||i.isLoading?s.jsx(T,{tiles:8,tileClassName:"h-20"}):_(((h=n.data)==null?void 0:h.results)??[]).map(r=>{const t=(d==null?void 0:d[r.id])||[];if(t.length===0)return null;const a=t.reduce((e,j)=>e+(j.paper_count||0),0);return s.jsxs(A,{id:`area-${v(r.name)}`,title:r.name,meta:`${t.length} methods · ${a.toLocaleString()} papers`,children:[t.map(e=>s.jsxs(f,{to:`/methods/${e.slug||e.id}`,className:"tag-cell",children:[s.jsxs("div",{className:"name",style:{fontFamily:"var(--mono)",fontSize:15},children:[e.name,g.has(e.id)&&s.jsx(S,{className:"method-trending-icon",size:15,"aria-label":"Top quartile by recent method mentions"})]}),s.jsxs("div",{className:"meta",children:[s.jsxs("span",{children:[(e.paper_count??0).toLocaleString()," papers"]}),(e.trend_score??0)>0&&s.jsxs(s.Fragment,{children:[s.jsx("span",{children:"·"}),s.jsxs("span",{className:"method-trend-score",children:[(e.trend_score??0).toFixed(1),"/mo"]})]}),e.introduced_year!=null&&s.jsxs(s.Fragment,{children:[s.jsx("span",{children:"·"}),s.jsx("span",{children:e.introduced_year})]})]})]},e.id)),s.jsx(F,{kind:"method"})]},r.id)})]})};export{Z as default};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/MethodsIndexView-D_aKGLyJ.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import{s as f,b as c,d as l,j as s,L as _,o as N,T as m}from"./index-DyXq7-Tg.js";import{c as p}from"./catalog-CRar2olQ.js";import{s as T}from"./areas-Dvi8w2dp.js";import{s as v}from"./slug-BpH-Nkvz.js";import{A as L,a as M}from"./alert-gbJBhAVE.js";import{A,a as F}from"./AreaSection-BxnKzNK0.js";import{T as q}from"./TaxonomySuggestionTile-jIiLMp4q.js";import{u as S,T as I}from"./useHashScrollOnReady-D5UCCQuT.js";import"./skeleton-C3IIzpSL.js";import"./SignInToEditDialog-B-oWVno5.js";import"./button-DZeAbOf2.js";import"./input-DJqCAbs7.js";import"./textarea-DPixlM5U.js";import"./searchable-select-DiDLwvbI.js";import"./popover-CTBEUp7Y.js";import"./dialog-CfM0Uql2.js";import"./search-8ssWDP68.js";import"./loader-circle-C75KLEgx.js";import"./useMutation-UWxBeqtn.js";import"./submissions-Cz_J-Ha2.js";import"./plus-Yh42pKZz.js";import"./trending-up-OM6wBVvQ.js";/**
|
| 2 |
+
* @license lucide-react v0.462.0 - ISC
|
| 3 |
+
*
|
| 4 |
+
* This source code is licensed under the ISC license.
|
| 5 |
+
* See the LICENSE file in the root directory of this source tree.
|
| 6 |
+
*/const E=f("Flame",[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]]),ee=()=>{var u,h,x;const n=c({queryKey:N.areas,queryFn:()=>p.listAreas({page_size:50,ordering:"name"}),staleTime:m}),i=c({queryKey:["methods-all"],queryFn:async()=>(await p.methodIndex()).results,staleTime:m}),o=c({queryKey:["trending-methods-directory"],queryFn:()=>p.trendingMethods({limit:12}),staleTime:m}),g=l.useMemo(()=>{var t,a;const r=new Map((((t=n.data)==null?void 0:t.results)??[]).map(e=>[e.id,e.name]));return(a=o.data)==null?void 0:a.results.map(e=>({id:e.id,name:e.name,href:`/methods/${e.slug||e.id}`,areaName:e.area_id?r.get(e.area_id):void 0,recentPaperCount:e.recent_paper_count,shareLift:e.share_lift}))},[o.data,n.data]),d=l.useMemo(()=>{if(!i.data||!n.data)return null;const r={};return i.data.forEach(t=>{const a=t.area_id??"_unassigned";(r[a]||(r[a]=[])).push(t)}),Object.values(r).forEach(t=>t.sort((a,e)=>(e.trend_score||0)-(a.trend_score||0)||(e.paper_count||0)-(a.paper_count||0)||a.name.localeCompare(e.name))),r},[i.data,n.data]),y=l.useMemo(()=>{const r=(i.data||[]).filter(a=>(a.trend_score||0)>0).sort((a,e)=>(e.trend_score||0)-(a.trend_score||0)),t=Math.ceil(r.length*.25);return new Set(r.slice(0,t).map(a=>a.id))},[i.data]);return S(!!n.data&&!!i.data&&!o.isLoading),n.error||i.error?s.jsx("div",{className:"page",children:s.jsx(L,{variant:"destructive",children:s.jsx(M,{children:"Failed to load methods."})})}):s.jsxs("div",{className:"page",children:[s.jsx("div",{className:"feed-header",children:s.jsxs("div",{children:[s.jsxs("h1",{className:"feed-title",children:["Methods ",s.jsx("em",{children:"library"})]}),s.jsx("div",{className:"feed-subtitle",children:"Common techniques used across AI research. Trend scores show papers using each method per 30 days, measured over the latest 90 days; the flame marks the top quartile."})]})}),s.jsx(I,{noun:"method",items:g,recentDays:(u=o.data)==null?void 0:u.recent_days,baselineDays:(h=o.data)==null?void 0:h.baseline_days,isLoading:o.isLoading,error:o.error,mono:!0}),n.isLoading||i.isLoading?s.jsx(A,{tiles:8,tileClassName:"h-20"}):T(((x=n.data)==null?void 0:x.results)??[]).map(r=>{const t=(d==null?void 0:d[r.id])||[];if(t.length===0)return null;const a=t.reduce((e,j)=>e+(j.paper_count||0),0);return s.jsxs(F,{id:`area-${v(r.name)}`,title:r.name,meta:`${t.length} methods · ${a.toLocaleString()} papers`,children:[t.map(e=>s.jsxs(_,{to:`/methods/${e.slug||e.id}`,className:"tag-cell",children:[s.jsxs("div",{className:"name",style:{fontFamily:"var(--mono)",fontSize:15},children:[e.name,y.has(e.id)&&s.jsx(E,{className:"method-trending-icon",size:15,"aria-label":"Top quartile by recent method mentions"})]}),s.jsxs("div",{className:"meta",children:[s.jsxs("span",{children:[(e.paper_count??0).toLocaleString()," papers"]}),(e.trend_score??0)>0&&s.jsxs(s.Fragment,{children:[s.jsx("span",{children:"·"}),s.jsxs("span",{className:"method-trend-score",children:[(e.trend_score??0).toFixed(1),"/mo"]})]}),e.introduced_year!=null&&s.jsxs(s.Fragment,{children:[s.jsx("span",{children:"·"}),s.jsx("span",{children:e.introduced_year})]})]})]},e.id)),s.jsx(q,{kind:"method"})]},r.id)})]})};export{ee as default};
|
assets/{NotFound-DtzwOULp.js → NotFound-DV_nwcxG.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{
|
|
|
|
| 1 |
+
import{c as o,d as s,j as t,L as a}from"./index-DyXq7-Tg.js";const r=()=>{const e=o();return s.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),t.jsxs("div",{className:"page",style:{textAlign:"center",paddingTop:96},children:[t.jsx("h1",{className:"detail-title",style:{fontSize:96,marginBottom:8},children:"404"}),t.jsx("p",{style:{fontFamily:"var(--serif)",fontStyle:"italic",color:"var(--ink-soft)",marginBottom:24},children:"That route isn't on the map."}),t.jsx(a,{to:"/",className:"action-btn",children:"Return home"})]})};export{r as default};
|
assets/OrganizationContributionGraph-DsoZR4EG.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{d as b,j as o,b as $,T as z}from"./index-DyXq7-Tg.js";import{S as w}from"./skeleton-C3IIzpSL.js";import{c as y}from"./catalog-CRar2olQ.js";const x=24*60*60*1e3,f=12,N=3,v=new Map([[1,"Mon"],[3,"Wed"],[5,"Fri"]]),T=n=>new Date(`${n}T00:00:00Z`),_=n=>n.toISOString().slice(0,10),M=(n,a)=>{if(n===0)return 0;const i=a.findIndex(s=>n<=s);return i===-1?4:i+1},S=n=>{const a=T(n.start_date),i=T(n.end_date),s=new Date(a.getTime()-a.getUTCDay()*x),h=new Date(i.getTime()+(6-i.getUTCDay())*x),p=new Map(n.results.map(e=>[e.date,e.paper_count])),u=n.results.map(e=>e.paper_count).sort((e,g)=>e-g),c=[.25,.5,.75].map(e=>u[Math.min(u.length-1,Math.floor(u.length*e))]??1),l=[];for(let e=s.getTime();e<=h.getTime();e+=x){const g=new Date(e),d=_(g),m=e>=a.getTime()&&e<=i.getTime(),C=m?p.get(d)??0:0;l.push({key:d,date:g,count:C,inRange:m,level:M(C,c)})}const t=l.length/7,r=[];let j=-1;for(let e=0;e<t;e+=1){const d=l.slice(e*7,e*7+7).find(m=>m.inRange&&(e===0||m.date.getUTCDate()<=7));d&&d.date.getUTCMonth()!==j&&(j=d.date.getUTCMonth(),r.length>0&&e-r[r.length-1].column<3&&r.pop(),r.push({label:d.date.toLocaleString("en",{month:"short",timeZone:"UTC"}),column:e}))}return{days:l,months:r,weekCount:t}},D=({data:n,organizationName:a,title:i="Paper contributions",noun:s="paper"})=>{const h=b.useRef(null),{days:p,months:u,weekCount:c}=b.useMemo(()=>S(n),[n]),l=c*f+(c-1)*N;return b.useEffect(()=>{const t=h.current;t&&(t.scrollLeft=t.scrollWidth)},[c]),o.jsxs("section",{className:"organization-contributions","aria-labelledby":"organization-contributions-title",children:[o.jsxs("div",{className:"organization-contributions-header",children:[o.jsx("h2",{id:"organization-contributions-title",className:"organization-contributions-title",children:i}),o.jsxs("p",{className:"organization-contributions-summary",children:[n.total_count.toLocaleString()," ",n.total_count===1?s:`${s}s`," recorded in the last year"]})]}),o.jsx("div",{className:"organization-contributions-scroll",ref:h,children:o.jsxs("div",{className:"organization-contributions-plot",style:{width:l+34},role:"img","aria-label":`${a} recorded ${n.total_count} ${n.total_count===1?s:`${s}s`} in the last year`,children:[o.jsx("div",{className:"organization-contributions-weekdays","aria-hidden":"true",children:Array.from({length:7}).map((t,r)=>o.jsx("span",{children:v.get(r)??""},r))}),o.jsxs("div",{children:[o.jsx("div",{className:"organization-contributions-months",style:{width:l,gridTemplateColumns:`repeat(${c}, ${f}px)`},"aria-hidden":"true",children:u.map(t=>o.jsx("span",{style:{gridColumnStart:t.column+1},children:t.label},`${t.label}-${t.column}`))}),o.jsx("div",{className:"organization-contributions-grid",style:{width:l,gridTemplateColumns:`repeat(${c}, ${f}px)`},"aria-hidden":"true",children:p.map(t=>o.jsx("span",{className:`organization-contribution-cell ${t.inRange?`level-${t.level}`:"is-outside"}`,title:t.inRange?`${t.count} ${t.count===1?s:`${s}s`} on ${t.date.toLocaleDateString("en",{dateStyle:"long",timeZone:"UTC"})}`:void 0},t.key))})]})]})}),o.jsxs("div",{className:"organization-contributions-legend","aria-hidden":"true",children:[o.jsx("span",{children:"Fewer"}),[0,1,2,3,4].map(t=>o.jsx("span",{className:`organization-contribution-cell level-${t}`},t)),o.jsx("span",{children:"More"})]})]})},U=({organizationSlug:n,organizationName:a})=>{const i=$({queryKey:["organization-contributions",n],queryFn:()=>y.organizationContributions(n),staleTime:z});return i.isLoading?o.jsx(w,{className:"organization-contributions-skeleton"}):i.data?o.jsx(D,{data:i.data,organizationName:a}):null};export{D as C,U as O};
|