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-ClqC1BaK.js → AgentLogos-CFt_vIO2.js} +1 -1
- assets/{AiDeadlinesView-DJBbqNNI.js → AiDeadlinesView-DJLyTAgt.js} +1 -1
- assets/{ApiDocsView-CydK1pFj.js → ApiDocsView-D3iY1sSs.js} +1 -1
- assets/{ArtifactWorkspace-DZXFAFpE.js → ArtifactWorkspace-CUZCugRS.js} +1 -1
- assets/{AstraForRoboticsView-U0yBJtLA.js → AstraForRoboticsView-CEJJvKPe.js} +1 -1
- assets/{AuthorAvatar-CWCqOa0h.js → AuthorAvatar-UMHOVOr9.js} +1 -1
- assets/{AuthorDetailView-CfDdV5MT.js → AuthorDetailView-BsVP0aHv.js} +1 -1
- assets/{AuthorizePaperEditView-D17pnlSs.js → AuthorizePaperEditView-mMhbmAG2.js} +1 -1
- assets/AutonomousOperations-BNbcighz.js +1 -0
- assets/AutonomousOperations-CYN302r1.js +0 -1
- assets/{BenchmarkDetailView-HVBhj9Ke.js → BenchmarkDetailView-DGAxl02Y.js} +1 -1
- assets/{BenchmarkTrendSparkline-BrvDBmsS.js → BenchmarkTrendSparkline-BfAoxAzu.js} +1 -1
- assets/{CatalogEntityPreviewLink-BWMEEf81.js → CatalogEntityPreviewLink-BhTSUN-X.js} +1 -1
- assets/{ChatView-DZCqXX3T.js → ChatView-wJIPZ39W.js} +1 -1
- assets/{ConferenceDetailView-BP533WBF.js → ConferenceDetailView-BNri44qz.js} +1 -1
- assets/{ConferenceTaskView-B9U81_-o.js → ConferenceTaskView-BBbbnoRS.js} +1 -1
- assets/{ConferencesIndexView-BvdvhrAq.js → ConferencesIndexView-DF9D85K1.js} +1 -1
- assets/CronDashboard-B0sjsUM_.js +6 -0
- assets/CronDashboard-Ch03vo4I.js +0 -1
- assets/CronDashboard-DPgNAdQz.js +0 -36
- assets/CronDashboard-DZ_espzl.js +36 -0
- assets/{ExternalSourceEvalBadge-TyFEU7vd.js → ExternalSourceEvalBadge-DfhTt9yv.js} +1 -1
- assets/{FeedView-EM1uL5u1.js → FeedView-L-eiYDg9.js} +1 -1
- assets/FollowingView-CVyxNxmM.js +1 -0
- assets/FollowingView-CYdAvQ9K.js +0 -1
- assets/{FrameworksIndexView-BjBwZMDx.js → FrameworksIndexView-BxWPuGhr.js} +1 -1
- assets/LatexTitle-BI9yl-Fo.js +0 -2
- assets/LatexTitle-D_92Jowu.js +2 -0
- assets/{MarkdownText-CJQADo_f.js → MarkdownText-B_D3IE_p.js} +1 -1
- assets/{McpShowcase-oHgWM9FI.js → McpShowcase-CS9LZY9p.js} +1 -1
- assets/{McpView-zJL3QfYL.js → McpView-Dg_zVuuF.js} +1 -1
- assets/{MethodDetailView-CFqQPuPA.js → MethodDetailView-PtjfC1LZ.js} +1 -1
- assets/{MethodsIndexView-CW-VvDvI.js → MethodsIndexView-2d98MRig.js} +1 -1
- assets/{NotFound-pWH_hqC2.js → NotFound-BTsJlVc8.js} +1 -1
- assets/{OrganizationContributionGraph-DUBXw9I0.js → OrganizationContributionGraph-DzcTqxNw.js} +1 -1
- assets/OrganizationDetailView-0SsciBmz.js +0 -1
- assets/OrganizationDetailView-BsHsK07O.js +1 -0
- assets/{OrganizationPaperFeed-CF5IpMXI.js → OrganizationPaperFeed-BsFHy5Y7.js} +1 -1
- assets/OrganizationTaskView--dnePIkF.js +1 -0
- assets/OrganizationTaskView-BXRvLYFu.js +0 -1
- assets/{OrganizationsIndexView-CLXjlm96.js → OrganizationsIndexView-C_uscBZY.js} +1 -1
- assets/{PaperDateFilter-zHw5tq6B.js → PaperDateFilter-CPIqaHaq.js} +1 -1
- assets/PaperDetailView-B-27QVn7.js +0 -0
- assets/PaperDetailView-rFgkO-hW.js +0 -0
- assets/{PaperFeedFilters-SOqb93ez.js → PaperFeedFilters-DNebHp4l.js} +1 -1
- assets/{PaperPreviewLink-C6khj_iZ.js → PaperPreviewLink-fcJyP9H0.js} +1 -1
- assets/{PaperReaderView-Dwb0MEz-.js → PaperReaderView-CTxDY9uR.js} +1 -1
- assets/{PapersListView-DYcakh08.js → PapersListView-BNcDd1lQ.js} +1 -1
- assets/{PrivacyView-CH2fzy9w.js → PrivacyView-CwO81wLZ.js} +1 -1
- assets/{RateLimitsView-46i_Guh7.js → RateLimitsView-ChUFO8Hr.js} +1 -1
assets/{AgentLogos-ClqC1BaK.js → AgentLogos-CFt_vIO2.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{j as e}from"./index-CqKcHUvZ.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-D6jcIRWs.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-DJBbqNNI.js → AiDeadlinesView-DJLyTAgt.js}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
-
import{r as x,j as t}from"./index-
|
| 2 |
`)},C=e=>e.toISOString().replace(/[-:]/g,"").replace(/\.\d{3}/,""),ee=(e,a)=>{const n=new Date(a.deadline_at),r=new Date(n.getTime()+60*60*1e3),o=`${e.short_name||e.name} ${a.label||a.type||"deadline"}`,i=e.venue||[e.city,e.country].filter(Boolean).join(", "),s=`https://calendar.google.com/calendar/render?action=TEMPLATE&text=${encodeURIComponent(o)}&dates=${C(n)}/${C(r)}&details=${encodeURIComponent(R(e,a))}&location=${encodeURIComponent(i)}`,m=z(s);m&&window.open(m,"_blank","noopener,noreferrer")},te=(e,a)=>{const n=new Date(a.deadline_at),r=new Date(n.getTime()+60*60*1e3),o=`${e.short_name||e.name} ${a.label||a.type||"deadline"}`,i=e.venue||[e.city,e.country].filter(Boolean).join(", "),s=["BEGIN:VCALENDAR","VERSION:2.0","BEGIN:VEVENT",e.url?`URL:${e.url}`:null,`DTSTART:${C(n)}`,`DTEND:${C(r)}`,`SUMMARY:${o}`,`DESCRIPTION:${R(e,a).replace(/\n/g,"\\n")}`,i?`LOCATION:${i}`:null,"END:VEVENT","END:VCALENDAR"].filter(Boolean).join(`
|
| 3 |
`),m=new Blob([s],{type:"text/calendar;charset=utf-8"}),c=document.createElement("a");c.href=URL.createObjectURL(m),c.download=`${(e.short_name||e.name).toLowerCase().replace(/\s+/g,"-")}-deadline.ics`,document.body.appendChild(c),c.click(),document.body.removeChild(c),URL.revokeObjectURL(c.href)},ne=({conf:e,open:a,onOpenChange:n})=>{const[r,o]=x.useState(()=>Date.now());x.useEffect(()=>{if(!a)return;o(Date.now());const d=setInterval(()=>o(Date.now()),1e3);return()=>clearInterval(d)},[a]);const i=x.useMemo(()=>e?M(e):[],[e]),s=x.useMemo(()=>e?T(e,r):null,[e,r]),m=e?I(e.start_date,e.end_date):null,c=e?e.venue||[e.city,e.country].filter(Boolean).join(", ")||e.location:null,u=s?new Date(s.deadline_at).getTime():null;return t.jsx(P,{open:a,onOpenChange:n,children:t.jsx(G,{className:"max-w-xl",style:{background:"var(--bg-elevated)",maxHeight:"85vh",overflowY:"auto"},children:e&&t.jsxs(t.Fragment,{children:[t.jsxs(Y,{children:[t.jsx(H,{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(K,{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:[m&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[t.jsx("span",{style:$,children:"Dates"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-soft)"},children:m})]}),c&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[t.jsx("span",{style:$,children:"Venue"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-soft)"},children:c})]})]}),u!=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:$,children:"Next deadline in"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:22,fontWeight:600,color:_(u,r)},children:X(u,r)})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[t.jsx("span",{style:$,children:"Important deadlines"}),i.length===0?t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-faint)"},children:"No deadlines listed"}):i.map((d,p)=>{const y=new Date(d.deadline_at).getTime(),l=s!=null&&d.deadline_at===s.deadline_at&&d.type===s.type,h=y<=r;return t.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12,padding:"8px 12px",borderRadius:6,background:l?"var(--accent-soft)":"transparent",border:l?"1px solid var(--hairline-strong)":"1px solid var(--hairline)",opacity:h&&!l?.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:l?600:400},children:[d.label||k(d.type||"deadline"),l&&t.jsx("span",{style:{...$,marginLeft:8},children:"Next"})]}),t.jsxs("span",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-faint)"},children:[F(d.deadline_at),d.timezone?` · ${d.timezone}`:""]})]}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:12,fontWeight:600,whiteSpace:"nowrap",color:_(h?null:y,r)},children:Z(y,r)})]},`${d.type??"deadline"}-${p}`)})]}),D(e).length>0&&t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:D(e).map(d=>t.jsx("span",{className:"tag-chip",style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:k(d)},d))}),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:z(e.url)??void 0,target:"_blank",rel:"noopener noreferrer",style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--accent-text)"},children:"Visit website ↗"}),s&&t.jsxs("div",{style:{display:"flex",gap:12,marginLeft:"auto"},children:[t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>ee(e,s),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Google Calendar"}),t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>te(e,s),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Apple / .ics"})]})]})]})]})})})},E=({id:e,label:a,checked:n,onChange:r})=>t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:[t.jsx(U,{id:e,checked:n,onCheckedChange:r}),t.jsx("label",{htmlFor:e,style:{cursor:"pointer"},children:a})]}),ae=({conf:e,now:a,selectedDomains:n,onToggleDomain:r,onOpen:o})=>{const i=T(e,a),s=i??L(e),m=s?new Date(s.deadline_at).getTime():null,c=_(i?m:null,a),u=I(e.start_date,e.end_date),d=[e.city??null,e.country??null].filter(Boolean).join(", ");return t.jsxs("div",{role:"button",tabIndex:0,onClick:()=>o(e),onKeyDown:p=>{(p.key==="Enter"||p.key===" ")&&(p.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:z(e.url)??void 0,target:"_blank",rel:"noopener noreferrer",onClick:p=>p.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:(s==null?void 0:s.label)||(s==null?void 0:s.type)||"Deadline"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:s?`${F(s.deadline_at)}${s.timezone?` · ${s.timezone}`:""}`:"TBD"})]}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:14,fontWeight:600,color:c,whiteSpace:"nowrap"},children:m!=null?J(m,a):"TBD"})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)"},children:[u&&t.jsx("span",{children:u}),d&&t.jsx("span",{children:d})]}),D(e).length>0&&t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:D(e).map(p=>{const y=n.has(p);return t.jsx("button",{className:"tag-chip",onClick:l=>{l.stopPropagation(),r(p)},style:{background:y?"var(--ink)":"var(--bg-subtle)",color:y?"var(--bg)":"var(--ink-soft)"},children:k(p)},p)})})]})},ue=()=>{const[e,a]=x.useState(!0),[n,r]=x.useState(!1),[o,i]=x.useState(new Set),[s,m]=x.useState(null),c=x.useMemo(()=>Date.now(),[]),u=A({queryKey:["conference-deadlines"],queryFn:()=>B.conferenceDeadlines(),staleTime:10*60*1e3}),d=l=>{i(h=>{const g=new Set(h);return g.has(l)?g.delete(l):g.add(l),g})},p=x.useMemo(()=>{var h;const l=new Map;return(h=u.data)==null||h.results.forEach(g=>{D(g).forEach(j=>l.set(j,(l.get(j)??0)+1))}),Array.from(l.entries()).sort((g,j)=>j[1]-g[1]).map(([g])=>g)},[u.data]),y=x.useMemo(()=>{var j;const h=(((j=u.data)==null?void 0:j.results)??[]).filter(f=>!(e&&f.tier!=="a"||o.size>0&&!D(f).some(v=>o.has(v))||!n&&!T(f,c))),g=f=>{const w=T(f,c);if(w)return{group:0,time:new Date(w.deadline_at).getTime()};const v=L(f);return{group:1,time:-(v?new Date(v.deadline_at).getTime():0)}};return[...h].sort((f,w)=>{const v=g(f),N=g(w);return v.group!==N.group?v.group-N.group:v.time-N.time})},[u.data,e,n,o,c]);return u.error?t.jsx("div",{className:"page",children:t.jsx(O,{variant:"destructive",children:t.jsx(V,{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:a}),t.jsx(E,{id:"show-past",label:"Show past conferences",checked:n,onChange:r})]}),p.length>0&&t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:6,marginBottom:24},children:[p.map(l=>{const h=o.has(l);return t.jsx("button",{className:"tag-chip",onClick:()=>d(l),style:{background:h?"var(--ink)":"var(--bg-subtle)",color:h?"var(--bg)":"var(--ink-soft)"},children:k(l)},l)}),o.size>0&&t.jsx("button",{className:"tag-chip",onClick:()=>i(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:u.isLoading?"…":`${y.length} conferences`})}),u.isLoading?t.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:16},children:Array.from({length:6}).map((l,h)=>t.jsx(W,{className:"h-44"},h))}):y.length===0?t.jsxs("div",{className:"no-results",children:["No conferences match these filters",n?".":" — try enabling “Show past conferences”."]}):t.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:16},children:y.map(l=>t.jsx(ae,{conf:l,now:c,selectedDomains:o,onToggleDomain:d,onOpen:m},l.id))}),t.jsx(ne,{conf:s,open:s!==null,onOpenChange:l=>{l||m(null)}})]})};export{ue as default};
|
|
|
|
| 1 |
+
import{r as x,j as t}from"./index-D6jcIRWs.js";import{u as A}from"./useQuery-CUJUm4FY.js";import{c as B}from"./catalog-PYrB8_bm.js";import{S as U}from"./switch-D_MyRbto.js";import{S as W}from"./skeleton-BqkYFmXl.js";import{A as O,a as V}from"./alert-2MbxVzGL.js";import{s as z}from"./safeExternalHref-CkBrsh84.js";import{D as P,a as G,c as Y,b as H,d as K}from"./dialog-vGFIbcd-.js";import"./index-DIg7XGE2.js";const b=1e3*60*60*24,S={urgent:"#c0392b",soon:"#b9770e",normal:"#3f7d3f",passed:"var(--ink-faint)"},k=e=>e.split("-").map(a=>a.charAt(0).toUpperCase()+a.slice(1)).join(" "),q=new Set(["machine-learning","computer-vision","natural-language-processing","data-mining","robotics","computer-graphics","human-computer-interaction","web-search","signal-processing","representation-learning","reinforcement-learning","optimization-methods","large-language-models","information-retrieval","speech","mathematics"]),Q=e=>e.trim().toLowerCase().replace(/\s+/g,"-"),D=e=>Array.from(new Set((e.tags??[]).map(Q).filter(a=>q.has(a)))),F=e=>new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),I=(e,a)=>{if(!e)return null;const n=new Date(`${e}T00:00:00`),r=a?new Date(`${a}T00:00:00`):null,o=s=>s.toLocaleDateString("en-US",{month:"long",day:"numeric"}),i=n.getFullYear();return r&&r.getTime()!==n.getTime()?n.getMonth()===r.getMonth()?`${o(n).replace(/\d+$/,"").trim()} ${n.getDate()}–${r.getDate()}, ${i}`:`${o(n)} – ${o(r)}, ${i}`:`${o(n)}, ${i}`},M=e=>[...e.deadlines??[]].sort((a,n)=>new Date(a.deadline_at).getTime()-new Date(n.deadline_at).getTime()),T=(e,a)=>M(e).find(n=>new Date(n.deadline_at).getTime()>a)??null,L=e=>{const a=M(e);return a.length?a[a.length-1]:null},J=(e,a)=>{const n=e-a;if(n<=0)return"Deadline passed";const r=Math.floor(n/b);if(r>=1){const s=Math.floor((n-r*b)/36e5);return`in ${r}d ${s}h`}const o=Math.floor(n/(1e3*60*60));return o>=1?`in ${o}h`:`in ${Math.max(1,Math.floor(n/(1e3*60)))}m`},X=(e,a)=>{const n=e-a;if(n<=0)return"Deadline passed";const r=Math.floor(n/b),o=Math.floor(n%b/(1e3*60*60)),i=Math.floor(n%(1e3*60*60)/(1e3*60)),s=Math.floor(n%(1e3*60)/1e3);return`${r}d ${o}h ${i}m ${s}s`},_=(e,a)=>{if(e==null)return S.passed;const n=(e-a)/b;return n<=0?S.passed:n<=7?S.urgent:n<=30?S.soon:S.normal},$={fontFamily:"var(--mono)",fontSize:10,letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--ink-faint)"},Z=(e,a)=>{const n=Math.ceil((e-a)/b);return n<=0?"passed":`${n} ${n===1?"day":"days"}`},R=(e,a)=>{const n=I(e.start_date,e.end_date),r=e.venue||[e.city,e.country].filter(Boolean).join(", ");return[`${a.label||a.type||"Deadline"} for ${e.name}`,n?`Dates: ${n}`:null,r?`Location: ${r}`:null,e.url?`Website: ${e.url}`:null].filter(Boolean).join(`
|
| 2 |
`)},C=e=>e.toISOString().replace(/[-:]/g,"").replace(/\.\d{3}/,""),ee=(e,a)=>{const n=new Date(a.deadline_at),r=new Date(n.getTime()+60*60*1e3),o=`${e.short_name||e.name} ${a.label||a.type||"deadline"}`,i=e.venue||[e.city,e.country].filter(Boolean).join(", "),s=`https://calendar.google.com/calendar/render?action=TEMPLATE&text=${encodeURIComponent(o)}&dates=${C(n)}/${C(r)}&details=${encodeURIComponent(R(e,a))}&location=${encodeURIComponent(i)}`,m=z(s);m&&window.open(m,"_blank","noopener,noreferrer")},te=(e,a)=>{const n=new Date(a.deadline_at),r=new Date(n.getTime()+60*60*1e3),o=`${e.short_name||e.name} ${a.label||a.type||"deadline"}`,i=e.venue||[e.city,e.country].filter(Boolean).join(", "),s=["BEGIN:VCALENDAR","VERSION:2.0","BEGIN:VEVENT",e.url?`URL:${e.url}`:null,`DTSTART:${C(n)}`,`DTEND:${C(r)}`,`SUMMARY:${o}`,`DESCRIPTION:${R(e,a).replace(/\n/g,"\\n")}`,i?`LOCATION:${i}`:null,"END:VEVENT","END:VCALENDAR"].filter(Boolean).join(`
|
| 3 |
`),m=new Blob([s],{type:"text/calendar;charset=utf-8"}),c=document.createElement("a");c.href=URL.createObjectURL(m),c.download=`${(e.short_name||e.name).toLowerCase().replace(/\s+/g,"-")}-deadline.ics`,document.body.appendChild(c),c.click(),document.body.removeChild(c),URL.revokeObjectURL(c.href)},ne=({conf:e,open:a,onOpenChange:n})=>{const[r,o]=x.useState(()=>Date.now());x.useEffect(()=>{if(!a)return;o(Date.now());const d=setInterval(()=>o(Date.now()),1e3);return()=>clearInterval(d)},[a]);const i=x.useMemo(()=>e?M(e):[],[e]),s=x.useMemo(()=>e?T(e,r):null,[e,r]),m=e?I(e.start_date,e.end_date):null,c=e?e.venue||[e.city,e.country].filter(Boolean).join(", ")||e.location:null,u=s?new Date(s.deadline_at).getTime():null;return t.jsx(P,{open:a,onOpenChange:n,children:t.jsx(G,{className:"max-w-xl",style:{background:"var(--bg-elevated)",maxHeight:"85vh",overflowY:"auto"},children:e&&t.jsxs(t.Fragment,{children:[t.jsxs(Y,{children:[t.jsx(H,{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(K,{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:[m&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[t.jsx("span",{style:$,children:"Dates"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-soft)"},children:m})]}),c&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[t.jsx("span",{style:$,children:"Venue"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-soft)"},children:c})]})]}),u!=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:$,children:"Next deadline in"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:22,fontWeight:600,color:_(u,r)},children:X(u,r)})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[t.jsx("span",{style:$,children:"Important deadlines"}),i.length===0?t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-faint)"},children:"No deadlines listed"}):i.map((d,p)=>{const y=new Date(d.deadline_at).getTime(),l=s!=null&&d.deadline_at===s.deadline_at&&d.type===s.type,h=y<=r;return t.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12,padding:"8px 12px",borderRadius:6,background:l?"var(--accent-soft)":"transparent",border:l?"1px solid var(--hairline-strong)":"1px solid var(--hairline)",opacity:h&&!l?.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:l?600:400},children:[d.label||k(d.type||"deadline"),l&&t.jsx("span",{style:{...$,marginLeft:8},children:"Next"})]}),t.jsxs("span",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-faint)"},children:[F(d.deadline_at),d.timezone?` · ${d.timezone}`:""]})]}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:12,fontWeight:600,whiteSpace:"nowrap",color:_(h?null:y,r)},children:Z(y,r)})]},`${d.type??"deadline"}-${p}`)})]}),D(e).length>0&&t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:D(e).map(d=>t.jsx("span",{className:"tag-chip",style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:k(d)},d))}),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:z(e.url)??void 0,target:"_blank",rel:"noopener noreferrer",style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--accent-text)"},children:"Visit website ↗"}),s&&t.jsxs("div",{style:{display:"flex",gap:12,marginLeft:"auto"},children:[t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>ee(e,s),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Google Calendar"}),t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>te(e,s),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Apple / .ics"})]})]})]})]})})})},E=({id:e,label:a,checked:n,onChange:r})=>t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:[t.jsx(U,{id:e,checked:n,onCheckedChange:r}),t.jsx("label",{htmlFor:e,style:{cursor:"pointer"},children:a})]}),ae=({conf:e,now:a,selectedDomains:n,onToggleDomain:r,onOpen:o})=>{const i=T(e,a),s=i??L(e),m=s?new Date(s.deadline_at).getTime():null,c=_(i?m:null,a),u=I(e.start_date,e.end_date),d=[e.city??null,e.country??null].filter(Boolean).join(", ");return t.jsxs("div",{role:"button",tabIndex:0,onClick:()=>o(e),onKeyDown:p=>{(p.key==="Enter"||p.key===" ")&&(p.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:z(e.url)??void 0,target:"_blank",rel:"noopener noreferrer",onClick:p=>p.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:(s==null?void 0:s.label)||(s==null?void 0:s.type)||"Deadline"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:s?`${F(s.deadline_at)}${s.timezone?` · ${s.timezone}`:""}`:"TBD"})]}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:14,fontWeight:600,color:c,whiteSpace:"nowrap"},children:m!=null?J(m,a):"TBD"})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)"},children:[u&&t.jsx("span",{children:u}),d&&t.jsx("span",{children:d})]}),D(e).length>0&&t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:D(e).map(p=>{const y=n.has(p);return t.jsx("button",{className:"tag-chip",onClick:l=>{l.stopPropagation(),r(p)},style:{background:y?"var(--ink)":"var(--bg-subtle)",color:y?"var(--bg)":"var(--ink-soft)"},children:k(p)},p)})})]})},ue=()=>{const[e,a]=x.useState(!0),[n,r]=x.useState(!1),[o,i]=x.useState(new Set),[s,m]=x.useState(null),c=x.useMemo(()=>Date.now(),[]),u=A({queryKey:["conference-deadlines"],queryFn:()=>B.conferenceDeadlines(),staleTime:10*60*1e3}),d=l=>{i(h=>{const g=new Set(h);return g.has(l)?g.delete(l):g.add(l),g})},p=x.useMemo(()=>{var h;const l=new Map;return(h=u.data)==null||h.results.forEach(g=>{D(g).forEach(j=>l.set(j,(l.get(j)??0)+1))}),Array.from(l.entries()).sort((g,j)=>j[1]-g[1]).map(([g])=>g)},[u.data]),y=x.useMemo(()=>{var j;const h=(((j=u.data)==null?void 0:j.results)??[]).filter(f=>!(e&&f.tier!=="a"||o.size>0&&!D(f).some(v=>o.has(v))||!n&&!T(f,c))),g=f=>{const w=T(f,c);if(w)return{group:0,time:new Date(w.deadline_at).getTime()};const v=L(f);return{group:1,time:-(v?new Date(v.deadline_at).getTime():0)}};return[...h].sort((f,w)=>{const v=g(f),N=g(w);return v.group!==N.group?v.group-N.group:v.time-N.time})},[u.data,e,n,o,c]);return u.error?t.jsx("div",{className:"page",children:t.jsx(O,{variant:"destructive",children:t.jsx(V,{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:a}),t.jsx(E,{id:"show-past",label:"Show past conferences",checked:n,onChange:r})]}),p.length>0&&t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:6,marginBottom:24},children:[p.map(l=>{const h=o.has(l);return t.jsx("button",{className:"tag-chip",onClick:()=>d(l),style:{background:h?"var(--ink)":"var(--bg-subtle)",color:h?"var(--bg)":"var(--ink-soft)"},children:k(l)},l)}),o.size>0&&t.jsx("button",{className:"tag-chip",onClick:()=>i(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:u.isLoading?"…":`${y.length} conferences`})}),u.isLoading?t.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:16},children:Array.from({length:6}).map((l,h)=>t.jsx(W,{className:"h-44"},h))}):y.length===0?t.jsxs("div",{className:"no-results",children:["No conferences match these filters",n?".":" — try enabling “Show past conferences”."]}):t.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:16},children:y.map(l=>t.jsx(ae,{conf:l,now:c,selectedDomains:o,onToggleDomain:d,onOpen:m},l.id))}),t.jsx(ne,{conf:s,open:s!==null,onOpenChange:l=>{l||m(null)}})]})};export{ue as default};
|
assets/{ApiDocsView-CydK1pFj.js → ApiDocsView-D3iY1sSs.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import{
|
| 2 |
|
| 3 |
response = requests.get(${JSON.stringify(s)}, timeout=30)
|
| 4 |
response.raise_for_status()
|
|
|
|
| 1 |
+
import{a5 as m,r as o,j as e}from"./index-D6jcIRWs.js";import{u as f}from"./useQuery-CUJUm4FY.js";import{M as g}from"./index-uFGyKu5N.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()
|
assets/{ArtifactWorkspace-DZXFAFpE.js → ArtifactWorkspace-CUZCugRS.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
var TL=Object.defineProperty;var yA=n=>{throw TypeError(n)};var PL=(n,e,t)=>e in n?TL(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var oe=(n,e,t)=>PL(n,typeof e!="symbol"?e+"":e,t),av=(n,e,t)=>e.has(n)||yA("Cannot "+t);var f=(n,e,t)=>(av(n,e,"read from private field"),t?t.call(n):e.get(n)),M=(n,e,t)=>e.has(n)?yA("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),$=(n,e,t,s)=>(av(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),P=(n,e,t)=>(av(n,e,"access private method"),t);var hs=(n,e,t,s)=>({set _(i){$(n,e,i,t)},get _(){return f(n,e,s)}});import{n as Mo,r as q,j as S,K as ee,
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
|
|
|
| 1 |
+
var TL=Object.defineProperty;var yA=n=>{throw TypeError(n)};var PL=(n,e,t)=>e in n?TL(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var oe=(n,e,t)=>PL(n,typeof e!="symbol"?e+"":e,t),av=(n,e,t)=>e.has(n)||yA("Cannot "+t);var f=(n,e,t)=>(av(n,e,"read from private field"),t?t.call(n):e.get(n)),M=(n,e,t)=>e.has(n)?yA("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),$=(n,e,t,s)=>(av(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),P=(n,e,t)=>(av(n,e,"access private method"),t);var hs=(n,e,t,s)=>({set _(i){$(n,e,i,t)},get _(){return f(n,e,s)}});import{n as Mo,r as q,j as S,K as ee,_ as eS,$ as rn,a0 as gm,a1 as l0,L as Nd,a2 as RL,X as c0,a3 as ML,f as ZC,C as IL}from"./index-D6jcIRWs.js";import{u as XC,a as OL,c as NL,P as YC,i as LL,b as JC,e as tS,A as DL,v as jL,Z as FL,_ as zL,$ as HL,a0 as QC,a1 as BL}from"./chatSessions-DByIWBno.js";/* empty css */import{H as Np,a as Lp,b as Dp}from"./hover-card-DPpv0l_x.js";import{u as wo}from"./useQuery-CUJUm4FY.js";import{f as UL,i as e$,p as qL,C as VL,a as WL,T as GL}from"./CatalogEntityPreviewLink-BhTSUN-X.js";import{G as h0}from"./github-B7D_19Qm.js";import{F as t$}from"./file-text-4G2I5_Zo.js";import{r as KL,a as ZL,P as u0,c as XL}from"./PaperPreviewLink-fcJyP9H0.js";import{M as YL,d as JL}from"./index-uFGyKu5N.js";import{r as QL}from"./index-yduEvk9Z.js";import{c as vA}from"./chat-ChnK8XDU.js";import{C as eD}from"./copy-BmzqMihw.js";import{T as tD}from"./thumbs-up-BqRlVdvF.js";import{u as ym}from"./useMutation-p6mN4h17.js";import{A as nD}from"./arrow-left-IzGlownM.js";import{E as n$}from"./external-link-C_yz2sXa.js";import{P as sD}from"./plus-C4UQ62Q1.js";import{S as iD}from"./search-CfTufeR7.js";import{C as s$,a as i$}from"./chevron-up-CQKUhZ0S.js";import{A as rD}from"./AuthorAvatar-UMHOVOr9.js";import{a as oD}from"./papers-DIIIPDpj.js";/**
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
assets/{AstraForRoboticsView-U0yBJtLA.js → AstraForRoboticsView-CEJJvKPe.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{e as y,r as g,j as a,L as n}from"./index-
|
|
|
|
| 1 |
+
import{e as y,r as g,j as a,L as n}from"./index-D6jcIRWs.js";import{P as v}from"./components-DO1X940E.js";import{P as k}from"./PaperFeedFilters-DNebHp4l.js";import{A,a as w}from"./alert-2MbxVzGL.js";import{S as N}from"./skeleton-BqkYFmXl.js";import{u as P}from"./useInfiniteScroll-Dm7JY_X4.js";import{u as S}from"./usePapers-BbCSwcVk.js";import{f as R,D as L}from"./latexPlainText-DI8YEXVe.js";import{t as T}from"./colors-CLwl8a2d.js";import"./papers-DIIIPDpj.js";import"./AuthorAvatar-UMHOVOr9.js";import"./LatexTitle-D_92Jowu.js";import"./safeExternalHref-CkBrsh84.js";import"./useIntersectionObserver-3LTuEaFW.js";import"./useQuery-CUJUm4FY.js";import"./useInfiniteQuery-FXco4P1n.js";const x="robotics",f="gpt-6-astra",F="https://x.com/YuXiang_IRVL/status/2100395131924840570",C=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],I=[{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"}],G=[{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"}],b=({posts:t,label:i})=>a.jsxs("div",{className:"astra-posts",children:[a.jsx("div",{className:"astra-posts-label",children:i}),a.jsx("ul",{children:t.map(r=>a.jsxs("li",{children:[a.jsxs("a",{href:r.url,target:"_blank",rel:"noreferrer",children:["@",r.handle]}),a.jsxs("span",{className:"astra-post-author",children:[" ",r.author]}),a.jsxs("span",{className:"astra-post-summary",children:[" — ",r.summary]})]},r.url))})]}),O=t=>t==="date_published"||t==="citation_count"?t:"trending",W=()=>{var u,p;const[t,i]=y(),r=O(t.get("order_by")),h=t.get("has_code")==="true",d=t.get("has_hf_artifacts")==="true",o=S({task:x,method:f,page_size:12,order_by:r,order_dir:"desc",include_resources:!0,has_code:h,has_hf_artifacts:d});g.useEffect(()=>(document.title=R("GPT-6 Astra for Robotics"),()=>{document.title=L}),[]);const j=P(o),m=g.useMemo(()=>{var e;return(((e=o.data)==null?void 0:e.pages)??[]).flatMap(s=>s.results.map(T))},[o.data]),_=((p=(u=o.data)==null?void 0:u.pages[0])==null?void 0:p.count)??0,l=(e,s)=>{const c=new URLSearchParams(t);s===null?c.delete(e):c.set(e,s),i(c)};return a.jsxs("div",{className:"page",children:[a.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[a.jsx(n,{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:F,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(b,{posts:I,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(b,{posts:G,label:"Seen on X"})]})]}),a.jsxs("p",{className:"astra-note",children:["Listing is automatic: any paper tagged with both the"," ",a.jsx(n,{to:`/tasks/${x}`,children:"Robotics"})," task and the"," ",a.jsx(n,{to:`/methods/${f}`,children:"GPT-6 Astra"})," method appears here. Missing a report or preprint?"," ",a.jsx(n,{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:["[",_.toLocaleString(),"]"]})]})]}),a.jsx("div",{className:"sort-bar",children:a.jsxs("div",{className:"paper-feed-toolbar-controls",children:[a.jsx("div",{className:"sort-options",children:C.map(([e,s])=>a.jsx("button",{type:"button",className:`sort-btn ${r===e?"active":""}`,onClick:()=>l("order_by",e==="trending"?null:e),children:s},e))}),a.jsx(k,{hasCode:h,hasHfArtifacts:d,onHasCodeChange:e=>l("has_code",e?"true":null),onHasHfArtifactsChange:e=>l("has_hf_artifacts",e?"true":null)})]})}),o.error?a.jsx(A,{variant:"destructive",children:a.jsx(w,{children:"Failed to load the collection. Please try again."})}):o.isLoading?a.jsx("div",{className:"paper-list",children:Array.from({length:3}).map((e,s)=>a.jsx(N,{className:"h-40 w-full"},s))}):m.length===0?a.jsx("div",{className:"no-results",children:"No papers match this selection yet."}):a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"paper-list",children:m.map((e,s)=>a.jsx(v,{paper:e,rank:s+1},e.id))}),a.jsx("div",{ref:j,style:{height:1}}),o.isFetchingNextPage&&a.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{W as default};
|
assets/{AuthorAvatar-CWCqOa0h.js → AuthorAvatar-UMHOVOr9.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{r as c,j as e}from"./index-
|
|
|
|
| 1 |
+
import{r as c,j as e}from"./index-D6jcIRWs.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-CfDdV5MT.js → AuthorDetailView-BsVP0aHv.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{u as C,j as a,e as D,r as R,
|
|
|
|
| 1 |
+
import{u as C,j as a,e as D,r as R,ah as k,L as w}from"./index-D6jcIRWs.js";import{u as H}from"./useQuery-CUJUm4FY.js";import{P as $}from"./components-DO1X940E.js";import{A as L}from"./AuthorAvatar-UMHOVOr9.js";import{a as O,P as z,b as B}from"./PaperDateFilter-CPIqaHaq.js";import{P as I}from"./PaperFeedFilters-DNebHp4l.js";import{R as T}from"./ResearchFollowButton-C2Bfd9dP.js";import{A as U,a as q}from"./alert-2MbxVzGL.js";import{S as y}from"./skeleton-BqkYFmXl.js";import{u as E}from"./useInfiniteScroll-Dm7JY_X4.js";import{u as M}from"./usePapers-BbCSwcVk.js";import{a as G}from"./papers-DIIIPDpj.js";import{t as K}from"./colors-CLwl8a2d.js";import A from"./NotFound-BTsJlVc8.js";import"./LatexTitle-D_92Jowu.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-DCjqGpW0.js";import"./useMutation-p6mN4h17.js";import"./research-BggtGgC2.js";import"./plus-C4UQ62Q1.js";import"./useIntersectionObserver-3LTuEaFW.js";import"./useInfiniteQuery-FXco4P1n.js";const Q=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],V=t=>t==="date_published"||t==="citation_count"?t:"trending",J=({authorId:t})=>{var g,f,x,_,j,b,N,v,P;const[n,d]=D(),h=V(n.get("order_by")),p=n.get("has_code")==="true",m=n.get("has_hf_artifacts")==="true",i=O(n),e=H({queryKey:["author",t],queryFn:()=>G.getAuthor(t)}),o=M({author:t,page_size:12,order_by:h,order_dir:"desc",include_resources:!0,has_code:p,has_hf_artifacts:m,start_date:i.startDate,end_date:i.endDate}),u=R.useMemo(()=>{var r;return(((r=o.data)==null?void 0:r.pages)??[]).flatMap(s=>s.results.map(K))},[o.data]),F=E(o),S=((f=(g=o.data)==null?void 0:g.pages[0])==null?void 0:f.count)??0,c=(r,s)=>{const l=new URLSearchParams(n);s?l.set(r,s):l.delete(r),d(l)};if(((x=e.error)==null?void 0:x.status)===404)return a.jsx(A,{});if((_=e.data)!=null&&_.organization_slug){const r=n.toString();return a.jsx(k,{to:`/orgs/${e.data.organization_slug}${r?`?${r}`:""}`,replace:!0})}return a.jsxs("div",{className:"page",children:[a.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[a.jsx(w,{to:"/",children:"Home"}),a.jsx("span",{children:" / "}),a.jsx("span",{children:"Authors"}),a.jsx("span",{children:" / "}),a.jsx("span",{children:((j=e.data)==null?void 0:j.full_name)??t})]}),a.jsxs("header",{className:"author-hero",children:[a.jsx("div",{className:"organizations-eyebrow",children:"AUTHOR"}),a.jsxs("div",{className:"author-hero-title",children:[(b=e.data)!=null&&b.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]})]}):((N=e.data)==null?void 0:N.hf_username)&&a.jsx(L,{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:((v=e.data)==null?void 0:v.full_name)??a.jsx(y,{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(T,{kind:"author",entityId:e.data.id})]}),a.jsxs("div",{className:"sort-bar",style:{alignItems:"center",gap:16},children:[a.jsxs("div",{className:"paper-feed-toolbar-controls",children:[a.jsx("div",{className:"sort-options",children:Q.map(([r,s])=>a.jsx("button",{type:"button",className:`sort-btn ${h===r?"active":""}`,onClick:()=>c("order_by",r==="trending"?null:r),children:s},r))}),a.jsx(I,{hasCode:p,hasHfArtifacts:m,onHasCodeChange:r=>c("has_code",r?"true":null),onHasHfArtifactsChange:r=>c("has_hf_artifacts",r?"true":null)})]}),a.jsx(z,{startDate:i.startDate,endDate:i.endDate,onChange:r=>d(B(n,r))}),a.jsxs("div",{className:"results-count",children:[S.toLocaleString()," papers"]})]}),o.error?a.jsx(U,{variant:"destructive",children:a.jsxs(q,{children:["Failed to load papers."," ",a.jsx("button",{type:"button",onClick:()=>void o.refetch(),children:"Try again"})]})}):o.isLoading?a.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((r,s)=>a.jsx(y,{className:"h-40 w-full"},s))}):u.length===0?a.jsx("div",{className:"no-results",children:((P=e.data)==null?void 0:P.paper_count)===0?"No public papers are available.":"No papers found for this selection."}):a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"paper-list",children:u.map((r,s)=>a.jsx($,{paper:r,rank:s+1},r.id))}),a.jsx("div",{ref:F,style:{height:1}}),o.isFetchingNextPage&&a.jsx("div",{style:{padding:"20px 0",textAlign:"center"},children:"Loading more…"})]})]})},_a=()=>{const{authorId:t}=C();return t?a.jsx(J,{authorId:t},t):a.jsx(A,{})};export{_a as default};
|
assets/{AuthorizePaperEditView-D17pnlSs.js → AuthorizePaperEditView-mMhbmAG2.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{u,a as d,j as e,L as l,H as p}from"./index-
|
|
|
|
| 1 |
+
import{u,a as d,j as e,L as l,H as p}from"./index-D6jcIRWs.js";import{u as c}from"./useQuery-CUJUm4FY.js";import{u as h}from"./useMutation-p6mN4h17.js";import{B as m}from"./button-Bzx0ccHH.js";import{p as n}from"./paperEdits-DUTCoe5T.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/AutonomousOperations-BNbcighz.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{f as R,r as d,j as e,L as B}from"./index-D6jcIRWs.js";import{u as q}from"./useQuery-CUJUm4FY.js";import{u as H}from"./useMutation-p6mN4h17.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-B0sjsUM_.js";import{B as Q}from"./badge-t4oak8yc.js";import{B as h}from"./button-Bzx0ccHH.js";import{I as u}from"./input-CCN-4hy4.js";import{A as P}from"./activity-5IcAhZoH.js";import{A as D}from"./arrow-left-IzGlownM.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/AutonomousOperations-CYN302r1.js
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
import{a as R,f as B,r as m,j as e,L as q}from"./index-CqKcHUvZ.js";import{u as H}from"./useQuery-Cngk7eL9.js";import{u as I}from"./useMutation-BItMAQ7s.js";import{C as n,d as i,a as t,b as r,f as x,o as u}from"./CronDashboard-Ch03vo4I.js";import{B as Q}from"./badge-D-oq0Pkj.js";import{B as h}from"./button-BYn4yUH_.js";import{I as j}from"./input-sw0Ix0Sa.js";import{A as P}from"./activity-DDb7qU7w.js";import{A as D}from"./arrow-left-D_tIkkPW.js";import{S as $}from"./shield-alert-B0VZio-w.js";const p={submissions:"Submission review",curation:"Scheduled curation",cron_health:"CRON health",chat_reliability:"Chat reliability"},S={healthy:"cron-status--healthy",degraded:"cron-status--degraded",repairing:"cron-status--running","rolled-back":"cron-status--broken",manual:"cron-status--degraded"},Z=()=>{var E;const{user:o}=R(),M=B(),[f,T]=m.useState(""),[b,v]=m.useState(""),[g,N]=m.useState({}),[_,y]=m.useState(""),A=["autonomousOperations",o==null?void 0:o.username],d=H({queryKey:A,queryFn:()=>u.getAutonomousOperations(),enabled:!!(o!=null&&o.is_admin),refetchInterval:3e4,retry:!1}),l=I({mutationFn:s=>s(),onSuccess:s=>{M.setQueryData(A,s),v(""),N({}),y("")}}),a=d.data,C=l.error instanceof Error?l.error.message:null;if(d.isLoading)return e.jsx("div",{className:"page","aria-busy":"true",children:"Loading autonomous operations…"});if(d.error||!a)return e.jsxs("div",{className:"page",children:[e.jsx("h1",{children:"Autonomous operations unavailable"}),e.jsx("p",{children:d.error instanceof Error?d.error.message:"No status was returned."})]});const O=()=>l.mutate(()=>u.setAutonomousManualMode(!a.manual_mode,a.revision,b)),k=(s,c)=>l.mutate(()=>u.setAutonomousOperator(s,c,a.revision,g[s]??"")),w=()=>{var c;const s=((c=a.baseline)==null?void 0:c.revision)??0;l.mutate(()=>u.qualifyAutonomousChatBaseline(f,s,_))};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($,{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:S[a.display_state],children:[e.jsx(t,{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(t,{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(t,{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 ${x(a.active_lease.expires_at)}`:"No active source repair"})]})]}),e.jsxs(n,{children:[e.jsx(t,{children:e.jsx(r,{className:"text-sm",children:"Global control"})}),e.jsxs(i,{className:"space-y-2",children:[e.jsx(j,{"aria-label":"Manual mode confirmation",value:b,onChange:s=>v(s.target.value),placeholder:"Type SET_MANUAL_MODE"}),e.jsx(h,{disabled:l.isPending||b!=="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:S[s.status],children:[e.jsx(t,{children:e.jsxs(r,{className:"flex justify-between gap-2",children:[e.jsx("span",{children:p[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?x(s.next_scheduled_run):"not scheduled"]}),e.jsx(j,{"aria-label":`${p[s.operator]} confirmation`,value:g[s.operator]??"",onChange:c=>N(L=>({...L,[s.operator]:c.target.value})),placeholder:"Type SET_OPERATOR_STATE"}),e.jsx(h,{disabled:l.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(t,{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:((E=a.baseline)==null?void 0:E.sha)??"No baseline qualified"}),a.baseline&&e.jsxs("p",{className:"text-sm",children:["Revision ",a.baseline.revision," · ",a.baseline.qualified_by," · ",x(a.baseline.qualified_at)]}),e.jsxs("div",{className:"grid md:grid-cols-[1fr_1fr_auto] gap-2",children:[e.jsx(j,{"aria-label":"Exact baseline SHA",value:f,onChange:s=>T(s.target.value),placeholder:"40-character lowercase commit SHA"}),e.jsx(j,{"aria-label":"Baseline confirmation",value:_,onChange:s=>y(s.target.value),placeholder:"Type QUALIFY_CHAT_BASELINE"}),e.jsx(h,{disabled:l.isPending||!/^[0-9a-f]{40}$/.test(f)||_!=="QUALIFY_CHAT_BASELINE",onClick:w,children:"Qualify exact SHA"})]})]})]}),e.jsxs(n,{children:[e.jsx(t,{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(t,{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:p[s.operator]})," · ",s.status," · ",s.exit_classification," · $",s.cost_usd," · ",x(s.created_at)]},s.run_id))}):e.jsx("p",{children:"No runs recorded."})})]}),e.jsxs(n,{children:[e.jsx(t,{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:p[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(t,{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))})})]}),C&&e.jsxs("p",{role:"alert",children:["Control update failed: ",C,". Refresh before retrying."]})]})})};export{Z as default};
|
|
|
|
|
|
assets/{BenchmarkDetailView-HVBhj9Ke.js → BenchmarkDetailView-DGAxl02Y.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
| 1 |
-
import{r as L,j as a,D as le,L as ne,c as ct,p as ot,u as dt,e as ut,q as mt}from"./index-CqKcHUvZ.js";import{R as ht}from"./ResearchFollowButton-CrCIwiok.js";import{u as te}from"./useQuery-Cngk7eL9.js";import{c as re}from"./catalog-D26nGNnK.js";import{C as ft,E as pt,e as gt}from"./ExternalSourceEvalBadge-TyFEU7vd.js";import{L as ce}from"./LatexTitle-BI9yl-Fo.js";import{S as Ke}from"./switch-BvSgzfJM.js";import{I as xt}from"./components-Dmnn5Z5p.js";import{S as oe}from"./skeleton-DleNhBYA.js";import{A as bt,a as yt}from"./alert-Z2yFUcyL.js";import{B as wt}from"./BenchmarkTrendSparkline-BrvDBmsS.js";import{s as vt}from"./safeExternalHref-CkBrsh84.js";import{s as jt}from"./slug-BpH-Nkvz.js";import"./useMutation-BItMAQ7s.js";import"./research-Dt0MUW0x.js";import"./plus-DZF-NxR0.js";import"./papers-bE3C_Qzl.js";import"./hover-card-BTsA69o8.js";import"./index-C8IgDsSE.js";import"./AuthorAvatar-CWCqOa0h.js";import"./colors-_scCXfCe.js";function _t(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,o)=>l?(o.best_rank??Number.POSITIVE_INFINITY)<(l.best_rank??Number.POSITIVE_INFINITY)?o:l:o,null);return{visible:r?s.filter(l=>l.is_open!==!1):s,hiddenClosed:n,topHiddenClosed:i}}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 St(e){const t=e===null?void 0:Number(e);return Ge.some(r=>r.maxParametersExclusive===t)?t:void 0}function kt(e){return new Intl.NumberFormat("en",{notation:"compact",maximumSignificantDigits:3}).format(e)}function Ct(e){return[e.paper_id,e.task_id,e.dataset_id,e.model_name,e.harness??""].join("|")}function Et(e){const t=new Map;for(const r of e){const s=Ct(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 Nt(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 Rt(e){const t=Date.parse(e);return Number.isNaN(t)?"":new Date(t).toISOString().slice(0,10)}function Pt(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 $t(e,t){const r=e.evaluated_on;return r&&r!==t&&r!==Rt(e.updated_at)?r:e.paper_published_date||""}function Mt(e,t,r){if(e.length===0)return{points:[],sota:0,sotaModel:""};const s=Pt(e),n=e.map(u=>{var R;const h=ie((R=u.metrics)==null?void 0:R[t]);return{eval:u,value:h,date:$t(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 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,o=-1;for(const d of e){const f=i.get(d.id)||0;f>o&&(o=f,l=d.id)}if(l)return l}return e[0].id}function Tt(e){var _,X,Y;const{evaluations:t,tasks:r,taskSlug:s,highlightEvalId:n,parameterBound:i,showMoreMetrics:l,fittingMetricCount:o=1}=e,d=Qe(r,t,s,n),f=r.find(c=>c.id===d)||r[0]||null,x=t.find(c=>c.id===n),u=_t(t,d,e.hideClosed),h=Et(u.visible),R=Le(h,i),C=e.configuredMetrics.map(c=>c.metric_name),P=Array.from(new Set(h.flatMap(c=>[...c.best_metric?[c.best_metric]:[],...Object.keys(c.metrics||{})]))),S=C.length?C:P,g=new Map;for(const c of h){const m=c.best_metric;!m||ie(c.metrics[m])===null||C.length&&!S.includes(m)||g.set(m,(g.get(m)||0)+1)}const k=((_=[...g].sort((c,m)=>m[1]-c[1])[0])==null?void 0:_[0])||S[0]||"",j=S.find(c=>{var m;return c.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(c=>c!==j)]:S,w=W.length?l?W:W.slice(0,Math.max(1,o)):j?[j]:[],U=R.slice().sort((c,m)=>{const p=ie(c.metrics[j]),y=ie(m.metrics[j]);return p!==null&&y!==null?D==="↓"?p-y:y-p:p!==null?-1:y!==null?1:Ie(c,j)-Ie(m,j)});let I=null,N=0;const Q=U.map((c,m)=>{const p=ie(c.metrics[j]);return p!==null&&p!==I&&(I=p,N=m+1),{evaluation:c,rank:p===null?null:N,isHighlighted:Nt(c,n)}}),{points:z,sota:ee,sotaModel:O}=Mt(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(c=>c.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(c=>c.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(c=>({...c,selected:i===c.maxParametersExclusive,disabled:i!==c.maxParametersExclusive&&Le(h,c.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 Ft(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 o=Math.floor((i-n)/t.metric);return Math.max(1,s,o)}function he(e,t){return parseFloat(e.getPropertyValue(t))||0}function Lt(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 It=20;function Ae(e,t){return e?a.jsx(ce,{title:e}):t||"—"}function At({model:e,showHarness:t,setMetric:r,highlightRowRef:s,onFittingMetricCountChange:n}){const{rows:i,visibleMetrics:l,activeMetric:o,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=Lt(R);f.classList.toggle("unpins-trailing-columns",C<P.fixed+P.metric);const S=document.documentElement,g=S.scrollHeight>S.clientHeight?0:It;n(k=>Ft(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===o;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?"—":kt(u.parameterCount)}),t&&a.jsx("td",{className:"col-harness",children:u.harness||"—"}),l.map(g=>{var j;const k=g===o,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 Bt(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 o=[];for(let d=r.year;d<=s.year;d+=i)o.push({timestamp:new Date(d,0,1).getTime(),key:String(d),label:String(d)});return o}const Dt=({points:e,metric:t})=>{const r=ct(),[s,n]=L.useState(null),i=880,l=320,o=60,d=30,f=40,x=50,u=e.map(c=>c.value),h=Math.min(...u),C=Math.max(...u)-h||1,P=i-o-d,S=l-f-x,g=e.map(c=>Be(c.date)),k=Math.min(...g),B=Math.max(...g),j=B-k||1,D=c=>k===B?o+P/2:o+(c-k)/j*P,W=e.map((c,m)=>{const p=D(Be(c.date)),y=(c.value-h)/C,$=f+S*(1-y);return{x:p,y:$,data:c,idx:m}}),w=W.filter(c=>c.data.isSota);let U="";if(w.length>=2){U=`M${w[0].x},${w[0].y}`;for(let c=1;c<w.length;c++){const m=w[c-1],p=w[c],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=c=>{const m=c.data.modelName||c.data.paperTitle||"";if(!m)return null;const p=m.length>22?m.slice(0,21)+"…":m,y=p.length*I;let $=c.x-y/2,E=c.x+y/2,v="middle";return $<o?($=o,E=o+y,v="start"):E>i-d&&(E=i-d,$=E-y,v="end"),{x:v==="start"?o:v==="end"?i-d:c.x,y:c.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 c=0;c<w.length-1;c++){const m=z(w[c]);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=Bt(k,B),K=5,_=c=>n(m=>m===c?null:m),X=c=>{c&&r(`/paper/${c}`)},Y=(c,m)=>{const y=`${c.data.modelName||c.data.paperTitle||"Unknown model"}: ${le(c.data.value)} on ${c.data.dateLabel}`,$=!!c.data.paperRouteId;return a.jsxs("g",{children:[m,a.jsx("circle",{cx:c.x,cy:c.y,r:"10",fill:"transparent",style:{cursor:$?"pointer":"default",outline:"none"},tabIndex:0,role:$?"link":"img","aria-label":y,onMouseEnter:()=>n(c.idx),onMouseLeave:()=>_(c.idx),onFocus:()=>n(c.idx),onBlur:()=>_(c.idx),onClick:()=>X(c.data.paperRouteId),onKeyDown:E=>{$&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),X(c.data.paperRouteId))},children:a.jsx("title",{children:y})})]},c.idx)};return a.jsxs("svg",{width:"100%",viewBox:`0 0 ${i} ${l}`,style:{display:"block"},children:[a.jsx("text",{x:o-38,y:f+S/2,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"middle",transform:`rotate(-90 ${o-38} ${f+S/2})`,children:t}),Array.from({length:K}).map((c,m)=>{const p=m/(K-1),y=f+S*(1-p),$=h+C*p;return a.jsxs("g",{children:[a.jsx("line",{x1:o,y1:y,x2:i-d,y2:y,stroke:"var(--hairline)",strokeWidth:"1"}),a.jsx("text",{x:o-10,y:y+4,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"end",children:le($)})]},m)}),q.map(c=>{const m=D(c.timestamp);return a.jsx("text",{x:m,y:l-x+18,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:"middle",children:c.label},c.key)}),W.filter(c=>!c.data.isSota).map(c=>{const m=s===c.idx;return Y(c,a.jsx("circle",{cx:c.x,cy:c.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(c=>{const m=s===c.idx;return Y(c,a.jsx("circle",{cx:c.x,cy:c.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((c,m)=>a.jsx("text",{x:c.x,y:c.y,fontSize:"9.5",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:c.anchor,pointerEvents:"none",style:{paintOrder:"stroke",stroke:"var(--bg-elevated)",strokeWidth:3,strokeLinejoin:"round"},children:c.text},`label-${m}`)),s!==null&&W[s]&&(()=>{const c=W[s],m=c.data.modelName||c.data.paperTitle||"Unknown model",y=`${m.length>40?m.slice(0,39)+"…":m}: ${le(c.data.value)}`,E=Math.max(120,Math.min(340,y.length*6.6+24)),v=30;let H=c.x-E/2;H<o&&(H=o),H+E>i-d&&(H=i-d-E);const G=c.y-v-14>=f?c.y-v-12:c.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 Ht(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 Vt=(()=>{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 Wt(e){const t=de(e,"border-left-width"),r=de(e,"border-right-width");return e.clientWidth+t+r}function Ot(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||Wt(e),s=t.height||Ot(e);return{width:r,height:s}}function qt(){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 Ut(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 zt(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 Kt(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function Gt(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),Kt(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 Qt(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function Xt(e,t){return Xe(t).map(r=>{const s=e.getPropertyValue(r),n=e.getPropertyPriority(r);return`${r}: ${s}${n?" !important":""};`}).join(" ")}function Yt(e,t,r,s){const n=`.${e}:${t}`,i=r.cssText?Qt(r):Xt(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=Vt();try{t.className=`${t.className} ${l}`}catch{return}const o=document.createElement("style");o.appendChild(Yt(l,r,n,s)),t.appendChild(o)}function Jt(e,t,r){De(e,t,":before",r),De(e,t,":after",r)}const He="application/font-woff",Ve="image/jpeg",Zt={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 er(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function ye(e){const t=er(e).toLowerCase();return Zt[t]||""}function tr(e){return e.split(/,/)[1]}function xe(e){return e.search(/^(data:)/)!==-1}function rr(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 o=new FileReader;o.onerror=l,o.onloadend=()=>{try{i(r({res:s,result:o.result}))}catch(d){l(d)}},o.readAsDataURL(n)})}const ge={};function ar(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=ar(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:o})=>(t||(t=l.headers.get("Content-Type")||""),tr(o)));n=rr(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 sr(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):ue(t)}async function nr(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 o=i.toDataURL();return ue(o)}const r=e.poster,s=ye(r),n=await we(r,s,t);return ue(n)}async function ir(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 lr(e,t){return A(e,HTMLCanvasElement)?sr(e):A(e,HTMLVideoElement)?nr(e,t):A(e,HTMLIFrameElement)?ir(e,t):e.cloneNode(Ze(e))}const cr=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",Ze=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function or(e,t,r){var s,n;if(Ze(t))return t;let i=[];return cr(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,o)=>l.then(()=>me(o,r)).then(d=>{d&&t.appendChild(d)}),Promise.resolve()),t}function dr(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 ur(e,t){A(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),A(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function mr(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 hr(e,t,r){return A(t,Element)&&(dr(e,t,r),Jt(e,t,r),ur(e,t),mr(e,t)),t}async function fr(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 o=r[i].getAttribute("xlink:href");if(o){const d=e.querySelector(o),f=document.querySelector(o);!d&&f&&!s[o]&&(s[o]=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 o=document.createElementNS(i,"defs");l.appendChild(o);for(let d=0;d<n.length;d++)o.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=>lr(s,t)).then(s=>or(e,s,t)).then(s=>hr(e,s,t)).then(s=>fr(s,t))}const et=/url\((['"]?)([^'"]+?)\1\)/g,pr=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,gr=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function xr(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function br(e){const t=[];return e.replace(et,(r,s,n)=>(t.push(n),r)),t.filter(r=>!xe(r))}async function yr(e,t,r,s,n){try{const i=r?Ht(t,r):t,l=ye(t);let o;return n||(o=await we(i,l,s)),e.replace(xr(t),`$1${o}$3`)}catch{}return e}function wr(e,{preferredFontFormat:t}){return t?e.replace(gr,r=>{for(;;){const[s,,n]=pr.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=wr(e,r);return br(s).reduce((i,l)=>i.then(o=>yr(o,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 vr(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 jr(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 o=e;o.decode&&(o.decode=i),o.loading==="lazy"&&(o.loading="eager"),r?(e.srcset="",e.src=n):e.href.baseVal=n})}async function _r(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 vr(e,t),await jr(e,t),await _r(e,t))}function Sr(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 o=l.replace(s,"$1");return o.startsWith("https://")||(o=new URL(o,e.url).href),Je(o,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]*?)})",o=new RegExp(l,"gi");for(;;){let d=i.exec(s);if(d===null){if(d=o.exec(s),d===null)break;i.lastIndex=o.lastIndex}else o.lastIndex=i.lastIndex;t.push(d[0])}return t}async function kr(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 o=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")?o+=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(o=>o.href==null)||document.styleSheets[0];n.href!=null&&s.push(Oe(n.href).then(o=>qe(o,t)).then(o=>Ue(o).forEach(d=>{l.insertRule(d,l.cssRules.length)})).catch(o=>{console.error("Error loading remote stylesheet",o)})),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 Cr(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>tt(t.style.getPropertyValue("src")))}async function Er(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=Z(e.ownerDocument.styleSheets),s=await kr(r,t);return Cr(s)}function st(e){return e.trim().replace(/["']/g,"")}function Nr(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 Rr(e,t){const r=await Er(e,t),s=Nr(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 Pr(e,t){const r=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await Rr(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 $r(e,t={}){const{width:r,height:s}=Ye(e,t),n=await me(e,t,!0);return await Pr(n,t),await at(n,t),Sr(n,t),await Gt(n,r,s)}async function Mr(e,t={}){const{width:r,height:s}=Ye(e,t),n=await $r(e,t),i=await ue(n),l=document.createElement("canvas"),o=l.getContext("2d"),d=t.pixelRatio||qt(),f=t.canvasWidth||r,x=t.canvasHeight||s;return l.width=f*d,l.height=x*d,t.skipAutoScale||Ut(l),l.style.width=`${f}`,l.style.height=`${x}`,t.backgroundColor&&(o.fillStyle=t.backgroundColor,o.fillRect(0,0,l.width,l.height)),o.drawImage(i,0,0,l.width,l.height),l}async function Tr(e,t={}){const r=await Mr(e,t);return await zt(r)}const be="#ffffff";function Fr(){return typeof window>"u"?be:window.getComputedStyle(document.documentElement).getPropertyValue("--bg-elevated").trim()||be}function Lr(e){if(typeof window>"u")return be;const t=window.getComputedStyle(e).backgroundColor;return!t||t==="rgba(0, 0, 0, 0)"||t==="transparent"?Fr():t}async function Ir(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 Tr(e,{pixelRatio:2,cacheBust:!0,backgroundColor:Lr(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}=ot(),[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 Ir(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]),o=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}),o]})};function Ar({model:e,datasetName:t,hideClosed:r,setHideClosed:s,setMetric:n}){const i=L.useRef(null),{isInitialFilteredViewLoading:l,chartPoints:o,activeMetric:d,allowedMetrics:f,orderedMetrics:x,parameterBound:u}=e;return l||o.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(Dt,{points:o,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 Br(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(ce,{title:e}):t||"—"}const ia=()=>{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=St(t.get("max_parameters_exclusive")),{preferences:l,setHideClosedSourceEvals:o}=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=Tt({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:c}=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(oe,{className:"h-12 w-1/2 mb-6"}),a.jsx(oe,{className:"h-64 w-full"})]});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)||Br(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(oe,{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:()=>{o(!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(ce,{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(ce,{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(ce,{title:J}):null}),G&&a.jsx("span",{className:"method-source-meta",children:G})]})]}),a.jsx(Ar,{model:I,datasetName:p.name,hideClosed:l.hide_closed_source_evals,setHideClosed:o,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:c.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=>{o(!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(oe,{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:[c.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 (${c.length-P})`}),C&&a.jsx("span",{children:"Scroll metrics horizontally; model and paper details stay visible."})]}),a.jsx(At,{model:I,showHarness:y,setMetric:E,highlightRowRef:d,onFittingMetricCountChange:S})]})]})]})})};export{ia as default};
|
|
|
|
| 1 |
+
import{r as L,j as a,E as le,L as ne,c as ct,p as ot,u as dt,e as ut,q as mt}from"./index-D6jcIRWs.js";import{R as ht}from"./ResearchFollowButton-C2Bfd9dP.js";import{u as te}from"./useQuery-CUJUm4FY.js";import{c as re}from"./catalog-PYrB8_bm.js";import{C as ft,E as pt,e as gt}from"./ExternalSourceEvalBadge-DfhTt9yv.js";import{L as ce}from"./LatexTitle-D_92Jowu.js";import{S as Ke}from"./switch-D_MyRbto.js";import{I as xt}from"./components-DO1X940E.js";import{S as oe}from"./skeleton-BqkYFmXl.js";import{A as bt,a as yt}from"./alert-2MbxVzGL.js";import{B as wt}from"./BenchmarkTrendSparkline-BfAoxAzu.js";import{s as vt}from"./safeExternalHref-CkBrsh84.js";import{s as jt}from"./slug-BpH-Nkvz.js";import"./useMutation-p6mN4h17.js";import"./research-BggtGgC2.js";import"./plus-C4UQ62Q1.js";import"./papers-DIIIPDpj.js";import"./hover-card-DPpv0l_x.js";import"./index-DIg7XGE2.js";import"./AuthorAvatar-UMHOVOr9.js";import"./colors-CLwl8a2d.js";function _t(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,o)=>l?(o.best_rank??Number.POSITIVE_INFINITY)<(l.best_rank??Number.POSITIVE_INFINITY)?o:l:o,null);return{visible:r?s.filter(l=>l.is_open!==!1):s,hiddenClosed:n,topHiddenClosed:i}}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 St(e){const t=e===null?void 0:Number(e);return Ge.some(r=>r.maxParametersExclusive===t)?t:void 0}function kt(e){return new Intl.NumberFormat("en",{notation:"compact",maximumSignificantDigits:3}).format(e)}function Ct(e){return[e.paper_id,e.task_id,e.dataset_id,e.model_name,e.harness??""].join("|")}function Et(e){const t=new Map;for(const r of e){const s=Ct(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 Nt(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 Rt(e){const t=Date.parse(e);return Number.isNaN(t)?"":new Date(t).toISOString().slice(0,10)}function Pt(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 $t(e,t){const r=e.evaluated_on;return r&&r!==t&&r!==Rt(e.updated_at)?r:e.paper_published_date||""}function Mt(e,t,r){if(e.length===0)return{points:[],sota:0,sotaModel:""};const s=Pt(e),n=e.map(u=>{var R;const h=ie((R=u.metrics)==null?void 0:R[t]);return{eval:u,value:h,date:$t(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 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,o=-1;for(const d of e){const f=i.get(d.id)||0;f>o&&(o=f,l=d.id)}if(l)return l}return e[0].id}function Tt(e){var _,X,Y;const{evaluations:t,tasks:r,taskSlug:s,highlightEvalId:n,parameterBound:i,showMoreMetrics:l,fittingMetricCount:o=1}=e,d=Qe(r,t,s,n),f=r.find(c=>c.id===d)||r[0]||null,x=t.find(c=>c.id===n),u=_t(t,d,e.hideClosed),h=Et(u.visible),R=Le(h,i),C=e.configuredMetrics.map(c=>c.metric_name),P=Array.from(new Set(h.flatMap(c=>[...c.best_metric?[c.best_metric]:[],...Object.keys(c.metrics||{})]))),S=C.length?C:P,g=new Map;for(const c of h){const m=c.best_metric;!m||ie(c.metrics[m])===null||C.length&&!S.includes(m)||g.set(m,(g.get(m)||0)+1)}const k=((_=[...g].sort((c,m)=>m[1]-c[1])[0])==null?void 0:_[0])||S[0]||"",j=S.find(c=>{var m;return c.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(c=>c!==j)]:S,w=W.length?l?W:W.slice(0,Math.max(1,o)):j?[j]:[],U=R.slice().sort((c,m)=>{const p=ie(c.metrics[j]),y=ie(m.metrics[j]);return p!==null&&y!==null?D==="↓"?p-y:y-p:p!==null?-1:y!==null?1:Ie(c,j)-Ie(m,j)});let I=null,N=0;const Q=U.map((c,m)=>{const p=ie(c.metrics[j]);return p!==null&&p!==I&&(I=p,N=m+1),{evaluation:c,rank:p===null?null:N,isHighlighted:Nt(c,n)}}),{points:z,sota:ee,sotaModel:O}=Mt(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(c=>c.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(c=>c.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(c=>({...c,selected:i===c.maxParametersExclusive,disabled:i!==c.maxParametersExclusive&&Le(h,c.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 Ft(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 o=Math.floor((i-n)/t.metric);return Math.max(1,s,o)}function he(e,t){return parseFloat(e.getPropertyValue(t))||0}function Lt(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 It=20;function Ae(e,t){return e?a.jsx(ce,{title:e}):t||"—"}function At({model:e,showHarness:t,setMetric:r,highlightRowRef:s,onFittingMetricCountChange:n}){const{rows:i,visibleMetrics:l,activeMetric:o,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=Lt(R);f.classList.toggle("unpins-trailing-columns",C<P.fixed+P.metric);const S=document.documentElement,g=S.scrollHeight>S.clientHeight?0:It;n(k=>Ft(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===o;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?"—":kt(u.parameterCount)}),t&&a.jsx("td",{className:"col-harness",children:u.harness||"—"}),l.map(g=>{var j;const k=g===o,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 Bt(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 o=[];for(let d=r.year;d<=s.year;d+=i)o.push({timestamp:new Date(d,0,1).getTime(),key:String(d),label:String(d)});return o}const Dt=({points:e,metric:t})=>{const r=ct(),[s,n]=L.useState(null),i=880,l=320,o=60,d=30,f=40,x=50,u=e.map(c=>c.value),h=Math.min(...u),C=Math.max(...u)-h||1,P=i-o-d,S=l-f-x,g=e.map(c=>Be(c.date)),k=Math.min(...g),B=Math.max(...g),j=B-k||1,D=c=>k===B?o+P/2:o+(c-k)/j*P,W=e.map((c,m)=>{const p=D(Be(c.date)),y=(c.value-h)/C,$=f+S*(1-y);return{x:p,y:$,data:c,idx:m}}),w=W.filter(c=>c.data.isSota);let U="";if(w.length>=2){U=`M${w[0].x},${w[0].y}`;for(let c=1;c<w.length;c++){const m=w[c-1],p=w[c],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=c=>{const m=c.data.modelName||c.data.paperTitle||"";if(!m)return null;const p=m.length>22?m.slice(0,21)+"…":m,y=p.length*I;let $=c.x-y/2,E=c.x+y/2,v="middle";return $<o?($=o,E=o+y,v="start"):E>i-d&&(E=i-d,$=E-y,v="end"),{x:v==="start"?o:v==="end"?i-d:c.x,y:c.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 c=0;c<w.length-1;c++){const m=z(w[c]);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=Bt(k,B),K=5,_=c=>n(m=>m===c?null:m),X=c=>{c&&r(`/paper/${c}`)},Y=(c,m)=>{const y=`${c.data.modelName||c.data.paperTitle||"Unknown model"}: ${le(c.data.value)} on ${c.data.dateLabel}`,$=!!c.data.paperRouteId;return a.jsxs("g",{children:[m,a.jsx("circle",{cx:c.x,cy:c.y,r:"10",fill:"transparent",style:{cursor:$?"pointer":"default",outline:"none"},tabIndex:0,role:$?"link":"img","aria-label":y,onMouseEnter:()=>n(c.idx),onMouseLeave:()=>_(c.idx),onFocus:()=>n(c.idx),onBlur:()=>_(c.idx),onClick:()=>X(c.data.paperRouteId),onKeyDown:E=>{$&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),X(c.data.paperRouteId))},children:a.jsx("title",{children:y})})]},c.idx)};return a.jsxs("svg",{width:"100%",viewBox:`0 0 ${i} ${l}`,style:{display:"block"},children:[a.jsx("text",{x:o-38,y:f+S/2,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"middle",transform:`rotate(-90 ${o-38} ${f+S/2})`,children:t}),Array.from({length:K}).map((c,m)=>{const p=m/(K-1),y=f+S*(1-p),$=h+C*p;return a.jsxs("g",{children:[a.jsx("line",{x1:o,y1:y,x2:i-d,y2:y,stroke:"var(--hairline)",strokeWidth:"1"}),a.jsx("text",{x:o-10,y:y+4,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"end",children:le($)})]},m)}),q.map(c=>{const m=D(c.timestamp);return a.jsx("text",{x:m,y:l-x+18,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:"middle",children:c.label},c.key)}),W.filter(c=>!c.data.isSota).map(c=>{const m=s===c.idx;return Y(c,a.jsx("circle",{cx:c.x,cy:c.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(c=>{const m=s===c.idx;return Y(c,a.jsx("circle",{cx:c.x,cy:c.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((c,m)=>a.jsx("text",{x:c.x,y:c.y,fontSize:"9.5",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:c.anchor,pointerEvents:"none",style:{paintOrder:"stroke",stroke:"var(--bg-elevated)",strokeWidth:3,strokeLinejoin:"round"},children:c.text},`label-${m}`)),s!==null&&W[s]&&(()=>{const c=W[s],m=c.data.modelName||c.data.paperTitle||"Unknown model",y=`${m.length>40?m.slice(0,39)+"…":m}: ${le(c.data.value)}`,E=Math.max(120,Math.min(340,y.length*6.6+24)),v=30;let H=c.x-E/2;H<o&&(H=o),H+E>i-d&&(H=i-d-E);const G=c.y-v-14>=f?c.y-v-12:c.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 Ht(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 Vt=(()=>{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 Wt(e){const t=de(e,"border-left-width"),r=de(e,"border-right-width");return e.clientWidth+t+r}function Ot(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||Wt(e),s=t.height||Ot(e);return{width:r,height:s}}function qt(){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 Ut(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 zt(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 Kt(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function Gt(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),Kt(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 Qt(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function Xt(e,t){return Xe(t).map(r=>{const s=e.getPropertyValue(r),n=e.getPropertyPriority(r);return`${r}: ${s}${n?" !important":""};`}).join(" ")}function Yt(e,t,r,s){const n=`.${e}:${t}`,i=r.cssText?Qt(r):Xt(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=Vt();try{t.className=`${t.className} ${l}`}catch{return}const o=document.createElement("style");o.appendChild(Yt(l,r,n,s)),t.appendChild(o)}function Jt(e,t,r){De(e,t,":before",r),De(e,t,":after",r)}const He="application/font-woff",Ve="image/jpeg",Zt={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 er(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function ye(e){const t=er(e).toLowerCase();return Zt[t]||""}function tr(e){return e.split(/,/)[1]}function xe(e){return e.search(/^(data:)/)!==-1}function rr(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 o=new FileReader;o.onerror=l,o.onloadend=()=>{try{i(r({res:s,result:o.result}))}catch(d){l(d)}},o.readAsDataURL(n)})}const ge={};function ar(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=ar(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:o})=>(t||(t=l.headers.get("Content-Type")||""),tr(o)));n=rr(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 sr(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):ue(t)}async function nr(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 o=i.toDataURL();return ue(o)}const r=e.poster,s=ye(r),n=await we(r,s,t);return ue(n)}async function ir(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 lr(e,t){return A(e,HTMLCanvasElement)?sr(e):A(e,HTMLVideoElement)?nr(e,t):A(e,HTMLIFrameElement)?ir(e,t):e.cloneNode(Ze(e))}const cr=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",Ze=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function or(e,t,r){var s,n;if(Ze(t))return t;let i=[];return cr(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,o)=>l.then(()=>me(o,r)).then(d=>{d&&t.appendChild(d)}),Promise.resolve()),t}function dr(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 ur(e,t){A(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),A(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function mr(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 hr(e,t,r){return A(t,Element)&&(dr(e,t,r),Jt(e,t,r),ur(e,t),mr(e,t)),t}async function fr(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 o=r[i].getAttribute("xlink:href");if(o){const d=e.querySelector(o),f=document.querySelector(o);!d&&f&&!s[o]&&(s[o]=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 o=document.createElementNS(i,"defs");l.appendChild(o);for(let d=0;d<n.length;d++)o.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=>lr(s,t)).then(s=>or(e,s,t)).then(s=>hr(e,s,t)).then(s=>fr(s,t))}const et=/url\((['"]?)([^'"]+?)\1\)/g,pr=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,gr=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function xr(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function br(e){const t=[];return e.replace(et,(r,s,n)=>(t.push(n),r)),t.filter(r=>!xe(r))}async function yr(e,t,r,s,n){try{const i=r?Ht(t,r):t,l=ye(t);let o;return n||(o=await we(i,l,s)),e.replace(xr(t),`$1${o}$3`)}catch{}return e}function wr(e,{preferredFontFormat:t}){return t?e.replace(gr,r=>{for(;;){const[s,,n]=pr.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=wr(e,r);return br(s).reduce((i,l)=>i.then(o=>yr(o,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 vr(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 jr(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 o=e;o.decode&&(o.decode=i),o.loading==="lazy"&&(o.loading="eager"),r?(e.srcset="",e.src=n):e.href.baseVal=n})}async function _r(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 vr(e,t),await jr(e,t),await _r(e,t))}function Sr(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 o=l.replace(s,"$1");return o.startsWith("https://")||(o=new URL(o,e.url).href),Je(o,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]*?)})",o=new RegExp(l,"gi");for(;;){let d=i.exec(s);if(d===null){if(d=o.exec(s),d===null)break;i.lastIndex=o.lastIndex}else o.lastIndex=i.lastIndex;t.push(d[0])}return t}async function kr(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 o=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")?o+=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(o=>o.href==null)||document.styleSheets[0];n.href!=null&&s.push(Oe(n.href).then(o=>qe(o,t)).then(o=>Ue(o).forEach(d=>{l.insertRule(d,l.cssRules.length)})).catch(o=>{console.error("Error loading remote stylesheet",o)})),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 Cr(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>tt(t.style.getPropertyValue("src")))}async function Er(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=Z(e.ownerDocument.styleSheets),s=await kr(r,t);return Cr(s)}function st(e){return e.trim().replace(/["']/g,"")}function Nr(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 Rr(e,t){const r=await Er(e,t),s=Nr(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 Pr(e,t){const r=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await Rr(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 $r(e,t={}){const{width:r,height:s}=Ye(e,t),n=await me(e,t,!0);return await Pr(n,t),await at(n,t),Sr(n,t),await Gt(n,r,s)}async function Mr(e,t={}){const{width:r,height:s}=Ye(e,t),n=await $r(e,t),i=await ue(n),l=document.createElement("canvas"),o=l.getContext("2d"),d=t.pixelRatio||qt(),f=t.canvasWidth||r,x=t.canvasHeight||s;return l.width=f*d,l.height=x*d,t.skipAutoScale||Ut(l),l.style.width=`${f}`,l.style.height=`${x}`,t.backgroundColor&&(o.fillStyle=t.backgroundColor,o.fillRect(0,0,l.width,l.height)),o.drawImage(i,0,0,l.width,l.height),l}async function Tr(e,t={}){const r=await Mr(e,t);return await zt(r)}const be="#ffffff";function Fr(){return typeof window>"u"?be:window.getComputedStyle(document.documentElement).getPropertyValue("--bg-elevated").trim()||be}function Lr(e){if(typeof window>"u")return be;const t=window.getComputedStyle(e).backgroundColor;return!t||t==="rgba(0, 0, 0, 0)"||t==="transparent"?Fr():t}async function Ir(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 Tr(e,{pixelRatio:2,cacheBust:!0,backgroundColor:Lr(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}=ot(),[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 Ir(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]),o=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}),o]})};function Ar({model:e,datasetName:t,hideClosed:r,setHideClosed:s,setMetric:n}){const i=L.useRef(null),{isInitialFilteredViewLoading:l,chartPoints:o,activeMetric:d,allowedMetrics:f,orderedMetrics:x,parameterBound:u}=e;return l||o.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(Dt,{points:o,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 Br(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(ce,{title:e}):t||"—"}const ia=()=>{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=St(t.get("max_parameters_exclusive")),{preferences:l,setHideClosedSourceEvals:o}=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=Tt({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:c}=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(oe,{className:"h-12 w-1/2 mb-6"}),a.jsx(oe,{className:"h-64 w-full"})]});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)||Br(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(oe,{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:()=>{o(!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(ce,{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(ce,{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(ce,{title:J}):null}),G&&a.jsx("span",{className:"method-source-meta",children:G})]})]}),a.jsx(Ar,{model:I,datasetName:p.name,hideClosed:l.hide_closed_source_evals,setHideClosed:o,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:c.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=>{o(!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(oe,{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:[c.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 (${c.length-P})`}),C&&a.jsx("span",{children:"Scroll metrics horizontally; model and paper details stay visible."})]}),a.jsx(At,{model:I,showHarness:y,setMetric:E,highlightRowRef:d,onFittingMetricCountChange:S})]})]})]})})};export{ia as default};
|
assets/{BenchmarkTrendSparkline-BrvDBmsS.js → BenchmarkTrendSparkline-BfAoxAzu.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{r as C,j as t}from"./index-
|
|
|
|
| 1 |
+
import{r as C,j as t}from"./index-D6jcIRWs.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-BWMEEf81.js → CatalogEntityPreviewLink-BhTSUN-X.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import{n as m,
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
|
|
|
| 1 |
+
import{n as m,$ as h,K as d,j as s,L as g,Y as f}from"./index-D6jcIRWs.js";import{u as k}from"./useQuery-CUJUm4FY.js";import{H as w,a as y,b as v}from"./hover-card-DPpv0l_x.js";import{c as l}from"./catalog-PYrB8_bm.js";/**
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
assets/{ChatView-DZCqXX3T.js → ChatView-wJIPZ39W.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
var ir=Object.defineProperty;var or=(e,r,t)=>r in e?ir(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t;var ee=(e,r,t)=>or(e,typeof r!="symbol"?r+"":r,t);import{n as cr,r as d,j as n,X as Pt,p as Ht,K as rt,a as Ut,u as lr,c as ur,e as dr,f as pr,
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
|
|
|
| 1 |
+
var ir=Object.defineProperty;var or=(e,r,t)=>r in e?ir(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t;var ee=(e,r,t)=>or(e,typeof r!="symbol"?r+"":r,t);import{n as cr,r as d,j as n,X as Pt,p as Ht,K as rt,a as Ut,u as lr,c as ur,e as dr,f as pr,Z as fr,A as hr,L as Ct,Q as mr,S as gr,U as yr,V as At,m as _r}from"./index-D6jcIRWs.js";import{u as Pe}from"./useQuery-CUJUm4FY.js";import{C as br,U as jt,b as wr,f as De,c as xr,g as vr,A as Sr,a as Er}from"./ArtifactWorkspace-CUZCugRS.js";import{f as Ue,h as Rr,j as Kt,k as Ir,T as kr,e as Wt,l as Cr,m as Ar,n as jr,r as Tr,o as Tt,s as Yt,t as nt,v as He,w as Le,x as Mr,y as Mt,z as Nr,B as Dr,E as ut,F as $t,G as Lr,H as Fr,I as Or,J as qr,D as st,K as Br,L as Pr,M as Je,N as Qe,O as Hr,Q as ze,R as Ge,U as Ur,V as Kr,S as Wr,W as Yr,X as Nt,Y as $r}from"./chatSessions-DByIWBno.js";import{M as Vr}from"./McpShowcase-CS9LZY9p.js";import{S as Qr}from"./share-2-DPo2j-OC.js";import{c as Xe}from"./chat-ChnK8XDU.js";import{u as zr,O as Gr}from"./openrouter-DrXWVMlM.js";import{q as Vt}from"./queryOptions-C9woPjwX.js";/* empty css */import"./hover-card-DPpv0l_x.js";import"./CatalogEntityPreviewLink-BhTSUN-X.js";import"./catalog-PYrB8_bm.js";import"./github-B7D_19Qm.js";import"./file-text-4G2I5_Zo.js";import"./PaperPreviewLink-fcJyP9H0.js";import"./index-uFGyKu5N.js";import"./index-yduEvk9Z.js";import"./katex-DkKDou_j.js";import"./papers-DIIIPDpj.js";import"./useMutation-p6mN4h17.js";import"./copy-BmzqMihw.js";import"./thumbs-up-BqRlVdvF.js";import"./arrow-left-IzGlownM.js";import"./external-link-C_yz2sXa.js";import"./plus-C4UQ62Q1.js";import"./search-CfTufeR7.js";import"./chevron-up-CQKUhZ0S.js";import"./AuthorAvatar-UMHOVOr9.js";import"./AgentLogos-CFt_vIO2.js";/**
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
assets/{ConferenceDetailView-BP533WBF.js → ConferenceDetailView-BNri44qz.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{u as L,r as D,j as e,L as p}from"./index-
|
|
|
|
| 1 |
+
import{u as L,r as D,j as e,L as p}from"./index-D6jcIRWs.js";import{u as T}from"./useQuery-CUJUm4FY.js";import{M as F}from"./MarkdownText-B_D3IE_p.js";import{c as A}from"./catalog-PYrB8_bm.js";import{c as B,h as C,d as E}from"./colors-CLwl8a2d.js";import{S as f}from"./skeleton-BqkYFmXl.js";import{A as P,a as z}from"./alert-2MbxVzGL.js";import{s as M}from"./safeExternalHref-CkBrsh84.js";/* empty css */import"./PaperPreviewLink-fcJyP9H0.js";import"./index-uFGyKu5N.js";import"./index-yduEvk9Z.js";import"./katex-DkKDou_j.js";import"./hover-card-DPpv0l_x.js";import"./papers-DIIIPDpj.js";import"./useMutation-p6mN4h17.js";const R=a=>(a==null?void 0:a.trim().toLowerCase().replace(/[\s_]+/g,"-"))??"",W=(a,t)=>{if(!a)return null;const i=new Date(`${a}T00:00:00`),s=t?new Date(`${t}T00:00:00`):null,c=g=>g.toLocaleDateString("en-US",{month:"long",day:"numeric"}),m=i.getFullYear();return s&&s.getTime()!==i.getTime()?i.getMonth()===s.getMonth()?`${c(i).replace(/\d+$/,"").trim()} ${i.getDate()}–${s.getDate()}, ${m}`:`${c(i)} – ${c(s)}, ${m}`:`${c(i)}, ${m}`},te=()=>{var k,S,b,_,$,w;const{confSlug:a}=L(),t=T({queryKey:["conference-areas-with-tasks",a],queryFn:()=>A.conferenceAreasWithTasks(a),enabled:!!a,staleTime:10*60*1e3}),i=D.useMemo(()=>{if(!t.data)return[];const n={general:0,vision:1,video:2,language:3,audio:4,other:5},r=o=>n[R(o)]??999;return[...t.data.results].sort((o,l)=>{const d=r(o.name),x=r(l.name);return d!==x?d-x:o.name.localeCompare(l.name)})},[t.data]),s=(k=t.data)==null?void 0:k.conference,c=((S=t.data)==null?void 0:S.total_paper_count)??0,m=((b=t.data)==null?void 0:b.oral_paper_count)??0,g=((_=t.data)==null?void 0:_.spotlight_paper_count)??0,u=(($=t.data)==null?void 0:$.outstanding_paper_count)??0,j=((w=t.data)==null?void 0:w.best_paper_finalist_paper_count)??0,v=i.reduce((n,r)=>n+r.tasks.length,0);if(t.error)return e.jsx("div",{className:"page",children:e.jsx(P,{variant:"destructive",children:e.jsx(z,{children:"Failed to load conference. Please try again."})})});const y=s?W(s.start_date,s.end_date):null,N=s?[s.venue,s.location].filter(Boolean).join(", "):null,h=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:h??e.jsx(f,{className:"h-10 w-64 inline-block"})}),e.jsxs("div",{className:"feed-subtitle",style:{display:"flex",flexDirection:"column",gap:4},children:[y&&e.jsx("span",{children:y}),N&&e.jsx("span",{children:N}),(s==null?void 0:s.url)&&e.jsx("a",{href:M(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(F,{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:h?`${h} visual`:"Conference visual",onError:n=>{var r,o;(o=(r=n.currentTarget.parentElement)==null?void 0:r.parentElement)==null||o.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",h??"Conference",s.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(F,{className:"task-image-credit",text:s.image_credit})]})]})]})]}),!t.isLoading&&c>0&&e.jsxs("section",{style:{marginTop:48,marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",flexWrap:"wrap",gap:"6px 24px",paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsxs("div",{children:[e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:"Browse papers"}),e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:"All accepted papers, plus oral, spotlight, outstanding, and best paper finalists."})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[c.toLocaleString()," papers"]})]}),e.jsxs("div",{className:"tag-grid",children:[e.jsxs(p,{to:`/conferences/${a}/all`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"var(--accent)"}}),"All papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[c.toLocaleString()," papers"]})})]}),m>0&&e.jsxs(p,{to:`/conferences/${a}/oral`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#fdbb02"}}),"Oral papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[m.toLocaleString()," papers"]})})]}),g>0&&e.jsxs(p,{to:`/conferences/${a}/spotlight`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#fdbb02"}}),"Spotlight papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[g.toLocaleString()," papers"]})})]}),u>0&&e.jsxs(p,{to:`/conferences/${a}/outstanding`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#c45c26"}}),"Outstanding papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[u.toLocaleString()," papers"]})})]}),j>0&&e.jsxs(p,{to:`/conferences/${a}/best-paper-finalists`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#c9a227"}}),"Best paper finalists"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[j.toLocaleString()," papers"]})})]})]})]}),t.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:4}).map((n,r)=>e.jsxs("div",{children:[e.jsx(f,{className:"h-8 w-1/3 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((o,l)=>e.jsx(f,{className:"h-24"},l))})]},r))}):i.map(n=>{const r=n.tasks;if(r.length===0)return null;const o=r.reduce((l,d)=>l+(d.paper_count||0),0);return e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",flexWrap:"wrap",gap:"6px 24px",paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsxs("div",{children:[e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:n.name}),n.description&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:n.description})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[r.length," ",r.length===1?"task":"tasks"," · ",o.toLocaleString()," papers"]})]}),e.jsx("div",{className:"tag-grid",children:r.map(l=>{const d=l.slug||"",x=B(C(d));return e.jsxs(p,{to:`/conferences/${a}/${d}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:x.dot}}),E(l.name,d)]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(l.paper_count??0).toLocaleString()," papers"]})})]},l.id)})})]},n.id)}),v>0&&e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:24},children:[v," tasks across ",i.filter(n=>n.tasks.length>0).length," areas."]})]})};export{te as default};
|
assets/{ConferenceTaskView-B9U81_-o.js → ConferenceTaskView-BBbbnoRS.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{u as V,e as $,r as b,j as e,L as y,K as W}from"./index-
|
|
|
|
| 1 |
+
import{u as V,e as $,r as b,j as e,L as y,K as W}from"./index-D6jcIRWs.js";import{u as E}from"./useQuery-CUJUm4FY.js";import{P as G}from"./components-DO1X940E.js";import{P as J}from"./PaperFeedFilters-DNebHp4l.js";import{a as X,P as Y,b as Z}from"./PaperDateFilter-CPIqaHaq.js";import{M as g}from"./MarkdownText-B_D3IE_p.js";import{c as M}from"./catalog-PYrB8_bm.js";import{t as ee,d as se}from"./colors-CLwl8a2d.js";import{d as ae}from"./usePapers-BbCSwcVk.js";import{u as te}from"./useInfiniteScroll-Dm7JY_X4.js";import{S as re}from"./skeleton-BqkYFmXl.js";import{A as ne,a as ie}from"./alert-2MbxVzGL.js";import"./papers-DIIIPDpj.js";import"./AuthorAvatar-UMHOVOr9.js";import"./LatexTitle-D_92Jowu.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-DCjqGpW0.js";/* empty css */import"./PaperPreviewLink-fcJyP9H0.js";import"./index-uFGyKu5N.js";import"./index-yduEvk9Z.js";import"./katex-DkKDou_j.js";import"./hover-card-DPpv0l_x.js";import"./useMutation-p6mN4h17.js";import"./useInfiniteQuery-FXco4P1n.js";import"./useIntersectionObserver-3LTuEaFW.js";const oe=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],ce=t=>t==="trending"||t==="date_published"||t==="citation_count"?t:"trending",Oe=()=>{var A,F,L,T,B,O;const{confSlug:t,taskSlug:n}=V(),[i,u]=$(),S=ce(i.get("order_by")),w=i.get("has_code")==="true",k=i.get("has_hf_artifacts")==="true",f=X(i),z=a=>{const s=new URLSearchParams(i);s.set("order_by",a),u(s)},q=a=>{const s=new URLSearchParams(i);a?s.set("has_code","true"):s.delete("has_code"),u(s)},I=a=>{const s=new URLSearchParams(i);a?s.set("has_hf_artifacts","true"):s.delete("has_hf_artifacts"),u(s)},R=n==="all",P=n==="oral",_=n==="spotlight",l=n==="outstanding",d=n==="best-paper-finalists",x=l||d,p=R||P||_||l||d,K=p?void 0:n,Q=P?"oral":_?"spotlight":l?"outstanding":d?"best_paper_finalist":void 0,m=E({queryKey:["conference",t],queryFn:()=>M.getConference(t),enabled:!!t,staleTime:10*60*1e3}),j=E({queryKey:["task",n],queryFn:()=>M.getTask(n),enabled:!!n&&!p,staleTime:10*60*1e3}),c=ae({conferenceSlug:t||"",taskSlug:K,presentation:Q,page_size:12,order_by:S,order_dir:"desc",include_resources:!0,has_code:w,has_hf_artifacts:k,start_date:f.startDate,end_date:f.endDate,enabled:!!t}),U=te(c);b.useEffect(()=>{window.scrollTo(0,0)},[t,n]);const N=b.useMemo(()=>{var s;return(((s=c.data)==null?void 0:s.pages)??[]).flatMap(o=>o.results)},[c.data]),v=b.useMemo(()=>N.map(ee),[N]),h=R?"All papers":P?"Oral papers":_?"Spotlight papers":l?"Outstanding papers":d?"Best paper finalists":se(((A=j.data)==null?void 0:A.name)||n||"",((F=j.data)==null?void 0:F.slug)||n),C=((T=(L=c.data)==null?void 0:L.pages[0])==null?void 0:T.count)??((B=m.data)==null?void 0:B.paper_count)??0,r=j.data;return m.error||j.error||c.error?e.jsx("div",{className:"page",children:e.jsx(ne,{variant:"destructive",children:e.jsx(ie,{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(y,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(y,{to:"/conferences",children:"Conferences"}),e.jsx("span",{children:" / "}),e.jsx(y,{to:`/conferences/${t}`,children:((O=m.data)==null?void 0:O.name)??t}),e.jsx("span",{children:" / "}),e.jsx("span",{children:h})]}),e.jsxs("div",{className:!p&&(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:p?"BROWSE PAPERS":"TASK"}),e.jsx("h1",{className:"domain-mega-title",children:h}),l&&t==="iclr-2026"&&e.jsx(g,{className:"task-explainer",text:"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/)."}),l&&t==="icml-2026"&&e.jsx(g,{className:"task-explainer",text:"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/)."}),d&&t==="cvpr-2026"&&e.jsx(g,{className:"task-explainer",text:"CVPR 2026 recognized fifteen Best Paper Award finalists, including the winners. [Read the announcement](https://x.com/CVPR/status/2062912519522717978)."}),!p&&(r==null?void 0:r.description)&&e.jsx(g,{className:"task-explainer",text:r.description}),m.data&&e.jsxs("div",{className:"task-quickstats",style:{marginTop:12},children:[e.jsxs("span",{children:[e.jsx("span",{className:"num",children:C.toLocaleString()}),"PAPERS"]}),e.jsx("span",{children:m.data.name})]})]}),!p&&(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:`${h} schematic`,onError:a=>{var s,o;(o=(s=a.currentTarget.parentElement)==null?void 0:s.parentElement)==null||o.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",h,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:x?"Award papers":"Conference papers · sort below"}),e.jsxs("div",{className:"task-section-title",children:["Papers ",e.jsxs("span",{className:"meta",children:["[",C.toLocaleString(),"]"]})]})]}),e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[!x&&e.jsx("div",{className:"sort-options",children:oe.map(([a,s])=>e.jsx("button",{className:`sort-btn ${S===a?"active":""}`,onClick:()=>z(a),children:s},a))}),e.jsx(J,{hasCode:w,hasHfArtifacts:k,onHasCodeChange:q,onHasHfArtifactsChange:I,showDivider:!x})]}),e.jsx(Y,{startDate:f.startDate,endDate:f.endDate,onChange:a=>u(Z(i,a))}),!x&&e.jsxs("div",{className:"results-count",children:[v.length," loaded in ",e.jsx("span",{children:h})]})]}),c.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((a,s)=>e.jsx(re,{className:"h-40 w-full"},s))}):v.length===0?e.jsx("div",{className:"no-results",children:"No papers found for this selection."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:v.map((a,s)=>{var H;const o=(H=N[s])==null?void 0:H.conference_award,D=o==="outstanding"?"Outstanding Paper":o==="honorable_mention"?"Honorable Mention":o==="best_paper_finalist"&&!d?"Best Paper Finalist":null;return e.jsxs(W.Fragment,{children:[D&&e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.08em",marginBottom:8},children:D}),e.jsx(G,{paper:a,rank:s+1})]},a.id)})}),e.jsx("div",{ref:U,style:{height:1}}),c.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{Oe as default};
|
assets/{ConferencesIndexView-BvdvhrAq.js → ConferencesIndexView-DF9D85K1.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{r as p,j as e,L as d}from"./index-
|
|
|
|
| 1 |
+
import{r as p,j as e,L as d}from"./index-D6jcIRWs.js";import{u}from"./useQuery-CUJUm4FY.js";import{c as f}from"./catalog-PYrB8_bm.js";import{S as m}from"./skeleton-BqkYFmXl.js";import{A as h,a as g}from"./alert-2MbxVzGL.js";import{T as x}from"./TaxonomySuggestionTile-BLk1tYYE.js";import"./SignInToEditDialog-RzK54RAM.js";import"./button-Bzx0ccHH.js";import"./input-CCN-4hy4.js";import"./textarea-sXKODM3W.js";import"./searchable-select-B7z6Fcrr.js";import"./popover-DCjqGpW0.js";import"./dialog-vGFIbcd-.js";import"./search-CfTufeR7.js";import"./loader-circle-BuDrH29B.js";import"./useMutation-p6mN4h17.js";import"./submissions-DNa3tQdo.js";import"./plus-C4UQ62Q1.js";const j=(t,a)=>{if(!t)return null;const r=new Date(`${t}T00:00:00`),s=a?new Date(`${a}T00:00:00`):null,n=o=>o.toLocaleDateString("en-US",{month:"long",day:"numeric"}),i=r.getFullYear();return s&&s.getTime()!==r.getTime()?r.getMonth()===s.getMonth()?`${n(r).replace(/\d+$/,"").trim()} ${r.getDate()}–${s.getDate()}, ${i}`:`${n(r)} – ${n(s)}, ${i}`:`${n(r)}, ${i}`},v=t=>{var r;if(t.year!=null)return t.year;if(t.start_date)return Number(t.start_date.slice(0,4));const a=(r=t.slug.match(/-(\d{4})$/))==null?void 0:r[1];return a?Number(a):0},y=(t,a)=>{if(t.start_date&&a.start_date){const r=t.start_date.localeCompare(a.start_date);if(r!==0)return r}else{if(t.start_date)return-1;if(a.start_date)return 1}return t.name.localeCompare(a.name)},N={display:"flex",alignItems:"baseline",justifyContent:"space-between",flexWrap:"wrap",gap:"6px 24px",paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},H=()=>{const t=u({queryKey:["conferences"],queryFn:()=>f.conferences(),staleTime:6e5}),a=p.useMemo(()=>{var s;if(!((s=t.data)!=null&&s.results))return null;const r={};return t.data.results.forEach(n=>{const i=v(n);(r[i]||(r[i]=[])).push(n)}),Object.values(r).forEach(n=>n.sort(y)),Object.keys(r).map(Number).sort((n,i)=>i-n).map(n=>({year:n,conferences:r[n]}))},[t.data]);return t.error?e.jsx("div",{className:"page",children:e.jsx(h,{variant:"destructive",children:e.jsx(g,{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(d,{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"}),"."]})]})}),t.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:2}).map((r,s)=>e.jsxs("div",{children:[e.jsx(m,{className:"h-8 w-24 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:3}).map((n,i)=>e.jsx(m,{className:"h-32"},i))})]},s))}):a==null?void 0:a.map(({year:r,conferences:s})=>{const n=s.reduce((o,l)=>o+(l.paper_count??0),0),i=r>0?String(r):"Unknown year";return e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:N,children:[e.jsx("div",{children:e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:i})}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[s.length," ",s.length===1?"conference":"conferences"," ·"," ",n.toLocaleString()," papers"]})]}),e.jsxs("div",{className:"tag-grid",children:[s.map(o=>{const l=j(o.start_date,o.end_date),c=[o.venue,o.location].filter(Boolean).join(", ");return e.jsxs(d,{to:`/conferences/${o.slug}`,className:"tag-cell",children:[e.jsx("div",{className:"name",children:o.name}),e.jsxs("div",{className:"meta",style:{display:"flex",flexDirection:"column",gap:4},children:[l&&e.jsx("span",{children:l}),c&&e.jsx("span",{children:c}),e.jsxs("span",{children:[(o.paper_count??0).toLocaleString()," papers"]})]})]},o.id)}),e.jsx(x,{kind:"conference"})]})]},r)})]})};export{H as default};
|
assets/CronDashboard-B0sjsUM_.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import{n as c,r,j as a,B as n,a5 as u}from"./index-D6jcIRWs.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=r.forwardRef(({className:o,...e},t)=>a.jsx("div",{ref:t,className:n("rounded-lg border bg-card text-card-foreground shadow-sm",o),...e}));f.displayName="Card";const m=r.forwardRef(({className:o,...e},t)=>a.jsx("div",{ref:t,className:n("flex flex-col space-y-1.5 p-6",o),...e}));m.displayName="CardHeader";const p=r.forwardRef(({className:o,...e},t)=>a.jsx("h3",{ref:t,className:n("text-2xl font-semibold leading-none tracking-tight",o),...e}));p.displayName="CardTitle";const l=r.forwardRef(({className:o,...e},t)=>a.jsx("p",{ref:t,className:n("text-sm text-muted-foreground",o),...e}));l.displayName="CardDescription";const h=r.forwardRef(({className:o,...e},t)=>a.jsx("div",{ref:t,className:n("p-6 pt-0",o),...e}));h.displayName="CardContent";const C=r.forwardRef(({className:o,...e},t)=>a.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/CronDashboard-Ch03vo4I.js
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
import{r as s,j as a,B as n,a3 as u}from"./index-CqKcHUvZ.js";const c=s.forwardRef(({className:o,...e},t)=>a.jsx("div",{ref:t,className:n("rounded-lg border bg-card text-card-foreground shadow-sm",o),...e}));c.displayName="Card";const f=s.forwardRef(({className:o,...e},t)=>a.jsx("div",{ref:t,className:n("flex flex-col space-y-1.5 p-6",o),...e}));f.displayName="CardHeader";const m=s.forwardRef(({className:o,...e},t)=>a.jsx("h3",{ref:t,className:n("text-2xl font-semibold leading-none tracking-tight",o),...e}));m.displayName="CardTitle";const p=s.forwardRef(({className:o,...e},t)=>a.jsx("p",{ref:t,className:n("text-sm text-muted-foreground",o),...e}));p.displayName="CardDescription";const l=s.forwardRef(({className:o,...e},t)=>a.jsx("div",{ref:t,className:n("p-6 pt-0",o),...e}));l.displayName="CardContent";const h=s.forwardRef(({className:o,...e},t)=>a.jsx("div",{ref:t,className:n("flex items-center p-6 pt-0",o),...e}));h.displayName="CardFooter";function y(o){if(!o)return"Never";const e=new Date(o);if(Number.isNaN(e.getTime()))return o;const t=Date.now()-e.getTime(),r=Math.floor(t/6e4),i=Math.floor(t/36e5),d=Math.floor(t/864e5);return r<1?"Just now":r<60?`${r}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 C{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,r){return this.request("/admin/autonomous-operations/manual-mode",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:e,expected_revision:t,confirmation:r})})}setAutonomousOperator(e,t,r,i){return this.request(`/admin/autonomous-operations/operators/${e}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:t,expected_revision:r,confirmation:i})})}qualifyAutonomousChatBaseline(e,t,r){return this.request("/admin/autonomous-operations/chat-baseline",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sha:e,expected_revision:t,confirmation:r})})}}const g=new C(u);export{c as C,f as a,m as b,p as c,l as d,y as f,g as o};
|
|
|
|
|
|
assets/CronDashboard-DPgNAdQz.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
| 1 |
-
import{n as W,r as h,E as rs,v as ns,j as e,t as le,a6 as ts,R as is,I as cs,x as me,P as ls,z as ds,F as Re,B as A,f as Fe,L as xe,a as os,m as ms}from"./index-CqKcHUvZ.js";import{u as X}from"./useQuery-Cngk7eL9.js";import{f,C as v,a as b,b as y,c as q,d as _,o as ve}from"./CronDashboard-Ch03vo4I.js";import{B as S}from"./badge-D-oq0Pkj.js";import{B as C}from"./button-BYn4yUH_.js";import{C as us,a as hs}from"./chevron-up-CZWX0SDx.js";import{D as _e}from"./database-DrVmdfNa.js";import{T as xs}from"./trending-up-n0ivZSaN.js";import{A as ie}from"./activity-DDb7qU7w.js";import{F as fe}from"./file-text-DnNBEwSF.js";import{T as Te,I as ps}from"./triangle-alert-DM207o24.js";import{S as Ae}from"./shield-alert-B0VZio-w.js";import{E as ee}from"./external-link-CrrdDZf6.js";import{C as se,R as Ne}from"./refresh-cw-gVdSyglp.js";import{L as I}from"./loader-circle-CZgakNH7.js";import{C as pe}from"./circle-check-BYRHMG9x.js";import{u as D}from"./useMutation-BItMAQ7s.js";import{r as gs,f as js,h as vs,j as _s,p as fs,k as Ns,A as bs,l as ys}from"./codexAddEvals-BaTB12JK.js";import{u as ks}from"./useInfiniteQuery-lxaMAHEu.js";import{p as Ee}from"./paperEdits-BD6cBS3E.js";import{c as ue}from"./catalog-D26nGNnK.js";import{c as be}from"./chat-DGBJkcmd.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 ye=W("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 ws=W("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 Cs=W("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 Ss=W("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 $s=W("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 Me=W("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 Ls=W("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 de="Tabs",[Ps]=ds(de,[Re]),qe=Re(),[Rs,ge]=Ps(de),Ie=h.forwardRef((s,a)=>{const{__scopeTabs:n,value:t,onValueChange:i,defaultValue:d,orientation:p="horizontal",dir:N,activationMode:k="automatic",...m}=s,c=rs(N),[u,w]=ns({prop:t,onChange:i,defaultProp:d??"",caller:de});return e.jsx(Rs,{scope:n,baseId:ts(),value:u,onValueChange:w,orientation:p,dir:c,activationMode:k,children:e.jsx(le.div,{dir:c,"data-orientation":p,...m,ref:a})})});Ie.displayName=de;var De="TabsList",Oe=h.forwardRef((s,a)=>{const{__scopeTabs:n,loop:t=!0,...i}=s,d=ge(De,n),p=qe(n);return e.jsx(is,{asChild:!0,...p,orientation:d.orientation,dir:d.dir,loop:t,children:e.jsx(le.div,{role:"tablist","aria-orientation":d.orientation,...i,ref:a})})});Oe.displayName=De;var Je="TabsTrigger",Be=h.forwardRef((s,a)=>{const{__scopeTabs:n,value:t,disabled:i=!1,...d}=s,p=ge(Je,n),N=qe(n),k=We(p.baseId,t),m=ze(p.baseId,t),c=t===p.value;return e.jsx(cs,{asChild:!0,...N,focusable:!i,active:c,children:e.jsx(le.button,{type:"button",role:"tab","aria-selected":c,"aria-controls":m,"data-state":c?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:k,...d,ref:a,onMouseDown:me(s.onMouseDown,u=>{!i&&u.button===0&&u.ctrlKey===!1?p.onValueChange(t):u.preventDefault()}),onKeyDown:me(s.onKeyDown,u=>{[" ","Enter"].includes(u.key)&&p.onValueChange(t)}),onFocus:me(s.onFocus,()=>{const u=p.activationMode!=="manual";!c&&!i&&u&&p.onValueChange(t)})})})});Be.displayName=Je;var He="TabsContent",Ue=h.forwardRef((s,a)=>{const{__scopeTabs:n,value:t,forceMount:i,children:d,...p}=s,N=ge(He,n),k=We(N.baseId,t),m=ze(N.baseId,t),c=t===N.value,u=h.useRef(c);return h.useEffect(()=>{const w=requestAnimationFrame(()=>u.current=!1);return()=>cancelAnimationFrame(w)},[]),e.jsx(ls,{present:i||c,children:({present:w})=>e.jsx(le.div,{"data-state":c?"active":"inactive","data-orientation":N.orientation,role:"tabpanel","aria-labelledby":k,hidden:!w,id:m,tabIndex:0,...p,ref:a,style:{...s.style,animationDuration:u.current?"0s":void 0},children:w&&d})})});Ue.displayName=He;function We(s,a){return`${s}-trigger-${a}`}function ze(s,a){return`${s}-content-${a}`}var Fs=Ie,Ge=Oe,Ke=Be,Qe=Ue;const Ts=Fs,Ve=h.forwardRef(({className:s,...a},n)=>e.jsx(Ge,{ref:n,className:A("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",s),...a}));Ve.displayName=Ge.displayName;const G=h.forwardRef(({className:s,...a},n)=>e.jsx(Ke,{ref:n,className:A("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),...a}));G.displayName=Ke.displayName;const K=h.forwardRef(({className:s,...a},n)=>e.jsx(Qe,{ref:n,className:A("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",s),...a}));K.displayName=Qe.displayName;function ce(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 Xe(s){return s.available?s.status==="completed"?s.conclusion??"completed":s.status??"unknown":"Unavailable"}function Z(s){return s.replace(/_/g," ").replace(/\b\w/g,a=>a.toUpperCase())}const P=s=>`$${s.toFixed(2)}`;function ke({title:s,budget:a,profile:n}){const t=a.cost_policy==="unmetered_hf"||a.budget_enforced===!1,i=Math.min(100,a.current_exposure_usd/a.ceiling_usd*100),d=t?"Unmetered HF":a.affordable_jobs===0&&a.desired_jobs>0?"No shard fits":a.affordable_jobs<a.desired_jobs?`${a.affordable_jobs} of ${a.desired_jobs} planned shards fit`:`${a.affordable_jobs} planned ${a.affordable_jobs===1?"shard fits":"shards fit"}`;return e.jsxs("div",{className:`cron-metric-card space-y-3 ${a.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:a.window==="rolling_30_days"?"Rolling 30-day window":"All history · no automatic reset"})]}),e.jsx(S,{variant:"outline",className:a.can_launch_planned?"cron-status--healthy":"cron-status--broken",children:d})]}),!t&&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:P(a.spent_usd)})]}),e.jsxs("div",{children:[e.jsx("span",{className:"cron-label",children:"Active reservations"}),e.jsx("div",{children:P(a.active_reserved_usd)})]}),e.jsxs("div",{children:[e.jsx("span",{className:"cron-label",children:"Current exposure"}),e.jsx("div",{children:P(a.current_exposure_usd)})]}),e.jsxs("div",{children:[e.jsx("span",{className:"cron-label",children:"Admission policy"}),e.jsx("div",{children:t?"HF-owned · no monetary gate":`${P(a.ceiling_usd)} cap · ${P(a.headroom_usd)} headroom`})]}),e.jsxs("div",{children:[e.jsx("span",{className:"cron-label",children:"Affordable plan reserves"}),e.jsx("div",{children:P(a.planned_reserved_usd)})]}),e.jsxs("div",{children:[e.jsx("span",{className:"cron-label",children:"Projected exposure"}),e.jsx("div",{children:P(a.projected_usd)})]}),e.jsxs("div",{children:[e.jsx("span",{className:"cron-label",children:"Rate assumption"}),e.jsxs("div",{children:[P(a.hourly_rate_usd),"/hour · ",a.reservation_hours_per_job,"h"]})]}),e.jsxs("div",{children:[e.jsx("span",{className:"cron-label",children:"Next admission"}),e.jsx("div",{children:t?"Now, subject to capacity":a.next_admission_at?f(a.next_admission_at):a.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:[P(a.unknown_terminal_reservation_usd??0)," · ",(a.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 ",ce(n.hard_timeout_seconds)," · soft ",ce(n.soft_deadline_seconds)]}),e.jsx("p",{className:"text-xs cron-muted",children:t?"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 As={healthy:pe,degraded:Te,broken:se,running:I,stuck:se,unknown:ws};function Es({status:s,isRunning:a}){const n=a?"running":s,t=As[n];return e.jsx(t,{className:`cron-status-icon cron-status--${n}${n==="running"?" animate-spin":""}`})}function we({label:s,axis:a}){return e.jsxs(S,{variant:"outline",className:`cron-status--${a.status}`,title:a.reason,children:[s,": ",a.status]})}function Ce({icon:s,title:a,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:a})]}),e.jsx("div",{className:"grid grid-cols-2 gap-3",children:Object.entries(n).map(([t,i])=>e.jsxs("div",{className:"cron-metric-card",children:[e.jsx("div",{className:"cron-label",children:Z(t)}),e.jsx("div",{className:"text-lg font-semibold",children:typeof i=="number"?i.toLocaleString():i})]},t))})]})}function Ms({workflow:s}){return e.jsxs("div",{children:[e.jsxs("div",{className:"cron-section-heading",children:[e.jsx(ie,{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",Xe(s)],...s.updated_at?[["Updated",f(s.updated_at)]]:[]].map(([a,n])=>e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx("span",{className:"cron-label",children:a}),e.jsx("span",{className:a==="Workflow"?"font-mono text-xs":void 0,children:n})]},a)),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(a=>e.jsx(S,{variant:"outline",className:"cron-status--broken",children:a},a))})]}),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(([a,n])=>e.jsxs(S,{variant:"outline",children:[a,": ",n??"running"]},a))})]}),(s.error||s.view_error)&&e.jsx("div",{className:"cron-message cron-message--error",children:s.error??s.view_error})]})]})}function qs(s){return s==="COMPLETED"?"cron-status--healthy":s==="ERROR"||s==="CANCELED"?"cron-status--broken":s==="RUNNING"?"cron-status--running":"cron-status--unknown"}function Se(s){return s==="success"?"cron-status--healthy":s==="partial"||s==="interrupted"?"cron-status--degraded":s==="infrastructure_failure"||s==="worker_failure"?"cron-status--broken":s==="active"?"cron-status--running":"cron-status--unknown"}function Is({job:s}){const a=s.progress,n=(a==null?void 0:a.omitted_images)??0,t=a!=null&&a.total_papers?Math.min(100,a.processed_papers/a.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(S,{variant:"outline",className:qs(s.stage),children:s.stage.toLowerCase()}),s.effective_outcome&&e.jsxs(S,{variant:"outline",className:Se(s.effective_outcome),children:["output: ",s.effective_outcome.replace(/_/g," ")]}),s.failure_cause&&e.jsxs(S,{variant:"outline",className:Se(s.effective_outcome),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(ee,{className:"h-4 w-4"})})]})]}),a?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:[a.processed_papers.toLocaleString()," / ",a.total_papers.toLocaleString()," papers"]}),e.jsxs("span",{children:[t.toFixed(0),"%"]})]}),e.jsx("div",{className:"cron-progress-track",children:e.jsx("div",{className:"cron-progress-value",style:{width:`${t}%`}})})]}),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:a.succeeded_papers.toLocaleString()})," succeeded"]}),e.jsxs("span",{children:[e.jsx("strong",{children:a.failed_papers.toLocaleString()})," failed"]}),e.jsxs("span",{children:[e.jsx("strong",{children:a.already_existed_papers.toLocaleString()})," skipped"]}),e.jsxs("span",{children:[e.jsx("strong",{children:a.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"]}),a.updated_at&&e.jsxs("div",{className:"text-xs cron-muted",children:["Progress updated ",f(a.updated_at)]}),(a.fatal_error||a.error_samples.length>0)&&e.jsxs("div",{className:"cron-message cron-message--error space-y-1",children:[a.fatal_error&&e.jsx("div",{children:a.fatal_error}),a.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 ",f(s.created_at)]}),s.duration_seconds!=null&&e.jsxs("span",{children:["Duration ",ce(s.duration_seconds)]})]}),s.stage_message&&e.jsx("div",{className:"cron-message cron-message--warning",children:s.stage_message})]})}function Ds({monitor:s,loading:a,error:n}){var t,i;return e.jsxs("div",{className:"md:col-span-2",children:[e.jsxs("div",{className:"cron-section-heading",children:[e.jsx(ps,{className:"h-4 w-4"}),e.jsx("h4",{children:"Hugging Face OCR shards"})]}),a&&e.jsxs("div",{className:"cron-metric-card flex items-center gap-2 text-sm cron-muted",children:[e.jsx(I,{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:(t=s.selected_profiles)==null?void 0:t.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,p])=>e.jsxs("div",{className:"cron-metric-card",children:[e.jsx("div",{className:"cron-label",children:Z(d)}),e.jsx("div",{className:"text-lg font-semibold",children:p.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(Is,{job:d},d.id))})]})]})}function Os({job:s,expanded:a,onToggle:n,paperMarkdownJobs:t,paperMarkdownJobsLoading:i=!1,paperMarkdownJobsError:d=null}){const p=!!(s.work_metrics&&Object.keys(s.work_metrics).length),N=!!(s.db_metrics&&Object.keys(s.db_metrics).length),k=s.job_name==="paper_markdown_backfill",m=k?t==null?void 0:t.budgets.live:void 0,c=(m==null?void 0:m.cost_policy)==="unmetered_hf"||(m==null?void 0:m.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":a,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(Es,{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(S,{variant:"outline",className:"text-[10px] uppercase tracking-wide",children:"Critical"}),s.lock_stale&&e.jsx(S,{variant:"outline",className:"cron-status--broken",children:"Held lock"}),e.jsx(we,{label:"Execution",axis:s.execution_health}),e.jsx(we,{label:"Output",axis:s.output_health}),a?e.jsx(us,{className:"h-4 w-4 cron-muted"}):e.jsx(hs,{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(Me,{}),"Log: ",f(s.last_run)]}),e.jsxs("span",{className:"cron-fact",children:[e.jsx(_e,{}),"DB: ",f(s.last_db_write)]}),s.recent_write_count!=null&&e.jsxs("span",{className:"cron-fact",children:[e.jsx(xs,{}),"Recent writes: ",s.recent_write_count.toLocaleString()]}),s.duration!=null&&e.jsxs("span",{className:"cron-fact",children:[e.jsx(ie,{}),"Duration: ",ce(s.duration)]}),s.schedule&&e.jsxs("span",{className:"cron-fact md:col-span-2",children:[e.jsx(ye,{}),e.jsx("span",{className:"font-mono text-xs",children:s.schedule})]}),s.log_status&&e.jsxs("span",{className:"cron-fact",children:[e.jsx(fe,{}),"Log status: ",s.log_status]}),s.workflow_status&&e.jsxs("span",{className:"cron-fact",children:[e.jsx(ie,{}),"Actions: ",Xe(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}),m&&e.jsxs("div",{className:`cron-message ${m.can_launch_planned?"":"cron-message--error"}`,children:[e.jsx("strong",{children:"Live GPU policy:"})," ",c?"unmetered on HF":`${P(m.current_exposure_usd)} current / ${P(m.ceiling_usd)} cap`," · ",m.affordable_jobs," of ",m.desired_jobs," planned",c?"":` · projects ${P(m.projected_usd)} · rolling 30 days`]})]})]}),e.jsx(S,{variant:"outline",className:`cron-status--${s.status}`,children:s.status})]})}),a&&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(ye,{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",f(s.execution_health.last_expected_at??null)],["Last started",f(s.execution_health.last_started_at??null)],["Last completed",f(s.execution_health.last_completed_at??null)],["Next expected",f(s.execution_health.next_expected_at??null)]].map(([u,w])=>e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx("span",{className:"cron-label",children:u}),e.jsx("span",{children:w})]},u))})]}),s.work_metrics&&p&&e.jsx(Ce,{icon:fe,title:"Log Metrics",metrics:s.work_metrics}),s.db_metrics&&N&&e.jsx(Ce,{icon:_e,title:"Database Metrics",metrics:s.db_metrics}),s.workflow_status&&e.jsx(Ms,{workflow:s.workflow_status}),k&&e.jsx(Ds,{monitor:t,loading:i,error:d}),s.diagnostic_groups&&Object.values(s.diagnostic_groups).some(u=>u.length>0)&&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:"Diagnostics by cause"})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:Object.entries(s.diagnostic_groups).filter(([,u])=>u.length>0).map(([u,w])=>e.jsxs("div",{className:"cron-metric-card",children:[e.jsx("div",{className:"cron-label mb-1",children:Z(u)}),e.jsx("ul",{className:"list-disc pl-4 text-sm space-y-1",children:w.map(E=>e.jsx("li",{children:E},E))})]},u))})]}),s.health_findings&&s.health_findings.some(u=>u.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(u=>u.state!=="healthy").map(u=>e.jsxs("div",{children:[e.jsx(S,{variant:"outline",className:`cron-status--${u.state}`,children:u.state})," ",e.jsx("strong",{children:Z(u.contract)}),": ",u.summary,Object.entries(u.evidence).length>0&&e.jsx("div",{className:"mt-1 text-xs cron-muted",children:Object.entries(u.evidence).map(([w,E])=>e.jsxs("span",{className:"mr-3",children:[Z(w),": ",String(E)]},w))})]},`${u.plane}-${u.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(ee,{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(ee,{className:"h-3.5 w-3.5"})]})]})]})]})]})})]})}const Ye=h.forwardRef(({className:s,...a},n)=>e.jsx("div",{className:"relative w-full overflow-auto",children:e.jsx("table",{ref:n,className:A("w-full caption-bottom text-sm",s),...a})}));Ye.displayName="Table";const Ze=h.forwardRef(({className:s,...a},n)=>e.jsx("thead",{ref:n,className:A("[&_tr]:border-b",s),...a}));Ze.displayName="TableHeader";const es=h.forwardRef(({className:s,...a},n)=>e.jsx("tbody",{ref:n,className:A("[&_tr:last-child]:border-0",s),...a}));es.displayName="TableBody";const Js=h.forwardRef(({className:s,...a},n)=>e.jsx("tfoot",{ref:n,className:A("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",s),...a}));Js.displayName="TableFooter";const he=h.forwardRef(({className:s,...a},n)=>e.jsx("tr",{ref:n,className:A("border-b transition-colors data-[state=selected]:bg-muted hover:bg-muted/50",s),...a}));he.displayName="TableRow";const Q=h.forwardRef(({className:s,...a},n)=>e.jsx("th",{ref:n,className:A("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",s),...a}));Q.displayName="TableHead";const V=h.forwardRef(({className:s,...a},n)=>e.jsx("td",{ref:n,className:A("p-4 align-middle [&:has([role=checkbox])]:pr-0",s),...a}));V.displayName="TableCell";const Bs=h.forwardRef(({className:s,...a},n)=>e.jsx("caption",{ref:n,className:A("mt-4 text-sm text-muted-foreground",s),...a}));Bs.displayName="TableCaption";const ss={queued:"cron-status--unknown",dispatching:"cron-status--running",running:"cron-status--running",completed:"cron-status--healthy",failed:"cron-status--broken",canceled:"cron-status--unknown",awaiting_markdown:"cron-status--unknown"},as={queued:"queued",dispatching:"dispatching",running:"running",completed:"completed",failed:"failed",canceled:"canceled",awaiting_markdown:"waiting for Markdown"},$e={"add-evals":"Add evals","enrich-paper":"Enrich paper","resolve-model-paper":"Resolve model release","review-benchmark-gaps":"Review benchmark gaps","add-benchmark":"Add benchmark"},Hs={queued:$s,dispatching:I,running:Cs,completed:pe,failed:se,canceled:Ss,awaiting_markdown:Ls};function Us({status:s}){const a=Hs[s];return e.jsxs(S,{variant:"outline",className:ss[s],children:[e.jsx(a,{className:`mr-1 h-3.5 w-3.5 ${s==="dispatching"?"animate-spin":""}`}),as[s]]})}function Ws(s){return s.status==="awaiting_markdown"?bs: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 Le({mutationResult:s}){const a=s==null?void 0:s.skipped_configured_leaderboards;return!Array.isArray(a)||a.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 (",a.length,")"]}),e.jsx("ul",{className:"mt-1 list-disc space-y-1 pl-4",children:a.map((n,t)=>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}`:""]},t))})]})}function zs({autoRefresh:s,refreshToken:a}){var te;const n=Fe(),[t,i]=h.useState(""),[d,p]=h.useState(""),[N,k]=h.useState(""),[m,c]=h.useState(""),[u,w]=h.useState(""),[E,g]=h.useState({}),j={trigger:t,status:d,policy_version:N,cohort_date:m,review_status:u},{data:x,isLoading:R,isFetching:oe,error:L}=X({queryKey:["codexPaperJobs",a,j],queryFn:()=>ys(100,j),refetchInterval:s?1e4:!1,retry:!1}),F=()=>n.invalidateQueries({queryKey:["codexPaperJobs"]}),Y=D({mutationFn:gs,onSuccess:F}),je=D({mutationFn:js,onSuccess:F}),ae=D({mutationFn:vs,onSuccess:F}),re=D({mutationFn:_s,onSuccess:F}),J=D({mutationFn:({id:r,dataset:o,task:T,metric:z})=>fs(r,{dataset_id:Number(o),task_id:Number(T),best_metric:z.trim()}),onSuccess:F}),B=D({mutationFn:Ns,onSuccess:F}),ne=L&&typeof L=="object"&&"status"in L?L.status:void 0;return e.jsxs(v,{className:"mb-8",children:[e.jsx(b,{children:e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx(y,{className:"text-xl",children:"Codex paper jobs"}),e.jsx(q,{children:"Durable queue, two-stage daily workflows, traces, and benchmark-gap follow-up"})]}),oe&&!R&&e.jsxs("span",{className:"flex items-center gap-2 text-xs cron-muted",children:[e.jsx(I,{className:"h-3.5 w-3.5 animate-spin"})," Syncing with Hugging Face"]})]})}),e.jsxs(_,{children:[R&&e.jsxs("div",{className:"flex items-center justify-center py-10 cron-muted",children:[e.jsx(I,{className:"mr-2 h-5 w-5 animate-spin"})," Loading paper jobs…"]}),L&&ne!==404&&e.jsx("div",{className:"cron-message cron-message--error mb-4",children:L instanceof Error?L.message:"Could not load Codex paper jobs."}),ne===404&&e.jsx("p",{className:"py-4 text-sm cron-muted",children:"Codex paper jobs are not enabled in this environment."}),x&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:`cron-message mb-5 ${x.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: ",x.scheduler.paused_at?"paused":x.scheduler.dispatch_enabled?"enabled":"disabled"]}),x.scheduler.pause_reason&&e.jsx("div",{className:"mt-1 text-xs",children:x.scheduler.pause_reason}),e.jsxs("div",{className:"mt-1 text-xs cron-muted",children:["Canary ",x.scheduler.canary_released?"released":"active"," · Queue age ",x.scheduler.queue_age_level]}),e.jsxs("div",{className:"mt-1 text-xs cron-muted",children:["Scheduled usage today ",x.scheduler.usage.current_day_tokens.toLocaleString()," tokens · ",x.scheduler.usage.mode==="enforced"?`pause threshold ${((te=x.scheduler.usage.pause_threshold_tokens)==null?void 0:te.toLocaleString())??"not established"}`:"first-week alert-only baseline"," · trailing median ",x.scheduler.usage.trailing_seven_day_median_tokens.toLocaleString()]})]}),e.jsx(C,{size:"sm",variant:x.scheduler.paused_at||!x.scheduler.dispatch_enabled?"default":"outline",disabled:re.isPending,onClick:()=>re.mutate(x.scheduler.paused_at||!x.scheduler.dispatch_enabled?"resume":"pause"),children:x.scheduler.paused_at?"Acknowledge & resume":x.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(r=>e.jsxs("div",{className:"cron-metric-card",children:[e.jsx("div",{className:"cron-label capitalize",children:as[r]}),e.jsx("div",{className:"mt-1 text-xl font-semibold",children:x.summary[r]})]},r)),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:x.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:r=>i(r.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:d,onChange:r=>p(r.target.value),children:[e.jsx("option",{value:"",children:"All statuses"}),Object.keys(ss).map(r=>e.jsx("option",{children:r},r))]}),e.jsx("input",{"aria-label":"Policy version",className:"rounded border px-2 py-1 text-sm",placeholder:"Policy version",value:N,onChange:r=>k(r.target.value)}),e.jsx("input",{"aria-label":"Cohort date",type:"date",className:"rounded border px-2 py-1 text-sm",value:m,onChange:r=>c(r.target.value)}),e.jsxs("select",{"aria-label":"Review status",className:"rounded border px-2 py-1 text-sm",value:u,onChange:r=>w(r.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"})]})]}),x.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(Ye,{children:[e.jsx(Ze,{children:e.jsxs(he,{children:[e.jsx(Q,{children:"Status"}),e.jsx(Q,{children:"Paper"}),e.jsx(Q,{children:"Action"}),e.jsx(Q,{children:"Requested"}),e.jsx(Q,{children:"Execution"})]})}),e.jsx(es,{children:x.jobs.map(r=>{const o=Ws(r);return e.jsxs(he,{children:[e.jsx(V,{className:"align-top",children:e.jsx(Us,{status:r.status})}),e.jsx(V,{className:"min-w-[260px] align-top",children:r.paper_route?e.jsxs(e.Fragment,{children:[e.jsx(xe,{to:`/paper/${encodeURIComponent(r.paper_route)}`,className:"font-medium hover:underline",children:r.paper_title}),e.jsxs("div",{className:"mt-1 text-xs cron-muted",children:["Paper #",r.paper_id]})]}):r.kind==="review-benchmark-gaps"?e.jsx("span",{className:"font-medium",children:"Benchmark-gap backlog"}):r.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:r.benchmark_candidate_id})]}):r.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 ",r.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 ",r.candidate_id]})]})}),e.jsxs(V,{className:"whitespace-nowrap align-top",children:[$e[r.kind],r.applied_at&&e.jsxs("div",{className:"mt-1 flex items-center gap-1 text-xs cron-status--healthy",children:[e.jsx(pe,{className:"h-3.5 w-3.5"})," Applied"]})]}),e.jsxs(V,{className:"whitespace-nowrap align-top",children:[e.jsx("div",{children:f(r.created_at)}),e.jsxs("div",{className:"mt-1 text-xs cron-muted",children:["@",r.requested_by]})]}),e.jsxs(V,{className:"max-w-[360px] align-top",children:[r.hf_job_url?e.jsxs("a",{href:r.hf_job_url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 hover:underline",children:["Hugging Face Job ",e.jsx(ee,{className:"h-3.5 w-3.5"})]}):e.jsx("span",{className:"cron-muted",children:"Waiting to dispatch"}),o&&e.jsx("p",{className:`mt-2 line-clamp-3 text-xs ${r.error&&r.status!=="awaiting_markdown"?"text-red-700":"cron-muted"}`,title:o,children:o}),e.jsx(Le,{mutationResult:r.mutation_result}),e.jsxs("div",{className:"mt-2 flex gap-2",children:[["failed","canceled"].includes(r.status)&&e.jsx(C,{size:"sm",variant:"outline",onClick:()=>Y.mutate(r.id),children:"Retry"}),["queued","awaiting_markdown","dispatching","running"].includes(r.status)&&e.jsx(C,{size:"sm",variant:"outline",onClick:()=>je.mutate(r.id),children:"Cancel"}),r.trace_status==="finalize_failed"&&e.jsx(C,{size:"sm",variant:"outline",onClick:()=>ae.mutate(r.id),children:"Retry trace"})]})]})]},r.id)})})]}),x.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"}),x.workflows.map(r=>e.jsxs("details",{className:"rounded-md border p-3",children:[e.jsxs("summary",{className:"cursor-pointer text-sm font-medium",children:["Paper #",r.paper_id," · ",r.cohort_date," · ",r.status," · ",r.policy_version]}),e.jsxs("div",{className:"mt-3 space-y-3 text-xs",children:[r.error&&e.jsx("div",{className:"text-red-700",children:r.error}),r.stages.map(o=>{var T;return e.jsxs("div",{className:"rounded border p-3",children:[e.jsxs("div",{className:"font-medium",children:[$e[o.kind]," · ",o.status," · trace ",o.trace_status," · review ",o.audit_status]}),e.jsxs("div",{className:"mt-1 cron-muted",children:["model ",o.model??"—"," · reasoning ",o.reasoning_effort??"—"," · tokens ",(o.input_tokens??0)+(o.output_tokens??0)," · duration ",o.duration_ms??0," ms · attempts ",o.attempt_count]}),o.error&&e.jsx("div",{className:"mt-2 text-red-700",children:o.error}),o.report&&e.jsx("div",{className:"mt-2 whitespace-pre-wrap rounded border p-2",children:o.report}),o.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(o.url_candidates,null,2)})]}),o.validation_summary&&e.jsx("pre",{className:"mt-2 max-h-40 overflow-auto whitespace-pre-wrap",children:JSON.stringify(o.validation_summary,null,2)}),Array.isArray((T=o.validation_summary)==null?void 0:T.manual_or_legacy_evaluation_rows_affected)&&o.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: ",o.validation_summary.manual_or_legacy_evaluation_rows_affected.join(", "),". Review the evidence and before/after diff."]}),o.proposal&&e.jsx("pre",{className:"mt-2 max-h-52 overflow-auto whitespace-pre-wrap",children:JSON.stringify(o.proposal,null,2)}),e.jsx(Le,{mutationResult:o.mutation_result}),o.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(o.mutation_result,null,2)})]}),o.trace_status==="complete"&&e.jsxs("a",{className:"mt-2 inline-flex items-center gap-1 hover:underline",href:`/api/v1/admin/codex-curation/jobs/${o.id}/trace`,target:"_blank",rel:"noreferrer",children:["Authenticated trace manifest ",e.jsx(ee,{className:"h-3.5 w-3.5"})]})]},o.id)})]})]},r.id))]}),x.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"}),x.benchmark_candidates.map(r=>{var z,H;const o=E[r.id]??{dataset:"",task:((z=r.task_ids[0])==null?void 0:z.toString())??"",metric:""},T=Number(o.dataset)>0&&Number(o.task)>0&&o.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:[r.canonical_name," · ",r.gap_type," · ",r.status]}),e.jsxs("div",{className:"cron-muted",children:[r.distinct_paper_count," paper",r.distinct_paper_count===1?"":"s"," · ",r.confidence??"unknown"," confidence"]})]}),r.canonical_url&&e.jsx("a",{className:"mt-1 block hover:underline",href:r.canonical_url,target:"_blank",rel:"noreferrer",children:r.canonical_url}),e.jsxs("div",{className:"mt-1 cron-muted",children:["Task evidence: ",r.task_ids.join(", ")||"none"," · Papers: ",r.evidence_paper_ids.join(", ")]}),r.review_reason&&e.jsxs("div",{className:"mt-1",children:["Review",r.reviewed_at?` ${f(r.reviewed_at)}`:"",": ",r.review_reason,r.deferred_until&&` · deferred until ${f(r.deferred_until)}`]}),r.resolution&&e.jsxs("div",{className:"mt-1 cron-muted",children:["Dataset #",r.resolution.dataset_id," · task #",r.resolution.task_id," · ",r.resolution.primary_metric,r.resolution.rolled_back_at&&` · rolled back ${f(r.resolution.rolled_back_at)}`]}),r.status==="promoted"&&((H=r.resolution)==null?void 0:H.created)&&!r.resolution.rolled_back_at&&e.jsx(C,{className:"mt-2",size:"sm",variant:"outline",disabled:B.isPending,onClick:()=>B.mutate(r.id),children:"Roll back automatic benchmark"}),!["promoted","merged"].includes(r.status)&&e.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",children:[["dataset","task","metric"].map(O=>e.jsx("input",{"aria-label":`${r.canonical_name} ${O}`,className:"w-36 rounded border px-2 py-1",placeholder:O==="metric"?"Exact metric":`${O} ID`,value:o[O],onChange:l=>g(M=>({...M,[r.id]:{...o,[O]:l.target.value}}))},O)),e.jsx(C,{size:"sm",variant:"outline",disabled:!T||J.isPending,onClick:()=>J.mutate({id:r.id,...o}),children:"Promote & requeue evidence papers"})]})]},r.id)}),J.error&&e.jsx("div",{className:"cron-message cron-message--error",children:J.error.message}),B.error&&e.jsx("div",{className:"cron-message cron-message--error",children:B.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 ",f(x.timestamp)]})]})]})]})}function Gs(){const[s,a]=h.useState(()=>new Date().toISOString().slice(0,10)),[n,t]=h.useState(1),i=X({queryKey:["paper-edit-digest",s,n],queryFn:()=>Ee.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:d=>{a(d.target.value),t(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,p)=>e.jsxs("li",{children:[e.jsxs(xe,{className:"underline",to:`/paper/${d.paper_id}`,children:["Paper ",d.paper_id]})," · @",d.actor_username??"admin"," · ",d.edits," changes"]},p))}),e.jsxs("div",{className:"flex gap-2",children:[n>1&&e.jsx(C,{variant:"outline",onClick:()=>t(n-1),children:"Previous"}),i.data.has_more&&e.jsx(C,{variant:"outline",onClick:()=>t(n+1),children:"Next"})]})]})]})}const Ks=()=>{var p,N,k,m;const s=Fe(),a=ks({queryKey:["catalog-audit"],queryFn:({pageParam:c})=>ue.audit(c),initialPageParam:void 0,getNextPageParam:c=>c.next_cursor??void 0}),n=((p=a.data)==null?void 0:p.pages.flatMap(c=>c.events))??[],t=D({mutationFn:()=>ue.acknowledgeAudit(),onSuccess:()=>s.invalidateQueries({queryKey:["catalog-audit"]})}),i=D({mutationFn:c=>ue.rollbackEvent(c),onSuccess:()=>s.invalidateQueries({queryKey:["catalog-audit"]})}),d=D({mutationFn:({subject:c,suspended:u})=>Ee.suspend(c,u),onSuccess:()=>s.invalidateQueries({queryKey:["catalog-audit"]})});return e.jsxs("div",{className:"space-y-4",children:[e.jsx(Gs,{}),(i.error||d.error)&&e.jsx("p",{role:"alert",children:(N=i.error||d.error)==null?void 0:N.message}),e.jsxs(v,{children:[e.jsxs(b,{className:"flex-row items-center justify-between",children:[e.jsx(y,{children:"Catalog mutation audit"}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"text-sm font-medium",children:[((m=(k=a.data)==null?void 0:k.pages[0])==null?void 0:m.unread_contributor_count)??0," unread contributor changes"]}),e.jsx(C,{variant:"outline",size:"sm",onClick:()=>t.mutate(),disabled:t.isPending,children:"Mark read"})]})]}),e.jsxs(_,{className:"space-y-3",children:[a.isLoading&&e.jsx("p",{children:"Loading audit history…"}),a.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(C,{className:"mt-3 mr-2",variant:"outline",size:"sm",disabled:d.isPending,onClick:()=>d.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(C,{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)),a.hasNextPage&&e.jsx(C,{variant:"outline",onClick:()=>a.fetchNextPage(),disabled:a.isFetchingNextPage,children:a.isFetchingNextPage?"Loading…":"Load older events"})]})]})]})},Pe={hourly:"cron-status--running",daily:"cron-status--healthy",weekly:"cron-status--degraded",systemd:"cron-status--running"},$=s=>`$${(s/1e6).toFixed(2)}`,Qs=({data:s,loading:a,error:n})=>{const[t,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(a)return e.jsxs("div",{className:"flex items-center py-12",children:[e.jsx(I,{className:"h-6 w-6 animate-spin mr-3"}),"Loading chat compute…"]});if(n||!s)return e.jsx(v,{className:"cron-status--broken",children:e.jsx(_,{className:"pt-6",children:"Chat compute accounting is unavailable."})});const p=Math.min(100,s.effective_microusd/s.application_cap_microusd*100),N=s.circuit_state==="tripped"?"Chat disabled":s.circuit_state==="warning"?"Operator warning":"Enabled",k=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(v,{className:s.circuit_state==="tripped"?"cron-status--broken":s.circuit_state==="warning"?"cron-status--degraded":"",children:[e.jsx(b,{children:e.jsx(y,{className:"text-sm",children:"Circuit"})}),e.jsxs(_,{children:[e.jsx("div",{className:"text-2xl font-bold",children:N}),e.jsx("p",{className:"text-xs cron-muted",children:s.trip_reason??"Policy armed"})]})]}),e.jsxs(v,{children:[e.jsx(b,{children:e.jsx(y,{className:"text-sm",children:"Month to date"})}),e.jsxs(_,{children:[e.jsx("div",{className:"text-2xl font-bold",children:$(s.effective_microusd)}),e.jsx("div",{role:"progressbar","aria-label":"Application cap used","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(p),className:"h-2 rounded bg-muted mt-3",children:e.jsx("div",{className:"h-2 rounded bg-primary",style:{width:`${p}%`}})})]})]}),e.jsxs(v,{children:[e.jsx(b,{children:e.jsx(y,{className:"text-sm",children:"Application headroom"})}),e.jsxs(_,{children:[e.jsx("div",{className:"text-2xl font-bold",children:$(s.remaining_microusd)}),e.jsxs("p",{className:"text-xs cron-muted",children:["Cap ",$(s.application_cap_microusd)]})]})]}),e.jsxs(v,{children:[e.jsx(b,{children:e.jsx(y,{className:"text-sm",children:"Live compute"})}),e.jsxs(_,{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(v,{children:[e.jsxs(b,{children:[e.jsx(y,{children:"Accounting and policy"}),e.jsxs(q,{children:[s.environment," · cycle ",s.billing_cycle]})]}),e.jsxs(_,{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:t,onChange:m=>i(m.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[t]," · Workspace $250"]})]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Conservative estimate"}),e.jsx("br",{}),$(s.estimated_microusd)]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Provider-reported floor"}),e.jsx("br",{}),$(s.provider_floor_microusd)," · ",e.jsx(S,{children:k})]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Provider backstops"}),e.jsx("br",{}),s.environment_cap_microusd===null?"Starter: no Environment cap":`Environment ${$(s.environment_cap_microusd)}`," · Workspace ",$(s.workspace_cap_microusd)]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Active thresholds"}),e.jsx("br",{}),"Warning ",$(s.warning_microusd)," · trip ",$(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",{}),f(s.cycle_end_at)]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Last metered"}),e.jsx("br",{}),s.last_metered_at?f(s.last_metered_at):"Unavailable"]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Provider reconciliation"}),e.jsx("br",{}),s.last_reconciled_at?f(s.last_reconciled_at):"Unavailable",s.last_reconciliation_attempt_at?` · attempted ${f(s.last_reconciliation_attempt_at)}`:"",s.next_reconciliation_at?` · next ${f(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":`${$(s.burn_rate_microusd_per_hour)}/hour${s.projected_cap_hit_at?` · cap ${f(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} · ${$(s.prior_cycle.effective_microusd)}`:"Not enough data"]})]})]}),e.jsxs(v,{children:[e.jsx(b,{children:e.jsx(y,{children:"Live lifecycle"})}),e.jsx(_,{className:"text-sm",children:Object.entries(s.live_states).map(([m,c])=>e.jsxs("span",{className:"mr-4",children:[m,": ",c]},m))})]}),e.jsxs(v,{children:[e.jsx(b,{children:e.jsx(y,{children:"Daily spend"})}),e.jsx(_,{children:s.daily_spend.length?e.jsx("ul",{className:"space-y-1 text-sm",children:s.daily_spend.map(m=>e.jsxs("li",{children:[m.date,": blank ",$(m.blank_pool_microusd)," · assigned ",$(m.assigned_microusd)]},m.date))}):e.jsx("p",{className:"cron-muted",children:"No compute recorded in this cycle."})})]}),e.jsxs(v,{children:[e.jsxs(b,{children:[e.jsx(y,{children:"Recent circuit events"}),e.jsx(q,{children:"Runbook: docs/chat-sandbox-spend-runbook.md"})]}),e.jsx(_,{children:s.events.length?e.jsx("ul",{className:"space-y-2 text-sm",children:s.events.map(m=>e.jsxs("li",{children:[e.jsx(S,{children:m.severity})," ",m.type," · ",f(m.created_at)]},m.id))}):e.jsx("p",{className:"cron-muted",children:"No events in this cycle."})})]})]})},Vs=({data:s,loading:a,error:n})=>{if(a)return e.jsxs("div",{className:"flex items-center py-8",children:[e.jsx(I,{className:"h-5 w-5 animate-spin mr-3"}),"Loading web-search budget…"]});if(n||!s)return e.jsx(v,{className:"cron-status--broken",children:e.jsx(_,{className:"pt-6",children:"Web-search budget accounting is unavailable."})});const t=Math.min(100,s.call_count/s.hard_limit_calls*100);return e.jsxs(v,{className:s.circuit_state==="tripped"?"cron-status--broken":s.circuit_state==="warning"||s.circuit_state==="cooldown"?"cron-status--degraded":"",children:[e.jsxs(b,{children:[e.jsx(y,{children:"Web search"}),e.jsxs(q,{children:[s.environment," · UTC cycle ",s.billing_cycle," · provider details are admin-only"]})]}),e.jsxs(_,{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(t),className:"h-2 rounded bg-muted",children:e.jsx("div",{className:"h-2 rounded bg-primary",style:{width:`${t}%`}})}),e.jsxs("p",{className:"text-xs cron-muted",children:["Cycle ends ",f(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 ${f(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," · ",f(i.created_at),i.error_class?` · ${i.error_class}`:""]},i.id))})]})]})},Xs=({data:s})=>s!=null&&s.snapshot_stale?e.jsx(v,{className:"mb-6 cron-status--degraded",role:"status",children:e.jsx(_,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center gap-3 text-sm",children:[e.jsx(I,{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,Ys=(s,a)=>s!=null&&s.snapshot_stale||s!=null&&s.refreshing?5e3:a?3e4:!1,Na=()=>{const s=ms(),[a,n]=h.useState(!0),[t,i]=h.useState(!1),[d,p]=h.useState(0),[N,k]=h.useState(""),[m,c]=h.useState(""),[u,w]=h.useState(new Set),E=h.useRef(!1),{user:g}=os(),{data:j,isLoading:x,error:R,refetch:oe}=X({queryKey:["cronStatus",g==null?void 0:g.username],queryFn:()=>{const l=E.current;return E.current=!1,ve.getCronStatus(l)},enabled:!!(g!=null&&g.is_admin),refetchInterval:l=>Ys(l.state.data,a),retry:!1}),L=X({queryKey:["paperMarkdownJobs",g==null?void 0:g.username],queryFn:()=>ve.getPaperMarkdownJobs(),enabled:!!(g!=null&&g.is_admin),refetchInterval:a?3e4:!1,retry:!1}),F=X({queryKey:["chatSandboxSpend",g==null?void 0:g.username,m],queryFn:()=>be.getSandboxSpend(m||void 0),enabled:!!(g!=null&&g.is_admin),refetchInterval:a?3e4:!1,retry:!1}),Y=X({queryKey:["chatWebSearchBudget",g==null?void 0:g.username],queryFn:()=>be.getWebSearchBudget(),enabled:!!(g!=null&&g.is_admin)&&s,refetchInterval:a?3e4:!1,retry:!1}),ae=(R&&typeof R=="object"&&"status"in R?R.status:void 0)===401?"Unauthorized. Sign in with an allowlisted Hugging Face admin account.":R instanceof Error?R.message:void 0,re=l=>{w(M=>{const U=new Set(M);return U.has(l)?U.delete(l):U.add(l),U})},J=(j==null?void 0:j.jobs.filter(l=>l.dashboard_group==="leaderboard_sync"))??[],B=(j==null?void 0:j.jobs.filter(l=>l.category!=="manual"&&l.dashboard_group!=="leaderboard_sync"))??[],ne=B.filter(l=>l.critical),te=B.filter(l=>!l.critical),r=(j==null?void 0:j.manual_operations)??[],o=!!(x||t||j!=null&&j.refreshing),T=te.reduce((l,M)=>(l[M.category]||(l[M.category]=[]),l[M.category].push(M),l),{}),z=Object.keys(T).sort((l,M)=>{const U=["systemd","hourly","daily","weekly","backfill"];return U.indexOf(l)-U.indexOf(M)}),H=l=>e.jsx(Os,{job:l,expanded:u.has(l.job_name),onToggle:()=>re(l.job_name),paperMarkdownJobs:l.job_name==="paper_markdown_backfill"?L.data:void 0,paperMarkdownJobsLoading:l.job_name==="paper_markdown_backfill"?L.isLoading:!1,paperMarkdownJobsError:l.job_name==="paper_markdown_backfill"?L.error:null},l.job_name),O=async()=>{p(l=>l+1),E.current=!0,i(!0);try{await Promise.all([oe(),L.refetch(),F.refetch()])}finally{i(!1)}};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(ie,{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(C,{asChild:!0,variant:"outline",size:"sm",children:e.jsx(xe,{to:"/autonomous-operations",children:"Autonomous operations"})}),e.jsxs(C,{variant:"outline",size:"sm",onClick:()=>n(!a),className:a?"cron-status--running":"",children:[e.jsx(Ne,{className:`h-4 w-4 mr-2 ${a?"animate-spin":""}`}),"Auto-refresh ",a?"ON":"OFF"]}),e.jsxs(C,{variant:"outline",size:"sm",onClick:()=>void O(),disabled:o,children:[e.jsx(Ne,{className:`h-4 w-4 mr-2 ${o?"animate-spin":""}`}),"Refresh"]})]})]})}),e.jsx(v,{className:"mb-6",children:e.jsx(_,{className:"pt-6",children:e.jsxs("p",{className:"text-sm cron-muted",children:["Signed in as ",e.jsxs("span",{className:"font-semibold",children:["@",g==null?void 0:g.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(Xs,{data:j}),e.jsxs(Ts,{defaultValue:"critical-jobs",children:[e.jsxs(Ve,{className:"grid h-auto w-full grid-cols-2 sm:w-auto sm:grid-cols-5",children:[e.jsx(G,{value:"critical-jobs",children:"Critical Jobs"}),e.jsx(G,{value:"leaderboard-syncs",children:"Leaderboard Syncs"}),e.jsx(G,{value:"codex-paper-jobs",children:"Codex Paper Jobs"}),e.jsx(G,{value:"catalog-audit",children:"Catalog Audit"}),e.jsx(G,{value:"chat-compute",children:"Chat Compute"})]}),e.jsxs(K,{value:"critical-jobs",className:"mt-6",children:[x&&e.jsxs("div",{className:"flex items-center justify-center py-12",children:[e.jsx(I,{className:"h-8 w-8 animate-spin cron-info-text"}),e.jsx("span",{className:"ml-3 cron-muted",children:"Loading CRON jobs status..."})]}),R&&e.jsx(v,{className:"cron-status--broken",children:e.jsx(_,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(se,{className:"h-5 w-5"}),e.jsx("p",{children:ae??"Failed to load CRON jobs status. Please try again."})]})})}),j&&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(l=>e.jsxs(v,{children:[e.jsx(b,{className:"pb-2",children:e.jsx(y,{className:"text-sm font-medium cron-muted capitalize",children:l})}),e.jsx(_,{children:e.jsx("div",{className:"text-2xl font-bold",children:j.summary[l]})})]},l))}),j.summary.critical_issues.length>0&&e.jsxs(v,{className:"mb-6 cron-status--broken",children:[e.jsx(b,{children:e.jsxs(y,{className:"flex items-center gap-2",children:[e.jsx(Ae,{className:"h-5 w-5"}),"Critical job issues"]})}),e.jsx(_,{children:e.jsx("ul",{className:"list-disc pl-5 space-y-1 text-sm",children:j.summary.critical_issues.map(l=>e.jsx("li",{children:l},l))})})]}),e.jsxs(v,{className:"mb-8",children:[e.jsx(b,{children:e.jsx(y,{className:"text-base",children:"What to check next"})}),e.jsxs(_,{children:[e.jsx("p",{className:"text-sm cron-muted",children:j.summary.what_to_check_next}),e.jsxs("p",{className:"mt-2 text-xs cron-muted flex items-center gap-2",children:[e.jsx(Me,{className:"h-4 w-4"}),"Last updated: ",f(j.timestamp)," · Health score:"," ",j.summary.health_score.toFixed(0),"%"]})]})]}),e.jsxs(v,{className:`mb-8 ${j.summary.coverage.coverage_gaps?"cron-status--broken":""}`,children:[e.jsxs(b,{children:[e.jsx(y,{className:"text-base",children:"Coverage"}),e.jsx(q,{children:"Registry and deployed scheduler inventory"})]}),e.jsxs(_,{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:j.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:j.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:j.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:j.summary.coverage.coverage_gaps})]})]})]}),e.jsxs(v,{className:"mb-8",children:[e.jsxs(b,{children:[e.jsx(y,{className:"text-xl",children:"Critical jobs"}),e.jsx(q,{children:"Writers whose stale output breaks the live site"})]}),e.jsx(_,{className:"space-y-4",children:ne.map(H)})]}),e.jsx("div",{className:"space-y-6",children:z.map(l=>e.jsxs(v,{children:[e.jsx(b,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(y,{className:"text-xl capitalize flex items-center gap-2",children:[e.jsx(S,{className:Pe[l]??Pe.hourly,children:l}),e.jsx("span",{children:"Supporting jobs"})]}),e.jsxs(q,{children:[T[l].length," job",T[l].length!==1?"s":""]})]})}),e.jsx(_,{className:"space-y-4",children:T[l].map(H)})]},l))}),r.length>0&&e.jsxs(v,{className:"mt-6",children:[e.jsxs(b,{children:[e.jsx(y,{className:"text-xl",children:"Manual operations"}),e.jsx(q,{children:"Visible invocation history; excluded from scheduled health and coverage"})]}),e.jsx(_,{className:"space-y-4",children:r.map(H)})]})]})]}),e.jsxs(K,{value:"leaderboard-syncs",className:"mt-6",children:[x&&e.jsxs("div",{className:"flex items-center justify-center py-12",children:[e.jsx(I,{className:"h-8 w-8 animate-spin cron-info-text"}),e.jsx("span",{className:"ml-3 cron-muted",children:"Loading leaderboard sync status..."})]}),R&&e.jsx(v,{className:"cron-status--broken",children:e.jsx(_,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(se,{className:"h-5 w-5"}),e.jsx("p",{children:ae??"Failed to load leaderboard sync status. Please try again."})]})})}),j&&e.jsxs(v,{children:[e.jsx(b,{children:e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx(y,{className:"text-xl",children:"Leaderboard syncs"}),e.jsx(q,{children:"Recurring imports from externally maintained benchmark leaderboards"})]}),e.jsxs(S,{children:[J.length," jobs"]})]})}),e.jsx(_,{className:"space-y-4",children:J.map(H)})]})]}),e.jsx(K,{value:"codex-paper-jobs",className:"mt-6",children:e.jsx(zs,{autoRefresh:a,refreshToken:d})}),e.jsx(K,{value:"catalog-audit",className:"mt-6",children:e.jsx(Ks,{})}),e.jsxs(K,{value:"chat-compute",className:"mt-6",children:[e.jsxs(v,{className:"mb-6",children:[e.jsxs(b,{children:[e.jsx(y,{children:"Environment record"}),e.jsx(q,{children:"Leave blank for live staging, or enter the isolated environment printed by the spend qualification command."})]}),e.jsxs(_,{className:"flex gap-2",children:[e.jsx("input",{"aria-label":"Chat compute environment record",value:N,onChange:l=>k(l.target.value),placeholder:"staging-q-example",className:"flex-1 rounded border px-3 py-2"}),e.jsx(C,{onClick:()=>c(N.trim()),children:"Load"})]})]}),e.jsx(Qs,{data:F.data,loading:F.isLoading,error:F.error}),s&&e.jsx("div",{className:"mt-6",children:e.jsx(Vs,{data:Y.data,loading:Y.isLoading,error:Y.error})})]})]})]})})};export{Qs as ChatComputePanel,Xs as CronSnapshotNotice,Ys as cronStatusRefetchInterval,Na as default};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/CronDashboard-DZ_espzl.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import{n as D,r as x,F as is,v as cs,j as e,t as ie,a8 as ls,R as ds,I as os,x as oe,P as ms,z as us,G as Re,B as $,f as xe,A as Te,L as pe,a as hs,m as xs}from"./index-D6jcIRWs.js";import{u as z}from"./useQuery-CUJUm4FY.js";import{u as L}from"./useMutation-p6mN4h17.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-B0sjsUM_.js";import{B as I}from"./badge-t4oak8yc.js";import{B as y}from"./button-Bzx0ccHH.js";import{C as ps,a as gs}from"./chevron-up-CQKUhZ0S.js";import{D as fe}from"./database-DKdKRr_t.js";import{T as js}from"./trending-up-DqN3HzZ5.js";import{A as ne}from"./activity-5IcAhZoH.js";import{F as Ne}from"./file-text-4G2I5_Zo.js";import{T as Ee,I as vs}from"./triangle-alert-Cypc2KaL.js";import{E as X}from"./external-link-C_yz2sXa.js";import{C as Y,R as be}from"./refresh-cw-Qmu3JZxd.js";import{L as R}from"./loader-circle-BuDrH29B.js";import{C as je}from"./circle-check-BZn9Lr76.js";import{c as E,A as _s}from"./codex-P8vYbo4B.js";import{u as fs}from"./useInfiniteQuery-FXco4P1n.js";import{p as Me}from"./paperEdits-DUTCoe5T.js";import{c as me}from"./catalog-PYrB8_bm.js";import{c as ye}from"./chat-ChnK8XDU.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/{ExternalSourceEvalBadge-TyFEU7vd.js → ExternalSourceEvalBadge-DfhTt9yv.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{c as o}from"./papers-
|
|
|
|
| 1 |
+
import{c as o}from"./papers-DIIIPDpj.js";import{a5 as g,j as a,L as l}from"./index-D6jcIRWs.js";import{H as u,a as c,b as d}from"./hover-card-DPpv0l_x.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-EM1uL5u1.js → FeedView-L-eiYDg9.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{j as e,L as D,a as Ce,b as Fe,r as h,h as Le,C as De,c as ve,d as Ae,e as Ee,f as Re,i as qe,g as oe,k as Ne,l as Me}from"./index-CqKcHUvZ.js";import{S as Ie}from"./sparkles-BKRdZneA.js";import{u as R}from"./useQuery-Cngk7eL9.js";import{D as He,a as Ke,b as Oe}from"./dialog-B-oqHDuH.js";import{c as se}from"./catalog-D26nGNnK.js";import{T as ge,r as Q}from"./research-Dt0MUW0x.js";import{d as ne,t as fe}from"./colors-_scCXfCe.js";import{u as ke,a as Se,s as $e,b as ze,r as xe,c as be,d as Be}from"./researchTopic-k4qgoW39.js";import{P as Ue}from"./plus-DZF-NxR0.js";import{A as Ge}from"./arrow-right-DCfHXCdw.js";import{P as Qe}from"./components-Dmnn5Z5p.js";import{M as Xe}from"./McpShowcase-oHgWM9FI.js";import{r as We,P as Ye,w as Ve}from"./PaperDateFilter-zHw5tq6B.js";import{u as Je,a as Ze,P as es,i as ss,A as ts,b as as,S as z,c as is,D as te,q as os,d as ns}from"./chatSessions-D75G2_U7.js";import{c as rs}from"./chat-DGBJkcmd.js";import{u as ls}from"./usePapers-By3yMmMn.js";import{p as cs,a as ds}from"./papers-bE3C_Qzl.js";import{u as us}from"./useInfiniteScroll-DVF-b-LX.js";import{S as $}from"./skeleton-DleNhBYA.js";import{A as ae,a as ie}from"./alert-Z2yFUcyL.js";import{u as we}from"./useInfiniteQuery-lxaMAHEu.js";import"./useMutation-BItMAQ7s.js";import"./AuthorAvatar-CWCqOa0h.js";import"./LatexTitle-BI9yl-Fo.js";import"./safeExternalHref-CkBrsh84.js";import"./AgentLogos-ClqC1BaK.js";import"./popover-BcoS9Jmp.js";import"./useIntersectionObserver-CiBk_Oug.js";function ps({onBuild:i}){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."}),i&&e.jsxs("button",{type:"button",className:"research-topic-save following-intro-topic",onClick:i,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(D,{to:"/settings",children:"Settings"}),"."]})]})}const je=16;function hs({open:i,onOpenChange:r}){return e.jsx(He,{open:i,onOpenChange:r,children:e.jsx(Ke,{className:"topic-dialog","aria-describedby":void 0,children:e.jsx(ms,{onDone:()=>r(!1)})})})}function ms({onDone:i}){var B,X,W,Y,V,J,K;const{user:r}=Ce(),g=Fe(),d=R({queryKey:["research-topic",r==null?void 0:r.hf_subject],queryFn:Q.topic,enabled:!!r}),t=R({queryKey:["research-follows",r==null?void 0:r.hf_subject],queryFn:Q.follows,enabled:!!r}),b=R({queryKey:["trending-tasks-follow"],queryFn:()=>se.trendingTasks({limit:je,level:0}),staleTime:10*60*1e3}),j=R({queryKey:["trending-methods-follow"],queryFn:()=>se.trendingMethods({limit:je}),staleTime:10*60*1e3}),c=R({queryKey:["research-follow-suggestions"],queryFn:Q.followSuggestions,staleTime:10*60*1e3}),v=(n=[])=>n.map(p=>({id:String(p.entity_id),name:p.name,image:p.image_url})),[P,A]=h.useState(null),[T,F]=h.useState([]),_=ke(),q=Se(),w=((B=d.data)==null?void 0:B.text)??"",o=P??w,S=o.trim().replace(/\s+/g," "),N=((X=d.data)==null?void 0:X.status)==="failed"&&S===w,m=S.length>=3&&(S!==w||N),C=_.isPending||q.isPending,a=(n,p)=>{var y;return((y=t.data)==null?void 0:y.some(k=>k.kind===n&&String(k.entity_id)===p))??!1},f=(n,p)=>{var y;return((y=T.find(k=>k.kind===n&&k.id===p))==null?void 0:y.follow)??a(n,p)},u=T.filter(n=>n.follow!==a(n.kind,n.id)),E=!C&&(m||u.length>0),M=(n,p,y)=>F(k=>[...k.filter(U=>U.kind!==n||U.id!==p),{kind:n,id:p,name:y,follow:!f(n,p)}]),I=()=>{if(!E)return;if(!r){m&&$e(S),u.length&&ze(u),window.location.href=Le(`${g.pathname}${g.search}`);return}const n=[...u.length?[q.mutateAsync(u)]:[],...m?[_.mutateAsync(S)]:[]];Promise.allSettled(n).then(p=>{p.every(y=>y.status==="fulfilled")&&i()})},H=(n,p,y,k)=>{const Z=[...(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})),...y.filter(x=>!a(p,x.id)).map(x=>({...x,suggested:!0}))];return Z.length>0&&e.jsxs("div",{className:"topic-dialog-group",children:[e.jsx("h3",{children:n}),e.jsxs(gs,{children:[Z.map(x=>{const O=f(p,x.id),G=p==="task"?ne(x.name,x.slug??void 0):x.name;return e.jsxs("button",{type:"button",className:"topic-dialog-chip","aria-pressed":O,disabled:C,"data-suggested":"suggested"in x||void 0,onClick:()=>M(p,x.id,G),children:[O?e.jsx(De,{"aria-hidden":"true"}):e.jsx(Ue,{"aria-hidden":"true"}),(p==="author"||p==="organization")&&e.jsx(fs,{kind:p,name:G,src:x.image}),G]},x.id)}),k&&e.jsxs(D,{to:k.to,className:"topic-dialog-browse",children:[k.label,e.jsx(Ge,{"aria-hidden":"true"})]})]})]})};return e.jsxs("form",{className:"topic-dialog-form",onSubmit:n=>{n.preventDefault(),I()},children:[e.jsx(Oe,{className:"topic-dialog-title",children:w||(W=t.data)!=null&&W.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:ge,"aria-label":"Research topic",placeholder:"e.g. diffusion policies for robot manipulation, or speculative decoding for LLM inference",value:o,onChange:n=>A(n.target.value),onKeyDown:n=>{n.key==="Enter"&&!n.shiftKey&&!n.nativeEvent.isComposing&&(n.preventDefault(),I())}}),e.jsxs("span",{className:"research-topic-count",children:[o.length,"/",ge]})]}),H("Trending tasks","task",((Y=b.data)==null?void 0:Y.results)??[],{to:"/tasks",label:"Browse tasks"}),H("Trending methods","method",((V=j.data)==null?void 0:V.results)??[],{to:"/methods",label:"Browse methods"}),H("Benchmarks","benchmark",[],{to:"/tasks",label:"Browse benchmarks"}),H("Popular authors","author",v((J=c.data)==null?void 0:J.authors)),H("Popular organizations","organization",v((K=c.data)==null?void 0:K.organizations),{to:"/organizations",label:"Browse organizations"}),(_.error||q.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:[w&&e.jsx("button",{type:"button",className:"research-follow-action topic-dialog-remove",disabled:C,onClick:()=>_.mutate(null,{onSuccess:i}),children:"Remove topic"}),e.jsx("button",{type:"button",className:"research-follow-action",disabled:C,onClick:i,children:"Cancel"}),e.jsx("button",{type:"submit",className:"research-topic-save",disabled:!E,children:u.some(n=>n.follow===!1)?"Save":u.length?"Follow":N?"Retry":w?"Update topic":"Follow"})]})]})}function gs({children:i}){const r=h.useRef(null);return h.useLayoutEffect(()=>{const g=r.current;if(!g)return;const d=()=>{const t=[...g.children],b=t.filter(c=>c.dataset.suggested);b.forEach(c=>{c.hidden=!1});const j=()=>new Set(t.filter(c=>!c.hidden).map(c=>c.offsetTop)).size;for(let c=b.length-1;c>=0&&j()>2;c--)b[c].hidden=!0};return d(),window.addEventListener("resize",d),()=>window.removeEventListener("resize",d)}),e.jsx("div",{ref:r,className:"topic-dialog-chips",children:i})}function fs({kind:i,name:r,src:g}){const[d,t]=h.useState(!1);if(g&&!d)return e.jsx("img",{className:`topic-dialog-chip-image is-${i}`,src:g,alt:"",loading:"lazy",onError:()=>t(!0)});if(i!=="author")return null;const b=r.split(/\s+/).filter(Boolean).map(j=>j[0]).slice(0,2).join("").toUpperCase();return e.jsx("span",{className:"topic-dialog-chip-image is-author is-initials","aria-hidden":"true",children:b})}const ye=45,xs=1800,bs=25,ws=350,js=i=>{const[r,g]=h.useState(z[0].slice(0,1)),[d,t]=h.useState(0);return h.useEffect(()=>{var A,T;if(!i)return;if((T=(A=window.matchMedia)==null?void 0:A.call(window,"(prefers-reduced-motion: reduce)"))!=null&&T.matches){g(z[0]),t(0);return}let b=0,j=1,c=!1,v;g(z[0].slice(0,j)),t(0);const P=()=>{const F=z[b];if(!c){if(j+=1,g(F.slice(0,j)),j===F.length){c=!0,v=window.setTimeout(P,xs);return}v=window.setTimeout(P,ye);return}if(j-=1,g(F.slice(0,j)),j===0){c=!1,b=(b+1)%z.length,t(b),v=window.setTimeout(P,ws);return}v=window.setTimeout(P,bs)};return v=window.setTimeout(P,ye),()=>window.clearTimeout(v)},[i]),{placeholder:r,prompt:z[d]}},ys=()=>{var C;const i=ve(),r=Ne(),[g,d]=h.useState({text:"",paperMentions:[]}),t=g.text,[b,j]=h.useState(0),[c,v]=h.useState(!1),[P,A]=h.useState(null),{placeholder:T,prompt:F}=js(!t),_=h.useRef(null),q=R({queryKey:["chatAvailability"],queryFn:()=>rs.getAvailability(),retry:!1,enabled:oe()}),w=oe()&&((C=q.data)==null?void 0:C.paper_mentions_enabled)!==!1,o=Je({draft:g,onChange:d,enabled:w,textareaRef:_}),S=Ze(g,o.open),N=t?S.completion:F;h.useLayoutEffect(()=>{const a=_.current;if(!a)return;const f=()=>{if(a.style.height="auto",t){a.style.height=`${Math.min(is(a),160)}px`;return}const u=a.placeholder,E=z.reduce((M,I)=>(a.placeholder=I,Math.max(M,a.scrollHeight)),0);a.placeholder=u,a.style.height=`${Math.min(E,160)}px`};return f(),window.addEventListener("resize",f),()=>window.removeEventListener("resize",f)},[t,N]);const m=async(a=g)=>{const f=a.text.trim();if(!(!f||c)){if(r){const u=new URLSearchParams({q:f,model:te}),E=`${Me}?${u}`,M=window.open(E,"_blank");if(!M){A(E);return}M.opener=null,A(null),d({text:"",paperMentions:[]});return}v(!0),os(a,te);try{const u=await ns(te);i(`/chat/${u.id}`)}catch{i("/chat")}}};return e.jsxs(e.Fragment,{children:[!r&&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(es,{text:g.text,mentions:g.paperMentions,scrollTop:b,variant:"home",completion:t?N:""}),e.jsx("textarea",{ref:_,rows:1,value:t,placeholder:T,"aria-label":"Ask the assistant",disabled:c,onChange:a=>{o.updateText(a.target.value,a.target.selectionStart),S.trackCaret(a.target)},onSelect:a=>{o.refresh(a.currentTarget.selectionStart),S.trackCaret(a.currentTarget)},onClick:a=>{o.refresh(a.currentTarget.selectionStart),S.trackCaret(a.currentTarget)},onScroll:a=>j(a.currentTarget.scrollTop),onBlur:a=>{var f,u;(u=(f=a.relatedTarget)==null?void 0:f.closest)!=null&&u.call(f,".chat-paper-picker")||window.setTimeout(o.close,0)},onKeyDown:a=>{if(!o.keyDown(a)){if(ss(a)&&N){a.preventDefault();const f=t+N;o.updateText(f,f.length),window.requestAnimationFrame(()=>{var u;return(u=_.current)==null?void 0:u.setSelectionRange(f.length,f.length)});return}a.key==="Enter"&&!a.shiftKey&&(a.preventDefault(),m())}},role:w?"combobox":void 0,"aria-expanded":w?o.open:void 0,"aria-controls":o.open?o.pickerId:void 0,"aria-activedescendant":o.open&&o.results.length?`${o.optionIdPrefix}-${o.activeIndex}`:void 0,"aria-autocomplete":w?"list":void 0,"aria-describedby":o.message?"ask-home-paper-mention-message":void 0})]}),e.jsx("button",{type:"button",className:`chat-send${t.trim()?" chat-send-on":""}`,onClick:()=>void m(),disabled:!t.trim()||c,"aria-label":"Ask the assistant",children:e.jsx(ts,{})})]}),P&&e.jsx("div",{className:"chat-paper-mention-message",role:"alert",children:e.jsx("a",{href:P,target:"_blank",rel:"noreferrer",children:"Open this question on paperswithcode.co"})}),o.message&&e.jsx("div",{id:"ask-home-paper-mention-message",className:"chat-paper-mention-message",role:"alert",children:o.message}),e.jsx(as,{open:o.open,query:o.query,results:o.results,activeIndex:o.activeIndex,loading:o.loading,error:o.error,onSelect:o.select,id:o.pickerId,optionIdPrefix:o.optionIdPrefix})]})]})},Pe={task:"Tasks",method:"Methods",benchmark:"Benchmarks",author:"Authors",organization:"Orgs"},vs=Object.keys(Pe),Vs=({following:i=!1,xTrending:r=!1})=>{var le,ce,de,ue,pe,he,me;const g=ve(),d=Ae(),t=d==null?void 0:d.user,[b,j]=Ee(),c=We(b,void 0,i?"month":"week"),v=s=>{const l=new URLSearchParams(b);l.delete("order_by"),l.delete("only");const L=l.toString();g(L?`${s}?${L}`:s)},P=s=>{const l=new URLSearchParams(b);s?l.set("only","topic"):l.delete("only");const L=l.toString();return L?`/following?${L}`:"/following"},A=R({queryKey:["top-tasks-sidebar"],queryFn:()=>se.topTasks(8),staleTime:10*60*1e3}),T=R({queryKey:["trending-tasks-sidebar"],queryFn:()=>se.trendingTasks({limit:8,level:0}),staleTime:10*60*1e3}),F=ls({enabled:!i&&!r,page_size:30,order_by:"trending",order_dir:"desc",start_date:c.startDate,end_date:c.endDate,include_resources:!0}),_={start_date:c.startDate,end_date:c.endDate},q=we({queryKey:[...cs.feeds.xTrending,_],queryFn:({pageParam:s})=>ds.xTrending({..._,page:s,page_size:30,include_resources:!0}),initialPageParam:1,getNextPageParam:s=>s.next_page??void 0,enabled:r}),w=i&&b.get("only")==="topic",o={...c,topicOnly:w},S=we({queryKey:["research-feed",t==null?void 0:t.hf_subject,o],queryFn:({pageParam:s})=>Q.following(s,o),initialPageParam:0,getNextPageParam:(s,l)=>s.length===40?l.length*40:void 0,enabled:i&&!!t}),N=R({queryKey:["research-follows",t==null?void 0:t.hf_subject],queryFn:Q.follows,enabled:i&&!!t}),m=R({queryKey:["research-topic",t==null?void 0:t.hf_subject],queryFn:Q.topic,enabled:i&&!!t,refetchInterval:s=>s.state.data&&["pending","running"].includes(s.state.data.status)?1e4:!1}),C=!!m.data&&["pending","running"].includes(m.data.status),a=m.data?m.data.label??m.data.text:"",[f,u]=h.useState(!1),E=Re(),M=h.useRef(!1);h.useEffect(()=>{M.current&&!C&&E.invalidateQueries({queryKey:["research-feed",t==null?void 0:t.hf_subject]}),M.current=C},[C,E,t==null?void 0:t.hf_subject]);const I=i&&!!t&&((le=N.data)==null?void 0:le.length)===0&&m.isSuccess&&!m.data,H=i&&!(d!=null&&d.isLoading)&&!t||I,B=!!t||!qe(),[X,W]=h.useState(!1),[Y]=h.useState(()=>!!xe()||be().length>0),[V,J]=h.useState(!1);!X&&(m.data||(ce=N.data)!=null&&ce.length)&&W(!0),H&&!V&&(J(!0),B&&!X&&!Y&&u(!0));const K=ke(),{mutate:n}=K,p=h.useRef(!1);h.useEffect(()=>{var l;const s=xe();!t||!m.isSuccess||!s||p.current||(p.current=!0,s===((l=m.data)==null?void 0:l.text)?Be():n(s))},[t,m.isSuccess,m.data,n]);const y=Se(),{mutate:k}=y,U=h.useRef(!1);h.useEffect(()=>{const s=be();!t||!s.length||U.current||(U.current=!0,k(s))},[t,k]);const Z=h.useMemo(()=>vs.map(s=>{var l;return{kind:s,follows:i?((l=N.data)==null?void 0:l.filter(L=>L.kind===s))??[]:[]}}).filter(s=>s.follows.length>0),[i,N.data]),x=i&&(!!(d!=null&&d.isLoading)||!!t&&!I),O=i?S:r?q:F,G=h.useMemo(()=>{var s,l;return i?((s=S.data)==null?void 0:s.pages.flatMap(L=>L.map(ee=>({...fe(ee.paper),followReasons:ee.reasons}))))??[]:((l=r?q.data:F.data)==null?void 0:l.pages.flatMap(L=>L.results.map(ee=>({...fe(ee),followReasons:void 0}))))??[]},[i,r,S.data,q.data,F.data]),Te=us(O,"400px"),_e=O.isLoading||i&&(d==null?void 0:d.isLoading),re=O.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?"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:[x?e.jsxs("div",{className:"sidebar-section sidebar-section-follows",children:[e.jsx("div",{className:"sidebar-label",children:"You follow"}),((d==null?void 0:d.isLoading)||N.isLoading)&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:4}).map((s,l)=>e.jsx($,{className:"h-5 w-full"},l))}),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:[m.data&&e.jsxs("div",{className:`sidebar-follow-topic ${w?"active":""}`,children:[e.jsxs(D,{to:P(!w),className:"sidebar-link sidebar-follow-link",title:w?"Show papers from everything you follow":`Show only papers about “${m.data.text}”`,"aria-current":w?"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":f,onClick:()=>u(!0),children:"edit"})]}),Z.map(s=>e.jsxs("div",{className:"sidebar-follow-group",children:[e.jsx("span",{className:"sidebar-follow-kind",children:Pe[s.kind]}),s.follows.map(l=>e.jsx(D,{to:l.url,className:"sidebar-link sidebar-follow-link",children:e.jsx("span",{className:"sidebar-follow-name",children:l.name})},l.entity_id))]},s.kind))]}),e.jsx(D,{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"}),A.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,l)=>e.jsx($,{className:"h-5 w-full"},l))}),e.jsxs("div",{className:"sidebar-links",children:[(de=A.data)==null?void 0:de.map(s=>e.jsxs(D,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[ne(s.name,s.slug),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count})]},s.id)),e.jsx(D,{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"}),T.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,l)=>e.jsx($,{className:"h-5 w-full"},l))}),((pe=(ue=T.data)==null?void 0:ue.results)==null?void 0:pe.length)===0&&!T.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:(me=(he=T.data)==null?void 0:he.results)==null?void 0:me.map(s=>e.jsxs(D,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[ne(s.name,s.slug),e.jsxs("span",{className:"count",children:[s.share_lift.toFixed(1),"x"]})]},s.id))})]})]}),e.jsx(Xe,{})]}),e.jsxs("div",{className:"feed-main",children:[(oe()||Ne())&&e.jsx("div",{className:"feed-chat",children:e.jsx(ys,{})}),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 ${i||r?"":"active"}`,onClick:()=>v("/"),children:"trending"}),e.jsx("button",{className:`sort-btn ${r?"active":""}`,onClick:()=>v("/x-trending"),children:"trending (X)"}),e.jsx("button",{className:`sort-btn ${i?"active":""}`,onClick:()=>v("/following"),children:"following"})]})}),e.jsx(Ye,{startDate:c.startDate,endDate:c.endDate,onChange:s=>j(Ve(b,s))})]}),re&&e.jsx(ae,{variant:"destructive",className:"mb-4",children:e.jsxs(ie,{children:["Failed to load papers. ",e.jsx("button",{type:"button",onClick:()=>void O.refetch(),children:"Try again"})]})}),K.isError&&K.variables&&e.jsx(ae,{variant:"destructive",className:"mb-4",children:e.jsxs(ie,{children:["Could not follow “",K.variables,"”. ",e.jsx("button",{type:"button",onClick:()=>n(K.variables),children:"Try again"})]})}),y.isError&&y.variables&&e.jsx(ae,{variant:"destructive",className:"mb-4",children:e.jsxs(ie,{children:["Could not follow ",y.variables.map(s=>s.name).join(", "),". ",e.jsx("button",{type:"button",onClick:()=>k(y.variables),children:"Try again"})]})}),i&&!!t&&m.isSuccess&&!N.isPending&&!I&&(m.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:()=>u(!0),children:"Follow a topic"})]})),i&&B&&e.jsx(hs,{open:f,onOpenChange:u}),w&&m.data&&e.jsxs("div",{className:"following-topic-note following-topic-filter",role:"status",children:["Showing only papers about “",a,"”."," ",e.jsx(D,{to:P(!1),children:"Show everything you follow"})]}),H?e.jsx(ps,{onBuild:B?()=>u(!0):void 0}):_e?e.jsx("div",{className:"paper-list",children:Array.from({length:6}).map((s,l)=>e.jsxs("div",{className:"paper-card",children:[e.jsx("div",{className:"paper-thumb-wrap",children:e.jsx($,{className:"paper-thumb-skeleton"})}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx($,{className:"h-6 w-3/4"}),e.jsx($,{className:"h-4 w-1/2"}),e.jsx($,{className:"h-12 w-full"})]})]},l))}):G.length===0?re?null:e.jsx("div",{className:"no-results",children:w?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:()=>u(!0),children:"edit your topic"}),"."]}):i?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(D,{to:"/tasks",children:"tasks"}),", ",e.jsx(D,{to:"/methods",children:"methods"}),", benchmark, author, or organization pages."]}):r?"No papers shared on X in this window.":"No papers in this window."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:G.map((s,l)=>e.jsx(Qe,{paper:s,rank:l+1,followReasons:s.followReasons},s.id))}),e.jsx("div",{ref:Te,style:{height:1}}),O.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})]})]})]})};export{ys as AskAssistant,Vs as default};
|
|
|
|
| 1 |
+
import{j as e,L as D,a as Ce,b as Fe,r as h,h as Le,C as De,c as ve,d as Ae,e as Ee,f as Re,i as qe,g as oe,k as Ne,l as Me}from"./index-D6jcIRWs.js";import{S as Ie}from"./sparkles-r8uPx2-0.js";import{u as R}from"./useQuery-CUJUm4FY.js";import{D as He,a as Ke,b as Oe}from"./dialog-vGFIbcd-.js";import{c as se}from"./catalog-PYrB8_bm.js";import{T as ge,r as Q}from"./research-BggtGgC2.js";import{d as ne,t as fe}from"./colors-CLwl8a2d.js";import{u as ke,a as Se,s as $e,b as ze,r as xe,c as be,d as Be}from"./researchTopic-NFMcqCcs.js";import{P as Ue}from"./plus-C4UQ62Q1.js";import{A as Ge}from"./arrow-right-CFRHnFt4.js";import{P as Qe}from"./components-DO1X940E.js";import{M as Xe}from"./McpShowcase-CS9LZY9p.js";import{r as We,P as Ye,w as Ve}from"./PaperDateFilter-CPIqaHaq.js";import{u as Je,a as Ze,P as es,i as ss,A as ts,b as as,S as z,c as is,D as te,q as os,d as ns}from"./chatSessions-DByIWBno.js";import{c as rs}from"./chat-ChnK8XDU.js";import{u as ls}from"./usePapers-BbCSwcVk.js";import{p as cs,a as ds}from"./papers-DIIIPDpj.js";import{u as us}from"./useInfiniteScroll-Dm7JY_X4.js";import{S as $}from"./skeleton-BqkYFmXl.js";import{A as ae,a as ie}from"./alert-2MbxVzGL.js";import{u as we}from"./useInfiniteQuery-FXco4P1n.js";import"./useMutation-p6mN4h17.js";import"./AuthorAvatar-UMHOVOr9.js";import"./LatexTitle-D_92Jowu.js";import"./safeExternalHref-CkBrsh84.js";import"./AgentLogos-CFt_vIO2.js";import"./popover-DCjqGpW0.js";import"./useIntersectionObserver-3LTuEaFW.js";function ps({onBuild:i}){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."}),i&&e.jsxs("button",{type:"button",className:"research-topic-save following-intro-topic",onClick:i,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(D,{to:"/settings",children:"Settings"}),"."]})]})}const je=16;function hs({open:i,onOpenChange:r}){return e.jsx(He,{open:i,onOpenChange:r,children:e.jsx(Ke,{className:"topic-dialog","aria-describedby":void 0,children:e.jsx(ms,{onDone:()=>r(!1)})})})}function ms({onDone:i}){var B,X,W,Y,V,J,K;const{user:r}=Ce(),g=Fe(),d=R({queryKey:["research-topic",r==null?void 0:r.hf_subject],queryFn:Q.topic,enabled:!!r}),t=R({queryKey:["research-follows",r==null?void 0:r.hf_subject],queryFn:Q.follows,enabled:!!r}),b=R({queryKey:["trending-tasks-follow"],queryFn:()=>se.trendingTasks({limit:je,level:0}),staleTime:10*60*1e3}),j=R({queryKey:["trending-methods-follow"],queryFn:()=>se.trendingMethods({limit:je}),staleTime:10*60*1e3}),c=R({queryKey:["research-follow-suggestions"],queryFn:Q.followSuggestions,staleTime:10*60*1e3}),v=(n=[])=>n.map(p=>({id:String(p.entity_id),name:p.name,image:p.image_url})),[P,A]=h.useState(null),[T,F]=h.useState([]),_=ke(),q=Se(),w=((B=d.data)==null?void 0:B.text)??"",o=P??w,S=o.trim().replace(/\s+/g," "),N=((X=d.data)==null?void 0:X.status)==="failed"&&S===w,m=S.length>=3&&(S!==w||N),C=_.isPending||q.isPending,a=(n,p)=>{var y;return((y=t.data)==null?void 0:y.some(k=>k.kind===n&&String(k.entity_id)===p))??!1},f=(n,p)=>{var y;return((y=T.find(k=>k.kind===n&&k.id===p))==null?void 0:y.follow)??a(n,p)},u=T.filter(n=>n.follow!==a(n.kind,n.id)),E=!C&&(m||u.length>0),M=(n,p,y)=>F(k=>[...k.filter(U=>U.kind!==n||U.id!==p),{kind:n,id:p,name:y,follow:!f(n,p)}]),I=()=>{if(!E)return;if(!r){m&&$e(S),u.length&&ze(u),window.location.href=Le(`${g.pathname}${g.search}`);return}const n=[...u.length?[q.mutateAsync(u)]:[],...m?[_.mutateAsync(S)]:[]];Promise.allSettled(n).then(p=>{p.every(y=>y.status==="fulfilled")&&i()})},H=(n,p,y,k)=>{const Z=[...(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})),...y.filter(x=>!a(p,x.id)).map(x=>({...x,suggested:!0}))];return Z.length>0&&e.jsxs("div",{className:"topic-dialog-group",children:[e.jsx("h3",{children:n}),e.jsxs(gs,{children:[Z.map(x=>{const O=f(p,x.id),G=p==="task"?ne(x.name,x.slug??void 0):x.name;return e.jsxs("button",{type:"button",className:"topic-dialog-chip","aria-pressed":O,disabled:C,"data-suggested":"suggested"in x||void 0,onClick:()=>M(p,x.id,G),children:[O?e.jsx(De,{"aria-hidden":"true"}):e.jsx(Ue,{"aria-hidden":"true"}),(p==="author"||p==="organization")&&e.jsx(fs,{kind:p,name:G,src:x.image}),G]},x.id)}),k&&e.jsxs(D,{to:k.to,className:"topic-dialog-browse",children:[k.label,e.jsx(Ge,{"aria-hidden":"true"})]})]})]})};return e.jsxs("form",{className:"topic-dialog-form",onSubmit:n=>{n.preventDefault(),I()},children:[e.jsx(Oe,{className:"topic-dialog-title",children:w||(W=t.data)!=null&&W.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:ge,"aria-label":"Research topic",placeholder:"e.g. diffusion policies for robot manipulation, or speculative decoding for LLM inference",value:o,onChange:n=>A(n.target.value),onKeyDown:n=>{n.key==="Enter"&&!n.shiftKey&&!n.nativeEvent.isComposing&&(n.preventDefault(),I())}}),e.jsxs("span",{className:"research-topic-count",children:[o.length,"/",ge]})]}),H("Trending tasks","task",((Y=b.data)==null?void 0:Y.results)??[],{to:"/tasks",label:"Browse tasks"}),H("Trending methods","method",((V=j.data)==null?void 0:V.results)??[],{to:"/methods",label:"Browse methods"}),H("Benchmarks","benchmark",[],{to:"/tasks",label:"Browse benchmarks"}),H("Popular authors","author",v((J=c.data)==null?void 0:J.authors)),H("Popular organizations","organization",v((K=c.data)==null?void 0:K.organizations),{to:"/organizations",label:"Browse organizations"}),(_.error||q.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:[w&&e.jsx("button",{type:"button",className:"research-follow-action topic-dialog-remove",disabled:C,onClick:()=>_.mutate(null,{onSuccess:i}),children:"Remove topic"}),e.jsx("button",{type:"button",className:"research-follow-action",disabled:C,onClick:i,children:"Cancel"}),e.jsx("button",{type:"submit",className:"research-topic-save",disabled:!E,children:u.some(n=>n.follow===!1)?"Save":u.length?"Follow":N?"Retry":w?"Update topic":"Follow"})]})]})}function gs({children:i}){const r=h.useRef(null);return h.useLayoutEffect(()=>{const g=r.current;if(!g)return;const d=()=>{const t=[...g.children],b=t.filter(c=>c.dataset.suggested);b.forEach(c=>{c.hidden=!1});const j=()=>new Set(t.filter(c=>!c.hidden).map(c=>c.offsetTop)).size;for(let c=b.length-1;c>=0&&j()>2;c--)b[c].hidden=!0};return d(),window.addEventListener("resize",d),()=>window.removeEventListener("resize",d)}),e.jsx("div",{ref:r,className:"topic-dialog-chips",children:i})}function fs({kind:i,name:r,src:g}){const[d,t]=h.useState(!1);if(g&&!d)return e.jsx("img",{className:`topic-dialog-chip-image is-${i}`,src:g,alt:"",loading:"lazy",onError:()=>t(!0)});if(i!=="author")return null;const b=r.split(/\s+/).filter(Boolean).map(j=>j[0]).slice(0,2).join("").toUpperCase();return e.jsx("span",{className:"topic-dialog-chip-image is-author is-initials","aria-hidden":"true",children:b})}const ye=45,xs=1800,bs=25,ws=350,js=i=>{const[r,g]=h.useState(z[0].slice(0,1)),[d,t]=h.useState(0);return h.useEffect(()=>{var A,T;if(!i)return;if((T=(A=window.matchMedia)==null?void 0:A.call(window,"(prefers-reduced-motion: reduce)"))!=null&&T.matches){g(z[0]),t(0);return}let b=0,j=1,c=!1,v;g(z[0].slice(0,j)),t(0);const P=()=>{const F=z[b];if(!c){if(j+=1,g(F.slice(0,j)),j===F.length){c=!0,v=window.setTimeout(P,xs);return}v=window.setTimeout(P,ye);return}if(j-=1,g(F.slice(0,j)),j===0){c=!1,b=(b+1)%z.length,t(b),v=window.setTimeout(P,ws);return}v=window.setTimeout(P,bs)};return v=window.setTimeout(P,ye),()=>window.clearTimeout(v)},[i]),{placeholder:r,prompt:z[d]}},ys=()=>{var C;const i=ve(),r=Ne(),[g,d]=h.useState({text:"",paperMentions:[]}),t=g.text,[b,j]=h.useState(0),[c,v]=h.useState(!1),[P,A]=h.useState(null),{placeholder:T,prompt:F}=js(!t),_=h.useRef(null),q=R({queryKey:["chatAvailability"],queryFn:()=>rs.getAvailability(),retry:!1,enabled:oe()}),w=oe()&&((C=q.data)==null?void 0:C.paper_mentions_enabled)!==!1,o=Je({draft:g,onChange:d,enabled:w,textareaRef:_}),S=Ze(g,o.open),N=t?S.completion:F;h.useLayoutEffect(()=>{const a=_.current;if(!a)return;const f=()=>{if(a.style.height="auto",t){a.style.height=`${Math.min(is(a),160)}px`;return}const u=a.placeholder,E=z.reduce((M,I)=>(a.placeholder=I,Math.max(M,a.scrollHeight)),0);a.placeholder=u,a.style.height=`${Math.min(E,160)}px`};return f(),window.addEventListener("resize",f),()=>window.removeEventListener("resize",f)},[t,N]);const m=async(a=g)=>{const f=a.text.trim();if(!(!f||c)){if(r){const u=new URLSearchParams({q:f,model:te}),E=`${Me}?${u}`,M=window.open(E,"_blank");if(!M){A(E);return}M.opener=null,A(null),d({text:"",paperMentions:[]});return}v(!0),os(a,te);try{const u=await ns(te);i(`/chat/${u.id}`)}catch{i("/chat")}}};return e.jsxs(e.Fragment,{children:[!r&&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(es,{text:g.text,mentions:g.paperMentions,scrollTop:b,variant:"home",completion:t?N:""}),e.jsx("textarea",{ref:_,rows:1,value:t,placeholder:T,"aria-label":"Ask the assistant",disabled:c,onChange:a=>{o.updateText(a.target.value,a.target.selectionStart),S.trackCaret(a.target)},onSelect:a=>{o.refresh(a.currentTarget.selectionStart),S.trackCaret(a.currentTarget)},onClick:a=>{o.refresh(a.currentTarget.selectionStart),S.trackCaret(a.currentTarget)},onScroll:a=>j(a.currentTarget.scrollTop),onBlur:a=>{var f,u;(u=(f=a.relatedTarget)==null?void 0:f.closest)!=null&&u.call(f,".chat-paper-picker")||window.setTimeout(o.close,0)},onKeyDown:a=>{if(!o.keyDown(a)){if(ss(a)&&N){a.preventDefault();const f=t+N;o.updateText(f,f.length),window.requestAnimationFrame(()=>{var u;return(u=_.current)==null?void 0:u.setSelectionRange(f.length,f.length)});return}a.key==="Enter"&&!a.shiftKey&&(a.preventDefault(),m())}},role:w?"combobox":void 0,"aria-expanded":w?o.open:void 0,"aria-controls":o.open?o.pickerId:void 0,"aria-activedescendant":o.open&&o.results.length?`${o.optionIdPrefix}-${o.activeIndex}`:void 0,"aria-autocomplete":w?"list":void 0,"aria-describedby":o.message?"ask-home-paper-mention-message":void 0})]}),e.jsx("button",{type:"button",className:`chat-send${t.trim()?" chat-send-on":""}`,onClick:()=>void m(),disabled:!t.trim()||c,"aria-label":"Ask the assistant",children:e.jsx(ts,{})})]}),P&&e.jsx("div",{className:"chat-paper-mention-message",role:"alert",children:e.jsx("a",{href:P,target:"_blank",rel:"noreferrer",children:"Open this question on paperswithcode.co"})}),o.message&&e.jsx("div",{id:"ask-home-paper-mention-message",className:"chat-paper-mention-message",role:"alert",children:o.message}),e.jsx(as,{open:o.open,query:o.query,results:o.results,activeIndex:o.activeIndex,loading:o.loading,error:o.error,onSelect:o.select,id:o.pickerId,optionIdPrefix:o.optionIdPrefix})]})]})},Pe={task:"Tasks",method:"Methods",benchmark:"Benchmarks",author:"Authors",organization:"Orgs"},vs=Object.keys(Pe),Vs=({following:i=!1,xTrending:r=!1})=>{var le,ce,de,ue,pe,he,me;const g=ve(),d=Ae(),t=d==null?void 0:d.user,[b,j]=Ee(),c=We(b,void 0,i?"month":"week"),v=s=>{const l=new URLSearchParams(b);l.delete("order_by"),l.delete("only");const L=l.toString();g(L?`${s}?${L}`:s)},P=s=>{const l=new URLSearchParams(b);s?l.set("only","topic"):l.delete("only");const L=l.toString();return L?`/following?${L}`:"/following"},A=R({queryKey:["top-tasks-sidebar"],queryFn:()=>se.topTasks(8),staleTime:10*60*1e3}),T=R({queryKey:["trending-tasks-sidebar"],queryFn:()=>se.trendingTasks({limit:8,level:0}),staleTime:10*60*1e3}),F=ls({enabled:!i&&!r,page_size:30,order_by:"trending",order_dir:"desc",start_date:c.startDate,end_date:c.endDate,include_resources:!0}),_={start_date:c.startDate,end_date:c.endDate},q=we({queryKey:[...cs.feeds.xTrending,_],queryFn:({pageParam:s})=>ds.xTrending({..._,page:s,page_size:30,include_resources:!0}),initialPageParam:1,getNextPageParam:s=>s.next_page??void 0,enabled:r}),w=i&&b.get("only")==="topic",o={...c,topicOnly:w},S=we({queryKey:["research-feed",t==null?void 0:t.hf_subject,o],queryFn:({pageParam:s})=>Q.following(s,o),initialPageParam:0,getNextPageParam:(s,l)=>s.length===40?l.length*40:void 0,enabled:i&&!!t}),N=R({queryKey:["research-follows",t==null?void 0:t.hf_subject],queryFn:Q.follows,enabled:i&&!!t}),m=R({queryKey:["research-topic",t==null?void 0:t.hf_subject],queryFn:Q.topic,enabled:i&&!!t,refetchInterval:s=>s.state.data&&["pending","running"].includes(s.state.data.status)?1e4:!1}),C=!!m.data&&["pending","running"].includes(m.data.status),a=m.data?m.data.label??m.data.text:"",[f,u]=h.useState(!1),E=Re(),M=h.useRef(!1);h.useEffect(()=>{M.current&&!C&&E.invalidateQueries({queryKey:["research-feed",t==null?void 0:t.hf_subject]}),M.current=C},[C,E,t==null?void 0:t.hf_subject]);const I=i&&!!t&&((le=N.data)==null?void 0:le.length)===0&&m.isSuccess&&!m.data,H=i&&!(d!=null&&d.isLoading)&&!t||I,B=!!t||!qe(),[X,W]=h.useState(!1),[Y]=h.useState(()=>!!xe()||be().length>0),[V,J]=h.useState(!1);!X&&(m.data||(ce=N.data)!=null&&ce.length)&&W(!0),H&&!V&&(J(!0),B&&!X&&!Y&&u(!0));const K=ke(),{mutate:n}=K,p=h.useRef(!1);h.useEffect(()=>{var l;const s=xe();!t||!m.isSuccess||!s||p.current||(p.current=!0,s===((l=m.data)==null?void 0:l.text)?Be():n(s))},[t,m.isSuccess,m.data,n]);const y=Se(),{mutate:k}=y,U=h.useRef(!1);h.useEffect(()=>{const s=be();!t||!s.length||U.current||(U.current=!0,k(s))},[t,k]);const Z=h.useMemo(()=>vs.map(s=>{var l;return{kind:s,follows:i?((l=N.data)==null?void 0:l.filter(L=>L.kind===s))??[]:[]}}).filter(s=>s.follows.length>0),[i,N.data]),x=i&&(!!(d!=null&&d.isLoading)||!!t&&!I),O=i?S:r?q:F,G=h.useMemo(()=>{var s,l;return i?((s=S.data)==null?void 0:s.pages.flatMap(L=>L.map(ee=>({...fe(ee.paper),followReasons:ee.reasons}))))??[]:((l=r?q.data:F.data)==null?void 0:l.pages.flatMap(L=>L.results.map(ee=>({...fe(ee),followReasons:void 0}))))??[]},[i,r,S.data,q.data,F.data]),Te=us(O,"400px"),_e=O.isLoading||i&&(d==null?void 0:d.isLoading),re=O.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?"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:[x?e.jsxs("div",{className:"sidebar-section sidebar-section-follows",children:[e.jsx("div",{className:"sidebar-label",children:"You follow"}),((d==null?void 0:d.isLoading)||N.isLoading)&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:4}).map((s,l)=>e.jsx($,{className:"h-5 w-full"},l))}),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:[m.data&&e.jsxs("div",{className:`sidebar-follow-topic ${w?"active":""}`,children:[e.jsxs(D,{to:P(!w),className:"sidebar-link sidebar-follow-link",title:w?"Show papers from everything you follow":`Show only papers about “${m.data.text}”`,"aria-current":w?"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":f,onClick:()=>u(!0),children:"edit"})]}),Z.map(s=>e.jsxs("div",{className:"sidebar-follow-group",children:[e.jsx("span",{className:"sidebar-follow-kind",children:Pe[s.kind]}),s.follows.map(l=>e.jsx(D,{to:l.url,className:"sidebar-link sidebar-follow-link",children:e.jsx("span",{className:"sidebar-follow-name",children:l.name})},l.entity_id))]},s.kind))]}),e.jsx(D,{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"}),A.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,l)=>e.jsx($,{className:"h-5 w-full"},l))}),e.jsxs("div",{className:"sidebar-links",children:[(de=A.data)==null?void 0:de.map(s=>e.jsxs(D,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[ne(s.name,s.slug),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count})]},s.id)),e.jsx(D,{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"}),T.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,l)=>e.jsx($,{className:"h-5 w-full"},l))}),((pe=(ue=T.data)==null?void 0:ue.results)==null?void 0:pe.length)===0&&!T.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:(me=(he=T.data)==null?void 0:he.results)==null?void 0:me.map(s=>e.jsxs(D,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[ne(s.name,s.slug),e.jsxs("span",{className:"count",children:[s.share_lift.toFixed(1),"x"]})]},s.id))})]})]}),e.jsx(Xe,{})]}),e.jsxs("div",{className:"feed-main",children:[(oe()||Ne())&&e.jsx("div",{className:"feed-chat",children:e.jsx(ys,{})}),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 ${i||r?"":"active"}`,onClick:()=>v("/"),children:"trending"}),e.jsx("button",{className:`sort-btn ${r?"active":""}`,onClick:()=>v("/x-trending"),children:"trending (X)"}),e.jsx("button",{className:`sort-btn ${i?"active":""}`,onClick:()=>v("/following"),children:"following"})]})}),e.jsx(Ye,{startDate:c.startDate,endDate:c.endDate,onChange:s=>j(Ve(b,s))})]}),re&&e.jsx(ae,{variant:"destructive",className:"mb-4",children:e.jsxs(ie,{children:["Failed to load papers. ",e.jsx("button",{type:"button",onClick:()=>void O.refetch(),children:"Try again"})]})}),K.isError&&K.variables&&e.jsx(ae,{variant:"destructive",className:"mb-4",children:e.jsxs(ie,{children:["Could not follow “",K.variables,"”. ",e.jsx("button",{type:"button",onClick:()=>n(K.variables),children:"Try again"})]})}),y.isError&&y.variables&&e.jsx(ae,{variant:"destructive",className:"mb-4",children:e.jsxs(ie,{children:["Could not follow ",y.variables.map(s=>s.name).join(", "),". ",e.jsx("button",{type:"button",onClick:()=>k(y.variables),children:"Try again"})]})}),i&&!!t&&m.isSuccess&&!N.isPending&&!I&&(m.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:()=>u(!0),children:"Follow a topic"})]})),i&&B&&e.jsx(hs,{open:f,onOpenChange:u}),w&&m.data&&e.jsxs("div",{className:"following-topic-note following-topic-filter",role:"status",children:["Showing only papers about “",a,"”."," ",e.jsx(D,{to:P(!1),children:"Show everything you follow"})]}),H?e.jsx(ps,{onBuild:B?()=>u(!0):void 0}):_e?e.jsx("div",{className:"paper-list",children:Array.from({length:6}).map((s,l)=>e.jsxs("div",{className:"paper-card",children:[e.jsx("div",{className:"paper-thumb-wrap",children:e.jsx($,{className:"paper-thumb-skeleton"})}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx($,{className:"h-6 w-3/4"}),e.jsx($,{className:"h-4 w-1/2"}),e.jsx($,{className:"h-12 w-full"})]})]},l))}):G.length===0?re?null:e.jsx("div",{className:"no-results",children:w?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:()=>u(!0),children:"edit your topic"}),"."]}):i?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(D,{to:"/tasks",children:"tasks"}),", ",e.jsx(D,{to:"/methods",children:"methods"}),", benchmark, author, or organization pages."]}):r?"No papers shared on X in this window.":"No papers in this window."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:G.map((s,l)=>e.jsx(Qe,{paper:s,rank:l+1,followReasons:s.followReasons},s.id))}),e.jsx("div",{ref:Te,style:{height:1}}),O.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})]})]})]})};export{ys as AskAssistant,Vs as default};
|
assets/FollowingView-CVyxNxmM.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{j as o}from"./index-D6jcIRWs.js";import r from"./FeedView-L-eiYDg9.js";import"./sparkles-r8uPx2-0.js";import"./useQuery-CUJUm4FY.js";import"./dialog-vGFIbcd-.js";import"./catalog-PYrB8_bm.js";import"./research-BggtGgC2.js";import"./colors-CLwl8a2d.js";import"./researchTopic-NFMcqCcs.js";import"./useMutation-p6mN4h17.js";import"./plus-C4UQ62Q1.js";import"./arrow-right-CFRHnFt4.js";import"./components-DO1X940E.js";import"./papers-DIIIPDpj.js";import"./AuthorAvatar-UMHOVOr9.js";import"./LatexTitle-D_92Jowu.js";import"./safeExternalHref-CkBrsh84.js";import"./McpShowcase-CS9LZY9p.js";import"./AgentLogos-CFt_vIO2.js";import"./PaperDateFilter-CPIqaHaq.js";import"./popover-DCjqGpW0.js";import"./chatSessions-DByIWBno.js";import"./chat-ChnK8XDU.js";import"./usePapers-BbCSwcVk.js";import"./useInfiniteQuery-FXco4P1n.js";import"./useInfiniteScroll-Dm7JY_X4.js";import"./useIntersectionObserver-3LTuEaFW.js";import"./skeleton-BqkYFmXl.js";import"./alert-2MbxVzGL.js";function B(){return o.jsx(r,{following:!0})}export{B as default};
|
assets/FollowingView-CYdAvQ9K.js
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
import{j as o}from"./index-CqKcHUvZ.js";import r from"./FeedView-EM1uL5u1.js";import"./sparkles-BKRdZneA.js";import"./useQuery-Cngk7eL9.js";import"./dialog-B-oqHDuH.js";import"./catalog-D26nGNnK.js";import"./research-Dt0MUW0x.js";import"./colors-_scCXfCe.js";import"./researchTopic-k4qgoW39.js";import"./useMutation-BItMAQ7s.js";import"./plus-DZF-NxR0.js";import"./arrow-right-DCfHXCdw.js";import"./components-Dmnn5Z5p.js";import"./papers-bE3C_Qzl.js";import"./AuthorAvatar-CWCqOa0h.js";import"./LatexTitle-BI9yl-Fo.js";import"./safeExternalHref-CkBrsh84.js";import"./McpShowcase-oHgWM9FI.js";import"./AgentLogos-ClqC1BaK.js";import"./PaperDateFilter-zHw5tq6B.js";import"./popover-BcoS9Jmp.js";import"./chatSessions-D75G2_U7.js";import"./chat-DGBJkcmd.js";import"./usePapers-By3yMmMn.js";import"./useInfiniteQuery-lxaMAHEu.js";import"./useInfiniteScroll-DVF-b-LX.js";import"./useIntersectionObserver-CiBk_Oug.js";import"./skeleton-DleNhBYA.js";import"./alert-Z2yFUcyL.js";function B(){return o.jsx(r,{following:!0})}export{B as default};
|
|
|
|
|
|
assets/{FrameworksIndexView-BjBwZMDx.js → FrameworksIndexView-BxWPuGhr.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{c as d,j as e,L as o,K as m}from"./index-
|
|
|
|
| 1 |
+
import{c as d,j as e,L as o,K as m}from"./index-D6jcIRWs.js";import{u as p}from"./useQuery-CUJUm4FY.js";import{I as h}from"./components-DO1X940E.js";import{c as u}from"./catalog-PYrB8_bm.js";import{c as g,h as f}from"./colors-CLwl8a2d.js";import"./papers-DIIIPDpj.js";import"./AuthorAvatar-UMHOVOr9.js";import"./LatexTitle-D_92Jowu.js";import"./safeExternalHref-CkBrsh84.js";const x={gpu:"GPU",cpu:"CPU",apple:"Apple silicon"},j={display:"flex",alignItems:"baseline",justifyContent:"space-between",flexWrap:"wrap",gap:"6px 24px",paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},k={fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},_={fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},v={fontFamily:"var(--mono)",fontSize:13,fontWeight:600,letterSpacing:"0.04em",textTransform:"uppercase",color:"var(--ink)",marginBottom:6},w=({platform:r})=>{const n=g(f(r));return e.jsx("span",{className:"framework-platform-chip",style:{background:n.bg,color:n.text},children:x[r]})},b=({framework:r})=>{const n=d(),l=`/papers?framework=${encodeURIComponent(r.slug)}`;return e.jsxs("article",{id:`framework-${r.slug}`,className:"framework-card framework-card-clickable",role:"link",tabIndex:0,"aria-label":`View papers implemented by ${r.name}`,onClick:a=>{a.target.closest("a, button")||n(l)},onKeyDown:a=>{a.target===a.currentTarget&&(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),n(l))},children:[e.jsxs("div",{className:"framework-card-head",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"framework-card-name",children:r.name}),r.organization_name&&e.jsx("div",{className:"framework-card-org",children:r.organization_name})]}),r.platforms&&r.platforms.length>0&&e.jsx("div",{className:"framework-platform-row",children:r.platforms.map(a=>e.jsx(w,{platform:a},a))})]}),e.jsx("p",{className:"framework-card-desc",children:r.description}),r.when_to_use&&e.jsxs("div",{className:"framework-card-when",children:[e.jsx("span",{className:"framework-card-when-label",children:"When to use"}),r.when_to_use]}),(r.github_url||r.docs_url||r.introducing_paper_arxiv_id)&&e.jsxs("div",{className:"framework-card-links",children:[r.introducing_paper_arxiv_id&&e.jsx(o,{to:`/paper/${r.introducing_paper_arxiv_id}`,className:"framework-link",children:"Introducing paper"}),r.github_url&&r.paper_count>0&&e.jsxs(o,{to:l,className:"framework-link",children:["Implements ",r.paper_count," ",r.paper_count===1?"paper":"papers"]}),r.github_url&&r.paper_count===0&&e.jsx("span",{className:"framework-link framework-link-disabled","aria-disabled":"true",children:"Implements 0 papers"}),r.github_url&&e.jsxs("a",{href:r.github_url,target:"_blank",rel:"noopener noreferrer",className:"framework-link",children:[e.jsx(h,{name:"github",size:13}),"GitHub"]}),r.docs_url&&r.docs_url!==r.github_url&&e.jsx("a",{href:r.docs_url,target:"_blank",rel:"noopener noreferrer",className:"framework-link",children:"Docs"})]})]})},E=()=>{var a;const r=p({queryKey:["framework-catalog"],queryFn:()=>u.frameworkCatalog()}),n=((a=r.data)==null?void 0:a.domains)??[],l=n.reduce((i,s)=>i+s.categories.reduce((t,c)=>t+c.frameworks.length,0),0);return m.useEffect(()=>{var s;const i=window.location.hash.slice(1);i&&((s=document.getElementById(i))==null||s.scrollIntoView())},[r.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."})]})}),r.isLoading&&e.jsx("div",{className:"empty",children:"Loading frameworks…"}),r.isError&&e.jsx("div",{className:"empty",children:"Could not load frameworks."}),n.map(i=>e.jsxs("section",{style:{marginBottom:56},children:[e.jsxs("div",{style:j,children:[e.jsxs("div",{children:[e.jsx("h2",{style:k,children:i.name}),e.jsx("div",{style:_,children:i.description})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[i.categories.length," ",i.categories.length===1?"category":"categories"," ·"," ",i.categories.reduce((s,t)=>s+t.frameworks.length,0)," frameworks"]})]}),i.categories.map(s=>e.jsxs("div",{className:"framework-category",children:[e.jsxs("div",{className:"framework-category-head",children:[e.jsxs("div",{children:[e.jsx("h3",{style:v,children:s.name}),s.description&&e.jsx("p",{className:"framework-category-blurb",children:s.description}),s.guide_url&&e.jsxs("a",{href:s.guide_url,target:"_blank",rel:"noopener noreferrer",className:"framework-guide-link",children:[s.guide_label??"Read guide"," →"]})]}),e.jsxs("div",{className:"framework-category-meta",children:[s.frameworks.length," ",s.frameworks.length===1?"framework":"frameworks"]})]}),e.jsx("div",{className:"framework-grid",children:s.frameworks.map(t=>e.jsx(b,{framework:t},t.slug))})]},s.slug))]},i.slug)),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:8},children:[l," frameworks across ",n.length," ",n.length===1?"domain":"domains",". More areas coming soon."]})]})};export{b as FrameworkCard,E as default};
|
assets/LatexTitle-BI9yl-Fo.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
| 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,r as A,_ as L}from"./index-CqKcHUvZ.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/LatexTitle-D_92Jowu.js
ADDED
|
@@ -0,0 +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,r as A,a0 as L}from"./index-D6jcIRWs.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-CJQADo_f.js → MarkdownText-B_D3IE_p.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{o as c,j as s,L as u}from"./index-
|
|
|
|
| 1 |
+
import{o as c,j as s,L as u}from"./index-D6jcIRWs.js";/* empty css */import{r as p,a as m,P as d}from"./PaperPreviewLink-fcJyP9H0.js";import{M as h}from"./index-uFGyKu5N.js";import{r as f}from"./index-yduEvk9Z.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),o=/^[1-9]\d*$/.test(r);return!n&&!o?null:c(r)}const M=({text:e,className:a=""})=>s.jsx("div",{className:a,children:s.jsx(h,{remarkPlugins:[f,m],rehypePlugins:[p],components:{a:({href:t,children:r,node:n,...o})=>{const i=k(t);if(i){const l=I(i);return l?s.jsx(d,{routeId:l,to:i,...o,children:r}):s.jsx(u,{to:i,...o,children:r})}return s.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",...o,children:r})}},children:e})});export{M,k as r};
|
assets/{McpShowcase-oHgWM9FI.js → McpShowcase-CS9LZY9p.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{j as e,L as t}from"./index-
|
|
|
|
| 1 |
+
import{j as e,L as t}from"./index-D6jcIRWs.js";import{A as a}from"./AgentLogos-CFt_vIO2.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-zJL3QfYL.js → McpView-Dg_zVuuF.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import{n as b,K as h,j as e,C as x}from"./index-
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
|
|
|
| 1 |
+
import{n as b,K as h,j as e,C as x}from"./index-D6jcIRWs.js";import{u as j}from"./useQuery-CUJUm4FY.js";import{f,D as g}from"./latexPlainText-DI8YEXVe.js";import{q as y}from"./queryOptions-C9woPjwX.js";import{G as v}from"./github-B7D_19Qm.js";import{E as i}from"./external-link-C_yz2sXa.js";import{C as w}from"./copy-BmzqMihw.js";/**
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
assets/{MethodDetailView-CFqQPuPA.js → MethodDetailView-PtjfC1LZ.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{j as e,r as I,u as q,e as K,L as D,ag as Q}from"./index-CqKcHUvZ.js";import{R as O}from"./ResearchFollowButton-CrCIwiok.js";import{p as U,a as G}from"./papers-bE3C_Qzl.js";import{u as w}from"./useQuery-Cngk7eL9.js";import{u as W}from"./useInfiniteQuery-lxaMAHEu.js";import{M as Z,P as X}from"./components-Dmnn5Z5p.js";import{P as Y}from"./PaperFeedFilters-SOqb93ez.js";import{a as J,P as ee,b as te}from"./PaperDateFilter-zHw5tq6B.js";import{r as se,M as $}from"./MarkdownText-CJQADo_f.js";import{c as M}from"./catalog-D26nGNnK.js";import{s as ae}from"./slug-BpH-Nkvz.js";import{t as re}from"./colors-_scCXfCe.js";import{u as ie}from"./useInfiniteScroll-DVF-b-LX.js";import{S as F}from"./skeleton-DleNhBYA.js";import{A as ne,a as le}from"./alert-Z2yFUcyL.js";import{s as oe}from"./safeExternalHref-CkBrsh84.js";import"./useMutation-BItMAQ7s.js";import"./research-Dt0MUW0x.js";import"./plus-DZF-NxR0.js";import"./AuthorAvatar-CWCqOa0h.js";import"./LatexTitle-BI9yl-Fo.js";import"./popover-BcoS9Jmp.js";/* empty css */import"./PaperPreviewLink-C6khj_iZ.js";import"./index-CqELxJb0.js";import"./index-DBHj7UWg.js";import"./katex-DkKDou_j.js";import"./hover-card-BTsA69o8.js";import"./useIntersectionObserver-CiBk_Oug.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"},o=({x:s,y:r,w:d,h:m,fill:g,stroke:u,label:x,fontSize:n=10})=>e.jsxs("g",{children:[e.jsx("rect",{x:s,y:r,width:d,height:m,rx:"3",ry:"3",fill:g,stroke:u,strokeWidth:"1"}),e.jsx("text",{x:s+d/2,y:r+m/2,fontSize:n,fontFamily:"var(--sans)",fill:t.ink,textAnchor:"middle",dominantBaseline:"middle",children:x})]}),ce=()=>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(o,{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(o,{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(o,{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(o,{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(o,{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(o,{x:100,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"Q",fontSize:13}),e.jsx(o,{x:160,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"K",fontSize:13}),e.jsx(o,{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"]})]}),de=()=>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(o,{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(o,{x:35,y:88,w:110,h:26,fill:t.yellow,stroke:t.yellowS,label:"Augment t₁",fontSize:11}),e.jsx(o,{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(o,{x:35,y:138,w:110,h:26,fill:t.orange,stroke:t.orangeS,label:"Encoder f",fontSize:11}),e.jsx(o,{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(o,{x:35,y:188,w:110,h:26,fill:t.purple,stroke:t.purpleS,label:"Projection g",fontSize:11}),e.jsx(o,{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(o,{x:35,y:238,w:110,h:26,fill:t.pink,stroke:t.pinkS,label:"z₁",fontSize:13}),e.jsx(o,{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₂) / τ"})]}),me=[["my-skill/",""],["├── SKILL.md","# Required: metadata + instructions"],["├── scripts/","# Optional: executable code"],["├── references/","# Optional: documentation"],["├── assets/","# Optional: templates, resources"],["└── ...","# Any additional files or directories"]],he=()=>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"}),me.map(([s,r],d)=>{const m=92+d*44;return e.jsxs("g",{children:[e.jsx("text",{x:"44",y:m,fontSize:"11",fontFamily:"var(--mono)",fill:t.ink,dominantBaseline:"middle",children:s}),r?e.jsx("text",{x:"138",y:m,fontSize:"8.5",fontFamily:"var(--mono)",fill:t.faint,dominantBaseline:"middle",children:r}):null]},s)})]}),xe={attention:ce,"contrastive-learning":de,"agent-skills":he},pe=({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(o,{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(o,{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(o,{x:80,y:250,w:200,h:50,fill:t.purple,stroke:t.purpleS,label:"Output",fontSize:12})]}),ue=({method:s})=>{const r=(s.slug||"").toLowerCase(),d=xe[r];if(d)return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(d,{})});if(s.image_url){const m=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${m}`,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(pe,{method:s})})},P=720,C=138,p={top:8,right:10,bottom:25,left:36},H=56,fe=new Intl.DateTimeFormat("en",{month:"short",year:"2-digit",timeZone:"UTC"}),ge=new Intl.DateTimeFormat("en",{year:"numeric",timeZone:"UTC"}),L=s=>fe.format(new Date(`${s}T00:00:00Z`)),je=(s,r)=>{if(s===0)return new Set;const d=s>48?12:s>36?6:s>18?3:2,m=Math.max(1,Math.ceil(H/r)),g=Math.max(d,m),u=s-1,x=new Set([0,u]);for(let n=g;n<u;n+=g)(u-n)*r>=H&&x.add(n);return x},R=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}`},ye=({history:s,methodName:r})=>{const[d,m]=I.useState(null),g=Math.max(1,...s.map(l=>l.paper_count)),u=P-p.left-p.right,x=C-p.top-p.bottom,n=s.length?u/s.length:u,b=Math.max(2,n*.68),A=je(s.length,n),y=Array.from(new Set([0,Math.ceil(g/2),g])),j=d==null?null:s[d],f=j?R(j):null;return e.jsxs("div",{className:"method-usage-chart-wrap",children:[e.jsxs("svg",{className:"method-usage-chart",viewBox:`0 0 ${P} ${C}`,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"]}),y.map(l=>{const c=p.top+x-l/g*x;return e.jsxs("g",{children:[e.jsx("line",{className:"method-usage-gridline",x1:p.left,x2:P-p.right,y1:c,y2:c}),e.jsx("text",{className:"method-usage-y-label",x:p.left-8,y:c+3,textAnchor:"end",children:l})]},l)}),s.map((l,c)=>{const N=l.paper_count/g*x,S=l.paper_count>0?Math.max(1,N):0,z=p.left+n*c+(n-b)/2,a=p.top+x-S,v=d===c,k=c===s.length-1,_=R(l);return e.jsxs("g",{className:`method-usage-bar${v?" is-active":""}${k?" is-current":""}`,tabIndex:0,role:"img","aria-label":`${L(l.start_date)}: ${l.paper_count} ${l.paper_count===1?"paper":"papers"}${_?`. ${_}`:""}`,onMouseEnter:()=>m(c),onMouseLeave:()=>m(null),onFocus:()=>m(c),onBlur:()=>m(null),children:[e.jsx("rect",{className:"method-usage-bar-hit",x:p.left+n*c,y:p.top,width:n,height:x}),e.jsx("rect",{className:"method-usage-bar-mark",x:z,y:a,width:b,height:S,rx:"1.5"})]},l.start_date)}),s.map((l,c)=>A.has(c)?e.jsx("text",{className:"method-usage-x-label",x:p.left+n*(c+.5),y:C-11,textAnchor:"middle",children:s.length>48?ge.format(new Date(`${l.start_date}T00:00:00Z`)):L(l.start_date)},l.start_date):null)]}),j&&e.jsxs("div",{className:"method-usage-tooltip",role:"status",children:[e.jsx("strong",{children:L(j.start_date)}),e.jsxs("span",{children:[j.paper_count," ",j.paper_count===1?"paper":"papers",d===s.length-1?" · month to date":""]}),e.jsxs("span",{children:[(j.catalog_share??0).toFixed(2),"% of"," ",(j.catalog_paper_count??0).toLocaleString()," catalog papers"]}),f&&e.jsx("span",{children:f})]})]})},Se=[["trending","trending"],["new","newest"],["cited","most cited"]],Ze=()=>{var T,E,B;const{methodSlug:s}=q(),[r,d]=K(),[m,g]=I.useState("trending"),u=r.get("has_code")==="true",x=r.get("has_hf_artifacts")==="true",n=J(r),b=i=>{const h=new URLSearchParams(r);i?h.set("has_code","true"):h.delete("has_code"),d(h)},A=i=>{const h=new URLSearchParams(r);i?h.set("has_hf_artifacts","true"):h.delete("has_hf_artifacts"),d(h)},y=w({queryKey:["method",s],queryFn:()=>M.getMethod(s),enabled:!!s,staleTime:10*60*1e3}),j=w({queryKey:["areas-all"],queryFn:()=>M.listAreas({page_size:50,ordering:"name"}),enabled:!!((T=y.data)!=null&&T.area_id),staleTime:10*60*1e3}),f=w({queryKey:["method-trend",s],queryFn:()=>M.methodTrend(s),enabled:!!s,staleTime:10*60*1e3}),l=m==="trending"?"trending":m==="cited"?"citation_count":"date_published",c=W({queryKey:[...U.feeds.method,s,l,u,x,n.startDate,n.endDate],queryFn:({pageParam:i=1})=>G.forMethod(s,{page:i,page_size:20,order_by:l,order_dir:"desc",include_resources:!0,repository_limit:1,has_code:u,has_hf_artifacts:x,start_date:n.startDate,end_date:n.endDate}),getNextPageParam:i=>i.next_page,initialPageParam:1,enabled:!!s,staleTime:5*60*1e3,placeholderData:Q}),N=w({queryKey:["related-methods",s],queryFn:()=>M.relatedMethods(s),enabled:!!s,staleTime:10*60*1e3}),S=I.useMemo(()=>{var h;return(((h=c.data)==null?void 0:h.pages.flatMap(V=>V.results))||[]).map(re)},[c.data]),z=ie(c);if(y.isLoading)return e.jsxs("div",{className:"page",children:[e.jsx(F,{className:"h-12 w-1/2 mb-4"}),e.jsx(F,{className:"h-64 w-full"})]});if(y.error||!y.data)return e.jsx("div",{className:"page",children:e.jsx(ne,{variant:"destructive",children:e.jsx(le,{children:"Method not found."})})});const a=y.data,v=(E=j.data)==null?void 0:E.results.find(i=>i.id===a.area_id),k=se(a.source_url),_=k?null:oe(a.source_url);return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(D,{to:"/methods",children:"Methods"}),v&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(D,{to:`/methods#area-${ae(v.name)}`,children:v.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(O,{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($,{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"}),k?e.jsxs(D,{className:"method-source-link",to:k,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("a",{className:"method-source-link",href:_,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()})]}),f.data&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Recent mentions"}),e.jsxs("span",{className:"value",children:[(f.data.recent_paper_count*30/f.data.recent_days).toFixed(1),e.jsx("small",{children:"/mo"})]}),!f.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})]})]}),f.isLoading?e.jsx(F,{className:"h-36 w-full method-trend-skeleton"}):f.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:f.data.recent_paper_count}),e.jsxs("span",{children:["papers / ",f.data.recent_days,"d"]})]})]}),e.jsx(ye,{history:f.data.history,methodName:a.name})]}):null]}),e.jsxs("figure",{className:"method-figure-card",children:[e.jsx(ue,{method:a}),a.image_credit&&e.jsx("figcaption",{children:e.jsx($,{className:"method-image-credit",text:a.image_credit})})]})]}),(((B=N.data)==null?void 0:B.results.length)??0)>0&&e.jsxs("div",{className:"filter-row",children:[e.jsx("span",{className:"label",children:"Related methods"}),N.data.results.map(i=>e.jsx(Z,{method:{slug:i.slug,name:i.name}},i.id))]}),e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:Se.map(([i,h])=>e.jsx("button",{className:`sort-btn ${m===i?"active":""}`,onClick:()=>g(i),children:h},i))}),e.jsx(Y,{hasCode:u,hasHfArtifacts:x,onHasCodeChange:b,onHasHfArtifactsChange:A})]}),e.jsx(ee,{startDate:n.startDate,endDate:n.endDate,onChange:i=>d(te(r,i))}),e.jsxs("div",{className:"results-count",children:[S.length," papers mentioning ",a.name]})]}),c.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((i,h)=>e.jsx(F,{className:"h-40 w-full"},h))}):S.length===0?e.jsx("div",{className:"no-results",children:"No papers tagged with this method yet."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:S.map((i,h)=>e.jsx(X,{paper:i,rank:h+1},i.id))}),e.jsx("div",{ref:z,style:{height:1}}),c.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{Ze as default};
|
|
|
|
| 1 |
+
import{j as e,r as I,u as q,e as K,L as D,ai as Q}from"./index-D6jcIRWs.js";import{R as O}from"./ResearchFollowButton-C2Bfd9dP.js";import{p as U,a as G}from"./papers-DIIIPDpj.js";import{u as w}from"./useQuery-CUJUm4FY.js";import{u as W}from"./useInfiniteQuery-FXco4P1n.js";import{M as Z,P as X}from"./components-DO1X940E.js";import{P as Y}from"./PaperFeedFilters-DNebHp4l.js";import{a as J,P as ee,b as te}from"./PaperDateFilter-CPIqaHaq.js";import{r as se,M as $}from"./MarkdownText-B_D3IE_p.js";import{c as M}from"./catalog-PYrB8_bm.js";import{s as ae}from"./slug-BpH-Nkvz.js";import{t as re}from"./colors-CLwl8a2d.js";import{u as ie}from"./useInfiniteScroll-Dm7JY_X4.js";import{S as F}from"./skeleton-BqkYFmXl.js";import{A as ne,a as le}from"./alert-2MbxVzGL.js";import{s as oe}from"./safeExternalHref-CkBrsh84.js";import"./useMutation-p6mN4h17.js";import"./research-BggtGgC2.js";import"./plus-C4UQ62Q1.js";import"./AuthorAvatar-UMHOVOr9.js";import"./LatexTitle-D_92Jowu.js";import"./popover-DCjqGpW0.js";/* empty css */import"./PaperPreviewLink-fcJyP9H0.js";import"./index-uFGyKu5N.js";import"./index-yduEvk9Z.js";import"./katex-DkKDou_j.js";import"./hover-card-DPpv0l_x.js";import"./useIntersectionObserver-3LTuEaFW.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"},o=({x:s,y:r,w:d,h:m,fill:g,stroke:u,label:x,fontSize:n=10})=>e.jsxs("g",{children:[e.jsx("rect",{x:s,y:r,width:d,height:m,rx:"3",ry:"3",fill:g,stroke:u,strokeWidth:"1"}),e.jsx("text",{x:s+d/2,y:r+m/2,fontSize:n,fontFamily:"var(--sans)",fill:t.ink,textAnchor:"middle",dominantBaseline:"middle",children:x})]}),ce=()=>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(o,{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(o,{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(o,{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(o,{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(o,{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(o,{x:100,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"Q",fontSize:13}),e.jsx(o,{x:160,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"K",fontSize:13}),e.jsx(o,{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"]})]}),de=()=>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(o,{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(o,{x:35,y:88,w:110,h:26,fill:t.yellow,stroke:t.yellowS,label:"Augment t₁",fontSize:11}),e.jsx(o,{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(o,{x:35,y:138,w:110,h:26,fill:t.orange,stroke:t.orangeS,label:"Encoder f",fontSize:11}),e.jsx(o,{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(o,{x:35,y:188,w:110,h:26,fill:t.purple,stroke:t.purpleS,label:"Projection g",fontSize:11}),e.jsx(o,{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(o,{x:35,y:238,w:110,h:26,fill:t.pink,stroke:t.pinkS,label:"z₁",fontSize:13}),e.jsx(o,{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₂) / τ"})]}),me=[["my-skill/",""],["├── SKILL.md","# Required: metadata + instructions"],["├── scripts/","# Optional: executable code"],["├── references/","# Optional: documentation"],["├── assets/","# Optional: templates, resources"],["└── ...","# Any additional files or directories"]],he=()=>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"}),me.map(([s,r],d)=>{const m=92+d*44;return e.jsxs("g",{children:[e.jsx("text",{x:"44",y:m,fontSize:"11",fontFamily:"var(--mono)",fill:t.ink,dominantBaseline:"middle",children:s}),r?e.jsx("text",{x:"138",y:m,fontSize:"8.5",fontFamily:"var(--mono)",fill:t.faint,dominantBaseline:"middle",children:r}):null]},s)})]}),xe={attention:ce,"contrastive-learning":de,"agent-skills":he},pe=({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(o,{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(o,{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(o,{x:80,y:250,w:200,h:50,fill:t.purple,stroke:t.purpleS,label:"Output",fontSize:12})]}),ue=({method:s})=>{const r=(s.slug||"").toLowerCase(),d=xe[r];if(d)return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(d,{})});if(s.image_url){const m=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${m}`,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(pe,{method:s})})},P=720,C=138,p={top:8,right:10,bottom:25,left:36},H=56,fe=new Intl.DateTimeFormat("en",{month:"short",year:"2-digit",timeZone:"UTC"}),ge=new Intl.DateTimeFormat("en",{year:"numeric",timeZone:"UTC"}),L=s=>fe.format(new Date(`${s}T00:00:00Z`)),je=(s,r)=>{if(s===0)return new Set;const d=s>48?12:s>36?6:s>18?3:2,m=Math.max(1,Math.ceil(H/r)),g=Math.max(d,m),u=s-1,x=new Set([0,u]);for(let n=g;n<u;n+=g)(u-n)*r>=H&&x.add(n);return x},R=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}`},ye=({history:s,methodName:r})=>{const[d,m]=I.useState(null),g=Math.max(1,...s.map(l=>l.paper_count)),u=P-p.left-p.right,x=C-p.top-p.bottom,n=s.length?u/s.length:u,b=Math.max(2,n*.68),A=je(s.length,n),y=Array.from(new Set([0,Math.ceil(g/2),g])),j=d==null?null:s[d],f=j?R(j):null;return e.jsxs("div",{className:"method-usage-chart-wrap",children:[e.jsxs("svg",{className:"method-usage-chart",viewBox:`0 0 ${P} ${C}`,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"]}),y.map(l=>{const c=p.top+x-l/g*x;return e.jsxs("g",{children:[e.jsx("line",{className:"method-usage-gridline",x1:p.left,x2:P-p.right,y1:c,y2:c}),e.jsx("text",{className:"method-usage-y-label",x:p.left-8,y:c+3,textAnchor:"end",children:l})]},l)}),s.map((l,c)=>{const N=l.paper_count/g*x,S=l.paper_count>0?Math.max(1,N):0,z=p.left+n*c+(n-b)/2,a=p.top+x-S,v=d===c,k=c===s.length-1,_=R(l);return e.jsxs("g",{className:`method-usage-bar${v?" is-active":""}${k?" is-current":""}`,tabIndex:0,role:"img","aria-label":`${L(l.start_date)}: ${l.paper_count} ${l.paper_count===1?"paper":"papers"}${_?`. ${_}`:""}`,onMouseEnter:()=>m(c),onMouseLeave:()=>m(null),onFocus:()=>m(c),onBlur:()=>m(null),children:[e.jsx("rect",{className:"method-usage-bar-hit",x:p.left+n*c,y:p.top,width:n,height:x}),e.jsx("rect",{className:"method-usage-bar-mark",x:z,y:a,width:b,height:S,rx:"1.5"})]},l.start_date)}),s.map((l,c)=>A.has(c)?e.jsx("text",{className:"method-usage-x-label",x:p.left+n*(c+.5),y:C-11,textAnchor:"middle",children:s.length>48?ge.format(new Date(`${l.start_date}T00:00:00Z`)):L(l.start_date)},l.start_date):null)]}),j&&e.jsxs("div",{className:"method-usage-tooltip",role:"status",children:[e.jsx("strong",{children:L(j.start_date)}),e.jsxs("span",{children:[j.paper_count," ",j.paper_count===1?"paper":"papers",d===s.length-1?" · month to date":""]}),e.jsxs("span",{children:[(j.catalog_share??0).toFixed(2),"% of"," ",(j.catalog_paper_count??0).toLocaleString()," catalog papers"]}),f&&e.jsx("span",{children:f})]})]})},Se=[["trending","trending"],["new","newest"],["cited","most cited"]],Ze=()=>{var T,E,B;const{methodSlug:s}=q(),[r,d]=K(),[m,g]=I.useState("trending"),u=r.get("has_code")==="true",x=r.get("has_hf_artifacts")==="true",n=J(r),b=i=>{const h=new URLSearchParams(r);i?h.set("has_code","true"):h.delete("has_code"),d(h)},A=i=>{const h=new URLSearchParams(r);i?h.set("has_hf_artifacts","true"):h.delete("has_hf_artifacts"),d(h)},y=w({queryKey:["method",s],queryFn:()=>M.getMethod(s),enabled:!!s,staleTime:10*60*1e3}),j=w({queryKey:["areas-all"],queryFn:()=>M.listAreas({page_size:50,ordering:"name"}),enabled:!!((T=y.data)!=null&&T.area_id),staleTime:10*60*1e3}),f=w({queryKey:["method-trend",s],queryFn:()=>M.methodTrend(s),enabled:!!s,staleTime:10*60*1e3}),l=m==="trending"?"trending":m==="cited"?"citation_count":"date_published",c=W({queryKey:[...U.feeds.method,s,l,u,x,n.startDate,n.endDate],queryFn:({pageParam:i=1})=>G.forMethod(s,{page:i,page_size:20,order_by:l,order_dir:"desc",include_resources:!0,repository_limit:1,has_code:u,has_hf_artifacts:x,start_date:n.startDate,end_date:n.endDate}),getNextPageParam:i=>i.next_page,initialPageParam:1,enabled:!!s,staleTime:5*60*1e3,placeholderData:Q}),N=w({queryKey:["related-methods",s],queryFn:()=>M.relatedMethods(s),enabled:!!s,staleTime:10*60*1e3}),S=I.useMemo(()=>{var h;return(((h=c.data)==null?void 0:h.pages.flatMap(V=>V.results))||[]).map(re)},[c.data]),z=ie(c);if(y.isLoading)return e.jsxs("div",{className:"page",children:[e.jsx(F,{className:"h-12 w-1/2 mb-4"}),e.jsx(F,{className:"h-64 w-full"})]});if(y.error||!y.data)return e.jsx("div",{className:"page",children:e.jsx(ne,{variant:"destructive",children:e.jsx(le,{children:"Method not found."})})});const a=y.data,v=(E=j.data)==null?void 0:E.results.find(i=>i.id===a.area_id),k=se(a.source_url),_=k?null:oe(a.source_url);return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(D,{to:"/methods",children:"Methods"}),v&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(D,{to:`/methods#area-${ae(v.name)}`,children:v.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(O,{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($,{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"}),k?e.jsxs(D,{className:"method-source-link",to:k,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("a",{className:"method-source-link",href:_,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()})]}),f.data&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Recent mentions"}),e.jsxs("span",{className:"value",children:[(f.data.recent_paper_count*30/f.data.recent_days).toFixed(1),e.jsx("small",{children:"/mo"})]}),!f.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})]})]}),f.isLoading?e.jsx(F,{className:"h-36 w-full method-trend-skeleton"}):f.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:f.data.recent_paper_count}),e.jsxs("span",{children:["papers / ",f.data.recent_days,"d"]})]})]}),e.jsx(ye,{history:f.data.history,methodName:a.name})]}):null]}),e.jsxs("figure",{className:"method-figure-card",children:[e.jsx(ue,{method:a}),a.image_credit&&e.jsx("figcaption",{children:e.jsx($,{className:"method-image-credit",text:a.image_credit})})]})]}),(((B=N.data)==null?void 0:B.results.length)??0)>0&&e.jsxs("div",{className:"filter-row",children:[e.jsx("span",{className:"label",children:"Related methods"}),N.data.results.map(i=>e.jsx(Z,{method:{slug:i.slug,name:i.name}},i.id))]}),e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:Se.map(([i,h])=>e.jsx("button",{className:`sort-btn ${m===i?"active":""}`,onClick:()=>g(i),children:h},i))}),e.jsx(Y,{hasCode:u,hasHfArtifacts:x,onHasCodeChange:b,onHasHfArtifactsChange:A})]}),e.jsx(ee,{startDate:n.startDate,endDate:n.endDate,onChange:i=>d(te(r,i))}),e.jsxs("div",{className:"results-count",children:[S.length," papers mentioning ",a.name]})]}),c.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((i,h)=>e.jsx(F,{className:"h-40 w-full"},h))}):S.length===0?e.jsx("div",{className:"no-results",children:"No papers tagged with this method yet."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:S.map((i,h)=>e.jsx(X,{paper:i,rank:h+1},i.id))}),e.jsx("div",{ref:z,style:{height:1}}),c.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{Ze as default};
|
assets/{MethodsIndexView-CW-VvDvI.js → MethodsIndexView-2d98MRig.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import{n as _,r as d,j as e,L as v}from"./index-
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
|
|
|
| 1 |
+
import{n as _,r as d,j as e,L as v}from"./index-D6jcIRWs.js";import{u as c}from"./useQuery-CUJUm4FY.js";import{c as m}from"./catalog-PYrB8_bm.js";import{s as N}from"./slug-BpH-Nkvz.js";import{S as x}from"./skeleton-BqkYFmXl.js";import{A as w,a as F}from"./alert-2MbxVzGL.js";import{T as L}from"./TaxonomySuggestionTile-BLk1tYYE.js";import{T}from"./TaxonomyTrending-Dqu0dPfc.js";import"./SignInToEditDialog-RzK54RAM.js";import"./button-Bzx0ccHH.js";import"./input-CCN-4hy4.js";import"./textarea-sXKODM3W.js";import"./searchable-select-B7z6Fcrr.js";import"./popover-DCjqGpW0.js";import"./dialog-vGFIbcd-.js";import"./search-CfTufeR7.js";import"./loader-circle-BuDrH29B.js";import"./useMutation-p6mN4h17.js";import"./submissions-DNa3tQdo.js";import"./plus-C4UQ62Q1.js";import"./trending-up-DqN3HzZ5.js";/**
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
assets/{NotFound-pWH_hqC2.js → NotFound-BTsJlVc8.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{b as o,r as s,j as t,L as a}from"./index-
|
|
|
|
| 1 |
+
import{b as o,r as s,j as t,L as a}from"./index-D6jcIRWs.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-DUBXw9I0.js → OrganizationContributionGraph-DzcTqxNw.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{r as b,j as o}from"./index-
|
|
|
|
| 1 |
+
import{r as b,j as o}from"./index-D6jcIRWs.js";import{u as z}from"./useQuery-CUJUm4FY.js";import{S as T}from"./skeleton-BqkYFmXl.js";import{c as w}from"./catalog-PYrB8_bm.js";const x=24*60*60*1e3,f=12,y=3,v=new Map([[1,"Mon"],[3,"Wed"],[5,"Fri"]]),$=n=>new Date(`${n}T00:00:00Z`),N=n=>n.toISOString().slice(0,10),_=(n,r)=>{if(n===0)return 0;const i=r.findIndex(s=>n<=s);return i===-1?4:i+1},D=n=>{const r=$(n.start_date),i=$(n.end_date),s=new Date(r.getTime()-r.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,m)=>e-m),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 m=new Date(e),d=N(m),g=e>=r.getTime()&&e<=i.getTime(),C=g?p.get(d)??0:0;l.push({key:d,date:m,count:C,inRange:g,level:_(C,c)})}const t=l.length/7,a=[];let j=-1;for(let e=0;e<t;e+=1){const d=l.slice(e*7,e*7+7).find(g=>g.inRange&&(e===0||g.date.getUTCDate()<=7));d&&d.date.getUTCMonth()!==j&&(j=d.date.getUTCMonth(),a.length>0&&e-a[a.length-1].column<3&&a.pop(),a.push({label:d.date.toLocaleString("en",{month:"short",timeZone:"UTC"}),column:e}))}return{days:l,months:a,weekCount:t}},L=({data:n,organizationName:r,title:i="Paper contributions",noun:s="paper"})=>{const h=b.useRef(null),{days:p,months:u,weekCount:c}=b.useMemo(()=>D(n),[n]),l=c*f+(c-1)*y;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":`${r} 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,a)=>o.jsx("span",{children:v.get(a)??""},a))}),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"})]})]})},A=({organizationSlug:n,organizationName:r})=>{const i=z({queryKey:["organization-contributions",n],queryFn:()=>w.organizationContributions(n),staleTime:6e5});return i.isLoading?o.jsx(T,{className:"organization-contributions-skeleton"}):i.data?o.jsx(L,{data:i.data,organizationName:r}):null};export{L as C,A as O};
|
assets/OrganizationDetailView-0SsciBmz.js
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
import{u as t,j as r}from"./index-CqKcHUvZ.js";import{O as i}from"./OrganizationPaperFeed-CF5IpMXI.js";import m from"./NotFound-pWH_hqC2.js";import"./ResearchFollowButton-CrCIwiok.js";import"./useQuery-Cngk7eL9.js";import"./useMutation-BItMAQ7s.js";import"./research-Dt0MUW0x.js";import"./plus-DZF-NxR0.js";import"./components-Dmnn5Z5p.js";import"./papers-bE3C_Qzl.js";import"./AuthorAvatar-CWCqOa0h.js";import"./LatexTitle-BI9yl-Fo.js";import"./colors-_scCXfCe.js";import"./safeExternalHref-CkBrsh84.js";import"./MarkdownText-CJQADo_f.js";/* empty css */import"./PaperPreviewLink-C6khj_iZ.js";import"./index-CqELxJb0.js";import"./index-DBHj7UWg.js";import"./katex-DkKDou_j.js";import"./hover-card-BTsA69o8.js";import"./OrganizationContributionGraph-DUBXw9I0.js";import"./skeleton-DleNhBYA.js";import"./catalog-D26nGNnK.js";import"./PaperFeedFilters-SOqb93ez.js";import"./PaperDateFilter-zHw5tq6B.js";import"./popover-BcoS9Jmp.js";import"./alert-Z2yFUcyL.js";import"./searchable-select-DY1KXMvg.js";import"./button-BYn4yUH_.js";import"./dialog-B-oqHDuH.js";import"./search-9n8Usynh.js";import"./loader-circle-CZgakNH7.js";import"./useInfiniteScroll-DVF-b-LX.js";import"./useIntersectionObserver-CiBk_Oug.js";import"./usePapers-By3yMmMn.js";import"./useInfiniteQuery-lxaMAHEu.js";import"./organizationNames-BVKzYEBp.js";const L=()=>{const{orgSlug:o}=t();return o?r.jsx(i,{organizationSlug:o}):r.jsx(m,{})};export{L as default};
|
|
|
|
|
|
assets/OrganizationDetailView-BsHsK07O.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{u as t,j as r}from"./index-D6jcIRWs.js";import{O as i}from"./OrganizationPaperFeed-BsFHy5Y7.js";import m from"./NotFound-BTsJlVc8.js";import"./ResearchFollowButton-C2Bfd9dP.js";import"./useQuery-CUJUm4FY.js";import"./useMutation-p6mN4h17.js";import"./research-BggtGgC2.js";import"./plus-C4UQ62Q1.js";import"./components-DO1X940E.js";import"./papers-DIIIPDpj.js";import"./AuthorAvatar-UMHOVOr9.js";import"./LatexTitle-D_92Jowu.js";import"./colors-CLwl8a2d.js";import"./safeExternalHref-CkBrsh84.js";import"./MarkdownText-B_D3IE_p.js";/* empty css */import"./PaperPreviewLink-fcJyP9H0.js";import"./index-uFGyKu5N.js";import"./index-yduEvk9Z.js";import"./katex-DkKDou_j.js";import"./hover-card-DPpv0l_x.js";import"./OrganizationContributionGraph-DzcTqxNw.js";import"./skeleton-BqkYFmXl.js";import"./catalog-PYrB8_bm.js";import"./PaperFeedFilters-DNebHp4l.js";import"./PaperDateFilter-CPIqaHaq.js";import"./popover-DCjqGpW0.js";import"./alert-2MbxVzGL.js";import"./searchable-select-B7z6Fcrr.js";import"./button-Bzx0ccHH.js";import"./dialog-vGFIbcd-.js";import"./search-CfTufeR7.js";import"./loader-circle-BuDrH29B.js";import"./useInfiniteScroll-Dm7JY_X4.js";import"./useIntersectionObserver-3LTuEaFW.js";import"./usePapers-BbCSwcVk.js";import"./useInfiniteQuery-FXco4P1n.js";import"./organizationNames-BVKzYEBp.js";const L=()=>{const{orgSlug:o}=t();return o?r.jsx(i,{organizationSlug:o}):r.jsx(m,{})};export{L as default};
|
assets/{OrganizationPaperFeed-CF5IpMXI.js → OrganizationPaperFeed-BsFHy5Y7.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{c as z,e as B,r as u,j as e,L as A}from"./index-
|
|
|
|
| 1 |
+
import{c as z,e as B,r as u,j as e,L as A}from"./index-D6jcIRWs.js";import{R as E}from"./ResearchFollowButton-C2Bfd9dP.js";import{u as C}from"./useQuery-CUJUm4FY.js";import{P as Q}from"./components-DO1X940E.js";import{M as U}from"./MarkdownText-B_D3IE_p.js";import{O as G}from"./OrganizationContributionGraph-DzcTqxNw.js";import{P as K}from"./PaperFeedFilters-DNebHp4l.js";import{a as W,P as Z,b as J}from"./PaperDateFilter-CPIqaHaq.js";import{A as V,a as X}from"./alert-2MbxVzGL.js";import{S as Y}from"./searchable-select-B7z6Fcrr.js";import{S as $}from"./skeleton-BqkYFmXl.js";import{u as ee}from"./useInfiniteScroll-Dm7JY_X4.js";import{e as ae}from"./usePapers-BbCSwcVk.js";import{c as R}from"./catalog-PYrB8_bm.js";import{d as D,t as se}from"./colors-CLwl8a2d.js";import{o as re,i as te}from"./organizationNames-BVKzYEBp.js";import ne from"./NotFound-BTsJlVc8.js";const oe=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],ie=n=>n==="date_published"||n==="citation_count"?n:"trending",Pe=({organizationSlug:n,taskSlug:d})=>{var y,v,L,P,F,k,w,O;const T=z(),[o,p]=B(),[I,g]=u.useState(!1),f=ie(o.get("order_by")),_=o.get("has_code")==="true",x=o.get("has_hf_artifacts")==="true",h=W(o),j=C({queryKey:["organization",n],queryFn:()=>R.getOrganization(n),staleTime:10*60*1e3}),c=C({queryKey:["organization-areas-with-tasks",n],queryFn:()=>R.organizationAreasWithTasks(n),staleTime:10*60*1e3}),i=ae({organizationSlug:n,taskSlug:d,page_size:12,order_by:f,order_dir:"desc",include_resources:!0,has_code:_,has_hf_artifacts:x,start_date:h.startDate,end_date:h.endDate,enabled:!!n}),S=ee(i);u.useEffect(()=>{g(!1)},[n,d]);const b=u.useMemo(()=>{var s;return(((s=c.data)==null?void 0:s.results)??[]).flatMap(r=>r.tasks.filter(t=>!!t.slug).map(t=>({...t,slug:t.slug,label:D(t.name,t.slug)})))},[c.data]),l=b.find(s=>s.slug===d),N=u.useMemo(()=>{var s;return(((s=i.data)==null?void 0:s.pages)??[]).flatMap(r=>r.results.map(se))},[i.data]),a=j.data??((y=c.data)==null?void 0:y.organization),m=a?re(a):null,H=((L=(v=i.data)==null?void 0:v.pages[0])==null?void 0:L.count)??0;if(((P=j.error)==null?void 0:P.status)===404||((F=c.error)==null?void 0:F.status)===404||((k=i.error)==null?void 0:k.status)===404)return e.jsx(ne,{});if(c.error||i.error)return e.jsx("div",{className:"page",children:e.jsx(V,{variant:"destructive",children:e.jsx(X,{children:"Failed to load organization papers. Please try again."})})});const M=s=>{const r=s.trim().toLocaleLowerCase();return b.filter(t=>`${t.label} ${t.slug}`.toLocaleLowerCase().includes(r)).map(t=>({value:t.slug,label:t.label,description:`${t.paper_count.toLocaleString()} ${t.paper_count===1?"paper":"papers"}`}))},q=s=>{const r=s==="__all__"?`/orgs/${n}`:`/orgs/${n}/${s}`,t=o.toString();T({pathname:r,search:t?`?${t}`:""})};return e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(A,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(A,{to:"/organizations",children:"Organizations"}),e.jsx("span",{children:" / "}),e.jsx("span",{children:(a==null?void 0:a.name)??n}),l&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:" / "}),e.jsx("span",{children:D(l.name,l.slug)})]})]}),e.jsxs("header",{className:"organization-hero",children:[e.jsxs("div",{className:"organization-hero-profile",children:[e.jsx("div",{className:"organizations-eyebrow",children:"ORGANIZATION"}),e.jsxs("h1",{className:`feed-title organization-hero-title${a&&!m&&te(a.name)?" organization-hero-title--long":""}`,children:[a!=null&&a.logo_url&&!I?e.jsx("img",{src:a.logo_url,alt:"",width:58,height:58,onError:()=>g(!0)}):a?e.jsx("span",{className:"organization-hero-monogram","aria-hidden":"true",children:(m??a.name).slice(0,1).toUpperCase()}):null,a?e.jsxs("span",{className:"organization-hero-name",children:[m??a.name,m&&e.jsx("span",{className:"organization-hero-full-name",children:a.name})]}):e.jsx($,{className:"h-12 w-64"})]}),a&&e.jsx(E,{kind:"organization",entityId:a.id}),a&&e.jsxs("div",{className:"feed-subtitle",children:[((w=a.paper_count)==null?void 0:w.toLocaleString())??0," papers",(a.organization_trending_score??0)>0&&a.trending_rank&&e.jsxs(e.Fragment,{children:[" · #",a.trending_rank," trending this month"]})]}),(a==null?void 0:a.description)&&e.jsx(U,{className:"method-description",text:a.description}),a&&e.jsxs("div",{className:"organization-hero-links",children:[a.website_url&&e.jsx("a",{href:a.website_url,target:"_blank",rel:"noreferrer",children:"Website ↗"}),a.hf_url&&e.jsx("a",{href:a.hf_url,target:"_blank",rel:"noreferrer",children:"Hugging Face ↗"}),a.github_url&&e.jsx("a",{href:a.github_url,target:"_blank",rel:"noreferrer",children:"GitHub ↗"})]})]}),e.jsx(G,{organizationSlug:n,organizationName:(a==null?void 0:a.name)??n})]}),e.jsxs("div",{className:"sort-bar",style:{alignItems:"center",gap:16},children:[e.jsx("div",{style:{minWidth:260},children:e.jsx(Y,{value:d??"__all__",onChange:q,placeholder:"All tasks",searchPlaceholder:"Search organization tasks...",emptyMessage:"No matching tasks.",ariaLabel:"Filter papers by task",selectedOption:l?{value:l.slug,label:l.label,description:`${l.paper_count.toLocaleString()} ${l.paper_count===1?"paper":"papers"}`}:{value:"__all__",label:"All tasks",description:`${((O=a==null?void 0:a.paper_count)==null?void 0:O.toLocaleString())??0} papers`},queryKey:["organization-task-options",n],queryFn:async s=>{var r;return[{value:"__all__",label:"All tasks",description:`${((r=a==null?void 0:a.paper_count)==null?void 0:r.toLocaleString())??0} papers`},...M(s)]},enabled:!c.isLoading,className:"h-[38px]"})}),e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:oe.map(([s,r])=>e.jsx("button",{type:"button",className:`sort-btn ${f===s?"active":""}`,onClick:()=>{const t=new URLSearchParams(o);s==="trending"?t.delete("order_by"):t.set("order_by",s),p(t)},children:r},s))}),e.jsx(K,{hasCode:_,hasHfArtifacts:x,onHasCodeChange:s=>{const r=new URLSearchParams(o);s?r.set("has_code","true"):r.delete("has_code"),p(r)},onHasHfArtifactsChange:s=>{const r=new URLSearchParams(o);s?r.set("has_hf_artifacts","true"):r.delete("has_hf_artifacts"),p(r)}})]}),e.jsx(Z,{startDate:h.startDate,endDate:h.endDate,onChange:s=>p(J(o,s))}),e.jsxs("div",{className:"results-count",children:[H.toLocaleString()," papers"]})]}),i.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((s,r)=>e.jsx($,{className:"h-40 w-full"},r))}):N.length===0?e.jsx("div",{className:"no-results",children:(a==null?void 0:a.paper_count)===0?"No papers indexed yet":"No papers found for this selection."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:N.map((s,r)=>e.jsx(Q,{paper:s,rank:r+1,showInstitution:!1},s.id))}),e.jsx("div",{ref:S,style:{height:1}}),i.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center"},children:"Loading more…"})]})]})};export{Pe as O};
|
assets/OrganizationTaskView--dnePIkF.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{u as i,j as t}from"./index-D6jcIRWs.js";import{O as m}from"./OrganizationPaperFeed-BsFHy5Y7.js";import p from"./NotFound-BTsJlVc8.js";import"./ResearchFollowButton-C2Bfd9dP.js";import"./useQuery-CUJUm4FY.js";import"./useMutation-p6mN4h17.js";import"./research-BggtGgC2.js";import"./plus-C4UQ62Q1.js";import"./components-DO1X940E.js";import"./papers-DIIIPDpj.js";import"./AuthorAvatar-UMHOVOr9.js";import"./LatexTitle-D_92Jowu.js";import"./colors-CLwl8a2d.js";import"./safeExternalHref-CkBrsh84.js";import"./MarkdownText-B_D3IE_p.js";/* empty css */import"./PaperPreviewLink-fcJyP9H0.js";import"./index-uFGyKu5N.js";import"./index-yduEvk9Z.js";import"./katex-DkKDou_j.js";import"./hover-card-DPpv0l_x.js";import"./OrganizationContributionGraph-DzcTqxNw.js";import"./skeleton-BqkYFmXl.js";import"./catalog-PYrB8_bm.js";import"./PaperFeedFilters-DNebHp4l.js";import"./PaperDateFilter-CPIqaHaq.js";import"./popover-DCjqGpW0.js";import"./alert-2MbxVzGL.js";import"./searchable-select-B7z6Fcrr.js";import"./button-Bzx0ccHH.js";import"./dialog-vGFIbcd-.js";import"./search-CfTufeR7.js";import"./loader-circle-BuDrH29B.js";import"./useInfiniteScroll-Dm7JY_X4.js";import"./useIntersectionObserver-3LTuEaFW.js";import"./usePapers-BbCSwcVk.js";import"./useInfiniteQuery-FXco4P1n.js";import"./organizationNames-BVKzYEBp.js";const L=()=>{const{orgSlug:o,taskSlug:r}=i();return o&&r?t.jsx(m,{organizationSlug:o,taskSlug:r}):t.jsx(p,{})};export{L as default};
|
assets/OrganizationTaskView-BXRvLYFu.js
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
import{u as i,j as t}from"./index-CqKcHUvZ.js";import{O as m}from"./OrganizationPaperFeed-CF5IpMXI.js";import p from"./NotFound-pWH_hqC2.js";import"./ResearchFollowButton-CrCIwiok.js";import"./useQuery-Cngk7eL9.js";import"./useMutation-BItMAQ7s.js";import"./research-Dt0MUW0x.js";import"./plus-DZF-NxR0.js";import"./components-Dmnn5Z5p.js";import"./papers-bE3C_Qzl.js";import"./AuthorAvatar-CWCqOa0h.js";import"./LatexTitle-BI9yl-Fo.js";import"./colors-_scCXfCe.js";import"./safeExternalHref-CkBrsh84.js";import"./MarkdownText-CJQADo_f.js";/* empty css */import"./PaperPreviewLink-C6khj_iZ.js";import"./index-CqELxJb0.js";import"./index-DBHj7UWg.js";import"./katex-DkKDou_j.js";import"./hover-card-BTsA69o8.js";import"./OrganizationContributionGraph-DUBXw9I0.js";import"./skeleton-DleNhBYA.js";import"./catalog-D26nGNnK.js";import"./PaperFeedFilters-SOqb93ez.js";import"./PaperDateFilter-zHw5tq6B.js";import"./popover-BcoS9Jmp.js";import"./alert-Z2yFUcyL.js";import"./searchable-select-DY1KXMvg.js";import"./button-BYn4yUH_.js";import"./dialog-B-oqHDuH.js";import"./search-9n8Usynh.js";import"./loader-circle-CZgakNH7.js";import"./useInfiniteScroll-DVF-b-LX.js";import"./useIntersectionObserver-CiBk_Oug.js";import"./usePapers-By3yMmMn.js";import"./useInfiniteQuery-lxaMAHEu.js";import"./organizationNames-BVKzYEBp.js";const L=()=>{const{orgSlug:o,taskSlug:r}=i();return o&&r?t.jsx(m,{organizationSlug:o,taskSlug:r}):t.jsx(p,{})};export{L as default};
|
|
|
|
|
|
assets/{OrganizationsIndexView-CLXjlm96.js → OrganizationsIndexView-C_uscBZY.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{e as g,r as h,j as e,L as x}from"./index-
|
|
|
|
| 1 |
+
import{e as g,r as h,j as e,L as x}from"./index-D6jcIRWs.js";import{u}from"./useQuery-CUJUm4FY.js";import{A as j,a as y}from"./alert-2MbxVzGL.js";import{c as N}from"./catalog-PYrB8_bm.js";const f=n=>n==="papers"||n==="name"?n:"trending",_=({organization:n})=>{const[d,i]=h.useState(!1);return!n.logo_url||d?e.jsx("span",{className:"organization-logo organization-logo--fallback","aria-hidden":"true",children:n.name.slice(0,1).toUpperCase()}):e.jsx("span",{className:"organization-logo",children:e.jsx("img",{src:n.logo_url,alt:"",width:48,height:48,onError:()=>i(!0)})})},S=()=>{const[n,d]=g(),i=f(n.get("sort")),c=n.get("q")??"",o=u({queryKey:["organizations","featured"],queryFn:()=>N.organizationIndex(),staleTime:10*60*1e3}),p=s=>{const a=new URLSearchParams(n),t=s.sort??i,r=s.query??c;t==="trending"?a.delete("sort"):a.set("sort",t),r.trim()?a.set("q",r):a.delete("q"),d(a)},m=h.useMemo(()=>{var t;const s=c.trim().toLocaleLowerCase(),a=(((t=o.data)==null?void 0:t.results)??[]).filter(r=>[r.name,r.slug,r.hf_slug??""].join(" ").toLocaleLowerCase().includes(s));return i==="papers"?[...a].sort((r,l)=>(l.paper_count??0)-(r.paper_count??0)||r.name.localeCompare(l.name)||r.slug.localeCompare(l.slug)):i==="name"?[...a].sort((r,l)=>r.name.localeCompare(l.name)||r.slug.localeCompare(l.slug)):a},[o.data,c,i]);return e.jsxs("div",{className:"page organizations-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:"Organizations"})]}),e.jsx("div",{className:"feed-subtitle",children:"Explore papers from leading AI organizations, ranked by sustained community momentum over the past 30 days."})]})}),e.jsxs("section",{"aria-labelledby":"organizations-heading",children:[e.jsxs("div",{className:"organizations-section-heading",children:[e.jsx("h2",{id:"organizations-heading",children:o.data?`${o.data.count.toLocaleString()} organizations`:"Organizations"}),e.jsx("span",{children:i==="trending"?"Ranked by 30-day momentum":i==="papers"?"Sorted by linked papers":"Sorted A–Z"})]}),e.jsxs("div",{className:"organizations-controls",children:[e.jsxs("label",{children:[e.jsx("span",{className:"sr-only",children:"Search organizations"}),e.jsx("input",{type:"search",value:c,onChange:s=>p({query:s.target.value}),placeholder:"Search organizations"})]}),e.jsx("div",{className:"organizations-sort","aria-label":"Sort organizations",children:[["trending","Trending"],["papers","Most papers"],["name","A–Z"]].map(([s,a])=>e.jsx("button",{type:"button",className:i===s?"active":"","aria-pressed":i===s,onClick:()=>p({sort:s}),children:a},s))})]}),o.isLoading?e.jsx("div",{className:"organizations-grid","aria-busy":"true","aria-label":"Loading organizations",children:Array.from({length:12}).map((s,a)=>e.jsxs("div",{className:"organization-card organization-card-skeleton",children:[e.jsxs("div",{className:"organization-card-header",children:[e.jsx("span",{className:"organization-logo"}),e.jsxs("div",{children:[e.jsx("span",{className:"organization-skeleton-line"}),e.jsx("span",{className:"organization-skeleton-line short"})]})]}),e.jsx("div",{className:"organization-card-metrics",children:e.jsx("span",{className:"organization-skeleton-line short"})}),e.jsxs("div",{className:"organization-highlight",children:[e.jsx("span",{className:"organization-skeleton-line"}),e.jsx("span",{className:"organization-skeleton-line"})]})]},a))}):o.error?e.jsx(j,{variant:"destructive",children:e.jsxs(y,{children:["Failed to load organizations."," ",e.jsx("button",{type:"button",onClick:()=>o.refetch(),children:"Try again"})]})}):m.length===0?e.jsxs("div",{className:"organizations-empty",children:["No organizations match “",c,"”."]}):e.jsx("div",{className:"organizations-grid",children:m.map(s=>{var r;const a=s.paper_count??0,t=s.first_paper_year&&s.latest_paper_year?s.first_paper_year===s.latest_paper_year?String(s.first_paper_year):`${s.first_paper_year}–${s.latest_paper_year}`:null;return e.jsxs(x,{to:`/orgs/${s.slug}`,className:"organization-card","aria-label":a?`Browse ${a.toLocaleString()} ${s.name} papers`:`Browse ${s.name} papers`,children:[e.jsxs("div",{className:"organization-card-header",children:[e.jsx(_,{organization:s}),e.jsxs("div",{children:[e.jsx("h3",{children:s.name}),e.jsxs("span",{children:["@",s.hf_slug??s.slug]})]})]}),e.jsxs("div",{className:"organization-card-metrics",children:[e.jsx("strong",{children:a.toLocaleString()}),e.jsx("span",{children:a===1?"paper":"papers"}),i==="trending"&&s.trending_rank&&e.jsxs("span",{className:"organization-rank",children:["#",s.trending_rank]})]}),e.jsxs("div",{className:"organization-highlight",children:[e.jsx("span",{children:"Trending paper"}),e.jsx("strong",{children:((r=s.top_trending_paper)==null?void 0:r.title)??"No papers indexed yet"})]}),e.jsxs("div",{className:"organization-card-footer",children:[t?`Publishing ${t}`:"Research archive ready",e.jsx("span",{"aria-hidden":"true",children:"↗"})]})]},s.id)})})]})]})};export{S as default};
|
assets/{PaperDateFilter-zHw5tq6B.js → PaperDateFilter-CPIqaHaq.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{r as p,j as n}from"./index-
|
|
|
|
| 1 |
+
import{r as p,j as n}from"./index-D6jcIRWs.js";import{P as q,a as G,b as Q}from"./popover-DCjqGpW0.js";const E=(e,t)=>{const a=new Date(t),s=new Date(a);return s.setUTCDate(a.getUTCDate()-(e==="week"?6:29)),{startDate:s.toISOString().slice(0,10),endDate:a.toISOString().slice(0,10)}},z=e=>({startDate:e.get("start_date")||void 0,endDate:e.get("end_date")||void 0}),oe=(e,t=new Date,a="week")=>{const s=z(e);if(s.startDate||s.endDate||e.get("time")==="all_time")return s;const c=new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()));return E(a,c)},J=(e,t)=>{const a=new URLSearchParams(e);return t.startDate?a.set("start_date",t.startDate):a.delete("start_date"),t.endDate?a.set("end_date",t.endDate):a.delete("end_date"),a.delete("time"),a},ie=(e,t)=>{const a=J(e,t);return!t.startDate&&!t.endDate&&a.set("time","all_time"),a},K=new Intl.DateTimeFormat("en",{month:"long",year:"numeric",timeZone:"UTC"}),O=new Intl.DateTimeFormat("en",{month:"short",timeZone:"UTC"}),L="(max-width: 640px)",X=()=>{const[e,t]=p.useState(()=>typeof window<"u"&&window.matchMedia(L).matches);return p.useEffect(()=>{const a=window.matchMedia(L),s=c=>t(c.matches);return t(a.matches),a.addEventListener("change",s),()=>a.removeEventListener("change",s)},[]),e},V=e=>e.toISOString().slice(0,10),b=e=>new Date(`${e}T00:00:00Z`),ee=()=>{const e=new Date;return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()))},R=(e,t)=>new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth()+t,1)),M=e=>new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),1)),te=(e,t)=>new Date(Date.UTC(t,e.getUTCMonth(),1)),w=(e,t)=>e.startDate===t.startDate&&e.endDate===t.endDate,ae=(e,t)=>{const a=b(e),s=b(t),c=O.format(a),l=O.format(s),g=a.getUTCDate(),d=s.getUTCDate(),o=a.getUTCFullYear(),u=s.getUTCFullYear();return e===t?`${c} ${g}, ${o}`:o===u&&a.getUTCMonth()===s.getUTCMonth()?`${c} ${g}–${d}, ${o}`:o===u?`${c} ${g}–${l} ${d}, ${o}`:`${c} ${g}, ${o}–${l} ${d}, ${u}`},ne=e=>{const t=e.getUTCFullYear(),a=e.getUTCMonth(),s=new Date(Date.UTC(t,a,1)),c=(s.getUTCDay()+6)%7,l=new Date(s);return l.setUTCDate(s.getUTCDate()-c),Array.from({length:42},(g,d)=>{const o=new Date(l);return o.setUTCDate(l.getUTCDate()+d),{iso:V(o),day:o.getUTCDate(),outsideMonth:o.getUTCMonth()!==a}})},A=({month:e,today:t,startDate:a,endDate:s,onSelect:c,yearLabel:l,yearValue:g,onYearChange:d,secondary:o=!1})=>{const u=p.useMemo(()=>ne(e),[e]);return n.jsxs("section",{className:`paper-date-calendar${o?" paper-date-calendar-secondary":""}`,children:[n.jsxs("label",{className:"paper-date-year",children:[n.jsx("span",{children:l}),n.jsx("input",{type:"number",inputMode:"numeric",min:"1900",max:t.slice(0,4),step:"1",value:g,onChange:r=>d(r.target.value)})]}),n.jsx("h3",{children:K.format(e)}),n.jsx("div",{className:"paper-date-weekdays","aria-hidden":"true",children:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"].map(r=>n.jsx("span",{children:r},r))}),n.jsx("div",{className:"paper-date-days",children:u.map(r=>{const h=r.iso===a||r.iso===s,T=!!(a&&s&&r.iso>a&&r.iso<s),m=r.outsideMonth||r.iso>t;return n.jsx("button",{type:"button","aria-label":r.iso,"aria-selected":h,disabled:m,className:["paper-date-day",r.outsideMonth?"outside":"",h?"selected":"",T?"in-range":"",r.iso===t?"today":""].filter(Boolean).join(" "),onClick:()=>c(r.iso),children:r.day},r.iso)})})]})},I=({calendar:e,onPrevious:t,onNext:a,secondary:s=!1})=>n.jsxs("div",{className:`paper-date-navigation-group${s?" paper-date-navigation-group-secondary":""}`,children:[n.jsx("button",{type:"button","aria-label":`Previous ${e} month`,onClick:t,children:"←"}),n.jsx("button",{type:"button","aria-label":`Next ${e} month`,onClick:a,children:"→"})]}),ce=({startDate:e,endDate:t,onChange:a,currentDate:s})=>{const c=X(),l=s?b(s):ee(),[g,d]=p.useState(!1),[o,u]=p.useState(),[r,h]=p.useState(),[T,m]=p.useState(()=>M(l)),[$,D]=p.useState(()=>R(M(l),1)),[H,y]=p.useState(()=>String(l.getUTCFullYear())),[B,U]=p.useState(()=>String(l.getUTCFullYear())),f={startDate:e,endDate:t},N=E("week",l),Y=E("month",l),P=V(l),v=!!(e&&t&&!w(f,N)&&!w(f,Y)),Z=()=>{u(e),h(t);const i=M(e?b(e):l),C=M(t?b(t):R(i,1));m(i),D(C),y(String(i.getUTCFullYear())),U(String(C.getUTCFullYear())),d(!0)},k=(i,C,F)=>{if(C(i),!/^\d{4}$/.test(i))return;const x=Number(i);x>=1900&&x<=l.getUTCFullYear()&&F(j=>te(j,x))},S=(i,C,F,x)=>{const j=R(i,C);F(j),x(String(j.getUTCFullYear()))},_=i=>{!o||r?(u(i),h(void 0)):i<o?u(i):h(i)},W=()=>{a({}),d(!1)};return n.jsxs("div",{className:`paper-date-filter${c?" paper-date-filter-single-calendar":""}`,role:"group","aria-label":"Publication date",children:[n.jsx("button",{type:"button",className:`sort-btn sort-btn-time${w(f,N)?" active":""}`,onClick:()=>a(N),children:"Last Week"}),n.jsx("button",{type:"button",className:`sort-btn sort-btn-time${w(f,Y)?" active":""}`,onClick:()=>a(Y),children:"Last Month"}),n.jsx("button",{type:"button",className:`sort-btn sort-btn-time${!e&&!t?" active":""}`,onClick:()=>a({}),children:"All Time"}),n.jsxs(q,{open:g,onOpenChange:i=>{i?Z():d(!1)},children:[n.jsx(G,{asChild:!0,children:n.jsx("button",{type:"button",className:`sort-btn sort-btn-time${v?" active":""}`,"aria-label":v?"Change date range":"Select a range",children:v&&e&&t?ae(e,t):"Select a range"})}),n.jsxs(Q,{align:"end",className:`paper-date-popover${c?" paper-date-popover-single-calendar":""}`,role:"dialog","aria-label":"Select a date range",children:[n.jsxs("div",{className:"paper-date-popover-header",children:[n.jsx("h2",{children:"Select a date range"}),n.jsx("p",{children:"Choose an inclusive start and end publication date."})]}),n.jsxs("div",{className:"paper-date-navigation",children:[n.jsx(I,{calendar:"start",onPrevious:()=>S(T,-1,m,y),onNext:()=>S(T,1,m,y)}),!c&&n.jsx(I,{calendar:"end",onPrevious:()=>S($,-1,D,U),onNext:()=>S($,1,D,U),secondary:!0})]}),n.jsxs("div",{className:"paper-date-calendars",children:[n.jsx(A,{month:T,today:P,startDate:o,endDate:r,onSelect:_,yearLabel:c?"Year":"Start year",yearValue:H,onYearChange:i=>k(i,y,m)}),!c&&n.jsx(A,{month:$,today:P,startDate:o,endDate:r,onSelect:_,yearLabel:"End year",yearValue:B,onYearChange:i=>k(i,U,D),secondary:!0})]}),n.jsxs("div",{className:"paper-date-actions",children:[n.jsx("button",{type:"button",className:"paper-date-clear",onClick:W,children:"Clear range"}),n.jsxs("div",{children:[n.jsx("button",{type:"button",onClick:()=>d(!1),children:"Cancel"}),n.jsx("button",{type:"button",className:"paper-date-apply",disabled:!o||!r,onClick:()=>{o&&r&&a({startDate:o,endDate:r}),d(!1)},children:"Apply"})]})]})]})]})]})};export{ce as P,z as a,J as b,oe as r,ie as w};
|
assets/PaperDetailView-B-27QVn7.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
assets/PaperDetailView-rFgkO-hW.js
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
assets/{PaperFeedFilters-SOqb93ez.js → PaperFeedFilters-DNebHp4l.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{j as e}from"./index-
|
|
|
|
| 1 |
+
import{j as e}from"./index-D6jcIRWs.js";import{I as n}from"./components-DO1X940E.js";const t=()=>e.jsxs("span",{className:"hf-resource-logo",children:[e.jsx("img",{className:"hf-resource-logo-black",src:"/hf-logo-monochrome-black.svg?v=20260729",alt:""}),e.jsx("img",{className:"hf-resource-logo-white",src:"/hf-logo-monochrome-white.svg?v=20260729",alt:""})]}),l=({checked:s,icon:a,label:r,onChange:o})=>e.jsxs("button",{type:"button",className:`paper-feed-filter ${s?"active":""}`,"aria-pressed":s,onClick:()=>o(!s),children:[e.jsxs("span",{className:"paper-feed-filter-content",children:[e.jsx("span",{className:"paper-feed-filter-icon","aria-hidden":"true",children:a}),r]}),s&&e.jsx("span",{className:"paper-feed-filter-check","aria-hidden":"true",children:"✓"})]}),h=({hasCode:s,hasHfArtifacts:a,onHasCodeChange:r,onHasHfArtifactsChange:o,showDivider:c=!0,showHasCode:i=!0})=>e.jsxs("div",{className:"paper-feed-resource-controls",role:"group","aria-label":"Resource filters",children:[c&&e.jsx("span",{className:"paper-feed-resource-divider","aria-hidden":"true"}),e.jsxs("div",{className:"paper-feed-filter-options",children:[i&&e.jsx(l,{checked:s,icon:e.jsx(n,{name:"github",size:14}),label:"Has code",onChange:r}),e.jsx(l,{checked:a,icon:e.jsx(t,{}),label:"Has artifacts",onChange:o})]})]});export{h as P};
|
assets/{PaperPreviewLink-C6khj_iZ.js → PaperPreviewLink-fcJyP9H0.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import{o as F,f as j,m as b,a as le,p as O,b as z,n as D,h as ce,s as ue,c as he,v as pe,S as me}from"./index-
|
| 2 |
`,inConstruct:"mathFlowMeta"},{character:"$",after:t?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:r,inlineMath:n}};function r(s,o,l,a){const c=s.value||"",m=l.createTracker(a),f="$".repeat(Math.max(fe(c,"$")+1,2)),g=l.enter("mathFlow");let d=m.move(f);if(s.meta){const x=l.enter("mathFlowMeta");d+=m.move(l.safe(s.meta,{after:`
|
| 3 |
`,before:d,encode:["$"],...m.current()})),x()}return d+=m.move(`
|
| 4 |
`),c&&(d+=m.move(c+`
|
|
|
|
| 1 |
+
import{o as F,f as j,m as b,a as le,p as O,b as z,n as D,h as ce,s as ue,c as he,v as pe,S as me}from"./index-uFGyKu5N.js";import{l as fe}from"./index-yduEvk9Z.js";import R from"./katex-DkKDou_j.js";import{j as p,K as A,Y as de,o as C,d as xe,f as ge,L as T,A as ye}from"./index-D6jcIRWs.js";import{u as we}from"./useQuery-CUJUm4FY.js";import{H as be,a as Ne,b as ve}from"./hover-card-DPpv0l_x.js";import{a as I,p as ke}from"./papers-DIIIPDpj.js";import{u as Fe}from"./useMutation-p6mN4h17.js";function je(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:s},exit:{mathFlow:i,mathFlowFence:n,mathFlowFenceMeta:r,mathFlowValue:l,mathText:o,mathTextData:l}};function e(a){const c={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[c]}},a)}function t(){this.buffer()}function r(){const a=this.resume(),c=this.stack[this.stack.length-1];F(c.type==="math"),c.meta=a}function n(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function i(a){const c=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),m=this.stack[this.stack.length-1];F(m.type==="math"),this.exit(a),m.value=c;const f=m.data.hChildren[0];F(f.type==="element"),F(f.tagName==="code"),f.children.push({type:"text",value:c}),this.data.mathFlowInside=void 0}function s(a){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},a),this.buffer()}function o(a){const c=this.resume(),m=this.stack[this.stack.length-1];F(m.type==="inlineMath"),this.exit(a),m.value=c,m.data.hChildren.push({type:"text",value:c})}function l(a){this.config.enter.data.call(this,a),this.config.exit.data.call(this,a)}}function Ce(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),n.peek=i,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:`
|
| 2 |
`,inConstruct:"mathFlowMeta"},{character:"$",after:t?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:r,inlineMath:n}};function r(s,o,l,a){const c=s.value||"",m=l.createTracker(a),f="$".repeat(Math.max(fe(c,"$")+1,2)),g=l.enter("mathFlow");let d=m.move(f);if(s.meta){const x=l.enter("mathFlowMeta");d+=m.move(l.safe(s.meta,{after:`
|
| 3 |
`,before:d,encode:["$"],...m.current()})),x()}return d+=m.move(`
|
| 4 |
`),c&&(d+=m.move(c+`
|
assets/{PaperReaderView-Dwb0MEz-.js → PaperReaderView-CTxDY9uR.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{r as s,j as a,A as J,u as Se,c as Ue,o as De,W as je,O as Oe,L as Y}from"./index-CqKcHUvZ.js";import{u as ee}from"./useQuery-Cngk7eL9.js";import{u as Ve,R as Qe,A as Xe,c as Ye,d as Ze,a as Ge,P as Je,e as et}from"./ArtifactWorkspace-DZXFAFpE.js";import{M as tt}from"./MarkdownText-CJQADo_f.js";import{g as rt,b as at}from"./papers-bE3C_Qzl.js";import{w as st,e as nt}from"./paperReader-BIpQD5HO.js";import{b as ot}from"./usePapers-By3yMmMn.js";import{c as it}from"./chat-DGBJkcmd.js";import{s as te}from"./safeExternalHref-CkBrsh84.js";import{ChatExperience as ct}from"./ChatView-DZCqXX3T.js";import"./chatSessions-D75G2_U7.js";/* empty css */import"./hover-card-BTsA69o8.js";import"./CatalogEntityPreviewLink-BWMEEf81.js";import"./catalog-D26nGNnK.js";import"./github-sUmGdHig.js";import"./file-text-DnNBEwSF.js";import"./PaperPreviewLink-C6khj_iZ.js";import"./index-CqELxJb0.js";import"./index-DBHj7UWg.js";import"./katex-DkKDou_j.js";import"./useMutation-BItMAQ7s.js";import"./copy-D9WKw0Bi.js";import"./thumbs-up-C19-ALYv.js";import"./arrow-left-D_tIkkPW.js";import"./external-link-CrrdDZf6.js";import"./plus-DZF-NxR0.js";import"./search-9n8Usynh.js";import"./chevron-up-CZWX0SDx.js";import"./AuthorAvatar-CWCqOa0h.js";import"./useInfiniteQuery-lxaMAHEu.js";import"./McpShowcase-oHgWM9FI.js";import"./AgentLogos-ClqC1BaK.js";import"./share-2-Ma7ZrYBX.js";import"./openrouter-BNf4jDuS.js";import"./queryOptions-C9woPjwX.js";function lt(r){return r instanceof J&&r.status===422?"This page could not be turned into a readable paper.":r instanceof J&&r.status===503?"Paper content is still being prepared. Please try again later.":"The paper could not be loaded."}function dt({paperId:r,paperKey:i,paperTitle:o,paperHref:b,sourceUrl:d,resources:t,paperVersion:f="",selectionEnabled:v=!1,onReady:h,onPaperSelection:I,onPaperSelectionError:B}){const c=s.useRef(null),g=ee({queryKey:["paperWebMarkdown",r],queryFn:()=>rt(r),staleTime:5*6e4,retry:(w,j)=>w<2&&!(j instanceof J&&j.status<500),retryDelay:3e3}),x=g.isSuccess;s.useEffect(()=>{x&&(h==null||h())},[h,x]),Ve({enabled:v&&!!f&&x,pagesRoot:c,routeId:i,paperVersion:f,numPages:1,onSelect:I,onError:B});const S=g.data?st(g.data):"";return a.jsxs("div",{className:"pdf-viewer",children:[a.jsx(Qe,{paperTitle:o,paperHref:b,resources:t,label:"Paper controls",children:a.jsx("div",{className:"pdf-toolbar-controls",children:a.jsx("a",{href:d,target:"_blank",rel:"noopener noreferrer",children:"Open original"})})}),a.jsx("div",{className:"pdf-scroll-frame",children:a.jsx("div",{className:"pdf-scroll",role:"region","aria-label":"Paper web page",children:g.isPending?a.jsx("div",{className:"pdf-loading",role:"status",children:"Preparing a readable version of this page…"}):g.isError?a.jsxs("div",{className:"pdf-error",role:"alert",children:[a.jsx("p",{children:lt(g.error)}),a.jsxs("div",{children:[a.jsx("button",{type:"button",onClick:()=>void g.refetch(),children:"Retry"})," ",a.jsx("a",{href:d,target:"_blank",rel:"noopener noreferrer",children:"Open original"})]})]}):a.jsxs("article",{ref:c,className:"reader-web-document","data-page":"1",children:[!S.startsWith("# ")&&a.jsx("h1",{children:o}),a.jsx(tt,{text:S})]})})})]})}const _e=66,ut=240,re="pwc:reader:split-ratio",L=r=>`pwc:reader:session:${r}`,Z=r=>`pwc:reader:assistant-collapsed:${r}`,Ce=r=>`pwc:reader:page:${r}`;function G(r){const i=Number(sessionStorage.getItem(Ce(r)));return Number.isInteger(i)&&i>0?i:1}function pt(){const r=Number(localStorage.getItem(re));return Number.isFinite(r)&&r>=45&&r<=75?r:_e}function ft(r){const i=te(r);if(!i)return null;const o=new URL(i);return(o.hostname==="arxiv.org"||o.hostname==="www.arxiv.org")&&o.pathname.startsWith("/pdf/")&&o.pathname.endsWith(".pdf")&&(o.pathname=o.pathname.slice(0,-4)),o.href}const mt=/^\/pdf\/(\d{4}\.\d{4,5}(?:v\d{1,3})?|[a-z]+(?:-[a-z]+)*(?:\.[A-Z]{2})?\/\d{7}(?:v\d{1,3})?)$/;function ht(r){const i=new URL(r),o=i.pathname.match(mt);return(i.hostname==="arxiv.org"||i.hostname==="www.arxiv.org")&&o&&!i.search?je(`/paper-assets/arxiv-pdf/${o[1]}`)??r:r}function gt(r){return new URL(r).hostname.replace(/^www\./,"")}function bt(r){if(!r)return{};const i={};for(const d of r.repositories??[]){if(!d.is_official)continue;const t=te(d.url);if(!t)continue;const f=new URL(t),v=f.pathname.split("/").filter(Boolean);if((f.hostname==="github.com"||f.hostname==="www.github.com")&&v.length>=2){i.repository={href:t,stars:d.num_stars||0};break}}const o=[...r.project_pages??[]].sort((d,t)=>Number(t.is_official)-Number(d.is_official));for(const d of o){const t=te(d.url);if(t){i.projectPage={href:t,label:gt(t)};break}}const b=r.hf_artifact_summary?r.hf_artifact_summary.model_count+r.hf_artifact_summary.dataset_count+r.hf_artifact_summary.space_count:new Set([...r.hf_models??[],...r.hf_datasets??[],...r.hf_spaces??[]]).size;return b>0&&r.arxiv_id&&(i.huggingFace={href:`https://huggingface.co/papers/${r.arxiv_id.replace(/v\d+$/i,"")}`,count:b}),i}function vt(){var xe,Pe,we,ye,Re;const r=Ue(),{paperId:i}=Se(),o=De(i??"").replace(/v\d+$/i,""),b=ot(o,!!o),d=ee({queryKey:["chatAvailability"],queryFn:()=>it.getAvailability(),refetchInterval:3e4,retry:!1}),t=b.data,f=t?nt(t):null,v=f?null:(t==null?void 0:t.source)==="external"?je(`/paper-assets/external/${t.id}/paper.pdf`):ft(t==null?void 0:t.url_pdf),h=v&&(t==null?void 0:t.source)!=="external"?ht(v):v,I=bt(t),B=s.useMemo(()=>{var e;return(e=t==null?void 0:t.author_links)==null?void 0:e.flatMap(n=>n.id?[{id:n.id,name:n.name,avatarUrl:n.hf_avatar_url}]:[])},[t==null?void 0:t.author_links]),c=((xe=t==null?void 0:t.arxiv_id)==null?void 0:xe.replace(/v\d+$/i,""))||o,g=s.useCallback(()=>r(`/paper/${c}`),[c,r]),[x,S]=s.useState(()=>sessionStorage.getItem(L(o))||void 0),[w,j]=s.useState(pt),[u,ae]=s.useState(()=>sessionStorage.getItem(Z(o))==="1"),[P,_]=s.useState("paper"),[H,C]=s.useState(),[ke,se]=s.useState(),[Ae,ne]=s.useState(!1),Ie=s.useCallback(()=>ne(!0),[]),[$e,y]=s.useState(""),[Ne,Ee]=s.useState(()=>G(o)),[k,Te]=s.useState(0),[oe,ie]=s.useState(!1),[Me,F]=s.useState(!1),$=s.useRef(null),q=s.useRef(null),N=s.useRef(null),ce=s.useRef(null),le=s.useRef(null),K=s.useRef(!1),E=s.useRef(!1),T=s.useRef(0),R=s.useRef(0),U=s.useRef(0),A=s.useRef(w),D=s.useRef(G(o)),O=s.useRef(t==null?void 0:t.version),de=Ye().reset,ue=s.useRef(`${o}:${x??"new"}`),p=k>=840;s.useEffect(()=>{const e=`${o}:${x??"new"}`;ue.current!==e&&(ue.current=e,de())},[x,de,o]),s.useEffect(()=>{t!=null&&t.version&&O.current&&t.version!==O.current&&(C(void 0),y("")),O.current=t==null?void 0:t.version},[t==null?void 0:t.version]),s.useEffect(()=>{window.clearTimeout(T.current),F(!1);const e=sessionStorage.getItem(L(o));S(e||void 0),ae(sessionStorage.getItem(Z(o))==="1"),_("paper"),ne(!1),C(void 0),se(void 0),y("");const n=G(o);D.current=n,Ee(n)},[o]),s.useEffect(()=>()=>{window.clearTimeout(T.current),cancelAnimationFrame(R.current)},[]),s.useLayoutEffect(()=>{const e=$.current;if(!e)return;const n=()=>Te(e.clientWidth);n();const l=new ResizeObserver(n);return l.observe(e),()=>l.disconnect()},[t]),s.useEffect(()=>{if(!t)return;document.title=`${t.title} — Papers With Code reader`;let e=document.querySelector('meta[name="robots"]');const n=!e;e||(e=document.createElement("meta"),e.name="robots",document.head.appendChild(e));const l=e.content;e.content="noindex, nofollow";let m=document.querySelector('link[rel="canonical"]');const qe=!m;m||(m=document.createElement("link"),m.rel="canonical",document.head.appendChild(m));const Ke=m.href;return m.href=`${window.location.origin}/paper/${c}`,()=>{document.title="Papers With Code",n?e==null||e.remove():e&&(e.content=l),qe?m==null||m.remove():m&&(m.href=Ke)}},[c,t]);const M=s.useCallback(e=>{if(!k)return Math.max(45,Math.min(75,e));const n=480/k*100,l=100-360/k*100;return Math.max(n,Math.min(l,e))},[k]);s.useEffect(()=>j(e=>{const n=M(e);return A.current=n,n}),[M]);const W=e=>{const n=M(e);A.current=n,j(n),localStorage.setItem(re,String(n))},pe=e=>{var l;const n=M(e);A.current=n,q.current&&(q.current.style.width=`${n}%`),N.current&&(N.current.style.width=`${100-n}%`),(l=ce.current)==null||l.setAttribute("aria-valuenow",String(Math.round(n)))},fe=e=>{U.current=e,!R.current&&(R.current=requestAnimationFrame(()=>{var l;R.current=0;const n=(l=$.current)==null?void 0:l.getBoundingClientRect();n!=null&&n.width&&pe((U.current-n.left)/n.width*100)}))},We=e=>{E.current=!0,ie(!0),e.currentTarget.setPointerCapture(e.pointerId),fe(e.clientX)},V=()=>{var e;if(E.current){if(R.current){cancelAnimationFrame(R.current),R.current=0;const n=(e=$.current)==null?void 0:e.getBoundingClientRect();n!=null&&n.width&&pe((U.current-n.left)/n.width*100)}E.current=!1,j(A.current),localStorage.setItem(re,String(A.current)),ie(!1)}},me=e=>{window.clearTimeout(T.current),F(!0),ae(e),sessionStorage.setItem(Z(o),e?"1":"0"),T.current=window.setTimeout(()=>F(!1),ut+40)},he=e=>{K.current=!0,me(e)};s.useEffect(()=>{var e;K.current&&(K.current=!1,(e=u?le.current:N.current)==null||e.focus())},[u]);const ze=e=>{S(e),sessionStorage.setItem(L(o),e)},Le=()=>{S(void 0),sessionStorage.removeItem(L(o)),C(void 0),y("")},ge=((Pe=d.data)==null?void 0:Pe.paper_reader_selection_enabled)===!0,be=e=>{C(e),y(`Selection from page ${e.page} added to chat`),p&&u&&me(!1)},Be=s.useCallback(e=>{C(e),e||y("")},[]),Q=((we=d.data)==null?void 0:we.paper_reader_citations_enabled)===!0&&!!h,z=ee({queryKey:["paper-layout",c],queryFn:()=>at(c),enabled:Q&&!!c,staleTime:5*6e4}).data,He=s.useMemo(()=>Q?{layout:z,open:e=>{const n=z?Ze(z,e):[];n.length&&(se(l=>({boxes:n,nonce:((l==null?void 0:l.nonce)??0)+1})),_("paper"))}}:null,[Q,z]),ve=Oe()&&((ye=d.data)==null?void 0:ye.paper_reader_chat_enabled)!==!1,X=!!(t&&ve&&!(f&&!Ae)),Fe=t&&ve&&!X?a.jsx("div",{className:"reader-chat-unavailable",role:"status",children:"Chat opens once the paper is ready."}):t&&X?a.jsx(ct,{mode:"paper",routeSessionId:x,primaryPaper:{id:t.id,routeId:c,title:t.title},currentPage:()=>D.current,paperSelection:H,onPaperSelectionChange:Be,onSessionId:ze,onReaderSubmit:()=>_("assistant"),onReaderNewChat:Le,onReaderClose:p?()=>he(!0):void 0}):a.jsx("div",{className:"reader-chat-unavailable",children:"Chat is not enabled for this preview."});return b.isLoading?a.jsx("div",{className:"reader-status",role:"status",children:"Loading paper…"}):b.error||!t?a.jsxs("div",{className:"reader-status",role:"alert",children:[a.jsx("p",{children:"Paper not found."}),a.jsx(Y,{to:"/papers",children:"Browse papers"})]}):((Re=d.data)==null?void 0:Re.native_pdf_reader_enabled)===!1?a.jsxs("div",{className:"reader-status",role:"alert",children:[a.jsx("p",{children:"The native reader is currently unavailable."}),a.jsx(Y,{to:`/paper/${c}`,children:"Back to paper"})]}):!h&&!f?a.jsxs("div",{className:"reader-status",role:"alert",children:[a.jsx("p",{children:"Native reading is unavailable for this resource."}),a.jsx(Y,{to:`/paper/${c}`,children:"Back to paper"})]}):a.jsxs("div",{className:"paper-reader-shell",children:[!p&&a.jsxs("div",{className:"reader-tabs",role:"tablist","aria-label":"Reader panels",children:[a.jsx("button",{type:"button",role:"tab","aria-selected":P==="paper",onClick:()=>_("paper"),children:"Paper"}),a.jsxs("button",{type:"button",role:"tab","aria-selected":P==="assistant","aria-label":H&&P!=="assistant"?"Chat, selection attached":"Chat",onClick:()=>_("assistant"),children:["Chat",H&&P!=="assistant"&&a.jsx("span",{className:"reader-tab-pending","aria-hidden":"true"})]})]}),a.jsx(Ge,{variant:"reader",children:a.jsxs("div",{ref:$,className:`reader-workspace${p?" is-desktop":" is-tabs"}${u?" is-assistant-collapsed":""}${oe?" is-resizing":""}`,"data-testid":"paper-chat-workspace",children:[a.jsx("section",{ref:q,className:`reader-paper-pane${!p&&P!=="paper"?" is-hidden":""}`,style:p?{width:u?"100%":`${w}%`}:void 0,role:"tabpanel","aria-label":"Paper","aria-hidden":!p&&P!=="paper",children:f?a.jsx(dt,{paperId:t.id,paperKey:c,paperTitle:t.title,paperHref:`/paper/${c}`,sourceUrl:f,resources:I,paperVersion:t.version,selectionEnabled:ge,onReady:Ie,onPaperSelection:be,onPaperSelectionError:y}):h&&a.jsx(Je,{url:h,downloadUrl:v??h,paperKey:c,paperTitle:t.title,paperHref:`/paper/${c}`,onClose:g,resources:I,initialPage:Ne,resizeActive:oe||Me,selectionEnabled:ge,paperVersion:t.version,authors:B,loadErrorMessage:t.source==="external"?"Paper content is still being prepared. Please try again later.":void 0,onPaperSelection:be,onPaperSelectionError:y,highlight:ke,onPageChange:e=>{D.current=e,sessionStorage.setItem(Ce(o),String(e))}})}),p&&!u&&a.jsx("div",{ref:ce,className:"reader-resize-handle",role:"separator","aria-label":"Resize paper and Chat panels","aria-orientation":"vertical","aria-valuemin":45,"aria-valuemax":75,"aria-valuenow":Math.round(w),tabIndex:0,onPointerDown:We,onPointerMove:e=>{E.current&&fe(e.clientX)},onPointerUp:V,onPointerCancel:V,onLostPointerCapture:V,onDoubleClick:()=>W(_e),onKeyDown:e=>{(e.key==="ArrowLeft"||e.key==="ArrowRight")&&(e.preventDefault(),W(w+(e.key==="ArrowRight"?2:-2))),e.key==="Home"&&W(45),e.key==="End"&&W(75)}}),a.jsx("aside",{ref:N,id:"reader-chat-panel",className:`reader-assistant-pane${!p&&P!=="assistant"?" is-hidden":""}${p&&u?" is-collapsed":""}`,style:p?{width:u?0:`${100-w}%`}:void 0,role:"tabpanel","aria-label":"Chat","aria-hidden":!p&&P!=="assistant"||u,tabIndex:-1,children:a.jsx(et.Provider,{value:He,children:Fe})}),a.jsx("div",{className:"sr-only","aria-live":"polite",children:$e}),p&&(u||!X)&&a.jsx("button",{ref:le,type:"button",className:"reader-collapse-assistant","aria-controls":"reader-chat-panel","aria-expanded":!u,onClick:()=>he(!u),children:u?"Open chat":"Hide chat"})]})})]})}function ar(){const{paperId:r=""}=Se();return a.jsx(Xe,{workspaceKey:`reader:${r}`,children:a.jsx(vt,{})})}export{ar as default,bt as readerToolbarResources};
|
|
|
|
| 1 |
+
import{r as s,j as a,A as J,u as Se,c as Ue,o as De,Y as je,O as Oe,L as Y}from"./index-D6jcIRWs.js";import{u as ee}from"./useQuery-CUJUm4FY.js";import{u as Ve,R as Qe,A as Xe,c as Ye,d as Ze,a as Ge,P as Je,e as et}from"./ArtifactWorkspace-CUZCugRS.js";import{M as tt}from"./MarkdownText-B_D3IE_p.js";import{g as rt,b as at}from"./papers-DIIIPDpj.js";import{w as st,e as nt}from"./paperReader-BIpQD5HO.js";import{b as ot}from"./usePapers-BbCSwcVk.js";import{c as it}from"./chat-ChnK8XDU.js";import{s as te}from"./safeExternalHref-CkBrsh84.js";import{ChatExperience as ct}from"./ChatView-wJIPZ39W.js";import"./chatSessions-DByIWBno.js";/* empty css */import"./hover-card-DPpv0l_x.js";import"./CatalogEntityPreviewLink-BhTSUN-X.js";import"./catalog-PYrB8_bm.js";import"./github-B7D_19Qm.js";import"./file-text-4G2I5_Zo.js";import"./PaperPreviewLink-fcJyP9H0.js";import"./index-uFGyKu5N.js";import"./index-yduEvk9Z.js";import"./katex-DkKDou_j.js";import"./useMutation-p6mN4h17.js";import"./copy-BmzqMihw.js";import"./thumbs-up-BqRlVdvF.js";import"./arrow-left-IzGlownM.js";import"./external-link-C_yz2sXa.js";import"./plus-C4UQ62Q1.js";import"./search-CfTufeR7.js";import"./chevron-up-CQKUhZ0S.js";import"./AuthorAvatar-UMHOVOr9.js";import"./useInfiniteQuery-FXco4P1n.js";import"./McpShowcase-CS9LZY9p.js";import"./AgentLogos-CFt_vIO2.js";import"./share-2-DPo2j-OC.js";import"./openrouter-DrXWVMlM.js";import"./queryOptions-C9woPjwX.js";function lt(r){return r instanceof J&&r.status===422?"This page could not be turned into a readable paper.":r instanceof J&&r.status===503?"Paper content is still being prepared. Please try again later.":"The paper could not be loaded."}function dt({paperId:r,paperKey:i,paperTitle:o,paperHref:b,sourceUrl:d,resources:t,paperVersion:f="",selectionEnabled:v=!1,onReady:h,onPaperSelection:I,onPaperSelectionError:B}){const c=s.useRef(null),g=ee({queryKey:["paperWebMarkdown",r],queryFn:()=>rt(r),staleTime:5*6e4,retry:(w,j)=>w<2&&!(j instanceof J&&j.status<500),retryDelay:3e3}),x=g.isSuccess;s.useEffect(()=>{x&&(h==null||h())},[h,x]),Ve({enabled:v&&!!f&&x,pagesRoot:c,routeId:i,paperVersion:f,numPages:1,onSelect:I,onError:B});const S=g.data?st(g.data):"";return a.jsxs("div",{className:"pdf-viewer",children:[a.jsx(Qe,{paperTitle:o,paperHref:b,resources:t,label:"Paper controls",children:a.jsx("div",{className:"pdf-toolbar-controls",children:a.jsx("a",{href:d,target:"_blank",rel:"noopener noreferrer",children:"Open original"})})}),a.jsx("div",{className:"pdf-scroll-frame",children:a.jsx("div",{className:"pdf-scroll",role:"region","aria-label":"Paper web page",children:g.isPending?a.jsx("div",{className:"pdf-loading",role:"status",children:"Preparing a readable version of this page…"}):g.isError?a.jsxs("div",{className:"pdf-error",role:"alert",children:[a.jsx("p",{children:lt(g.error)}),a.jsxs("div",{children:[a.jsx("button",{type:"button",onClick:()=>void g.refetch(),children:"Retry"})," ",a.jsx("a",{href:d,target:"_blank",rel:"noopener noreferrer",children:"Open original"})]})]}):a.jsxs("article",{ref:c,className:"reader-web-document","data-page":"1",children:[!S.startsWith("# ")&&a.jsx("h1",{children:o}),a.jsx(tt,{text:S})]})})})]})}const _e=66,ut=240,re="pwc:reader:split-ratio",L=r=>`pwc:reader:session:${r}`,Z=r=>`pwc:reader:assistant-collapsed:${r}`,Ce=r=>`pwc:reader:page:${r}`;function G(r){const i=Number(sessionStorage.getItem(Ce(r)));return Number.isInteger(i)&&i>0?i:1}function pt(){const r=Number(localStorage.getItem(re));return Number.isFinite(r)&&r>=45&&r<=75?r:_e}function ft(r){const i=te(r);if(!i)return null;const o=new URL(i);return(o.hostname==="arxiv.org"||o.hostname==="www.arxiv.org")&&o.pathname.startsWith("/pdf/")&&o.pathname.endsWith(".pdf")&&(o.pathname=o.pathname.slice(0,-4)),o.href}const mt=/^\/pdf\/(\d{4}\.\d{4,5}(?:v\d{1,3})?|[a-z]+(?:-[a-z]+)*(?:\.[A-Z]{2})?\/\d{7}(?:v\d{1,3})?)$/;function ht(r){const i=new URL(r),o=i.pathname.match(mt);return(i.hostname==="arxiv.org"||i.hostname==="www.arxiv.org")&&o&&!i.search?je(`/paper-assets/arxiv-pdf/${o[1]}`)??r:r}function gt(r){return new URL(r).hostname.replace(/^www\./,"")}function bt(r){if(!r)return{};const i={};for(const d of r.repositories??[]){if(!d.is_official)continue;const t=te(d.url);if(!t)continue;const f=new URL(t),v=f.pathname.split("/").filter(Boolean);if((f.hostname==="github.com"||f.hostname==="www.github.com")&&v.length>=2){i.repository={href:t,stars:d.num_stars||0};break}}const o=[...r.project_pages??[]].sort((d,t)=>Number(t.is_official)-Number(d.is_official));for(const d of o){const t=te(d.url);if(t){i.projectPage={href:t,label:gt(t)};break}}const b=r.hf_artifact_summary?r.hf_artifact_summary.model_count+r.hf_artifact_summary.dataset_count+r.hf_artifact_summary.space_count:new Set([...r.hf_models??[],...r.hf_datasets??[],...r.hf_spaces??[]]).size;return b>0&&r.arxiv_id&&(i.huggingFace={href:`https://huggingface.co/papers/${r.arxiv_id.replace(/v\d+$/i,"")}`,count:b}),i}function vt(){var xe,Pe,we,ye,Re;const r=Ue(),{paperId:i}=Se(),o=De(i??"").replace(/v\d+$/i,""),b=ot(o,!!o),d=ee({queryKey:["chatAvailability"],queryFn:()=>it.getAvailability(),refetchInterval:3e4,retry:!1}),t=b.data,f=t?nt(t):null,v=f?null:(t==null?void 0:t.source)==="external"?je(`/paper-assets/external/${t.id}/paper.pdf`):ft(t==null?void 0:t.url_pdf),h=v&&(t==null?void 0:t.source)!=="external"?ht(v):v,I=bt(t),B=s.useMemo(()=>{var e;return(e=t==null?void 0:t.author_links)==null?void 0:e.flatMap(n=>n.id?[{id:n.id,name:n.name,avatarUrl:n.hf_avatar_url}]:[])},[t==null?void 0:t.author_links]),c=((xe=t==null?void 0:t.arxiv_id)==null?void 0:xe.replace(/v\d+$/i,""))||o,g=s.useCallback(()=>r(`/paper/${c}`),[c,r]),[x,S]=s.useState(()=>sessionStorage.getItem(L(o))||void 0),[w,j]=s.useState(pt),[u,ae]=s.useState(()=>sessionStorage.getItem(Z(o))==="1"),[P,_]=s.useState("paper"),[H,C]=s.useState(),[ke,se]=s.useState(),[Ae,ne]=s.useState(!1),Ie=s.useCallback(()=>ne(!0),[]),[$e,y]=s.useState(""),[Ne,Ee]=s.useState(()=>G(o)),[k,Te]=s.useState(0),[oe,ie]=s.useState(!1),[Me,F]=s.useState(!1),$=s.useRef(null),q=s.useRef(null),N=s.useRef(null),ce=s.useRef(null),le=s.useRef(null),K=s.useRef(!1),E=s.useRef(!1),T=s.useRef(0),R=s.useRef(0),U=s.useRef(0),A=s.useRef(w),D=s.useRef(G(o)),O=s.useRef(t==null?void 0:t.version),de=Ye().reset,ue=s.useRef(`${o}:${x??"new"}`),p=k>=840;s.useEffect(()=>{const e=`${o}:${x??"new"}`;ue.current!==e&&(ue.current=e,de())},[x,de,o]),s.useEffect(()=>{t!=null&&t.version&&O.current&&t.version!==O.current&&(C(void 0),y("")),O.current=t==null?void 0:t.version},[t==null?void 0:t.version]),s.useEffect(()=>{window.clearTimeout(T.current),F(!1);const e=sessionStorage.getItem(L(o));S(e||void 0),ae(sessionStorage.getItem(Z(o))==="1"),_("paper"),ne(!1),C(void 0),se(void 0),y("");const n=G(o);D.current=n,Ee(n)},[o]),s.useEffect(()=>()=>{window.clearTimeout(T.current),cancelAnimationFrame(R.current)},[]),s.useLayoutEffect(()=>{const e=$.current;if(!e)return;const n=()=>Te(e.clientWidth);n();const l=new ResizeObserver(n);return l.observe(e),()=>l.disconnect()},[t]),s.useEffect(()=>{if(!t)return;document.title=`${t.title} — Papers With Code reader`;let e=document.querySelector('meta[name="robots"]');const n=!e;e||(e=document.createElement("meta"),e.name="robots",document.head.appendChild(e));const l=e.content;e.content="noindex, nofollow";let m=document.querySelector('link[rel="canonical"]');const qe=!m;m||(m=document.createElement("link"),m.rel="canonical",document.head.appendChild(m));const Ke=m.href;return m.href=`${window.location.origin}/paper/${c}`,()=>{document.title="Papers With Code",n?e==null||e.remove():e&&(e.content=l),qe?m==null||m.remove():m&&(m.href=Ke)}},[c,t]);const M=s.useCallback(e=>{if(!k)return Math.max(45,Math.min(75,e));const n=480/k*100,l=100-360/k*100;return Math.max(n,Math.min(l,e))},[k]);s.useEffect(()=>j(e=>{const n=M(e);return A.current=n,n}),[M]);const W=e=>{const n=M(e);A.current=n,j(n),localStorage.setItem(re,String(n))},pe=e=>{var l;const n=M(e);A.current=n,q.current&&(q.current.style.width=`${n}%`),N.current&&(N.current.style.width=`${100-n}%`),(l=ce.current)==null||l.setAttribute("aria-valuenow",String(Math.round(n)))},fe=e=>{U.current=e,!R.current&&(R.current=requestAnimationFrame(()=>{var l;R.current=0;const n=(l=$.current)==null?void 0:l.getBoundingClientRect();n!=null&&n.width&&pe((U.current-n.left)/n.width*100)}))},We=e=>{E.current=!0,ie(!0),e.currentTarget.setPointerCapture(e.pointerId),fe(e.clientX)},V=()=>{var e;if(E.current){if(R.current){cancelAnimationFrame(R.current),R.current=0;const n=(e=$.current)==null?void 0:e.getBoundingClientRect();n!=null&&n.width&&pe((U.current-n.left)/n.width*100)}E.current=!1,j(A.current),localStorage.setItem(re,String(A.current)),ie(!1)}},me=e=>{window.clearTimeout(T.current),F(!0),ae(e),sessionStorage.setItem(Z(o),e?"1":"0"),T.current=window.setTimeout(()=>F(!1),ut+40)},he=e=>{K.current=!0,me(e)};s.useEffect(()=>{var e;K.current&&(K.current=!1,(e=u?le.current:N.current)==null||e.focus())},[u]);const ze=e=>{S(e),sessionStorage.setItem(L(o),e)},Le=()=>{S(void 0),sessionStorage.removeItem(L(o)),C(void 0),y("")},ge=((Pe=d.data)==null?void 0:Pe.paper_reader_selection_enabled)===!0,be=e=>{C(e),y(`Selection from page ${e.page} added to chat`),p&&u&&me(!1)},Be=s.useCallback(e=>{C(e),e||y("")},[]),Q=((we=d.data)==null?void 0:we.paper_reader_citations_enabled)===!0&&!!h,z=ee({queryKey:["paper-layout",c],queryFn:()=>at(c),enabled:Q&&!!c,staleTime:5*6e4}).data,He=s.useMemo(()=>Q?{layout:z,open:e=>{const n=z?Ze(z,e):[];n.length&&(se(l=>({boxes:n,nonce:((l==null?void 0:l.nonce)??0)+1})),_("paper"))}}:null,[Q,z]),ve=Oe()&&((ye=d.data)==null?void 0:ye.paper_reader_chat_enabled)!==!1,X=!!(t&&ve&&!(f&&!Ae)),Fe=t&&ve&&!X?a.jsx("div",{className:"reader-chat-unavailable",role:"status",children:"Chat opens once the paper is ready."}):t&&X?a.jsx(ct,{mode:"paper",routeSessionId:x,primaryPaper:{id:t.id,routeId:c,title:t.title},currentPage:()=>D.current,paperSelection:H,onPaperSelectionChange:Be,onSessionId:ze,onReaderSubmit:()=>_("assistant"),onReaderNewChat:Le,onReaderClose:p?()=>he(!0):void 0}):a.jsx("div",{className:"reader-chat-unavailable",children:"Chat is not enabled for this preview."});return b.isLoading?a.jsx("div",{className:"reader-status",role:"status",children:"Loading paper…"}):b.error||!t?a.jsxs("div",{className:"reader-status",role:"alert",children:[a.jsx("p",{children:"Paper not found."}),a.jsx(Y,{to:"/papers",children:"Browse papers"})]}):((Re=d.data)==null?void 0:Re.native_pdf_reader_enabled)===!1?a.jsxs("div",{className:"reader-status",role:"alert",children:[a.jsx("p",{children:"The native reader is currently unavailable."}),a.jsx(Y,{to:`/paper/${c}`,children:"Back to paper"})]}):!h&&!f?a.jsxs("div",{className:"reader-status",role:"alert",children:[a.jsx("p",{children:"Native reading is unavailable for this resource."}),a.jsx(Y,{to:`/paper/${c}`,children:"Back to paper"})]}):a.jsxs("div",{className:"paper-reader-shell",children:[!p&&a.jsxs("div",{className:"reader-tabs",role:"tablist","aria-label":"Reader panels",children:[a.jsx("button",{type:"button",role:"tab","aria-selected":P==="paper",onClick:()=>_("paper"),children:"Paper"}),a.jsxs("button",{type:"button",role:"tab","aria-selected":P==="assistant","aria-label":H&&P!=="assistant"?"Chat, selection attached":"Chat",onClick:()=>_("assistant"),children:["Chat",H&&P!=="assistant"&&a.jsx("span",{className:"reader-tab-pending","aria-hidden":"true"})]})]}),a.jsx(Ge,{variant:"reader",children:a.jsxs("div",{ref:$,className:`reader-workspace${p?" is-desktop":" is-tabs"}${u?" is-assistant-collapsed":""}${oe?" is-resizing":""}`,"data-testid":"paper-chat-workspace",children:[a.jsx("section",{ref:q,className:`reader-paper-pane${!p&&P!=="paper"?" is-hidden":""}`,style:p?{width:u?"100%":`${w}%`}:void 0,role:"tabpanel","aria-label":"Paper","aria-hidden":!p&&P!=="paper",children:f?a.jsx(dt,{paperId:t.id,paperKey:c,paperTitle:t.title,paperHref:`/paper/${c}`,sourceUrl:f,resources:I,paperVersion:t.version,selectionEnabled:ge,onReady:Ie,onPaperSelection:be,onPaperSelectionError:y}):h&&a.jsx(Je,{url:h,downloadUrl:v??h,paperKey:c,paperTitle:t.title,paperHref:`/paper/${c}`,onClose:g,resources:I,initialPage:Ne,resizeActive:oe||Me,selectionEnabled:ge,paperVersion:t.version,authors:B,loadErrorMessage:t.source==="external"?"Paper content is still being prepared. Please try again later.":void 0,onPaperSelection:be,onPaperSelectionError:y,highlight:ke,onPageChange:e=>{D.current=e,sessionStorage.setItem(Ce(o),String(e))}})}),p&&!u&&a.jsx("div",{ref:ce,className:"reader-resize-handle",role:"separator","aria-label":"Resize paper and Chat panels","aria-orientation":"vertical","aria-valuemin":45,"aria-valuemax":75,"aria-valuenow":Math.round(w),tabIndex:0,onPointerDown:We,onPointerMove:e=>{E.current&&fe(e.clientX)},onPointerUp:V,onPointerCancel:V,onLostPointerCapture:V,onDoubleClick:()=>W(_e),onKeyDown:e=>{(e.key==="ArrowLeft"||e.key==="ArrowRight")&&(e.preventDefault(),W(w+(e.key==="ArrowRight"?2:-2))),e.key==="Home"&&W(45),e.key==="End"&&W(75)}}),a.jsx("aside",{ref:N,id:"reader-chat-panel",className:`reader-assistant-pane${!p&&P!=="assistant"?" is-hidden":""}${p&&u?" is-collapsed":""}`,style:p?{width:u?0:`${100-w}%`}:void 0,role:"tabpanel","aria-label":"Chat","aria-hidden":!p&&P!=="assistant"||u,tabIndex:-1,children:a.jsx(et.Provider,{value:He,children:Fe})}),a.jsx("div",{className:"sr-only","aria-live":"polite",children:$e}),p&&(u||!X)&&a.jsx("button",{ref:le,type:"button",className:"reader-collapse-assistant","aria-controls":"reader-chat-panel","aria-expanded":!u,onClick:()=>he(!u),children:u?"Open chat":"Hide chat"})]})})]})}function ar(){const{paperId:r=""}=Se();return a.jsx(Xe,{workspaceKey:`reader:${r}`,children:a.jsx(vt,{})})}export{ar as default,bt as readerToolbarResources};
|
assets/{PapersListView-DYcakh08.js → PapersListView-BNcDd1lQ.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{e as V,r as g,A as X,j as e,L as j,g as J}from"./index-
|
|
|
|
| 1 |
+
import{e as V,r as g,A as X,j as e,L as j,g as J}from"./index-D6jcIRWs.js";import{I as G,T as W,P as Y}from"./components-DO1X940E.js";import{c as Z}from"./catalog-PYrB8_bm.js";import{t as ee,d as se}from"./colors-CLwl8a2d.js";import{u as re,a as ae}from"./usePapers-BbCSwcVk.js";import{u as te}from"./useDebounce-DLPbKAkz.js";import{u as ne}from"./useInfiniteScroll-Dm7JY_X4.js";import{S as _}from"./skeleton-BqkYFmXl.js";import{A as ie,a as oe}from"./alert-2MbxVzGL.js";import{u as ce}from"./useQuery-CUJUm4FY.js";import{P as le}from"./PaperFeedFilters-DNebHp4l.js";import{a as de,P as me,b as he}from"./PaperDateFilter-CPIqaHaq.js";import"./papers-DIIIPDpj.js";import"./AuthorAvatar-UMHOVOr9.js";import"./LatexTitle-D_92Jowu.js";import"./safeExternalHref-CkBrsh84.js";import"./useInfiniteQuery-FXco4P1n.js";import"./useIntersectionObserver-3LTuEaFW.js";import"./popover-DCjqGpW0.js";const N=360;function pe(r,o){const d=r.toLocaleLowerCase();return o.trim().split(/\s+/).filter(Boolean).reduce((c,t)=>{const l=d.indexOf(t.toLocaleLowerCase());return l>=0&&(c<0||l<c)?l:c},-1)}function U(r,o,d){if((r.slice(0,o).match(/\$/g)||[]).length%2===0)return o;if(d==="start")return r.lastIndexOf("$",o)+1;const t=r.indexOf("$",o);return t>=0?t+1:o}function ue(r,o){if(r.length<=N)return r;const d=pe(r,o);if(d<0||d<N*.6)return r;let c=Math.max(0,d-Math.floor(N*.35)),t=Math.min(r.length,c+N);return c=U(r,c,"start"),t=U(r,t,"end"),`${c>0?"…":""}${r.slice(c,t).trim()}${t<r.length?"…":""}`}const fe=[["trending","trending"],["new","newest"],["cited","most cited"]],xe=[["relevance","relevance"],["new","newest"],["cited","most cited"]],ge=r=>new Intl.NumberFormat("en",{notation:r>=1e3?"compact":"standard",maximumFractionDigits:1}).format(r),Be=()=>{var E,I,$,T,B,H,O,q,M;const[r,o]=V(),d=r.get("framework")||void 0,c=r.get("repository")||void 0,t=!!(d||c),l=r.get("search")||"",[F,C]=g.useState(l),p=te(F,300),n=!t&&l.trim().length>0;g.useEffect(()=>C(l),[l]),g.useEffect(()=>{if(p===l)return;const s=new URLSearchParams(r);p?s.set("search",p):s.delete("search"),o(s,{replace:!0})},[p]),g.useEffect(()=>{const s=r.get("order_by"),i=new URLSearchParams(r);n&&!["relevance","date_published","citation_count"].includes(s||"")?(i.set("order_by","relevance"),o(i,{replace:!0})):!n&&s==="relevance"&&(i.delete("order_by"),o(i,{replace:!0}))},[n,r,o]);const L=r.get("order_by"),x=L==="citation_count"?"cited":L==="date_published"?"new":n?"relevance":"trending",u=de(r),w=r.get("has_hf_artifacts")==="true",k=!t&&r.get("has_code")==="true",y=(s,i)=>{const h=new URLSearchParams(r);i?h.set(s,i):h.delete(s),o(h)},z=s=>{y("order_by",s==="cited"?"citation_count":s==="new"?"date_published":s)},b=re({page_size:20,order_by:x==="trending"?"trending":x==="cited"?"citation_count":"date_published",order_dir:"desc",search:t&&p||void 0,start_date:u.startDate,end_date:u.endDate,include_resources:!0,conference:r.get("conference")||void 0,latest_only:r.get("latest_only")!=="false",has_code:k,has_hf_artifacts:w,framework:d,repository:c,enabled:!n}),A=ae({q:p.trim(),order_by:x==="cited"?"citation_count":x==="new"?"date_published":"relevance",start_date:u.startDate,end_date:u.endDate,has_code:k,has_hf_artifacts:w,enabled:n}),m=n?A:b,D=ce({queryKey:["top-tasks-sidebar"],queryFn:()=>Z.topTasks(8),enabled:!t&&!n,staleTime:10*60*1e3}),v=g.useMemo(()=>{var i;return(((i=m.data)==null?void 0:i.pages.flatMap(h=>h.results))||[]).map(h=>{const S=ee(h);return n?{...S,abstract:ue(S.abstract,l)}:S})},[m.data,n,l]),Q=ne(m),f=(($=(I=(E=b.data)==null?void 0:E.pages)==null?void 0:I[0])==null?void 0:$.count)??0,a=(H=(B=(T=b.data)==null?void 0:T.pages)==null?void 0:B[0])==null?void 0:H.scope,P=(q=(O=A.data)==null?void 0:O.pages)==null?void 0:q.at(-1),R=d&&m.error instanceof X&&m.error.status===404,K=(a==null?void 0:a.kind)==="framework"?a.framework_name:a==null?void 0:a.repository;return e.jsxs("div",{className:"page",children:[(a==null?void 0:a.kind)==="framework"&&e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(j,{to:"/",children:"Papers"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx(j,{to:"/frameworks",children:"Frameworks"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:a.framework_name})]}),e.jsxs("div",{className:"feed-header",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"feed-title",children:t?e.jsxs(e.Fragment,{children:["Papers implemented by ",e.jsx("em",{children:K||d||c})]}):n?e.jsxs(e.Fragment,{children:["Search results for ",e.jsxs("em",{children:["“",l,"”"]})]}):e.jsxs(e.Fragment,{children:["All ",e.jsx("em",{children:"Papers"})]})}),e.jsx("div",{className:"feed-subtitle",children:t?(a==null?void 0:a.kind)==="framework"?f>0&&`${f.toLocaleString()} papers.`:a!=null&&a.repository?e.jsxs(e.Fragment,{children:["GitHub repository ",e.jsx("strong",{children:a.repository}),". ",f>0&&`${f.toLocaleString()} papers.`]}):"Repository-scoped paper feed.":n?`${v.length} loaded from the most relevant results.`:e.jsxs(e.Fragment,{children:["Search the full corpus. ",f>0&&`${f.toLocaleString()} papers indexed.`]})}),t&&a&&e.jsxs("div",{className:"paper-feed-scope-links",children:[e.jsxs("div",{className:"paper-feed-primary-links",children:[a.github_url&&e.jsxs("a",{href:a.github_url,target:"_blank",rel:"noopener noreferrer",className:a.kind==="framework"?"task-framework-link":"framework-link",children:[e.jsx(G,{name:"github",size:13}),a.kind==="framework"?e.jsxs(e.Fragment,{children:[e.jsx("span",{children:a.repository||"GitHub"}),a.num_stars!=null&&e.jsxs("span",{className:"task-framework-link-stars",children:["★ ",ge(a.num_stars)]})]}):"GitHub"]}),a.kind==="framework"&&a.introducing_paper_arxiv_id&&e.jsx(j,{to:`/paper/${a.introducing_paper_arxiv_id}`,className:"framework-link",children:"Introducing paper"})]}),a.kind==="framework"&&a.recommended_tasks&&a.recommended_tasks.length>0&&e.jsx("div",{className:"paper-feed-task-tags",children:a.recommended_tasks.map(s=>s.slug?e.jsx(W,{slug:s.slug,label:s.name},s.id):null)})]})]}),e.jsx(me,{startDate:u.startDate,endDate:u.endDate,onChange:s=>o(he(r,s))})]}),e.jsx("div",{className:"papers-search-row",children:e.jsxs("div",{className:"papers-search-input-wrap",children:[e.jsx(G,{name:"search",size:14}),e.jsx("input",{className:"papers-search-input",placeholder:"Search title or abstract…",value:F,onChange:s=>C(s.target.value)})]})}),e.jsxs("div",{className:t||n?"papers-feed-layout-scoped":"layout-with-sidebar",children:[!t&&!n&&e.jsx("aside",{className:"sidebar",children:e.jsxs("div",{className:"sidebar-section",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),D.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,i)=>e.jsx(_,{className:"h-5 w-full"},i))}),e.jsx("div",{className:"sidebar-links",children:(M=D.data)==null?void 0:M.map(s=>e.jsxs(j,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[se(s.name,s.slug),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count})]},s.id))})]})}),e.jsxs("div",{children:[e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:(n?xe:fe).map(([s,i])=>e.jsx("button",{className:`sort-btn ${x===s?"active":""}`,onClick:()=>z(s),children:i},s))}),e.jsx(le,{hasCode:k,hasHfArtifacts:w,onHasCodeChange:s=>y("has_code",s?"true":void 0),onHasHfArtifactsChange:s=>y("has_hf_artifacts",s?"true":void 0),showHasCode:!t})]}),e.jsxs("div",{className:"results-count",children:[v.length," loaded"]})]}),R?e.jsx("div",{className:"no-results",children:"Framework not found."}):m.error&&e.jsx(ie,{variant:"destructive",className:"mb-4",children:e.jsx(oe,{children:"Failed to load papers. Please try again."})}),!R&&(m.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:6}).map((s,i)=>e.jsxs("div",{className:"paper-card",children:[e.jsx(_,{className:"h-[220px] w-[160px]"}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(_,{className:"h-6 w-3/4"}),e.jsx(_,{className:"h-4 w-1/2"}),e.jsx(_,{className:"h-12 w-full"})]})]},i))}):v.length===0?e.jsxs("div",{className:"no-results",children:[e.jsx("p",{children:"No matching papers."}),n&&J()&&e.jsx(j,{to:`/chat?q=${encodeURIComponent(l.trim())}`,children:"Ask the assistant instead"})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:v.map((s,i)=>e.jsx(Y,{paper:s,rank:i+1,highlightQuery:n?l:void 0},s.id))}),e.jsx("div",{ref:Q,style:{height:1}}),m.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"}),!m.hasNextPage&&!m.isFetchingNextPage&&n&&e.jsx("div",{className:"search-results-end",children:P!=null&&P.cap_reached?"End of the top 100 results":"End of results"})]}))]})]})]})};export{Be as default};
|
assets/{PrivacyView-CH2fzy9w.js → PrivacyView-CwO81wLZ.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{K as s,j as e}from"./index-
|
|
|
|
| 1 |
+
import{K as s,j as e}from"./index-D6jcIRWs.js";import{f as i,D as r}from"./latexPlainText-DI8YEXVe.js";const n=()=>(s.useEffect(()=>(document.title=i("Privacy Policy"),()=>{document.title=r}),[]),e.jsxs("article",{className:"page legal-page",children:[e.jsxs("header",{className:"legal-header",children:[e.jsx("p",{className:"legal-kicker",children:"Legal"}),e.jsx("h1",{children:"Privacy Policy"}),e.jsx("p",{className:"legal-effective-date",children:"Effective August 11, 2026"})]}),e.jsx("p",{children:"This Privacy Policy explains how Hugging Face, Inc. (“Hugging Face,” “we,” or “us”) collects, uses, and shares information when you use Papers With Code, including its website, research assistant, APIs, and related services (the “Service”)."}),e.jsxs("section",{children:[e.jsx("h2",{children:"1. Information we collect"}),e.jsx("h3",{children:"Information you provide"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Account information."})," If you sign in with Hugging Face, we receive account identifiers and profile details needed to authenticate you, such as your user ID, username, and avatar. If you request contributor access, we also receive and retain the verified email address associated with your Hugging Face account so we can review and communicate about your request."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Contributions and preferences."})," We collect information you submit or save, such as paper submissions and edits, bookmarks, display preferences, feedback, and communications with us. Material you submit to a public research page may be publicly visible."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Research assistant content."})," We collect your questions, conversation history, generated answers, citations, tool calls and results, and feedback about answers. Chats are private to your account unless you choose to create a share link; anyone with that link may be able to view the shared chat."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Provider and billing information."})," If you enable a model provider, we process the authorization or API credentials needed to make requests on your behalf. Hugging Face or another provider processes its own billing information under its terms. Papers With Code does not collect your payment-card details."]})]}),e.jsx("h3",{children:"Information collected automatically"}),e.jsx("p",{children:"We collect technical and usage information such as IP address, browser and device type, operating system, pages or features used, dates and times, referring pages, request identifiers, cookies, logs, and diagnostic data. For research-assistant requests, this may include the selected model, token and cost details, latency, errors, and other operational metadata."}),e.jsx("h3",{children:"Research assistant tracing"}),e.jsxs("p",{children:["To evaluate, debug, secure, and improve the research assistant, we use Langfuse to record traces. A trace may contain the complete text of your question and the assistant's answer, as well as tool inputs, tool outputs, retrieved research material, model details, usage data, and related operational metadata.",e.jsx("strong",{children:" This trace content is not redacted before it is sent to Langfuse."})]}),e.jsx("p",{children:"Papers With Code is designed for questions about research literature. Do not put passwords, API keys, confidential information, health or financial data, or other sensitive personal information in research-assistant prompts."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"2. How we use information"}),e.jsx("p",{children:"We use information to:"}),e.jsxs("ul",{children:[e.jsx("li",{children:"provide, personalize, maintain, and operate the Service;"}),e.jsx("li",{children:"authenticate users and keep accounts and the Service secure;"}),e.jsx("li",{children:"run research-assistant requests and preserve conversation history;"}),e.jsx("li",{children:"measure performance, troubleshoot failures, and improve quality;"}),e.jsx("li",{children:"review contributions, prevent abuse, and enforce applicable terms;"}),e.jsx("li",{children:"communicate with you and respond to requests; and"}),e.jsx("li",{children:"comply with law and protect users, Hugging Face, and the public."})]})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"3. How we share information"}),e.jsx("p",{children:"We may share information in these circumstances:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Service providers."})," Vendors process information for hosting, authentication, analytics, observability, security, and support. These include Hugging Face services, Langfuse for research-assistant tracing, Plausible for website analytics, and infrastructure providers."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Model providers."})," Research-assistant content is sent to the model provider you use, such as Hugging Face Inference Providers or OpenRouter, so it can generate a response. That provider's privacy terms also apply to its processing."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Public and shared content."})," Contributions intended for public pages are public. A chat is disclosed through the Service when you create and distribute a share link."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Legal, safety, and corporate events."})," We may disclose information when reasonably necessary to comply with law, protect rights and safety, investigate abuse, or complete a merger, acquisition, financing, or transfer of assets."]})]}),e.jsx("p",{children:"We do not sell your personal information."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"4. Cookies and analytics"}),e.jsx("p",{children:"We use cookies and similar storage when needed for sign-in, security, preferences, and operation of the Service. We also use Plausible to understand aggregate website usage. You can control cookies through your browser, but disabling necessary cookies may prevent account features from working."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"5. Legal bases"}),e.jsx("p",{children:"Where applicable law requires a legal basis, we process information as needed to perform our agreement with you, with your consent, to comply with legal obligations, and for legitimate interests such as operating, securing, and improving the Service. You may withdraw consent where consent is the basis for processing, without affecting earlier processing."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"6. Retention and deletion"}),e.jsx("p",{children:"Private chats are retained until you delete them, subject to limits of 500 active chats and 100 MB of chat data per user. Archiving hides a chat and frees active-chat quota but does not delete it. You may deliberately share an unlisted snapshot; deleting its private chat removes the durable transcript, workspace reference, and share link after deletion is verified. No dedicated private-chat export format is currently offered."}),e.jsx("p",{children:"We keep information for as long as reasonably needed for the purposes described here, including providing the Service, maintaining security and audit records, resolving disputes, and meeting legal obligations. Retention periods vary by data type and service provider. You can delete individual chats in the Service. Deletion may not immediately remove information from backups, security logs, or third-party systems where limited retention is required."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"7. Security and international transfers"}),e.jsx("p",{children:"We use reasonable administrative, technical, and organizational safeguards, but no internet service can guarantee absolute security. We and our service providers may process information in the United States and other countries, which may have different data-protection laws from your country. Where required, we use appropriate safeguards for international transfers."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"8. Your privacy rights"}),e.jsx("p",{children:"Depending on where you live, you may have rights to access, correct, delete, or receive a copy of your personal information; object to or restrict processing; withdraw consent; or appeal a decision about a request. You may also have the right to complain to a data-protection authority. We may need to verify your identity before fulfilling a request."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"9. Children"}),e.jsx("p",{children:"The Service is not directed to children under 13, and we do not knowingly collect personal information from children under 13. If you believe a child has provided personal information, please contact us."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"10. Changes to this policy"}),e.jsx("p",{children:"We may update this policy as the Service changes. We will post the revised policy here and update its effective date. If a change is material, we will provide additional notice when appropriate."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"11. Contact us"}),e.jsxs("p",{children:["For questions or privacy requests, contact"," ",e.jsx("a",{href:"mailto:privacy@huggingface.co",children:"privacy@huggingface.co"}),". Please do not include passwords, API keys, or other sensitive credentials in your message."]})]})]}));export{n as default};
|
assets/{RateLimitsView-46i_Guh7.js → RateLimitsView-ChUFO8Hr.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{j as e,M as t}from"./index-
|
|
|
|
| 1 |
+
import{j as e,M as t}from"./index-D6jcIRWs.js";import{u as s}from"./useQuery-CUJUm4FY.js";const n=()=>{const i=s({queryKey:["submission-rate-limit-policy"],queryFn:()=>t.getRateLimitPolicy()}).data;return e.jsxs("div",{className:"page",style:{maxWidth:760},children:[e.jsx("h1",{children:"Submission and rate-limit policy"}),i?e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:["Each account may have up to ",i.active_pending," active submissions."]}),e.jsxs("p",{children:["New submissions are limited to ",i.subject_per_hour," per account and ",i.ip_per_hour," per source network in a rolling hour."]})]}):e.jsx("p",{children:"Loading current limits…"}),e.jsx("p",{children:"Duplicate, no-op, and idempotently replayed requests do not consume creation quota."}),e.jsx("p",{children:"Rate-limited responses use HTTP 429 with Retry-After, RateLimit, and RateLimit-Policy headers."}),e.jsx("p",{children:"Good-faith contributors who are blocked should contact the Papers with Code maintainers with their Hugging Face username."})]})};export{n as default};
|