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-PqR86_NK.js → AgentLogos-BPQPDQNU.js} +1 -1
- assets/{AiDeadlinesView-Ad6LnMOr.js → AiDeadlinesView-BVrDgxK7.js} +1 -1
- assets/{ApiDocsView-DT_kBPK6.js → ApiDocsView-CV3pGe0Y.js} +1 -1
- assets/{AreaSection-BVX3JiNc.js → AreaSection-DPzsnyZc.js} +1 -1
- assets/{AstraForRoboticsView-BiXYC0gV.js → AstraForRoboticsView-uC73YbKl.js} +1 -1
- assets/{AuthorAvatar-fJxhX3fO.js → AuthorAvatar-CIgdnsA4.js} +1 -1
- assets/{AuthorDetailView-HZ2z-PQp.js → AuthorDetailView-BqulA_cV.js} +1 -1
- assets/{AuthorizePaperEditView-BmKMH1AZ.js → AuthorizePaperEditView-CEtMWk6L.js} +1 -1
- assets/{AutonomousOperations-Ch9vfeiA.js → AutonomousOperations-CP1_xnwp.js} +1 -1
- assets/{BenchmarkDetailView-BomzuNed.js → BenchmarkDetailView-DWqSKCxm.js} +1 -1
- assets/{BenchmarkTrendSparkline-dQdt-ejq.js → BenchmarkTrendSparkline-DRl3gbu-.js} +1 -1
- assets/{CatalogEntityPreviewLink-C5CxvSnT.js → CatalogEntityPreviewLink-BxpIu72v.js} +1 -1
- assets/{ChatView-BYQGLYvv.js → ChatView-DfNYGQIS.js} +1 -1
- assets/{ConferenceDetailView-BEtffUKD.js → ConferenceDetailView-DfZeI9bC.js} +1 -1
- assets/{ConferenceTaskView-BAq9JbyI.js → ConferenceTaskView-ToLG2N24.js} +1 -1
- assets/{ConferencesIndexView-CYTn_PTx.js → ConferencesIndexView-DnzCKyxg.js} +1 -1
- assets/{CronDashboard-BrJey03Y.js → CronDashboard-Dy6JF0vV.js} +1 -1
- assets/{CronDashboard-CgnzKY0g.js → CronDashboard-OYygS5RT.js} +1 -1
- assets/{ExternalSourceEvalBadge-CMfiSNvf.js → ExternalSourceEvalBadge-xcz_QKFV.js} +1 -1
- assets/{FeedView-wNAf1UnM.js → FeedView-6f9XH-U-.js} +1 -1
- assets/FollowingView-CDE0hOj_.js +1 -0
- assets/FollowingView-e1HW5vmf.js +0 -1
- assets/{FrameworksIndexView-D3oe8htL.js → FrameworksIndexView-B3GB1NaJ.js} +1 -1
- assets/{Icon-CRWrVPWO.js → Icon-aDKp5nB1.js} +1 -1
- assets/{LatexTitle-CfeEppH3.js → LatexTitle-CXoQ1Bzq.js} +1 -1
- assets/{MarkdownText-D0AGKKJ1.js → MarkdownText-C90Ontxz.js} +1 -1
- assets/{McpShowcase-D5BEHBL4.js → McpShowcase-D4TTJi6V.js} +1 -1
- assets/{McpView-B1VMxy4R.js → McpView-DK648tGI.js} +1 -1
- assets/{MethodDetailView-BI5O9w4y.js → MethodDetailView-BFmmUqL-.js} +1 -1
- assets/{MethodsIndexView-CPxYYZYk.js → MethodsIndexView-CvslIW0K.js} +1 -1
- assets/{NotFound-Bc6y0g0J.js → NotFound-BiuJcE21.js} +1 -1
- assets/{OrganizationContributionGraph-Dd08m_k9.js → OrganizationContributionGraph-DHmvzALw.js} +1 -1
- assets/{OrganizationDetailView-DiOUhHgj.js → OrganizationDetailView-D5IPFPbB.js} +1 -1
- assets/{OrganizationsIndexView-BfbGHJbZ.js → OrganizationsIndexView-WPgntiLW.js} +1 -1
- assets/{PaperCard-BtCEa6CD.js → PaperCard-C_kRm1Bt.js} +1 -1
- assets/PaperDetailView-BGo-dK6S.js +0 -0
- assets/PaperDetailView-yhifaccW.js +0 -0
- assets/{PaperFeed-DjmnPHUi.js → PaperFeed-BkUBd-xO.js} +1 -1
- assets/{PaperPreviewLink-CPkn2Kqv.js → PaperPreviewLink-rxrEwjIH.js} +1 -1
- assets/{PaperReaderView-BEoTUiXT.js → PaperReaderView-DkBLGada.js} +1 -1
- assets/{PapersListView-BkLVnEdQ.js → PapersListView-DIAhWDQT.js} +1 -1
- assets/{PrivacyView-Dv3D7fuz.js → PrivacyView-D1F1BW5v.js} +1 -1
- assets/{RateLimitsView-CHGVVIWH.js → RateLimitsView-DwWJ7bNa.js} +1 -1
- assets/{ResearchFollowButton-DFGdTBex.js → ResearchFollowButton-BWlDUBnb.js} +1 -1
- assets/{SavedPapersView-B2OtoH-9.js → SavedPapersView-BkTuct4d.js} +1 -1
- assets/{SearchOverlay-DLtGxH8I.js → SearchOverlay-v5_W9diY.js} +1 -1
- assets/{SettingsView-DSsDYMnQ.js → SettingsView-D0Pv1jC4.js} +1 -1
- assets/{SharedChatView-pWPy2puC.js → SharedChatView-X9FEgHfX.js} +1 -1
- assets/{SignInToEditDialog-B3EJVut1.js → SignInToEditDialog-CejkAYkt.js} +1 -1
- assets/{SotaBadges-D825CK6n.js → SotaBadges-BFyAOF4Y.js} +1 -1
assets/{AgentLogos-PqR86_NK.js → AgentLogos-BPQPDQNU.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{j as e}from"./index-CHGpuh10.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-BuF8ktG8.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-Ad6LnMOr.js → AiDeadlinesView-BVrDgxK7.js}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
-
import{d as g,j as t,b as R,T as A}from"./index-
|
| 2 |
`)},C=e=>e.toISOString().replace(/[-:]/g,"").replace(/\.\d{3}/,""),X=(e,l)=>{const s=new Date(l.deadline_at),r=new Date(s.getTime()+60*60*1e3),o=`${e.short_name||e.name} ${l.label||l.type||"deadline"}`,h=e.venue||[e.city,e.country].filter(Boolean).join(", "),n=`https://calendar.google.com/calendar/render?action=TEMPLATE&text=${encodeURIComponent(o)}&dates=${C(s)}/${C(r)}&details=${encodeURIComponent(F(e,l))}&location=${encodeURIComponent(h)}`,p=$(n);p&&window.open(p,"_blank","noopener,noreferrer")},Z=(e,l)=>{const s=new Date(l.deadline_at),r=new Date(s.getTime()+60*60*1e3),o=`${e.short_name||e.name} ${l.label||l.type||"deadline"}`,h=e.venue||[e.city,e.country].filter(Boolean).join(", "),n=["BEGIN:VCALENDAR","VERSION:2.0","BEGIN:VEVENT",e.url?`URL:${e.url}`:null,`DTSTART:${C(s)}`,`DTEND:${C(r)}`,`SUMMARY:${o}`,`DESCRIPTION:${F(e,l).replace(/\n/g,"\\n")}`,h?`LOCATION:${h}`:null,"END:VEVENT","END:VCALENDAR"].filter(Boolean).join(`
|
| 3 |
`),p=new Blob([n],{type:"text/calendar;charset=utf-8"}),d=document.createElement("a");d.href=URL.createObjectURL(p),d.download=`${(e.short_name||e.name).toLowerCase().replace(/\s+/g,"-")}-deadline.ics`,document.body.appendChild(d),d.click(),document.body.removeChild(d),URL.revokeObjectURL(d.href)},ee=({conf:e,open:l,onOpenChange:s})=>{const[r,o]=g.useState(()=>Date.now());g.useEffect(()=>{if(!l)return;o(Date.now());const i=setInterval(()=>o(Date.now()),1e3);return()=>clearInterval(i)},[l]);const h=g.useMemo(()=>e?K(e):[],[e]),n=g.useMemo(()=>e?S(e,r):null,[e,r]),p=e?_(e.start_date,e.end_date):null,d=e?e.venue||[e.city,e.country].filter(Boolean).join(", ")||e.location:null,m=n?new Date(n.deadline_at).getTime():null;return t.jsx(O,{open:l,onOpenChange:s,children:t.jsx(V,{className:"max-w-xl",style:{background:"var(--bg-elevated)",maxHeight:"85vh",overflowY:"auto"},children:e&&t.jsxs(t.Fragment,{children:[t.jsxs(P,{children:[t.jsx(G,{asChild:!0,children:t.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.01em",margin:0},children:e.short_name?`${e.short_name} ${e.year??""}`.trim():e.name})}),e.short_name&&e.name||e.description?t.jsx(H,{asChild:!0,children:t.jsx("span",{style:{fontFamily:"var(--serif)",fontSize:14,color:"var(--ink-soft)"},children:e.short_name?e.name:e.description})}):null]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:20,marginTop:4},children:[t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:24},children:[p&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[t.jsx("span",{style:w,children:"Dates"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-soft)"},children:p})]}),d&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[t.jsx("span",{style:w,children:"Venue"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-soft)"},children:d})]})]}),m!=null&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,padding:"12px 14px",borderRadius:8,background:"var(--bg-subtle)",border:"1px solid var(--hairline)"},children:[t.jsx("span",{style:w,children:"Next deadline in"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:22,fontWeight:600,color:N(m,r)},children:Y(m,r)})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[t.jsx("span",{style:w,children:"Important deadlines"}),h.length===0?t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-faint)"},children:"No deadlines listed"}):h.map((i,c)=>{const y=new Date(i.deadline_at).getTime(),a=n!=null&&i.deadline_at===n.deadline_at&&i.type===n.type,u=y<=r;return t.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12,padding:"8px 12px",borderRadius:6,background:a?"var(--accent-soft)":"transparent",border:a?"1px solid var(--hairline-strong)":"1px solid var(--hairline)",opacity:u&&!a?.55:1},children:[t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[t.jsxs("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink)",fontWeight:a?600:400},children:[i.label||k(i.type||"deadline"),a&&t.jsx("span",{style:{...w,marginLeft:8},children:"Next"})]}),t.jsxs("span",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-faint)"},children:[I(i.deadline_at),i.timezone?` · ${i.timezone}`:""]})]}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:12,fontWeight:600,whiteSpace:"nowrap",color:N(u?null:y,r)},children:J(y,r)})]},`${i.type??"deadline"}-${c}`)})]}),b(e).length>0&&t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:b(e).map(i=>t.jsx("span",{className:"tag-chip",style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:k(i)},i))}),t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:16,paddingTop:12,borderTop:"1px solid var(--hairline)"},children:[e.url&&t.jsx("a",{href:$(e.url)??void 0,target:"_blank",rel:"noopener noreferrer",style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--accent-text)"},children:"Visit website ↗"}),n&&t.jsxs("div",{style:{display:"flex",gap:12,marginLeft:"auto"},children:[t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>X(e,n),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Google Calendar"}),t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>Z(e,n),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Apple / .ics"})]})]})]})]})})})},E=({id:e,label:l,checked:s,onChange:r})=>t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:[t.jsx(B,{id:e,checked:s,onCheckedChange:r}),t.jsx("label",{htmlFor:e,style:{cursor:"pointer"},children:l})]}),te=({conf:e,now:l,selectedDomains:s,onToggleDomain:r,onOpen:o})=>{const h=S(e,l),n=h??z(e),p=n?new Date(n.deadline_at).getTime():null,d=N(h?p:null,l),m=_(e.start_date,e.end_date),i=[e.city??null,e.country??null].filter(Boolean).join(", ");return t.jsxs("div",{role:"button",tabIndex:0,onClick:()=>o(e),onKeyDown:c=>{(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),o(e))},style:{border:"1px solid var(--hairline)",borderRadius:8,padding:20,background:"var(--bg-elevated)",display:"flex",flexDirection:"column",gap:12,cursor:"pointer"},children:[t.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",gap:12},children:[t.jsx("h3",{style:{fontFamily:"var(--serif)",fontSize:20,fontWeight:500,letterSpacing:"-0.01em",margin:0},children:e.short_name?`${e.short_name} ${e.year??""}`.trim():e.name}),e.url&&t.jsx("a",{href:$(e.url)??void 0,target:"_blank",rel:"noopener noreferrer",onClick:c=>c.stopPropagation(),style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",whiteSpace:"nowrap"},children:"website ↗"})]}),t.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12,paddingBottom:12,borderBottom:"1px solid var(--hairline)"},children:[t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)"},children:(n==null?void 0:n.label)||(n==null?void 0:n.type)||"Deadline"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:n?`${I(n.deadline_at)}${n.timezone?` · ${n.timezone}`:""}`:"TBD"})]}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:14,fontWeight:600,color:d,whiteSpace:"nowrap"},children:p!=null?Q(p,l):"TBD"})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)"},children:[m&&t.jsx("span",{children:m}),i&&t.jsx("span",{children:i})]}),b(e).length>0&&t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:b(e).map(c=>{const y=s.has(c);return t.jsx("button",{className:"tag-chip",onClick:a=>{a.stopPropagation(),r(c)},style:{background:y?"var(--ink)":"var(--bg-subtle)",color:y?"var(--bg)":"var(--ink-soft)"},children:k(c)},c)})})]})},pe=()=>{const[e,l]=g.useState(!0),[s,r]=g.useState(!1),[o,h]=g.useState(new Set),[n,p]=g.useState(null),d=g.useMemo(()=>Date.now(),[]),m=R({queryKey:["conference-deadlines"],queryFn:()=>L.conferenceDeadlines(),staleTime:A}),i=a=>{h(u=>{const x=new Set(u);return x.has(a)?x.delete(a):x.add(a),x})},c=g.useMemo(()=>{var u;const a=new Map;return(u=m.data)==null||u.results.forEach(x=>{b(x).forEach(j=>a.set(j,(a.get(j)??0)+1))}),Array.from(a.entries()).sort((x,j)=>j[1]-x[1]).map(([x])=>x)},[m.data]),y=g.useMemo(()=>{var j;const u=(((j=m.data)==null?void 0:j.results)??[]).filter(f=>!(e&&f.tier!=="a"||o.size>0&&!b(f).some(v=>o.has(v))||!s&&!S(f,d))),x=f=>{const D=S(f,d);if(D)return{group:0,time:new Date(D.deadline_at).getTime()};const v=z(f);return{group:1,time:-(v?new Date(v.deadline_at).getTime():0)}};return[...u].sort((f,D)=>{const v=x(f),T=x(D);return v.group!==T.group?v.group-T.group:v.time-T.time})},[m.data,e,s,o,d]);return m.error?t.jsx("div",{className:"page",children:t.jsx(W,{variant:"destructive",children:t.jsx(M,{children:"Failed to load conference deadlines. Please try again."})})}):t.jsxs("div",{className:"page",children:[t.jsx("div",{className:"feed-header",children:t.jsxs("div",{children:[t.jsxs("h1",{className:"feed-title",children:["AI Conference ",t.jsx("em",{children:"Deadlines"})]}),t.jsx("div",{className:"feed-subtitle",children:"Upcoming submission deadlines for major AI conferences, counting down."})]})}),t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:20,padding:"16px 0",borderBottom:"1px solid var(--hairline)",marginBottom:24},children:[t.jsx(E,{id:"top-tier-only",label:"Top tier only",checked:e,onChange:l}),t.jsx(E,{id:"show-past",label:"Show past conferences",checked:s,onChange:r})]}),c.length>0&&t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:6,marginBottom:24},children:[c.map(a=>{const u=o.has(a);return t.jsx("button",{className:"tag-chip",onClick:()=>i(a),style:{background:u?"var(--ink)":"var(--bg-subtle)",color:u?"var(--bg)":"var(--ink-soft)"},children:k(a)},a)}),o.size>0&&t.jsx("button",{className:"tag-chip",onClick:()=>h(new Set),style:{background:"transparent",color:"var(--ink-faint)"},children:"Clear ✕"})]}),t.jsx("div",{className:"sort-bar",children:t.jsx("div",{className:"results-count",children:m.isLoading?"…":`${y.length} conferences`})}),m.isLoading?t.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:16},children:Array.from({length:6}).map((a,u)=>t.jsx(U,{className:"h-44"},u))}):y.length===0?t.jsxs("div",{className:"no-results",children:["No conferences match these filters",s?".":" — try enabling “Show past conferences”."]}):t.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:16},children:y.map(a=>t.jsx(te,{conf:a,now:d,selectedDomains:o,onToggleDomain:i,onOpen:p},a.id))}),t.jsx(ee,{conf:n,open:n!==null,onOpenChange:a=>{a||p(null)}})]})};export{pe as default};
|
|
|
|
| 1 |
+
import{d as g,j as t,b as R,T as A}from"./index-BuF8ktG8.js";import{c as L}from"./catalog-QOvavbkR.js";import{S as B}from"./switch-BZ1Lljbb.js";import{S as U}from"./skeleton-Dp4VcttN.js";import{A as W,a as M}from"./alert-ClESc45e.js";import{s as $}from"./safeExternalHref-CkBrsh84.js";import{D as O,a as V,c as P,b as G,d as H}from"./dialog-B5pjhpY5.js";import{s as K,n as S,f as _,p as Y,u as N,l as k,a as I,c as b,D as q,b as z,d as Q}from"./deadlines-BH32v7D1.js";import"./index-DKuYr0yj.js";const w={fontFamily:"var(--mono)",fontSize:10,letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--ink-faint)"},J=(e,l)=>{const s=Math.ceil((e-l)/q);return s<=0?"passed":`${s} ${s===1?"day":"days"}`},F=(e,l)=>{const s=_(e.start_date,e.end_date),r=e.venue||[e.city,e.country].filter(Boolean).join(", ");return[`${l.label||l.type||"Deadline"} for ${e.name}`,s?`Dates: ${s}`:null,r?`Location: ${r}`:null,e.url?`Website: ${e.url}`:null].filter(Boolean).join(`
|
| 2 |
`)},C=e=>e.toISOString().replace(/[-:]/g,"").replace(/\.\d{3}/,""),X=(e,l)=>{const s=new Date(l.deadline_at),r=new Date(s.getTime()+60*60*1e3),o=`${e.short_name||e.name} ${l.label||l.type||"deadline"}`,h=e.venue||[e.city,e.country].filter(Boolean).join(", "),n=`https://calendar.google.com/calendar/render?action=TEMPLATE&text=${encodeURIComponent(o)}&dates=${C(s)}/${C(r)}&details=${encodeURIComponent(F(e,l))}&location=${encodeURIComponent(h)}`,p=$(n);p&&window.open(p,"_blank","noopener,noreferrer")},Z=(e,l)=>{const s=new Date(l.deadline_at),r=new Date(s.getTime()+60*60*1e3),o=`${e.short_name||e.name} ${l.label||l.type||"deadline"}`,h=e.venue||[e.city,e.country].filter(Boolean).join(", "),n=["BEGIN:VCALENDAR","VERSION:2.0","BEGIN:VEVENT",e.url?`URL:${e.url}`:null,`DTSTART:${C(s)}`,`DTEND:${C(r)}`,`SUMMARY:${o}`,`DESCRIPTION:${F(e,l).replace(/\n/g,"\\n")}`,h?`LOCATION:${h}`:null,"END:VEVENT","END:VCALENDAR"].filter(Boolean).join(`
|
| 3 |
`),p=new Blob([n],{type:"text/calendar;charset=utf-8"}),d=document.createElement("a");d.href=URL.createObjectURL(p),d.download=`${(e.short_name||e.name).toLowerCase().replace(/\s+/g,"-")}-deadline.ics`,document.body.appendChild(d),d.click(),document.body.removeChild(d),URL.revokeObjectURL(d.href)},ee=({conf:e,open:l,onOpenChange:s})=>{const[r,o]=g.useState(()=>Date.now());g.useEffect(()=>{if(!l)return;o(Date.now());const i=setInterval(()=>o(Date.now()),1e3);return()=>clearInterval(i)},[l]);const h=g.useMemo(()=>e?K(e):[],[e]),n=g.useMemo(()=>e?S(e,r):null,[e,r]),p=e?_(e.start_date,e.end_date):null,d=e?e.venue||[e.city,e.country].filter(Boolean).join(", ")||e.location:null,m=n?new Date(n.deadline_at).getTime():null;return t.jsx(O,{open:l,onOpenChange:s,children:t.jsx(V,{className:"max-w-xl",style:{background:"var(--bg-elevated)",maxHeight:"85vh",overflowY:"auto"},children:e&&t.jsxs(t.Fragment,{children:[t.jsxs(P,{children:[t.jsx(G,{asChild:!0,children:t.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.01em",margin:0},children:e.short_name?`${e.short_name} ${e.year??""}`.trim():e.name})}),e.short_name&&e.name||e.description?t.jsx(H,{asChild:!0,children:t.jsx("span",{style:{fontFamily:"var(--serif)",fontSize:14,color:"var(--ink-soft)"},children:e.short_name?e.name:e.description})}):null]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:20,marginTop:4},children:[t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:24},children:[p&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[t.jsx("span",{style:w,children:"Dates"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-soft)"},children:p})]}),d&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[t.jsx("span",{style:w,children:"Venue"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-soft)"},children:d})]})]}),m!=null&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,padding:"12px 14px",borderRadius:8,background:"var(--bg-subtle)",border:"1px solid var(--hairline)"},children:[t.jsx("span",{style:w,children:"Next deadline in"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:22,fontWeight:600,color:N(m,r)},children:Y(m,r)})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[t.jsx("span",{style:w,children:"Important deadlines"}),h.length===0?t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-faint)"},children:"No deadlines listed"}):h.map((i,c)=>{const y=new Date(i.deadline_at).getTime(),a=n!=null&&i.deadline_at===n.deadline_at&&i.type===n.type,u=y<=r;return t.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12,padding:"8px 12px",borderRadius:6,background:a?"var(--accent-soft)":"transparent",border:a?"1px solid var(--hairline-strong)":"1px solid var(--hairline)",opacity:u&&!a?.55:1},children:[t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[t.jsxs("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink)",fontWeight:a?600:400},children:[i.label||k(i.type||"deadline"),a&&t.jsx("span",{style:{...w,marginLeft:8},children:"Next"})]}),t.jsxs("span",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-faint)"},children:[I(i.deadline_at),i.timezone?` · ${i.timezone}`:""]})]}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:12,fontWeight:600,whiteSpace:"nowrap",color:N(u?null:y,r)},children:J(y,r)})]},`${i.type??"deadline"}-${c}`)})]}),b(e).length>0&&t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:b(e).map(i=>t.jsx("span",{className:"tag-chip",style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:k(i)},i))}),t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:16,paddingTop:12,borderTop:"1px solid var(--hairline)"},children:[e.url&&t.jsx("a",{href:$(e.url)??void 0,target:"_blank",rel:"noopener noreferrer",style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--accent-text)"},children:"Visit website ↗"}),n&&t.jsxs("div",{style:{display:"flex",gap:12,marginLeft:"auto"},children:[t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>X(e,n),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Google Calendar"}),t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>Z(e,n),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Apple / .ics"})]})]})]})]})})})},E=({id:e,label:l,checked:s,onChange:r})=>t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:[t.jsx(B,{id:e,checked:s,onCheckedChange:r}),t.jsx("label",{htmlFor:e,style:{cursor:"pointer"},children:l})]}),te=({conf:e,now:l,selectedDomains:s,onToggleDomain:r,onOpen:o})=>{const h=S(e,l),n=h??z(e),p=n?new Date(n.deadline_at).getTime():null,d=N(h?p:null,l),m=_(e.start_date,e.end_date),i=[e.city??null,e.country??null].filter(Boolean).join(", ");return t.jsxs("div",{role:"button",tabIndex:0,onClick:()=>o(e),onKeyDown:c=>{(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),o(e))},style:{border:"1px solid var(--hairline)",borderRadius:8,padding:20,background:"var(--bg-elevated)",display:"flex",flexDirection:"column",gap:12,cursor:"pointer"},children:[t.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",gap:12},children:[t.jsx("h3",{style:{fontFamily:"var(--serif)",fontSize:20,fontWeight:500,letterSpacing:"-0.01em",margin:0},children:e.short_name?`${e.short_name} ${e.year??""}`.trim():e.name}),e.url&&t.jsx("a",{href:$(e.url)??void 0,target:"_blank",rel:"noopener noreferrer",onClick:c=>c.stopPropagation(),style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",whiteSpace:"nowrap"},children:"website ↗"})]}),t.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12,paddingBottom:12,borderBottom:"1px solid var(--hairline)"},children:[t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)"},children:(n==null?void 0:n.label)||(n==null?void 0:n.type)||"Deadline"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:n?`${I(n.deadline_at)}${n.timezone?` · ${n.timezone}`:""}`:"TBD"})]}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:14,fontWeight:600,color:d,whiteSpace:"nowrap"},children:p!=null?Q(p,l):"TBD"})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)"},children:[m&&t.jsx("span",{children:m}),i&&t.jsx("span",{children:i})]}),b(e).length>0&&t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:b(e).map(c=>{const y=s.has(c);return t.jsx("button",{className:"tag-chip",onClick:a=>{a.stopPropagation(),r(c)},style:{background:y?"var(--ink)":"var(--bg-subtle)",color:y?"var(--bg)":"var(--ink-soft)"},children:k(c)},c)})})]})},pe=()=>{const[e,l]=g.useState(!0),[s,r]=g.useState(!1),[o,h]=g.useState(new Set),[n,p]=g.useState(null),d=g.useMemo(()=>Date.now(),[]),m=R({queryKey:["conference-deadlines"],queryFn:()=>L.conferenceDeadlines(),staleTime:A}),i=a=>{h(u=>{const x=new Set(u);return x.has(a)?x.delete(a):x.add(a),x})},c=g.useMemo(()=>{var u;const a=new Map;return(u=m.data)==null||u.results.forEach(x=>{b(x).forEach(j=>a.set(j,(a.get(j)??0)+1))}),Array.from(a.entries()).sort((x,j)=>j[1]-x[1]).map(([x])=>x)},[m.data]),y=g.useMemo(()=>{var j;const u=(((j=m.data)==null?void 0:j.results)??[]).filter(f=>!(e&&f.tier!=="a"||o.size>0&&!b(f).some(v=>o.has(v))||!s&&!S(f,d))),x=f=>{const D=S(f,d);if(D)return{group:0,time:new Date(D.deadline_at).getTime()};const v=z(f);return{group:1,time:-(v?new Date(v.deadline_at).getTime():0)}};return[...u].sort((f,D)=>{const v=x(f),T=x(D);return v.group!==T.group?v.group-T.group:v.time-T.time})},[m.data,e,s,o,d]);return m.error?t.jsx("div",{className:"page",children:t.jsx(W,{variant:"destructive",children:t.jsx(M,{children:"Failed to load conference deadlines. Please try again."})})}):t.jsxs("div",{className:"page",children:[t.jsx("div",{className:"feed-header",children:t.jsxs("div",{children:[t.jsxs("h1",{className:"feed-title",children:["AI Conference ",t.jsx("em",{children:"Deadlines"})]}),t.jsx("div",{className:"feed-subtitle",children:"Upcoming submission deadlines for major AI conferences, counting down."})]})}),t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:20,padding:"16px 0",borderBottom:"1px solid var(--hairline)",marginBottom:24},children:[t.jsx(E,{id:"top-tier-only",label:"Top tier only",checked:e,onChange:l}),t.jsx(E,{id:"show-past",label:"Show past conferences",checked:s,onChange:r})]}),c.length>0&&t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:6,marginBottom:24},children:[c.map(a=>{const u=o.has(a);return t.jsx("button",{className:"tag-chip",onClick:()=>i(a),style:{background:u?"var(--ink)":"var(--bg-subtle)",color:u?"var(--bg)":"var(--ink-soft)"},children:k(a)},a)}),o.size>0&&t.jsx("button",{className:"tag-chip",onClick:()=>h(new Set),style:{background:"transparent",color:"var(--ink-faint)"},children:"Clear ✕"})]}),t.jsx("div",{className:"sort-bar",children:t.jsx("div",{className:"results-count",children:m.isLoading?"…":`${y.length} conferences`})}),m.isLoading?t.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:16},children:Array.from({length:6}).map((a,u)=>t.jsx(U,{className:"h-44"},u))}):y.length===0?t.jsxs("div",{className:"no-results",children:["No conferences match these filters",s?".":" — try enabling “Show past conferences”."]}):t.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:16},children:y.map(a=>t.jsx(te,{conf:a,now:d,selectedDomains:o,onToggleDomain:i,onOpen:p},a.id))}),t.jsx(ee,{conf:n,open:n!==null,onOpenChange:a=>{a||p(null)}})]})};export{pe as default};
|
assets/{ApiDocsView-DT_kBPK6.js → ApiDocsView-CV3pGe0Y.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import{ac as m,b as f,d as h,j as e}from"./index-
|
| 2 |
|
| 3 |
response = requests.get(${JSON.stringify(s)}, timeout=30)
|
| 4 |
response.raise_for_status()
|
|
|
|
| 1 |
+
import{ac as m,b as f,d as h,j as e}from"./index-BuF8ktG8.js";import{u as g}from"./useDocumentTitle-DZHc-0SQ.js";import{M as y}from"./index-BwrKSI2t.js";const b={queryKey:["public-api-schema"],queryFn:()=>m("/openapi.json",{credentials:"omit"}),staleTime:5*60*1e3};function w(s,r){const n=new URLSearchParams;for(const[a,t]of Object.entries(r["x-example-parameters"]))s.includes(`{${a}}`)?s=s.replace(`{${a}}`,encodeURIComponent(String(t))):n.append(a,String(t));return`https://paperswithcode.co${s}${n.size?`?${n}`:""}`}function v(s,r){return r==="Python"?`import requests
|
| 2 |
|
| 3 |
response = requests.get(${JSON.stringify(s)}, timeout=30)
|
| 4 |
response.raise_for_status()
|
assets/{AreaSection-BVX3JiNc.js → AreaSection-DPzsnyZc.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{j as s}from"./index-
|
|
|
|
| 1 |
+
import{j as s}from"./index-BuF8ktG8.js";import{S as l}from"./skeleton-Dp4VcttN.js";const m=({id:t,title:a,description:e,meta:r,style:c,children:i})=>s.jsxs("section",{id:t,className:"area-section",style:c,children:[s.jsxs("div",{className:"area-section-head",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"area-section-title",children:a}),e&&s.jsx("div",{className:"area-section-description",children:e})]}),s.jsx("div",{className:"area-section-meta",children:r})]}),s.jsx("div",{className:"tag-grid",children:i})]}),h=({sections:t=4,tiles:a,tileClassName:e})=>s.jsx("div",{className:"area-directory-skeleton",children:Array.from({length:t}).map((r,c)=>s.jsxs("div",{children:[s.jsx(l,{className:"h-8 w-1/3 mb-4"}),s.jsx("div",{className:"tag-grid",children:Array.from({length:a}).map((i,n)=>s.jsx(l,{className:e},n))})]},c))}),x=({areas:t})=>{const a=t.filter(r=>r.tasks.length>0),e=a.reduce((r,c)=>r+c.tasks.length,0);return e===0?null:s.jsxs("div",{className:"area-directory-footer",children:[e," tasks across ",a.length," areas."]})};export{h as A,m as a,x as b};
|
assets/{AstraForRoboticsView-BiXYC0gV.js → AstraForRoboticsView-uC73YbKl.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{p,d as u,j as a,L as o}from"./index-
|
|
|
|
| 1 |
+
import{p,d as u,j as a,L as o}from"./index-BuF8ktG8.js";import{u as g,b as x,a as b}from"./PaperFeed-BkUBd-xO.js";import{A as f,a as j}from"./alert-ClESc45e.js";import{u as y}from"./usePapers-3mHbxOSK.js";import{p as v}from"./papers-DOWhzKgr.js";import{u as k,f as w}from"./useDocumentTitle-DZHc-0SQ.js";import{t as A}from"./transform-CHck6g-D.js";import"./PaperCard-C_kRm1Bt.js";import"./AuthorAvatar-CIgdnsA4.js";import"./SotaBadges-BFyAOF4Y.js";import"./colors-BkWRhvFI.js";import"./Icon-aDKp5nB1.js";import"./LatexTitle-CXoQ1Bzq.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-NrNmZ8VR.js";import"./skeleton-Dp4VcttN.js";import"./useIntersectionObserver-Cvgl2pBE.js";import"./useInfiniteQuery-DnjhR627.js";import"./curation-rx4Y4ai_.js";const n="robotics",i="gpt-6-astra",_="https://x.com/YuXiang_IRVL/status/2100395131924840570",P=[{handle:"Frame_Robotics",author:"Frame Robotics",summary:"Real-arm control that fixes grip angle and carry height on the next try after a miss.",url:"https://x.com/Frame_Robotics/status/2099900836273090614"},{handle:"qineng_wang",author:"Qineng Wang",summary:"Dual-ALOHA spatial-constraint puzzles: unlocking interlocked parts and threading a rope through three rings.",url:"https://x.com/qineng_wang/status/2099893504658866561"},{handle:"__Rhodium__",author:"Lucas",summary:"In-context learning of the controls and the workspace, reaching the task goal in three tries.",url:"https://x.com/__Rhodium__/status/2099521054678925534"},{handle:"SuveenE",author:"Suveen Ellawela",summary:"Picking up a pipette and fitting a 5 mm tip on a MolmoAct2 real-world eval, using the free hand for a better view.",url:"https://x.com/SuveenE/status/2099448450341605672"},{handle:"cdngdev",author:"thijs",summary:"A robot arm with a paintbrush painting the Golden Gate Bridge, improving across attempts from camera feedback.",url:"https://x.com/cdngdev/status/2097339677128982873"},{handle:"IsaacSin12",author:"Isaac Sin",summary:"Zero-shot sorting of irregularly shaped blocks into cups by color.",url:"https://x.com/IsaacSin12/status/2096715382166098302"},{handle:"chooi_jeq",author:"Jay Chooi",summary:"Robocurve's robot-control comparison: 95% task completion versus 40% for Fable 5.1 at lower cost.",url:"https://x.com/chooi_jeq/status/2096064315115839904"}],R=[{handle:"Lingjun_Mao",author:"Lingjun Mao",summary:"Adapting to a new embodiment to put a cake into an air fryer through CuRobo motion-planning tool APIs.",url:"https://x.com/Lingjun_Mao/status/2100294902672462176"},{handle:"walterzhu8",author:"Wentao Zhu",summary:"A day-and-a-half autonomous run that builds and trains pen spinning on a Sharpa hand in Isaac Lab.",url:"https://x.com/walterzhu8/status/2100212420840989112"},{handle:"mishig25",author:"Mishig",summary:"Painting the Eiffel Tower in MuJoCo with an SO-101 and a brush, with the full experiment shared on Hugging Face.",url:"https://x.com/mishig25/status/2099611674793668676"},{handle:"RunpeiDong",author:"Runpei Dong",summary:"Getting a humanoid into a Tesla in MuJoCo: learning from feedback, then reusing that experience with egocentric perception.",url:"https://x.com/RunpeiDong/status/2099604536327614717"},{handle:"frankzydou",author:"Zhiyang (Frank) Dou",summary:"A LeRobot SO-101 real-world pickup from a third-person RGB camera, where the arm has to bend back to reach the pen.",url:"https://x.com/frankzydou/status/2099338127915512297"},{handle:"Parvkpr",author:"Parv Kapoor",summary:"Real-to-sim: building an interactive simulation environment from a single image or video.",url:"https://x.com/Parvkpr/status/2098847963867238597"},{handle:"z_code68632",author:"code_z",summary:"One demo per task: unscrewing a bottle cap, inserting a plug, clearing obstacles, and imitating a dance on a real robot.",url:"https://x.com/z_code68632/status/2098397364725895387"}],h=({posts:s,label:e})=>a.jsxs("div",{className:"astra-posts",children:[a.jsx("div",{className:"astra-posts-label",children:e}),a.jsx("ul",{children:s.map(t=>a.jsxs("li",{children:[a.jsxs("a",{href:t.url,target:"_blank",rel:"noreferrer",children:["@",t.handle]}),a.jsxs("span",{className:"astra-post-author",children:[" ",t.author]}),a.jsxs("span",{className:"astra-post-summary",children:[" — ",t.summary]})]},t.url))})]}),B=()=>{var l,c;const s=g(),e=y([...p.feeds.infinite,{task:n,method:i,...s.filters}],r=>v.list({...s.filters,task:n,method:i,page:r,page_size:12}));k(w("GPT-6 Astra for Robotics"));const t=u.useMemo(()=>{var r;return(((r=e.data)==null?void 0:r.pages)??[]).flatMap(d=>d.results.map(A))},[e.data]),m=((c=(l=e.data)==null?void 0:l.pages[0])==null?void 0:c.count)??0;return a.jsxs("div",{className:"page",children:[a.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[a.jsx(o,{to:"/",children:"Home"}),a.jsx("span",{children:" / "}),a.jsx("span",{children:"GPT-6 Astra for Robotics"})]}),a.jsx("header",{className:"feed-header",children:a.jsxs("div",{children:[a.jsx("div",{className:"astra-eyebrow",children:"Collection"}),a.jsxs("h1",{className:"feed-title",children:["GPT-6 Astra ",a.jsx("em",{children:"for Robotics"})]}),a.jsx("div",{className:"feed-subtitle",children:"Papers, technical reports, and evaluations that put OpenAI’s frontier model in control of real and simulated robots."}),a.jsxs("p",{className:"astra-lede",children:["The GPT-6 Astra launch never mentioned robots, yet within days the model was driving arms, hands, and humanoids. As"," ",a.jsx("a",{href:_,target:"_blank",rel:"noreferrer",children:"Yu Xiang"})," ","framed it, the work splits into two families: Astra acting as the robot policy itself, and Astra acting as an agent that orchestrates everything else."]})]})}),a.jsxs("section",{className:"astra-approaches","aria-label":"How GPT-6 Astra is used for robots",children:[a.jsxs("article",{className:"astra-approach",children:[a.jsx("div",{className:"astra-approach-num",children:"01 / Robot policy"}),a.jsx("h2",{children:"Astra as the policy, like a VLA"}),a.jsx("p",{children:"The model looks at camera frames and robot state and directly emits actions: end-effector poses, joint targets, or gripper commands, closing the control loop step by step with no task-specific training."}),a.jsx(h,{posts:P,label:"Seen on X"})]}),a.jsxs("article",{className:"astra-approach",children:[a.jsx("div",{className:"astra-approach-num",children:"02 / Agent"}),a.jsx("h2",{children:"Astra as the agent"}),a.jsx("p",{children:"The model reasons about the scene, writes and runs code, calls planners and tools, or delegates low-level motion to pretrained policies such as VLAs, and keeps the robot on task over long horizons."}),a.jsx(h,{posts:R,label:"Seen on X"})]})]}),a.jsxs("p",{className:"astra-note",children:["Listing is automatic: any paper tagged with both the"," ",a.jsx(o,{to:`/tasks/${n}`,children:"Robotics"})," task and the"," ",a.jsx(o,{to:`/methods/${i}`,children:"GPT-6 Astra"})," method appears here. Missing a report or preprint?"," ",a.jsx(o,{to:"/submit",children:"Submit it"}),"."]}),a.jsxs("div",{className:"task-section-head",style:{marginTop:36},children:[a.jsx("div",{className:"task-section-eyebrow",children:"Top trending · sort below"}),a.jsxs("div",{className:"task-section-title",children:["Papers ",a.jsxs("span",{className:"meta",children:["[",m.toLocaleString(),"]"]})]})]}),a.jsx(x,{feed:s,showDateFilter:!1}),e.error?a.jsx(f,{variant:"destructive",children:a.jsx(j,{children:"Failed to load the collection. Please try again."})}):a.jsx(b,{query:e,cards:t,empty:"No papers match this selection yet."})]})};export{B as default};
|
assets/{AuthorAvatar-fJxhX3fO.js → AuthorAvatar-CIgdnsA4.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{d as c,j as r}from"./index-
|
|
|
|
| 1 |
+
import{d as c,j as r}from"./index-BuF8ktG8.js";const p=a=>a!=null&&a.startsWith("https://")&&!a.startsWith("https://huggingface.co/avatars/")?a:null,g=({url:a,className:o,href:t,label:n})=>{const[i,l]=c.useState(!1),s=i?null:p(a);if(!s)return null;const e=r.jsx("img",{className:`author-avatar-base ${o}`,src:s,alt:"",loading:"lazy",onError:()=>l(!0)});return t?r.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer","aria-label":n,children:e}):e};export{g as A};
|
assets/{AuthorDetailView-HZ2z-PQp.js → AuthorDetailView-BqulA_cV.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{u as b,j as a,b as N,p as v,d as F,ao as y,L as A}from"./index-
|
|
|
|
| 1 |
+
import{u as b,j as a,b as N,p as v,d as F,ao as y,L as A}from"./index-BuF8ktG8.js";import{A as k}from"./AuthorAvatar-CIgdnsA4.js";import{u as P,b as $,a as S}from"./PaperFeed-BkUBd-xO.js";import{R as L}from"./ResearchFollowButton-BWlDUBnb.js";import{A as R,a as w}from"./alert-ClESc45e.js";import{S as z}from"./skeleton-Dp4VcttN.js";import{u as C}from"./usePapers-3mHbxOSK.js";import{p as m}from"./papers-DOWhzKgr.js";import{i as H}from"./apiErrors-Bu7TuOPW.js";import{t as q}from"./transform-CHck6g-D.js";import f from"./NotFound-BiuJcE21.js";import"./PaperCard-C_kRm1Bt.js";import"./SotaBadges-BFyAOF4Y.js";import"./colors-BkWRhvFI.js";import"./Icon-aDKp5nB1.js";import"./LatexTitle-CXoQ1Bzq.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-NrNmZ8VR.js";import"./useIntersectionObserver-Cvgl2pBE.js";import"./researchTopic-Cz5Cn_RO.js";import"./useMutation-H0Ru2KmC.js";import"./plus-9o2YwICS.js";import"./useInfiniteQuery-DnjhR627.js";import"./curation-rx4Y4ai_.js";const Q=({authorId:r})=>{var n,i,l,p,c,d,h,u;const o=P(),{searchParams:g}=o,e=N({queryKey:["author",r],queryFn:()=>m.getAuthor(r)}),s=C([...v.feeds.infinite,{author:r,...o.filters}],t=>m.list({...o.filters,author:r,page:t,page_size:12})),x=F.useMemo(()=>{var t;return(((t=s.data)==null?void 0:t.pages)??[]).flatMap(_=>_.results.map(q))},[s.data]),j=((i=(n=s.data)==null?void 0:n.pages[0])==null?void 0:i.count)??0;if(H(e.error))return a.jsx(f,{});if((l=e.data)!=null&&l.organization_slug){const t=g.toString();return a.jsx(y,{to:`/orgs/${e.data.organization_slug}${t?`?${t}`:""}`,replace:!0})}return a.jsxs("div",{className:"page",children:[a.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[a.jsx(A,{to:"/",children:"Home"}),a.jsx("span",{children:" / "}),a.jsx("span",{children:"Authors"}),a.jsx("span",{children:" / "}),a.jsx("span",{children:((p=e.data)==null?void 0:p.full_name)??r})]}),a.jsxs("header",{className:"author-hero",children:[a.jsx("div",{className:"organizations-eyebrow",children:"AUTHOR"}),a.jsxs("div",{className:"author-hero-title",children:[(c=e.data)!=null&&c.photo?a.jsxs("figure",{className:"author-photo",children:[a.jsx("img",{className:"author-avatar-base author-avatar",src:e.data.photo.url,alt:""}),a.jsxs("figcaption",{children:["Photo:"," ",a.jsx("a",{href:e.data.photo.source_url,target:"_blank",rel:"noopener noreferrer",children:e.data.photo.credit}),", ",e.data.photo.license_url?a.jsx("a",{href:e.data.photo.license_url,target:"_blank",rel:"noopener noreferrer",children:e.data.photo.license}):e.data.photo.license]})]}):((d=e.data)==null?void 0:d.hf_username)&&a.jsx(k,{className:"author-avatar",url:e.data.hf_avatar_url,href:`https://huggingface.co/${e.data.hf_username}`,label:`@${e.data.hf_username} on Hugging Face`}),a.jsx("h1",{className:"feed-title",children:((h=e.data)==null?void 0:h.full_name)??a.jsx(z,{className:"h-12 w-64 inline-block"})})]}),e.data&&a.jsxs("div",{className:"feed-subtitle",children:[e.data.paper_count.toLocaleString()," ",e.data.paper_count===1?"paper":"papers",e.data.hf_username&&a.jsxs(a.Fragment,{children:[" · ",a.jsxs("a",{href:`https://huggingface.co/${e.data.hf_username}`,target:"_blank",rel:"noopener noreferrer",children:["@",e.data.hf_username," on Hugging Face ↗"]})]}),e.data.google_scholar_id&&a.jsxs(a.Fragment,{children:[" · ",a.jsx("a",{href:`https://scholar.google.com/citations?user=${encodeURIComponent(e.data.google_scholar_id)}`,target:"_blank",rel:"noopener noreferrer",children:"Google Scholar ↗"})]})]}),e.data&&a.jsx(L,{kind:"author",entityId:e.data.id})]}),a.jsx($,{feed:o,style:{alignItems:"center",gap:16},children:a.jsxs("div",{className:"results-count",children:[j.toLocaleString()," papers"]})}),s.error?a.jsx(R,{variant:"destructive",children:a.jsxs(w,{children:["Failed to load papers."," ",a.jsx("button",{type:"button",onClick:()=>void s.refetch(),children:"Try again"})]})}):a.jsx(S,{query:s,cards:x,empty:((u=e.data)==null?void 0:u.paper_count)===0?"No public papers are available.":"No papers found for this selection."})]})},la=()=>{const{authorId:r}=b();return r?a.jsx(Q,{authorId:r},r):a.jsx(f,{})};export{la as default};
|
assets/{AuthorizePaperEditView-BmKMH1AZ.js → AuthorizePaperEditView-CEtMWk6L.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{u,a as d,b as l,j as e,L as p,H as c}from"./index-
|
|
|
|
| 1 |
+
import{u,a as d,b as l,j as e,L as p,H as c}from"./index-BuF8ktG8.js";import{u as h}from"./useMutation-H0Ru2KmC.js";import{B as g}from"./button-kiAIp5NU.js";import{p as n}from"./paperEdits-wCAl1e4-.js";function f(){const{authorizationId:t=""}=u(),{user:s,isLoading:o}=d(),i=l({queryKey:["paper-edit-authorization",t],queryFn:()=>n.authorization(t),retry:!1}),r=h({mutationFn:()=>n.approve(t)}),a=i.data;return e.jsxs("main",{className:"mx-auto max-w-xl space-y-5 px-6 py-12",children:[e.jsx("h1",{className:"text-2xl font-semibold",children:"Authorize your agent to edit a paper"}),(i.isLoading||o)&&e.jsx("p",{children:"Loading authorization…"}),i.error&&e.jsx("p",{role:"alert",children:i.error.message}),a&&e.jsxs(e.Fragment,{children:[e.jsx(p,{className:"underline",to:`/paper/${a.paper_id}`,children:a.title}),e.jsxs("p",{children:["Check that your CLI shows this code: ",e.jsx("strong",{className:"font-mono",children:a.user_code})]}),e.jsx("p",{children:"Only approve a request you started. Your agent will be able to publish changes to this paper’s links, tags, and evaluation results for one hour, without further approval."}),e.jsx("p",{children:"Edits appear publicly under your Hugging Face username. You can edit up to 20 distinct papers per UTC day. Evaluation deletion and changes to shared benchmark definitions require an administrator."}),r.isSuccess||a.approved?e.jsx("p",{role:"status",children:"Access approved. Return to your CLI to continue."}):s?e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:["Signed in as ",e.jsxs("strong",{children:["@",s.username]})]}),e.jsx(g,{disabled:r.isPending||!s.can_directly_edit_catalog,onClick:()=>r.mutate(),children:r.isPending?"Authorizing…":"Authorize for one hour"}),!s.can_directly_edit_catalog&&e.jsx("p",{children:"Direct editing is unavailable for this session."})]}):e.jsx(c,{returnTo:`/authorize-paper-edit/${t}`,label:"Sign in with Hugging Face"}),r.error&&e.jsx("p",{role:"alert",children:r.error.message})]})]})}export{f as default};
|
assets/{AutonomousOperations-Ch9vfeiA.js → AutonomousOperations-CP1_xnwp.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{i as R,d,b as B,J as C,j as e,L as q}from"./index-
|
|
|
|
| 1 |
+
import{i as R,d,b as B,J as C,j as e,L as q}from"./index-BuF8ktG8.js";import{u as Q}from"./useMutation-H0Ru2KmC.js";import{C as n,e as i,S as H,b as l,c as t,t as E,f as m,o as x}from"./CronDashboard-OYygS5RT.js";import{B as I}from"./badge-DGbLiWuK.js";import{B as h}from"./button-kiAIp5NU.js";import{I as u}from"./input-CApr9J-O.js";import{A as P}from"./activity-CKvEBdtE.js";import{A as D}from"./arrow-left-DHCUWtMI.js";const j={submissions:"Submission review",curation:"Scheduled curation",cron_health:"CRON health",chat_reliability:"Chat reliability"},S={healthy:"healthy",degraded:"degraded",repairing:"running","rolled-back":"broken",manual:"degraded"},V=()=>{var A;const M=R(),[p,T]=d.useState(""),[f,_]=d.useState(""),[b,v]=d.useState({}),[g,N]=d.useState(""),c=B({queryKey:C.autonomousOperations,queryFn:()=>x.getAutonomousOperations(),refetchInterval:3e4,retry:!1}),r=Q({mutationFn:s=>s(),onSuccess:s=>{M.setQueryData(C.autonomousOperations,s),_(""),v({}),N("")}}),a=c.data,y=r.error instanceof Error?r.error.message:null;if(c.isLoading)return e.jsx("div",{className:"page","aria-busy":"true",children:"Loading autonomous operations…"});if(c.error||!a)return e.jsxs("div",{className:"page",children:[e.jsx("h1",{children:"Autonomous operations unavailable"}),e.jsx("p",{children:c.error instanceof Error?c.error.message:"No status was returned."})]});const O=()=>r.mutate(()=>x.setAutonomousManualMode(!a.manual_mode,a.revision,f)),k=(s,o)=>r.mutate(()=>x.setAutonomousOperator(s,o,a.revision,b[s]??"")),w=()=>{var o;const s=((o=a.baseline)==null?void 0:o.revision)??0;r.mutate(()=>x.qualifyAutonomousChatBaseline(p,s,g))};return e.jsx("div",{className:"cron-dashboard","data-shadcn":!0,children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8 space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between gap-4 flex-wrap",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"text-3xl font-bold flex items-center gap-3",children:[e.jsx(P,{className:"h-8 w-8"}),"Autonomous operations"]}),e.jsx("p",{className:"mt-2 cron-muted",children:"Content-free supervision, remote controls, and bounded audit history."})]}),e.jsx(h,{asChild:!0,variant:"outline",children:e.jsxs(q,{to:"/admin-dashboard",children:[e.jsx(D,{className:"h-4 w-4 mr-2"}),"Admin dashboard"]})})]}),a.manual_mode&&e.jsx(n,{className:"cron-status--degraded",role:"status",children:e.jsxs(i,{className:"pt-6 flex gap-3",children:[e.jsx(H,{className:"h-5 w-5"}),e.jsxs("div",{children:[e.jsx("strong",{children:"Manual mode is enabled."}),e.jsxs("p",{children:[a.monitoring_active?"Monitoring remains active":"Monitoring is not currently verified","; autonomous callbacks, retries, deployments, and data mutations fail closed."]})]})]})}),e.jsxs("div",{className:"grid md:grid-cols-4 gap-4",children:[e.jsxs(n,{className:E(S[a.display_state]),children:[e.jsx(l,{children:e.jsx(t,{className:"text-sm",children:"Overall state"})}),e.jsxs(i,{children:[e.jsx("div",{className:"text-2xl font-bold capitalize",children:a.display_state}),e.jsxs("p",{className:"text-sm",children:["Monitoring ",a.monitoring_active?"active":"inactive"]})]})]}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{className:"text-sm",children:"Codex cost"})}),e.jsxs(i,{children:[e.jsxs("div",{className:"text-2xl font-bold",children:["$",a.costs.total_usd]}),e.jsxs("p",{className:"text-sm",children:[a.costs.input_tokens+a.costs.output_tokens," tokens"]})]})]}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{className:"text-sm",children:"Repair lease"})}),e.jsxs(i,{children:[e.jsx("div",{className:"text-lg font-bold",children:a.active_lease?a.active_lease.owner_operator:"Available"}),e.jsx("p",{className:"text-sm",children:a.active_lease?`Expires ${m(a.active_lease.expires_at)}`:"No active source repair"})]})]}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{className:"text-sm",children:"Global control"})}),e.jsxs(i,{className:"space-y-2",children:[e.jsx(u,{"aria-label":"Manual mode confirmation",value:f,onChange:s=>_(s.target.value),placeholder:"Type SET_MANUAL_MODE"}),e.jsx(h,{disabled:r.isPending||f!=="SET_MANUAL_MODE",onClick:O,children:a.manual_mode?"Leave manual mode":"Enable manual mode"})]})]})]}),e.jsx("div",{className:"grid md:grid-cols-4 gap-4",children:a.operators.map(s=>e.jsxs(n,{className:E(S[s.status]),children:[e.jsx(l,{children:e.jsxs(t,{className:"flex justify-between gap-2",children:[e.jsx("span",{children:j[s.operator]}),e.jsx(I,{children:s.status})]})}),e.jsxs(i,{className:"space-y-3",children:[e.jsxs("p",{children:[s.enabled?"Mutation enabled":"Mutation disabled"," · monitoring ",s.monitoring_active?"active":"unverified"]}),e.jsxs("p",{className:"text-sm",children:["Next scheduled run: ",s.next_scheduled_run?m(s.next_scheduled_run):"not scheduled"]}),e.jsx(u,{"aria-label":`${j[s.operator]} confirmation`,value:b[s.operator]??"",onChange:o=>v(L=>({...L,[s.operator]:o.target.value})),placeholder:"Type SET_OPERATOR_STATE"}),e.jsx(h,{disabled:r.isPending||a.manual_mode&&!s.enabled||b[s.operator]!=="SET_OPERATOR_STATE",onClick:()=>k(s.operator,!s.enabled),children:s.enabled?"Disable":"Enable"})]})]},s.operator))}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{children:"Qualified scalable-chat baseline"})}),e.jsxs(i,{className:"space-y-3",children:[e.jsx("p",{className:"font-mono break-all",children:((A=a.baseline)==null?void 0:A.sha)??"No baseline qualified"}),a.baseline&&e.jsxs("p",{className:"text-sm",children:["Revision ",a.baseline.revision," · ",a.baseline.qualified_by," · ",m(a.baseline.qualified_at)]}),e.jsxs("div",{className:"grid md:grid-cols-[1fr_1fr_auto] gap-2",children:[e.jsx(u,{"aria-label":"Exact baseline SHA",value:p,onChange:s=>T(s.target.value),placeholder:"40-character lowercase commit SHA"}),e.jsx(u,{"aria-label":"Baseline confirmation",value:g,onChange:s=>N(s.target.value),placeholder:"Type QUALIFY_CHAT_BASELINE"}),e.jsx(h,{disabled:r.isPending||!/^[0-9a-f]{40}$/.test(p)||g!=="QUALIFY_CHAT_BASELINE",onClick:w,children:"Qualify exact SHA"})]})]})]}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{children:"Provider and fallback state"})}),e.jsx(i,{children:a.provider_states.length?e.jsx("ul",{className:"space-y-2",children:a.provider_states.map(s=>e.jsxs("li",{children:[e.jsx("strong",{children:s.environment}),": ",s.active_provider," · ",s.reason_code," · manifest ",s.manifest_revision]},s.environment))}):e.jsx("p",{children:"No provider state recorded."})})]}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{children:"Recent runs"})}),e.jsx(i,{children:a.recent_runs.length?e.jsx("ul",{className:"space-y-2",children:a.recent_runs.map(s=>e.jsxs("li",{children:[e.jsx("strong",{children:j[s.operator]})," · ",s.status," · ",s.exit_classification," · $",s.cost_usd," · ",m(s.created_at)]},s.run_id))}):e.jsx("p",{children:"No runs recorded."})})]}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{children:"Recent actions"})}),e.jsx(i,{children:a.recent_actions.length?e.jsx("ul",{className:"space-y-2",children:a.recent_actions.map(s=>e.jsxs("li",{children:[e.jsx("strong",{children:j[s.operator]})," · ",s.capability," · ",s.reason_code," · ",s.resource_kind,"/",s.resource_identifier]},s.action_id))}):e.jsx("p",{children:"No actions recorded."})})]})]}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{children:"Hard exclusions"})}),e.jsx(i,{children:e.jsx("ul",{className:"list-disc pl-5",children:a.exclusions.map(s=>e.jsx("li",{children:s},s))})})]}),y&&e.jsxs("p",{role:"alert",children:["Control update failed: ",y,". Refresh before retrying."]})]})})};export{V as default};
|
assets/{BenchmarkDetailView-BomzuNed.js → BenchmarkDetailView-DWqSKCxm.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
| 1 |
-
import{d as L,j as a,M as le,L as ne,e as dt,x as ut,u as mt,g as ht,b as te,o as de,t as ft,T as oe}from"./index-CHGpuh10.js";import{R as pt}from"./ResearchFollowButton-DFGdTBex.js";import{c as re}from"./catalog-DMzmJg__.js";import{C as gt,E as xt,e as bt}from"./ExternalSourceEvalBadge-CMfiSNvf.js";import{u as yt}from"./preferences-BR-SGx3E.js";import{L as ce}from"./LatexTitle-CfeEppH3.js";import{S as Ge}from"./switch-CD23XWT7.js";import{I as wt}from"./Icon-CRWrVPWO.js";import{S as ue}from"./skeleton-Df0GaMuw.js";import{A as vt,a as jt}from"./alert-DPvmCXZT.js";import{B as _t}from"./BenchmarkTrendSparkline-dQdt-ejq.js";import{s as St}from"./safeExternalHref-CkBrsh84.js";import{s as kt}from"./slug-BpH-Nkvz.js";import{i as Ct}from"./apiErrors-CvxFAcrW.js";import Et from"./NotFound-Bc6y0g0J.js";import"./researchTopic-DK_KbYKH.js";import"./useMutation-3fOqWcpt.js";import"./plus-CYgr1KdS.js";import"./curation-DI9_zYNx.js";import"./hover-card-Dz7z6DCn.js";import"./account-D9O54ufU.js";import"./index-CWaI9Snb.js";function ie(e){if(e==null)return null;if(typeof e=="number")return Number.isFinite(e)?e:null;const t=e.includes("±")?e.split("±")[0].trim():e.trim(),r=parseFloat(t);return Number.isFinite(r)?r:null}const Xe=[{label:"All",maxParametersExclusive:void 0},{label:"<10M",maxParametersExclusive:1e7},{label:"<100M",maxParametersExclusive:1e8},{label:"<1B",maxParametersExclusive:1e9},{label:"<3B",maxParametersExclusive:3e9},{label:"<6B",maxParametersExclusive:6e9},{label:"<12B",maxParametersExclusive:12e9},{label:"<32B",maxParametersExclusive:32e9},{label:"<128B",maxParametersExclusive:128e9},{label:"<500B",maxParametersExclusive:5e11}];function Nt(e){const t=e===null?void 0:Number(e);return Xe.some(r=>r.maxParametersExclusive===t)?t:void 0}function Rt(e){return new Intl.NumberFormat("en",{notation:"compact",maximumSignificantDigits:3}).format(e)}function Pt(e){return[e.paper_id,e.task_id,e.dataset_id,e.model_name,e.harness??""].join("|")}function Tt(e){const t=new Map;for(const r of e){const s=Pt(r),n=t.get(s);if(!n){t.set(s,{...r,metrics:{...r.metrics||{}},sourceEvaluationIds:[r.id],ranksByMetric:r.best_metric&&r.best_rank!=null?{[r.best_metric]:r.best_rank}:{},parameterCount:r.num_parameters??null,hasParameterConflict:!1});continue}n.metrics={...n.metrics,...r.metrics||{}},n.sourceEvaluationIds.push(r.id),r.best_metric&&r.best_rank!=null&&(n.ranksByMetric[r.best_metric]=r.best_rank),r.num_parameters!=null&&!n.hasParameterConflict&&(n.parameterCount===null?n.parameterCount=r.num_parameters:n.parameterCount!==r.num_parameters&&(n.parameterCount=null,n.hasParameterConflict=!0))}return Array.from(t.values())}function Ae(e,t){return t===void 0?e:e.filter(r=>r.parameterCount!==null&&r.parameterCount<t)}function Mt(e,t){return t?e.id===t||e.sourceEvaluationIds.includes(t):!1}function Be(e,t){return e.ranksByMetric[t]??e.best_rank??9999}function $t(e){const t=Date.parse(e);return Number.isNaN(t)?"":new Date(t).toISOString().slice(0,10)}function Ft(e){const t=new Map;for(const s of e)s.evaluated_on&&t.set(s.evaluated_on,(t.get(s.evaluated_on)??0)+1);const r=Array.from(t.values()).reduce((s,n)=>s+n,0);for(const[s,n]of t)if(n>=2&&n*2>r)return s;return null}function Lt(e,t){const r=e.evaluated_on;return r&&r!==t&&r!==$t(e.updated_at)?r:e.paper_published_date||""}function It(e,t,r){if(e.length===0)return{points:[],sota:0,sotaModel:""};const s=Ft(e),n=e.map(u=>{var R;const h=ie((R=u.metrics)==null?void 0:R[t]);return{eval:u,value:h,date:Lt(u,s)}}).filter(u=>u.value!==null&&!!u.date).sort((u,h)=>u.date.localeCompare(h.date)),i=[];let l=null;for(const u of n){const h=l==null?!0:r==="↓"?u.value<l:u.value>l;h&&(l=u.value),i.push({value:u.value,date:u.date,dateLabel:u.date.slice(0,7),modelName:u.eval.model_name||"",paperTitle:u.eval.paper_title||"",paperRouteId:u.eval.paper_arxiv_id||u.eval.paper_id||null,isSota:h})}const d=e.map(u=>{var h;return{eval:u,value:ie((h=u.metrics)==null?void 0:h[t])}}).filter(u=>u.value!==null).sort((u,h)=>r==="↓"?u.value-h.value:h.value-u.value)[0],f=(d==null?void 0:d.value)??0,x=(d==null?void 0:d.eval.model_name)||(d==null?void 0:d.eval.paper_title)||"";return{points:i,sota:f,sotaModel:x}}function At(e,t,r){const s=t?(e??[]).filter(l=>l.task_id===t):e??[],n=s.filter(l=>l.is_open===!1),i=n.reduce((l,c)=>l?(c.best_rank??Number.POSITIVE_INFINITY)<(l.best_rank??Number.POSITIVE_INFINITY)?c:l:c,null);return{visible:r?s.filter(l=>l.is_open!==!1):s,hiddenClosed:n,topHiddenClosed:i}}function Ye(e,t,r,s){const n=t.find(i=>i.id===s);if(e.length===0)return null;if(n!=null&&n.task_id&&e.some(i=>i.id===n.task_id))return n.task_id;if(r){const i=e.find(l=>l.slug===r);if(i)return i.id}if(e.length===1)return e[0].id;if(t.length>0){const i=new Map;for(const d of t)i.set(d.task_id,(i.get(d.task_id)||0)+1);let l=null,c=-1;for(const d of e){const f=i.get(d.id)||0;f>c&&(c=f,l=d.id)}if(l)return l}return e[0].id}function Bt(e){var _,X,Y;const{evaluations:t,tasks:r,taskSlug:s,highlightEvalId:n,parameterBound:i,showMoreMetrics:l,fittingMetricCount:c=1}=e,d=Ye(r,t,s,n),f=r.find(o=>o.id===d)||r[0]||null,x=t.find(o=>o.id===n),u=At(t,d,e.hideClosed),h=Tt(u.visible),R=Ae(h,i),C=e.configuredMetrics.map(o=>o.metric_name),P=Array.from(new Set(h.flatMap(o=>[...o.best_metric?[o.best_metric]:[],...Object.keys(o.metrics||{})]))),S=C.length?C:P,g=new Map;for(const o of h){const m=o.best_metric;!m||ie(o.metrics[m])===null||C.length&&!S.includes(m)||g.set(m,(g.get(m)||0)+1)}const k=((_=[...g].sort((o,m)=>m[1]-o[1])[0])==null?void 0:_[0])||S[0]||"",j=S.find(o=>{var m;return o.toLocaleLowerCase()===((m=e.metric)==null?void 0:m.trim().toLocaleLowerCase())})||(x==null?void 0:x.best_metric)||k,D=((X=e.directions)==null?void 0:X.directions[j])==="lower_is_better"?"↓":"↑",W=j&&S.includes(j)?[j,...S.filter(o=>o!==j)]:S,w=W.length?l?W:W.slice(0,Math.max(1,c)):j?[j]:[],q=R.slice().sort((o,m)=>{const p=ie(o.metrics[j]),y=ie(m.metrics[j]);return p!==null&&y!==null?D==="↓"?p-y:y-p:p!==null?-1:y!==null?1:Be(o,j)-Be(m,j)});let I=null,N=0;const G=q.map((o,m)=>{const p=ie(o.metrics[j]);return p!==null&&p!==I&&(I=p,N=m+1),{evaluation:o,rank:p===null?null:N,isHighlighted:Mt(o,n)}}),{points:z,sota:ee,sotaModel:O}=It(R,j,D),M=i===void 0?e.initialSummary:void 0,U=e.ready.evaluations&&e.ready.tasks&&e.ready.directions&&(!d||e.ready.metrics),K={parameter_coverage_known:h.filter(o=>o.parameterCount!==null).length,parameter_coverage_total:h.length};return{currentTaskId:d,primaryTask:f,activeMetric:j,arrow:D,allowedMetrics:S,orderedMetrics:W,visibleMetrics:w,rows:G,chartPoints:z,highlightedEval:((Y=G.find(o=>o.isHighlighted))==null?void 0:Y.evaluation)||null,hiddenClosedEvals:u.hiddenClosed,hiddenClosedTopEval:u.topHiddenClosed,parameterBound:i,parameterCoverage:K,hasParameterMetadata:K.parameter_coverage_known>0,parameterFilters:Xe.map(o=>({...o,selected:i===o.maxParametersExclusive,disabled:i!==o.maxParametersExclusive&&Ae(h,o.maxParametersExclusive).length===0})),displayedMetric:U?j:M==null?void 0:M.metric,displayedSota:U?ee:M==null?void 0:M.value,displayedSotaModel:U?O:M==null?void 0:M.model_name,isSummaryLoading:!U&&!M,isInitialFilteredViewLoading:i!==void 0&&!U}}function Dt(e,t,r,s=1,n=0){const i=e-t.fixed-(r?t.harness:0);if(t.metric<=0)return 1;const l=Math.floor(i/t.metric);if(l<s)return Math.max(1,l);const c=Math.floor((i-n)/t.metric);return Math.max(1,s,c)}function pe(e,t){return parseFloat(e.getPropertyValue(t))||0}function Ht(e){const t=getComputedStyle(e);return{fixed:["--bm-rank-width","--bm-model-width","--bm-parameters-width","--bm-paper-width","--bm-year-width"].reduce((r,s)=>r+pe(t,s),0),harness:pe(t,"--bm-harness-width"),metric:pe(t,"--bm-metric-width")}}const Vt=20;function De(e,t){return e?a.jsx(ce,{title:e}):t||"—"}function Wt({model:e,showHarness:t,setMetric:r,highlightRowRef:s,onFittingMetricCountChange:n}){const{rows:i,visibleMetrics:l,activeMetric:c,arrow:d}=e,[f,x]=L.useState(null);return L.useEffect(()=>{if(!f)return;const u=()=>{f.classList.toggle("has-horizontal-overflow",f.scrollWidth>f.clientWidth);const R=f.firstElementChild;if(!R)return;const C=f.clientWidth,P=Ht(R);f.classList.toggle("unpins-trailing-columns",C<P.fixed+P.metric);const S=document.documentElement,g=S.scrollHeight>S.clientHeight?0:Vt;n(k=>Dt(C,P,t,k,g))},h=new ResizeObserver(u);return h.observe(f),f.firstElementChild&&h.observe(f.firstElementChild),u(),()=>h.disconnect()},[f,t,n]),a.jsx("div",{ref:x,className:"bm-table-scroll",role:"region","aria-label":"Leaderboard metrics",tabIndex:0,children:a.jsxs("table",{id:"benchmark-leaderboard",className:"bm-table",style:{"--bm-metric-count":l.length,"--bm-harness-count":t?1:0},children:[a.jsxs("colgroup",{children:[a.jsx("col",{className:"bm-width-rank"}),a.jsx("col",{className:"bm-width-model"}),a.jsx("col",{className:"bm-width-parameters"}),t&&a.jsx("col",{className:"bm-width-harness"}),l.map(u=>a.jsx("col",{className:"bm-width-metric"},u)),a.jsx("col",{}),a.jsx("col",{className:"bm-width-year"})]}),a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{className:"col-rank",children:"Rank"}),a.jsx("th",{className:"col-model",children:"Model"}),a.jsxs("th",{className:"col-parameters",children:[a.jsx("span",{className:"bm-label-full",children:"Parameters"}),a.jsx("span",{className:"bm-label-short",children:"Params"})]}),t&&a.jsx("th",{className:"col-harness",children:"Harness"}),l.map(u=>{const h=u===c;return a.jsx("th",{className:`col-value ${h?"is-active":""}`,"aria-sort":h?d==="↓"?"ascending":"descending":"none",children:a.jsxs("button",{type:"button",className:"bm-metric-header",onClick:()=>r(u),"aria-pressed":h,title:`Sort by ${u}`,children:[u,h?` ${d}`:""]})},u)}),a.jsx("th",{className:"col-paper",children:"Paper"}),a.jsx("th",{className:"col-year",children:"Year"})]})}),a.jsx("tbody",{children:i.map(({evaluation:u,rank:h,isHighlighted:R})=>{var S;const C=u.paper_arxiv_id||u.paper_id,P=u.paper_title||(u.paper_arxiv_id?`arXiv:${u.paper_arxiv_id}`:null);return a.jsxs("tr",{ref:R?s:void 0,className:R?"is-highlighted":void 0,children:[a.jsx("td",{className:"col-rank",children:h??"—"}),a.jsxs("td",{className:"col-model",children:[R&&a.jsx("span",{className:"bm-row-marker","aria-hidden":"true"}),u.hf_model_url?a.jsx("a",{href:u.hf_model_url,target:"_blank",rel:"noopener noreferrer",className:"bm-model-link",title:`Open ${u.model_name||"model"} on Hugging Face`,children:u.model_name||"—"}):u.model_name||"—",u.is_open===!1&&a.jsx(gt,{}),(u.external??u.is_external)&&a.jsx(xt,{sourceUrl:u.source_url||u.external_source_url||u.result_url})]}),a.jsx("td",{className:"col-parameters",title:u.parameterCount===null?void 0:u.parameterCount.toLocaleString("en-US"),"aria-label":u.parameterCount===null?"Parameters unknown":`${u.parameterCount.toLocaleString("en-US")} parameters`,children:u.parameterCount===null?"—":Rt(u.parameterCount)}),t&&a.jsx("td",{className:"col-harness",children:u.harness||"—"}),l.map(g=>{var j;const k=g===c,B=(j=u.metrics)==null?void 0:j[g];return a.jsx("td",{className:`col-value${k?" is-active":""}${k&&h===1?" is-best":""}`,children:B!=null&&B!==""?le(B):"—"},g)}),a.jsx("td",{className:"col-paper",children:C?a.jsx(ne,{to:`/paper/${C}`,title:u.paper_title||P||void 0,children:De(u.paper_title,P)}):De(u.paper_title,P)}),a.jsx("td",{className:"col-year",children:((S=u.evaluated_on||u.paper_published_date)==null?void 0:S.slice(0,4))||"—"})]},u.id)})})]})})}function He(e){const t=e.length===7?`${e}-01`:e,r=new Date(t).getTime();return Number.isFinite(r)?r:0}const ge=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function xe(e){const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()}}function Ot(e,t){if(e===t){const{year:d,month:f}=xe(e);return[{timestamp:new Date(d,f,1).getTime(),key:`${d}-${f}`,label:`${ge[f]} ${d}`}]}const r=xe(e),s=xe(t);if(r.year===s.year){const d=s.month-r.month+1;let f=1;const x=12;d>x&&(f=Math.ceil(d/x));const u=[];for(let h=r.month;h<=s.month;h+=f)u.push({timestamp:new Date(r.year,h,1).getTime(),key:`${r.year}-${h}`,label:d<=3?`${ge[h]} ${r.year}`:ge[h]});return u}const n=s.year-r.year+1;let i=1;const l=12;n>l&&(i=Math.ceil(n/l));const c=[];for(let d=r.year;d<=s.year;d+=i)c.push({timestamp:new Date(d,0,1).getTime(),key:String(d),label:String(d)});return c}const Ut=({points:e,metric:t})=>{const r=dt(),[s,n]=L.useState(null),i=880,l=320,c=60,d=30,f=40,x=50,u=e.map(o=>o.value),h=Math.min(...u),C=Math.max(...u)-h||1,P=i-c-d,S=l-f-x,g=e.map(o=>He(o.date)),k=Math.min(...g),B=Math.max(...g),j=B-k||1,D=o=>k===B?c+P/2:c+(o-k)/j*P,W=e.map((o,m)=>{const p=D(He(o.date)),y=(o.value-h)/C,T=f+S*(1-y);return{x:p,y:T,data:o,idx:m}}),w=W.filter(o=>o.data.isSota);let q="";if(w.length>=2){q=`M${w[0].x},${w[0].y}`;for(let o=1;o<w.length;o++){const m=w[o-1],p=w[o],y=(m.x+p.x)/2;q+=` C${y},${m.y} ${y},${p.y} ${p.x},${p.y}`}}const I=5.4,N=8,G=9,z=o=>{const m=o.data.modelName||o.data.paperTitle||"";if(!m)return null;const p=m.length>22?m.slice(0,21)+"…":m,y=p.length*I;let T=o.x-y/2,E=o.x+y/2,v="middle";return T<c?(T=c,E=c+y,v="start"):E>i-d&&(E=i-d,T=E-y,v="end"),{x:v==="start"?c:v==="end"?i-d:o.x,y:o.y-G,text:p,anchor:v,left:T,right:E}},ee=[],O=w.length>0?z(w[w.length-1]):null;let M=-1/0;for(let o=0;o<w.length-1;o++){const m=z(w[o]);m&&(m.left<M+N||O&&m.right>O.left-N||(M=m.right,ee.push({x:m.x,y:m.y,text:m.text,anchor:m.anchor})))}O&&ee.push({x:O.x,y:O.y,text:O.text,anchor:O.anchor});const U=Ot(k,B),K=5,_=o=>n(m=>m===o?null:m),X=o=>{o&&r(`/paper/${o}`)},Y=(o,m)=>{const y=`${o.data.modelName||o.data.paperTitle||"Unknown model"}: ${le(o.data.value)} on ${o.data.dateLabel}`,T=!!o.data.paperRouteId;return a.jsxs("g",{children:[m,a.jsx("circle",{cx:o.x,cy:o.y,r:"10",fill:"transparent",style:{cursor:T?"pointer":"default",outline:"none"},tabIndex:0,role:T?"link":"img","aria-label":y,onMouseEnter:()=>n(o.idx),onMouseLeave:()=>_(o.idx),onFocus:()=>n(o.idx),onBlur:()=>_(o.idx),onClick:()=>X(o.data.paperRouteId),onKeyDown:E=>{T&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),X(o.data.paperRouteId))},children:a.jsx("title",{children:y})})]},o.idx)};return a.jsxs("svg",{width:"100%",viewBox:`0 0 ${i} ${l}`,style:{display:"block"},children:[a.jsx("text",{x:c-38,y:f+S/2,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"middle",transform:`rotate(-90 ${c-38} ${f+S/2})`,children:t}),Array.from({length:K}).map((o,m)=>{const p=m/(K-1),y=f+S*(1-p),T=h+C*p;return a.jsxs("g",{children:[a.jsx("line",{x1:c,y1:y,x2:i-d,y2:y,stroke:"var(--hairline)",strokeWidth:"1"}),a.jsx("text",{x:c-10,y:y+4,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"end",children:le(T)})]},m)}),U.map(o=>{const m=D(o.timestamp);return a.jsx("text",{x:m,y:l-x+18,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:"middle",children:o.label},o.key)}),W.filter(o=>!o.data.isSota).map(o=>{const m=s===o.idx;return Y(o,a.jsx("circle",{cx:o.x,cy:o.y,r:m?3:2,fill:"var(--ink-faint)",opacity:m?1:.45,style:{transition:"r 0.12s ease, opacity 0.12s ease"}}))}),q&&a.jsx("path",{d:q,stroke:"var(--accent)",strokeWidth:"2",fill:"none",strokeLinejoin:"round",strokeLinecap:"round"}),w.map(o=>{const m=s===o.idx;return Y(o,a.jsx("circle",{cx:o.x,cy:o.y,r:m?4.5:3,fill:m?"var(--accent)":"var(--bg-elevated)",stroke:"var(--accent)",strokeWidth:"1.5",style:{transition:"r 0.12s ease, fill 0.12s ease"}}))}),ee.map((o,m)=>a.jsx("text",{x:o.x,y:o.y,fontSize:"9.5",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:o.anchor,pointerEvents:"none",style:{paintOrder:"stroke",stroke:"var(--bg-elevated)",strokeWidth:3,strokeLinejoin:"round"},children:o.text},`label-${m}`)),s!==null&&W[s]&&(()=>{const o=W[s],m=o.data.modelName||o.data.paperTitle||"Unknown model",y=`${m.length>40?m.slice(0,39)+"…":m}: ${le(o.data.value)}`,E=Math.max(120,Math.min(340,y.length*6.6+24)),v=30;let H=o.x-E/2;H<c&&(H=c),H+E>i-d&&(H=i-d-E);const Q=o.y-v-14>=f?o.y-v-12:o.y+12;return a.jsxs("g",{pointerEvents:"none",children:[a.jsx("rect",{x:H,y:Q,width:E,height:v,rx:"6",ry:"6",fill:"var(--bg-elevated)",stroke:"var(--hairline-strong)",strokeWidth:"1",style:{filter:"drop-shadow(0 2px 6px rgba(0,0,0,0.08))"}}),a.jsx("text",{x:H+12,y:Q+19,fontSize:"12",fontFamily:"var(--sans)",fill:"var(--ink)",fontWeight:500,children:y})]})})()]})};function qt(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const r=document.implementation.createHTMLDocument(),s=r.createElement("base"),n=r.createElement("a");return r.head.appendChild(s),r.body.appendChild(n),t&&(s.href=t),n.href=e,n.href}const zt=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function Z(e){const t=[];for(let r=0,s=e.length;r<s;r++)t.push(e[r]);return t}let ae=null;function Je(e={}){return ae||(e.includeStyleProperties?(ae=e.includeStyleProperties,ae):(ae=Z(window.getComputedStyle(document.documentElement)),ae))}function me(e,t){const s=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return s?parseFloat(s.replace("px","")):0}function Kt(e){const t=me(e,"border-left-width"),r=me(e,"border-right-width");return e.clientWidth+t+r}function Qt(e){const t=me(e,"border-top-width"),r=me(e,"border-bottom-width");return e.clientHeight+t+r}function Ze(e,t={}){const r=t.width||Kt(e),s=t.height||Qt(e);return{width:r,height:s}}function Gt(){let e,t;try{t=process}catch{}const r=t&&t.env?t.env.devicePixelRatio:null;return r&&(e=parseInt(r,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}const V=16384;function Xt(e){(e.width>V||e.height>V)&&(e.width>V&&e.height>V?e.width>e.height?(e.height*=V/e.width,e.width=V):(e.width*=V/e.height,e.height=V):e.width>V?(e.height*=V/e.width,e.width=V):(e.width*=V/e.height,e.height=V))}function Yt(e,t={}){return e.toBlob?new Promise(r=>{e.toBlob(r,t.type?t.type:"image/png",t.quality?t.quality:1)}):new Promise(r=>{const s=window.atob(e.toDataURL(t.type?t.type:void 0,t.quality?t.quality:void 0).split(",")[1]),n=s.length,i=new Uint8Array(n);for(let l=0;l<n;l+=1)i[l]=s.charCodeAt(l);r(new Blob([i],{type:t.type?t.type:"image/png"}))})}function he(e){return new Promise((t,r)=>{const s=new Image;s.onload=()=>{s.decode().then(()=>{requestAnimationFrame(()=>t(s))})},s.onerror=r,s.crossOrigin="anonymous",s.decoding="async",s.src=e})}async function Jt(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function Zt(e,t,r){const s="http://www.w3.org/2000/svg",n=document.createElementNS(s,"svg"),i=document.createElementNS(s,"foreignObject");return n.setAttribute("width",`${t}`),n.setAttribute("height",`${r}`),n.setAttribute("viewBox",`0 0 ${t} ${r}`),i.setAttribute("width","100%"),i.setAttribute("height","100%"),i.setAttribute("x","0"),i.setAttribute("y","0"),i.setAttribute("externalResourcesRequired","true"),n.appendChild(i),i.appendChild(e),Jt(n)}const A=(e,t)=>{if(e instanceof t)return!0;const r=Object.getPrototypeOf(e);return r===null?!1:r.constructor.name===t.name||A(r,t)};function er(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function tr(e,t){return Je(t).map(r=>{const s=e.getPropertyValue(r),n=e.getPropertyPriority(r);return`${r}: ${s}${n?" !important":""};`}).join(" ")}function rr(e,t,r,s){const n=`.${e}:${t}`,i=r.cssText?er(r):tr(r,s);return document.createTextNode(`${n}{${i}}`)}function Ve(e,t,r,s){const n=window.getComputedStyle(e,r),i=n.getPropertyValue("content");if(i===""||i==="none")return;const l=zt();try{t.className=`${t.className} ${l}`}catch{return}const c=document.createElement("style");c.appendChild(rr(l,r,n,s)),t.appendChild(c)}function ar(e,t,r){Ve(e,t,":before",r),Ve(e,t,":after",r)}const We="application/font-woff",Oe="image/jpeg",sr={woff:We,woff2:We,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:Oe,jpeg:Oe,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function nr(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function ve(e){const t=nr(e).toLowerCase();return sr[t]||""}function ir(e){return e.split(/,/)[1]}function ye(e){return e.search(/^(data:)/)!==-1}function lr(e,t){return`data:${t};base64,${e}`}async function et(e,t,r){const s=await fetch(e,t);if(s.status===404)throw new Error(`Resource "${s.url}" not found`);const n=await s.blob();return new Promise((i,l)=>{const c=new FileReader;c.onerror=l,c.onloadend=()=>{try{i(r({res:s,result:c.result}))}catch(d){l(d)}},c.readAsDataURL(n)})}const be={};function or(e,t,r){let s=e.replace(/\?.*/,"");return r&&(s=e),/ttf|otf|eot|woff2?/i.test(s)&&(s=s.replace(/.*\//,"")),t?`[${t}]${s}`:s}async function je(e,t,r){const s=or(e,t,r.includeQueryParams);if(be[s]!=null)return be[s];r.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let n;try{const i=await et(e,r.fetchRequestInit,({res:l,result:c})=>(t||(t=l.headers.get("Content-Type")||""),ir(c)));n=lr(i,t)}catch(i){n=r.imagePlaceholder||"";let l=`Failed to fetch resource: ${e}`;i&&(l=typeof i=="string"?i:i.message),l&&console.warn(l)}return be[s]=n,n}async function cr(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):he(t)}async function dr(e,t){if(e.currentSrc){const i=document.createElement("canvas"),l=i.getContext("2d");i.width=e.clientWidth,i.height=e.clientHeight,l==null||l.drawImage(e,0,0,i.width,i.height);const c=i.toDataURL();return he(c)}const r=e.poster,s=ve(r),n=await je(r,s,t);return he(n)}async function ur(e,t){var r;try{if(!((r=e==null?void 0:e.contentDocument)===null||r===void 0)&&r.body)return await fe(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function mr(e,t){return A(e,HTMLCanvasElement)?cr(e):A(e,HTMLVideoElement)?dr(e,t):A(e,HTMLIFrameElement)?ur(e,t):e.cloneNode(tt(e))}const hr=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",tt=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function fr(e,t,r){var s,n;if(tt(t))return t;let i=[];return hr(e)&&e.assignedNodes?i=Z(e.assignedNodes()):A(e,HTMLIFrameElement)&&(!((s=e.contentDocument)===null||s===void 0)&&s.body)?i=Z(e.contentDocument.body.childNodes):i=Z(((n=e.shadowRoot)!==null&&n!==void 0?n:e).childNodes),i.length===0||A(e,HTMLVideoElement)||await i.reduce((l,c)=>l.then(()=>fe(c,r)).then(d=>{d&&t.appendChild(d)}),Promise.resolve()),t}function pr(e,t,r){const s=t.style;if(!s)return;const n=window.getComputedStyle(e);n.cssText?(s.cssText=n.cssText,s.transformOrigin=n.transformOrigin):Je(r).forEach(i=>{let l=n.getPropertyValue(i);i==="font-size"&&l.endsWith("px")&&(l=`${Math.floor(parseFloat(l.substring(0,l.length-2)))-.1}px`),A(e,HTMLIFrameElement)&&i==="display"&&l==="inline"&&(l="block"),i==="d"&&t.getAttribute("d")&&(l=`path(${t.getAttribute("d")})`),s.setProperty(i,l,n.getPropertyPriority(i))})}function gr(e,t){A(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),A(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function xr(e,t){if(A(e,HTMLSelectElement)){const r=t,s=Array.from(r.children).find(n=>e.value===n.getAttribute("value"));s&&s.setAttribute("selected","")}}function br(e,t,r){return A(t,Element)&&(pr(e,t,r),ar(e,t,r),gr(e,t),xr(e,t)),t}async function yr(e,t){const r=e.querySelectorAll?e.querySelectorAll("use"):[];if(r.length===0)return e;const s={};for(let i=0;i<r.length;i++){const c=r[i].getAttribute("xlink:href");if(c){const d=e.querySelector(c),f=document.querySelector(c);!d&&f&&!s[c]&&(s[c]=await fe(f,t,!0))}}const n=Object.values(s);if(n.length){const i="http://www.w3.org/1999/xhtml",l=document.createElementNS(i,"svg");l.setAttribute("xmlns",i),l.style.position="absolute",l.style.width="0",l.style.height="0",l.style.overflow="hidden",l.style.display="none";const c=document.createElementNS(i,"defs");l.appendChild(c);for(let d=0;d<n.length;d++)c.appendChild(n[d]);e.appendChild(l)}return e}async function fe(e,t,r){return!r&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(s=>mr(s,t)).then(s=>fr(e,s,t)).then(s=>br(e,s,t)).then(s=>yr(s,t))}const rt=/url\((['"]?)([^'"]+?)\1\)/g,wr=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,vr=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function jr(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function _r(e){const t=[];return e.replace(rt,(r,s,n)=>(t.push(n),r)),t.filter(r=>!ye(r))}async function Sr(e,t,r,s,n){try{const i=r?qt(t,r):t,l=ve(t);let c;return n||(c=await je(i,l,s)),e.replace(jr(t),`$1${c}$3`)}catch{}return e}function kr(e,{preferredFontFormat:t}){return t?e.replace(vr,r=>{for(;;){const[s,,n]=wr.exec(r)||[];if(!n)return"";if(n===t)return`src: ${s};`}}):e}function at(e){return e.search(rt)!==-1}async function st(e,t,r){if(!at(e))return e;const s=kr(e,r);return _r(s).reduce((i,l)=>i.then(c=>Sr(c,l,t,r)),Promise.resolve(s))}async function se(e,t,r){var s;const n=(s=t.style)===null||s===void 0?void 0:s.getPropertyValue(e);if(n){const i=await st(n,null,r);return t.style.setProperty(e,i,t.style.getPropertyPriority(e)),!0}return!1}async function Cr(e,t){await se("background",e,t)||await se("background-image",e,t),await se("mask",e,t)||await se("-webkit-mask",e,t)||await se("mask-image",e,t)||await se("-webkit-mask-image",e,t)}async function Er(e,t){const r=A(e,HTMLImageElement);if(!(r&&!ye(e.src))&&!(A(e,SVGImageElement)&&!ye(e.href.baseVal)))return;const s=r?e.src:e.href.baseVal,n=await je(s,ve(s),t);await new Promise((i,l)=>{e.onload=i,e.onerror=t.onImageErrorHandler?(...d)=>{try{i(t.onImageErrorHandler(...d))}catch(f){l(f)}}:l;const c=e;c.decode&&(c.decode=i),c.loading==="lazy"&&(c.loading="eager"),r?(e.srcset="",e.src=n):e.href.baseVal=n})}async function Nr(e,t){const s=Z(e.childNodes).map(n=>nt(n,t));await Promise.all(s).then(()=>e)}async function nt(e,t){A(e,Element)&&(await Cr(e,t),await Er(e,t),await Nr(e,t))}function Rr(e,t){const{style:r}=e;t.backgroundColor&&(r.backgroundColor=t.backgroundColor),t.width&&(r.width=`${t.width}px`),t.height&&(r.height=`${t.height}px`);const s=t.style;return s!=null&&Object.keys(s).forEach(n=>{r[n]=s[n]}),e}const Ue={};async function qe(e){let t=Ue[e];if(t!=null)return t;const s=await(await fetch(e)).text();return t={url:e,cssText:s},Ue[e]=t,t}async function ze(e,t){let r=e.cssText;const s=/url\(["']?([^"')]+)["']?\)/g,i=(r.match(/url\([^)]+\)/g)||[]).map(async l=>{let c=l.replace(s,"$1");return c.startsWith("https://")||(c=new URL(c,e.url).href),et(c,t.fetchRequestInit,({result:d})=>(r=r.replace(l,`url(${d})`),[l,d]))});return Promise.all(i).then(()=>r)}function Ke(e){if(e==null)return[];const t=[],r=/(\/\*[\s\S]*?\*\/)/gi;let s=e.replace(r,"");const n=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const d=n.exec(s);if(d===null)break;t.push(d[0])}s=s.replace(n,"");const i=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,l="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",c=new RegExp(l,"gi");for(;;){let d=i.exec(s);if(d===null){if(d=c.exec(s),d===null)break;i.lastIndex=c.lastIndex}else c.lastIndex=i.lastIndex;t.push(d[0])}return t}async function Pr(e,t){const r=[],s=[];return e.forEach(n=>{if("cssRules"in n)try{Z(n.cssRules||[]).forEach((i,l)=>{if(i.type===CSSRule.IMPORT_RULE){let c=l+1;const d=i.href,f=qe(d).then(x=>ze(x,t)).then(x=>Ke(x).forEach(u=>{try{n.insertRule(u,u.startsWith("@import")?c+=1:n.cssRules.length)}catch(h){console.error("Error inserting rule from remote css",{rule:u,error:h})}})).catch(x=>{console.error("Error loading remote css",x.toString())});s.push(f)}})}catch(i){const l=e.find(c=>c.href==null)||document.styleSheets[0];n.href!=null&&s.push(qe(n.href).then(c=>ze(c,t)).then(c=>Ke(c).forEach(d=>{l.insertRule(d,l.cssRules.length)})).catch(c=>{console.error("Error loading remote stylesheet",c)})),console.error("Error inlining remote css file",i)}}),Promise.all(s).then(()=>(e.forEach(n=>{if("cssRules"in n)try{Z(n.cssRules||[]).forEach(i=>{r.push(i)})}catch(i){console.error(`Error while reading CSS rules from ${n.href}`,i)}}),r))}function Tr(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>at(t.style.getPropertyValue("src")))}async function Mr(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=Z(e.ownerDocument.styleSheets),s=await Pr(r,t);return Tr(s)}function it(e){return e.trim().replace(/["']/g,"")}function $r(e){const t=new Set;function r(s){(s.style.fontFamily||getComputedStyle(s).fontFamily).split(",").forEach(i=>{t.add(it(i))}),Array.from(s.children).forEach(i=>{i instanceof HTMLElement&&r(i)})}return r(e),t}async function Fr(e,t){const r=await Mr(e,t),s=$r(e);return(await Promise.all(r.filter(i=>s.has(it(i.style.fontFamily))).map(i=>{const l=i.parentStyleSheet?i.parentStyleSheet.href:null;return st(i.cssText,l,t)}))).join(`
|
| 2 |
`)}async function Lr(e,t){const r=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await Fr(e,t);if(r){const s=document.createElement("style"),n=document.createTextNode(r);s.appendChild(n),e.firstChild?e.insertBefore(s,e.firstChild):e.appendChild(s)}}async function Ir(e,t={}){const{width:r,height:s}=Ze(e,t),n=await fe(e,t,!0);return await Lr(n,t),await nt(n,t),Rr(n,t),await Zt(n,r,s)}async function Ar(e,t={}){const{width:r,height:s}=Ze(e,t),n=await Ir(e,t),i=await he(n),l=document.createElement("canvas"),c=l.getContext("2d"),d=t.pixelRatio||Gt(),f=t.canvasWidth||r,x=t.canvasHeight||s;return l.width=f*d,l.height=x*d,t.skipAutoScale||Xt(l),l.style.width=`${f}`,l.style.height=`${x}`,t.backgroundColor&&(c.fillStyle=t.backgroundColor,c.fillRect(0,0,l.width,l.height)),c.drawImage(i,0,0,l.width,l.height),l}async function Br(e,t={}){const r=await Ar(e,t);return await Yt(r)}const we="#ffffff";function Dr(){return typeof window>"u"?we:window.getComputedStyle(document.documentElement).getPropertyValue("--bg-elevated").trim()||we}function Hr(e){if(typeof window>"u")return we;const t=window.getComputedStyle(e).backgroundColor;return!t||t==="rgba(0, 0, 0, 0)"||t==="transparent"?Dr():t}async function Vr(e){var r,s;if(typeof window>"u"||!((s=(r=window.navigator)==null?void 0:r.clipboard)!=null&&s.write))throw new Error("Clipboard image copy is not supported in this browser.");if(typeof window.ClipboardItem>"u")throw new Error("Clipboard image copy is not supported in this browser.");const t=await Br(e,{pixelRatio:2,cacheBust:!0,backgroundColor:Hr(e)});if(!t)throw new Error("Failed to render screenshot.");await window.navigator.clipboard.write([new window.ClipboardItem({"image/png":t})])}const lt=({targetRef:e,label:t})=>{const{toast:r}=ut(),[s,n]=L.useState("idle"),i=L.useRef(null);L.useEffect(()=>()=>{i.current!==null&&window.clearTimeout(i.current)},[]);const l=L.useCallback(async()=>{const d=e.current;if(d){n("copying"),d.classList.add("is-capturing"),d.offsetHeight,await new Promise(f=>window.requestAnimationFrame(()=>f()));try{await Vr(d),n("copied"),r({title:"Screenshot copied",description:`Image of the ${t} copied to your clipboard.`}),i.current!==null&&window.clearTimeout(i.current),i.current=window.setTimeout(()=>n("idle"),1500)}catch(f){n("idle"),r({title:"Copy failed",description:f instanceof Error&&f.message?f.message:"Could not copy the screenshot to your clipboard.",variant:"destructive"})}finally{d.classList.remove("is-capturing")}}},[e,t,r]),c=s==="copied"?"Copied":s==="copying"?"Copying…":"Copy image";return a.jsxs("button",{type:"button",className:"bm-copy-btn",onClick:l,disabled:s==="copying","aria-label":`Copy ${t} screenshot to clipboard`,title:`Copy ${t} screenshot to clipboard`,children:[a.jsx(wt,{name:"copy",size:11}),c]})};function Wr({model:e,datasetName:t,hideClosed:r,setHideClosed:s,setMetric:n}){const i=L.useRef(null),{isInitialFilteredViewLoading:l,chartPoints:c,activeMetric:d,allowedMetrics:f,orderedMetrics:x,parameterBound:u}=e;return l||c.length===0?null:a.jsxs("div",{className:"bm-card",ref:i,children:[a.jsxs("div",{className:"bm-card-screenshot-header","aria-hidden":"true",children:[a.jsxs("div",{className:"bm-card-screenshot-title",children:[a.jsx("span",{className:"bm-card-screenshot-eyebrow",children:"Benchmark"}),a.jsx("span",{className:"bm-card-screenshot-name",children:t})]}),a.jsxs("div",{className:"bm-card-screenshot-brand",children:[a.jsxs("span",{className:"brand",children:[a.jsx("span",{className:"brand-mark"}),a.jsxs("span",{className:"brand-name",children:["Papers ",a.jsx("em",{children:"With Code"})]})]}),a.jsx("span",{className:"bm-card-screenshot-url",children:"paperswithcode.co"})]})]}),a.jsxs("div",{className:"bm-card-head",children:[a.jsx("div",{className:"bm-card-title",children:"SOTA progression"}),a.jsxs("div",{className:"bm-card-actions",children:[f.length>1&&a.jsxs("label",{className:"bm-view-select",children:[a.jsx("span",{className:"bm-view-select-label",children:"View"}),a.jsx("select",{value:d,onChange:h=>n(h.target.value),children:x.map(h=>a.jsx("option",{value:h,children:h},h))})]}),a.jsxs("label",{className:"bm-closed-toggle",title:"Show or hide evaluations of closed-source models",children:[a.jsx(Ge,{className:"bm-closed-toggle-switch",checked:!r,onCheckedChange:h=>{s(!h)},"aria-label":"Show closed-source models"}),a.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),a.jsx(lt,{targetRef:i,label:"SOTA chart"})]})]}),a.jsx("div",{className:"bm-chart-wrap",children:a.jsx(Ut,{points:c,metric:d})}),a.jsxs("div",{className:"bm-chart-foot",children:[a.jsx("span",{className:"legend-dot"}),u===void 0?"All models":"Filtered models"," over time · highlighted dots track the running best · hover for the model · click to open the paper"]})]})}function Or(e){if(!e)return null;const t=e.trim(),r=t.match(/^https?:\/\/(?:www\.)?arxiv\.org\/(?:abs|pdf)\/([^/?#]+)/i);if(r!=null&&r[1])return r[1].replace(/\.pdf$/i,"");const s=t.match(/^(?:https?:\/\/(?:www\.)?paperswithcode\.co)?\/paper\/([^/?#]+)/i);return(s==null?void 0:s[1])??null}function Qe(e,t){return e?a.jsx(ce,{title:e}):t||"—"}const ma=()=>{var _e,Se,ke,Ce,Ee,Ne,Re,Pe,Te,Me,$e;const{datasetSlug:e}=mt(),[t,r]=ht(),s=t.get("task")||void 0,n=t.get("eval")||void 0,i=Nt(t.get("max_parameters_exclusive")),{preferences:l,setHideClosedSourceEvals:c}=yt(),d=L.useRef(null),f=L.useRef(!1),x=L.useRef(null),[u,h]=L.useState(null),R=`${e}:${s||""}`,C=u===R,[P,S]=L.useState(1),g=te({queryKey:[...de.dataset(e),"with-paper",s,l.hide_closed_source_evals?"open":"all"],queryFn:()=>re.getDatasetBySlug(e,{include_paper:!0,task:s,is_open:l.hide_closed_source_evals?!0:void 0}),enabled:!!e,staleTime:oe}),k=te({queryKey:ft.byDataset((_e=g.data)==null?void 0:_e.id),queryFn:()=>bt.byDataset(g.data.id),enabled:!!((Se=g.data)!=null&&Se.id),staleTime:5*60*1e3}),B=te({queryKey:[...de.datasetTasks,(ke=g.data)==null?void 0:ke.id],queryFn:()=>re.datasetTasks(g.data.id),enabled:!!((Ce=g.data)!=null&&Ce.id),staleTime:oe}),j=te({queryKey:["metric-directions"],queryFn:()=>re.metricDirections(),staleTime:60*60*1e3}),D=Ye(B.data||[],k.data||[],s,n),W=te({queryKey:[...de.taskBenchmarkTrends,D,l.hide_closed_source_evals?!0:void 0],queryFn:()=>re.trendingBenchmarks(D,{limit:100,min_recent_papers:0,is_open:l.hide_closed_source_evals?!0:void 0}),enabled:!!D&&!!((Ee=g.data)!=null&&Ee.id),staleTime:oe}),w=L.useMemo(()=>{var b;return(((b=W.data)==null?void 0:b.results)||[]).find($=>{var F;return $.id===((F=g.data)==null?void 0:F.id)})||null},[W.data,(Ne=g.data)==null?void 0:Ne.id]),q=te({queryKey:["leaderboard-metrics",(Re=g.data)==null?void 0:Re.id,D],queryFn:()=>re.leaderboardMetrics(g.data.id,D),enabled:!!((Pe=g.data)!=null&&Pe.id)&&!!D,staleTime:oe}),I=Bt({evaluations:k.data||[],tasks:B.data||[],configuredMetrics:q.data||[],directions:j.data,initialSummary:(Te=g.data)==null?void 0:Te.leaderboard_summary,taskSlug:s,highlightEvalId:n,metric:t.get("metric")||void 0,hideClosed:l.hide_closed_source_evals,parameterBound:i,showMoreMetrics:C,fittingMetricCount:P,ready:{evaluations:k.isSuccess,tasks:B.isSuccess,directions:j.isSuccess,metrics:q.isSuccess}}),{primaryTask:N,hiddenClosedEvals:G,hiddenClosedTopEval:z,isSummaryLoading:ee,displayedMetric:O,displayedSota:M,displayedSotaModel:U,isInitialFilteredViewLoading:K,highlightedEval:_,hasParameterMetadata:X,parameterCoverage:Y,orderedMetrics:o}=I;L.useEffect(()=>{if(f.current||!n||!k.data||k.data.length===0)return;const b=d.current;b&&(f.current=!0,b.scrollIntoView({behavior:"smooth",block:"start"}))},[n,k.data]);const m=te({queryKey:de.area(N==null?void 0:N.area_id),queryFn:()=>re.getArea(N.area_id),enabled:!!(N!=null&&N.area_id),staleTime:oe});if(g.isLoading)return a.jsxs("div",{className:"page",children:[a.jsx(ue,{className:"h-12 w-1/2 mb-6"}),a.jsx(ue,{className:"h-64 w-full"})]});if(Ct(g.error))return a.jsx(Et,{});if(g.error||!g.data)return a.jsx("div",{className:"page",children:a.jsx(vt,{variant:"destructive",children:a.jsx(jt,{children:"Benchmark not found."})})});const p=g.data,y=!!p.supports_harness,T=b=>{r($=>{const F=new URLSearchParams($);return b===void 0?F.delete("max_parameters_exclusive"):F.set("max_parameters_exclusive",String(b)),F})},E=b=>{r($=>{const F=new URLSearchParams($);return F.set("metric",b),F})},v=p.introducing_paper??void 0,H=(v==null?void 0:v.arxiv_id)||(v==null?void 0:v.id)||Or(p.paper_url),J=(v==null?void 0:v.title)||p.introducing_paper_title||null,Q=((Me=v==null?void 0:v.published)==null?void 0:Me.slice(0,4))||p.introduced_year||null,ot=!!H||!!p.paper_url||!!J,ct=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-${kt(m.data.name)}`,children:m.data.name})]}),N&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"sep",children:"/"}),a.jsx(ne,{to:`/tasks/${N.slug||N.id}`,children:N.name})]}),a.jsx("span",{className:"sep",children:"/"}),a.jsx("span",{style:{color:"var(--accent-text)"},children:p.name})]}),a.jsxs("div",{className:"bm-title-row",children:[a.jsx("h1",{className:"bm-title",children:p.name}),w&&a.jsxs("div",{className:"bm-title-trend","aria-label":`${p.name} reporting trend`,children:[a.jsx(_t,{history:w.history,benchmarkName:w.name}),a.jsxs("span",{className:"bm-title-trend-summary",children:[a.jsx("strong",{children:w.recent_paper_count})," ",w.recent_paper_count===1?"paper":"papers",w.rate_change==null?w.recent_paper_count>0&&a.jsx("span",{className:"benchmark-trend-change is-new",children:"new"}):a.jsxs("span",{className:`benchmark-trend-change ${w.rate_change>=1?"is-up":"is-down"}`,children:[w.rate_change>=1?"↑":"↓"," ",w.rate_change.toFixed(1),"×"]})]})]})]}),a.jsx(pt,{kind:"benchmark",entityId:p.id}),a.jsxs("div",{className:"bm-subtitle",children:[ee?a.jsx(ue,{className:"h-5 w-64 bm-summary-skeleton","aria-label":"Loading benchmark summary"}):a.jsxs("span",{children:[O&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"metric-tag",children:O}),a.jsx("span",{style:{color:"var(--hairline-strong)",margin:"0 8px"},children:"·"})]}),U?a.jsxs("span",{children:["Best: ",a.jsx("span",{className:"best-name",children:le(M)})," by ",a.jsx("span",{className:"best-name",style:{fontStyle:"normal"},children:U})]}):a.jsxs("span",{children:[I.rows.length," evaluations"]})]}),p.hf_url&&a.jsxs("a",{className:"bm-action-btn",href:p.hf_url,target:"_blank",rel:"noopener noreferrer",children:[a.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),p.description&&a.jsx("p",{className:"bm-description",children:p.description}),l.hide_closed_source_evals&&G.length>0&&a.jsxs("div",{className:"bm-hidden-closed-notice",children:[a.jsxs("span",{children:[G.length," closed-source ",G.length===1?"row is":"rows are"," hidden",z!=null&&z.model_name?a.jsxs(a.Fragment,{children:[", including ",a.jsx("strong",{children:z.model_name})]}):null,"."]}),a.jsx("button",{type:"button",className:"bm-hidden-closed-action",onClick:()=>{c(!1)},children:"Show closed-source"})]}),ot&&a.jsxs("div",{className:"method-source",style:{marginTop:0,marginBottom:18},children:[a.jsx("span",{className:"method-source-label",children:"Source"}),H?a.jsxs(ne,{to:`/paper/${H}`,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[a.jsx("span",{className:"method-source-title",children:J?a.jsx(ce,{title:J}):ct}),Q&&a.jsx("span",{className:"method-source-meta",children:Q})]}):p.paper_url?a.jsxs("a",{href:St(p.paper_url)??void 0,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[a.jsx("span",{className:"method-source-title",children:J?a.jsx(ce,{title:J}):p.paper_url}),Q&&a.jsx("span",{className:"method-source-meta",children:Q})]}):a.jsxs("div",{className:"method-source-link is-static",children:[a.jsx("span",{className:"method-source-title",children:J?a.jsx(ce,{title:J}):null}),Q&&a.jsx("span",{className:"method-source-meta",children:Q})]})]}),a.jsx(Wr,{model:I,datasetName:p.name,hideClosed:l.hide_closed_source_evals,setHideClosed:c,setMetric:E}),_&&(()=>{var Le,Ie;const b=_.paper_arxiv_id||_.paper_id,$=_.paper_title||(_.paper_arxiv_id?`arXiv:${_.paper_arxiv_id}`:null),F=_.best_metric&&((Le=_.metrics)==null?void 0:Le[_.best_metric])!==void 0?_.best_metric:I.activeMetric,Fe=(Ie=_.metrics)==null?void 0:Ie[F];return a.jsxs("div",{className:"bm-highlight-banner",role:"status",children:[a.jsx("span",{className:"bm-highlight-dot","aria-hidden":"true"}),a.jsxs("div",{className:"bm-highlight-text",children:[a.jsx("span",{className:"bm-highlight-label",children:"Comparing result"}),a.jsxs("span",{className:"bm-highlight-paper",children:[_.model_name||$||"—",_.harness?` · ${_.harness}`:""]}),a.jsxs("span",{className:"bm-highlight-meta",children:[Fe!==void 0&&F?a.jsxs(a.Fragment,{children:[F,": ",le(Fe),$?" · ":""]}):null,b?a.jsx(ne,{to:`/paper/${b}`,children:Qe(_.paper_title,$)}):Qe(_.paper_title,$)]})]})]})})(),a.jsxs("div",{className:"bm-card",ref:x,children:[a.jsxs("div",{className:"bm-card-screenshot-header","aria-hidden":"true",children:[a.jsxs("div",{className:"bm-card-screenshot-title",children:[a.jsx("span",{className:"bm-card-screenshot-eyebrow",children:"Benchmark"}),a.jsx("span",{className:"bm-card-screenshot-name",children:p.name})]}),a.jsxs("div",{className:"bm-card-screenshot-brand",children:[a.jsxs("span",{className:"brand",children:[a.jsx("span",{className:"brand-mark"}),a.jsxs("span",{className:"brand-name",children:["Papers ",a.jsx("em",{children:"With Code"})]})]}),a.jsx("span",{className:"bm-card-screenshot-url",children:"paperswithcode.co"})]})]}),a.jsxs("div",{className:"bm-card-head",children:[a.jsx("div",{className:"bm-card-title",children:"Leaderboard"}),a.jsxs("div",{className:"bm-card-actions",children:[I.allowedMetrics.length>1&&a.jsxs("label",{className:"bm-view-select",children:[a.jsx("span",{className:"bm-view-select-label",children:"View"}),a.jsx("select",{value:I.activeMetric,onChange:b=>E(b.target.value),children:o.map(b=>a.jsx("option",{value:b,children:b},b))})]}),a.jsxs("label",{className:"bm-closed-toggle",title:"Show or hide evaluations of closed-source models",children:[a.jsx(Ge,{className:"bm-closed-toggle-switch",checked:!l.hide_closed_source_evals,onCheckedChange:b=>{c(!b)},"aria-label":"Show closed-source models"}),a.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),!K&&!X&&k.isSuccess?a.jsx("span",{className:"bm-parameter-unavailable",children:"Parameter metadata unavailable"}):null,a.jsx(lt,{targetRef:x,label:"leaderboard"})]})]}),!K&&X&&a.jsxs("div",{className:"bm-parameter-filter-bar",children:[a.jsx("span",{className:"bm-parameter-filter-label",children:"Parameters Size"}),a.jsx("div",{className:"bm-parameter-filter-options",role:"group","aria-label":"Filter leaderboard by parameter size",children:I.parameterFilters.map(b=>{const{selected:$,disabled:F}=b;return a.jsx("button",{type:"button",className:`bm-parameter-filter-option${$?" is-active":""}`,"aria-pressed":$,disabled:F,onClick:()=>T(b.maxParametersExclusive),children:b.label},b.label)})}),a.jsxs("span",{className:"bm-parameter-coverage",children:["Parameters known for ",Y.parameter_coverage_known," of ",Y.parameter_coverage_total," entries"]})]}),k.isLoading||K?a.jsx("div",{style:{padding:16},children:Array.from({length:5}).map((b,$)=>a.jsx(ue,{className:"h-10 w-full mb-2"},$))}):I.rows.length===0?i?a.jsxs("div",{className:"no-results",children:["No known parameter counts match this filter. "," ",a.jsx("button",{type:"button",className:"bm-empty-filter-action",onClick:()=>T(void 0),children:"Show all"})]}):a.jsx("div",{className:"no-results",children:"No evaluations submitted yet."}):a.jsxs(a.Fragment,{children:[o.length>P&&a.jsxs("div",{className:"bm-metric-columns-control",children:[a.jsx("button",{type:"button",className:"bm-metric-columns-toggle","aria-expanded":C,"aria-controls":"benchmark-leaderboard",onClick:()=>h(C?null:R),children:C?"Show fewer metrics":`Show more metrics (${o.length-P})`}),C&&a.jsx("span",{children:"Scroll metrics horizontally; model and paper details stay visible."})]}),a.jsx(Wt,{model:I,showHarness:y,setMetric:E,highlightRowRef:d,onFittingMetricCountChange:S})]})]})]})})};export{ma as default};
|
|
|
|
| 1 |
+
import{d as L,j as a,M as le,L as ne,e as dt,x as ut,u as mt,g as ht,b as te,o as de,t as ft,T as oe}from"./index-BuF8ktG8.js";import{R as pt}from"./ResearchFollowButton-BWlDUBnb.js";import{c as re}from"./catalog-QOvavbkR.js";import{C as gt,E as xt,e as bt}from"./ExternalSourceEvalBadge-xcz_QKFV.js";import{u as yt}from"./preferences-DbS0yVYy.js";import{L as ce}from"./LatexTitle-CXoQ1Bzq.js";import{S as Ge}from"./switch-BZ1Lljbb.js";import{I as wt}from"./Icon-aDKp5nB1.js";import{S as ue}from"./skeleton-Dp4VcttN.js";import{A as vt,a as jt}from"./alert-ClESc45e.js";import{B as _t}from"./BenchmarkTrendSparkline-DRl3gbu-.js";import{s as St}from"./safeExternalHref-CkBrsh84.js";import{s as kt}from"./slug-BpH-Nkvz.js";import{i as Ct}from"./apiErrors-Bu7TuOPW.js";import Et from"./NotFound-BiuJcE21.js";import"./researchTopic-Cz5Cn_RO.js";import"./useMutation-H0Ru2KmC.js";import"./plus-9o2YwICS.js";import"./curation-rx4Y4ai_.js";import"./hover-card-yQsLTE4d.js";import"./account-BGPDCUJL.js";import"./index-DKuYr0yj.js";function ie(e){if(e==null)return null;if(typeof e=="number")return Number.isFinite(e)?e:null;const t=e.includes("±")?e.split("±")[0].trim():e.trim(),r=parseFloat(t);return Number.isFinite(r)?r:null}const Xe=[{label:"All",maxParametersExclusive:void 0},{label:"<10M",maxParametersExclusive:1e7},{label:"<100M",maxParametersExclusive:1e8},{label:"<1B",maxParametersExclusive:1e9},{label:"<3B",maxParametersExclusive:3e9},{label:"<6B",maxParametersExclusive:6e9},{label:"<12B",maxParametersExclusive:12e9},{label:"<32B",maxParametersExclusive:32e9},{label:"<128B",maxParametersExclusive:128e9},{label:"<500B",maxParametersExclusive:5e11}];function Nt(e){const t=e===null?void 0:Number(e);return Xe.some(r=>r.maxParametersExclusive===t)?t:void 0}function Rt(e){return new Intl.NumberFormat("en",{notation:"compact",maximumSignificantDigits:3}).format(e)}function Pt(e){return[e.paper_id,e.task_id,e.dataset_id,e.model_name,e.harness??""].join("|")}function Tt(e){const t=new Map;for(const r of e){const s=Pt(r),n=t.get(s);if(!n){t.set(s,{...r,metrics:{...r.metrics||{}},sourceEvaluationIds:[r.id],ranksByMetric:r.best_metric&&r.best_rank!=null?{[r.best_metric]:r.best_rank}:{},parameterCount:r.num_parameters??null,hasParameterConflict:!1});continue}n.metrics={...n.metrics,...r.metrics||{}},n.sourceEvaluationIds.push(r.id),r.best_metric&&r.best_rank!=null&&(n.ranksByMetric[r.best_metric]=r.best_rank),r.num_parameters!=null&&!n.hasParameterConflict&&(n.parameterCount===null?n.parameterCount=r.num_parameters:n.parameterCount!==r.num_parameters&&(n.parameterCount=null,n.hasParameterConflict=!0))}return Array.from(t.values())}function Ae(e,t){return t===void 0?e:e.filter(r=>r.parameterCount!==null&&r.parameterCount<t)}function Mt(e,t){return t?e.id===t||e.sourceEvaluationIds.includes(t):!1}function Be(e,t){return e.ranksByMetric[t]??e.best_rank??9999}function $t(e){const t=Date.parse(e);return Number.isNaN(t)?"":new Date(t).toISOString().slice(0,10)}function Ft(e){const t=new Map;for(const s of e)s.evaluated_on&&t.set(s.evaluated_on,(t.get(s.evaluated_on)??0)+1);const r=Array.from(t.values()).reduce((s,n)=>s+n,0);for(const[s,n]of t)if(n>=2&&n*2>r)return s;return null}function Lt(e,t){const r=e.evaluated_on;return r&&r!==t&&r!==$t(e.updated_at)?r:e.paper_published_date||""}function It(e,t,r){if(e.length===0)return{points:[],sota:0,sotaModel:""};const s=Ft(e),n=e.map(u=>{var R;const h=ie((R=u.metrics)==null?void 0:R[t]);return{eval:u,value:h,date:Lt(u,s)}}).filter(u=>u.value!==null&&!!u.date).sort((u,h)=>u.date.localeCompare(h.date)),i=[];let l=null;for(const u of n){const h=l==null?!0:r==="↓"?u.value<l:u.value>l;h&&(l=u.value),i.push({value:u.value,date:u.date,dateLabel:u.date.slice(0,7),modelName:u.eval.model_name||"",paperTitle:u.eval.paper_title||"",paperRouteId:u.eval.paper_arxiv_id||u.eval.paper_id||null,isSota:h})}const d=e.map(u=>{var h;return{eval:u,value:ie((h=u.metrics)==null?void 0:h[t])}}).filter(u=>u.value!==null).sort((u,h)=>r==="↓"?u.value-h.value:h.value-u.value)[0],f=(d==null?void 0:d.value)??0,x=(d==null?void 0:d.eval.model_name)||(d==null?void 0:d.eval.paper_title)||"";return{points:i,sota:f,sotaModel:x}}function At(e,t,r){const s=t?(e??[]).filter(l=>l.task_id===t):e??[],n=s.filter(l=>l.is_open===!1),i=n.reduce((l,c)=>l?(c.best_rank??Number.POSITIVE_INFINITY)<(l.best_rank??Number.POSITIVE_INFINITY)?c:l:c,null);return{visible:r?s.filter(l=>l.is_open!==!1):s,hiddenClosed:n,topHiddenClosed:i}}function Ye(e,t,r,s){const n=t.find(i=>i.id===s);if(e.length===0)return null;if(n!=null&&n.task_id&&e.some(i=>i.id===n.task_id))return n.task_id;if(r){const i=e.find(l=>l.slug===r);if(i)return i.id}if(e.length===1)return e[0].id;if(t.length>0){const i=new Map;for(const d of t)i.set(d.task_id,(i.get(d.task_id)||0)+1);let l=null,c=-1;for(const d of e){const f=i.get(d.id)||0;f>c&&(c=f,l=d.id)}if(l)return l}return e[0].id}function Bt(e){var _,X,Y;const{evaluations:t,tasks:r,taskSlug:s,highlightEvalId:n,parameterBound:i,showMoreMetrics:l,fittingMetricCount:c=1}=e,d=Ye(r,t,s,n),f=r.find(o=>o.id===d)||r[0]||null,x=t.find(o=>o.id===n),u=At(t,d,e.hideClosed),h=Tt(u.visible),R=Ae(h,i),C=e.configuredMetrics.map(o=>o.metric_name),P=Array.from(new Set(h.flatMap(o=>[...o.best_metric?[o.best_metric]:[],...Object.keys(o.metrics||{})]))),S=C.length?C:P,g=new Map;for(const o of h){const m=o.best_metric;!m||ie(o.metrics[m])===null||C.length&&!S.includes(m)||g.set(m,(g.get(m)||0)+1)}const k=((_=[...g].sort((o,m)=>m[1]-o[1])[0])==null?void 0:_[0])||S[0]||"",j=S.find(o=>{var m;return o.toLocaleLowerCase()===((m=e.metric)==null?void 0:m.trim().toLocaleLowerCase())})||(x==null?void 0:x.best_metric)||k,D=((X=e.directions)==null?void 0:X.directions[j])==="lower_is_better"?"↓":"↑",W=j&&S.includes(j)?[j,...S.filter(o=>o!==j)]:S,w=W.length?l?W:W.slice(0,Math.max(1,c)):j?[j]:[],q=R.slice().sort((o,m)=>{const p=ie(o.metrics[j]),y=ie(m.metrics[j]);return p!==null&&y!==null?D==="↓"?p-y:y-p:p!==null?-1:y!==null?1:Be(o,j)-Be(m,j)});let I=null,N=0;const G=q.map((o,m)=>{const p=ie(o.metrics[j]);return p!==null&&p!==I&&(I=p,N=m+1),{evaluation:o,rank:p===null?null:N,isHighlighted:Mt(o,n)}}),{points:z,sota:ee,sotaModel:O}=It(R,j,D),M=i===void 0?e.initialSummary:void 0,U=e.ready.evaluations&&e.ready.tasks&&e.ready.directions&&(!d||e.ready.metrics),K={parameter_coverage_known:h.filter(o=>o.parameterCount!==null).length,parameter_coverage_total:h.length};return{currentTaskId:d,primaryTask:f,activeMetric:j,arrow:D,allowedMetrics:S,orderedMetrics:W,visibleMetrics:w,rows:G,chartPoints:z,highlightedEval:((Y=G.find(o=>o.isHighlighted))==null?void 0:Y.evaluation)||null,hiddenClosedEvals:u.hiddenClosed,hiddenClosedTopEval:u.topHiddenClosed,parameterBound:i,parameterCoverage:K,hasParameterMetadata:K.parameter_coverage_known>0,parameterFilters:Xe.map(o=>({...o,selected:i===o.maxParametersExclusive,disabled:i!==o.maxParametersExclusive&&Ae(h,o.maxParametersExclusive).length===0})),displayedMetric:U?j:M==null?void 0:M.metric,displayedSota:U?ee:M==null?void 0:M.value,displayedSotaModel:U?O:M==null?void 0:M.model_name,isSummaryLoading:!U&&!M,isInitialFilteredViewLoading:i!==void 0&&!U}}function Dt(e,t,r,s=1,n=0){const i=e-t.fixed-(r?t.harness:0);if(t.metric<=0)return 1;const l=Math.floor(i/t.metric);if(l<s)return Math.max(1,l);const c=Math.floor((i-n)/t.metric);return Math.max(1,s,c)}function pe(e,t){return parseFloat(e.getPropertyValue(t))||0}function Ht(e){const t=getComputedStyle(e);return{fixed:["--bm-rank-width","--bm-model-width","--bm-parameters-width","--bm-paper-width","--bm-year-width"].reduce((r,s)=>r+pe(t,s),0),harness:pe(t,"--bm-harness-width"),metric:pe(t,"--bm-metric-width")}}const Vt=20;function De(e,t){return e?a.jsx(ce,{title:e}):t||"—"}function Wt({model:e,showHarness:t,setMetric:r,highlightRowRef:s,onFittingMetricCountChange:n}){const{rows:i,visibleMetrics:l,activeMetric:c,arrow:d}=e,[f,x]=L.useState(null);return L.useEffect(()=>{if(!f)return;const u=()=>{f.classList.toggle("has-horizontal-overflow",f.scrollWidth>f.clientWidth);const R=f.firstElementChild;if(!R)return;const C=f.clientWidth,P=Ht(R);f.classList.toggle("unpins-trailing-columns",C<P.fixed+P.metric);const S=document.documentElement,g=S.scrollHeight>S.clientHeight?0:Vt;n(k=>Dt(C,P,t,k,g))},h=new ResizeObserver(u);return h.observe(f),f.firstElementChild&&h.observe(f.firstElementChild),u(),()=>h.disconnect()},[f,t,n]),a.jsx("div",{ref:x,className:"bm-table-scroll",role:"region","aria-label":"Leaderboard metrics",tabIndex:0,children:a.jsxs("table",{id:"benchmark-leaderboard",className:"bm-table",style:{"--bm-metric-count":l.length,"--bm-harness-count":t?1:0},children:[a.jsxs("colgroup",{children:[a.jsx("col",{className:"bm-width-rank"}),a.jsx("col",{className:"bm-width-model"}),a.jsx("col",{className:"bm-width-parameters"}),t&&a.jsx("col",{className:"bm-width-harness"}),l.map(u=>a.jsx("col",{className:"bm-width-metric"},u)),a.jsx("col",{}),a.jsx("col",{className:"bm-width-year"})]}),a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{className:"col-rank",children:"Rank"}),a.jsx("th",{className:"col-model",children:"Model"}),a.jsxs("th",{className:"col-parameters",children:[a.jsx("span",{className:"bm-label-full",children:"Parameters"}),a.jsx("span",{className:"bm-label-short",children:"Params"})]}),t&&a.jsx("th",{className:"col-harness",children:"Harness"}),l.map(u=>{const h=u===c;return a.jsx("th",{className:`col-value ${h?"is-active":""}`,"aria-sort":h?d==="↓"?"ascending":"descending":"none",children:a.jsxs("button",{type:"button",className:"bm-metric-header",onClick:()=>r(u),"aria-pressed":h,title:`Sort by ${u}`,children:[u,h?` ${d}`:""]})},u)}),a.jsx("th",{className:"col-paper",children:"Paper"}),a.jsx("th",{className:"col-year",children:"Year"})]})}),a.jsx("tbody",{children:i.map(({evaluation:u,rank:h,isHighlighted:R})=>{var S;const C=u.paper_arxiv_id||u.paper_id,P=u.paper_title||(u.paper_arxiv_id?`arXiv:${u.paper_arxiv_id}`:null);return a.jsxs("tr",{ref:R?s:void 0,className:R?"is-highlighted":void 0,children:[a.jsx("td",{className:"col-rank",children:h??"—"}),a.jsxs("td",{className:"col-model",children:[R&&a.jsx("span",{className:"bm-row-marker","aria-hidden":"true"}),u.hf_model_url?a.jsx("a",{href:u.hf_model_url,target:"_blank",rel:"noopener noreferrer",className:"bm-model-link",title:`Open ${u.model_name||"model"} on Hugging Face`,children:u.model_name||"—"}):u.model_name||"—",u.is_open===!1&&a.jsx(gt,{}),(u.external??u.is_external)&&a.jsx(xt,{sourceUrl:u.source_url||u.external_source_url||u.result_url})]}),a.jsx("td",{className:"col-parameters",title:u.parameterCount===null?void 0:u.parameterCount.toLocaleString("en-US"),"aria-label":u.parameterCount===null?"Parameters unknown":`${u.parameterCount.toLocaleString("en-US")} parameters`,children:u.parameterCount===null?"—":Rt(u.parameterCount)}),t&&a.jsx("td",{className:"col-harness",children:u.harness||"—"}),l.map(g=>{var j;const k=g===c,B=(j=u.metrics)==null?void 0:j[g];return a.jsx("td",{className:`col-value${k?" is-active":""}${k&&h===1?" is-best":""}`,children:B!=null&&B!==""?le(B):"—"},g)}),a.jsx("td",{className:"col-paper",children:C?a.jsx(ne,{to:`/paper/${C}`,title:u.paper_title||P||void 0,children:De(u.paper_title,P)}):De(u.paper_title,P)}),a.jsx("td",{className:"col-year",children:((S=u.evaluated_on||u.paper_published_date)==null?void 0:S.slice(0,4))||"—"})]},u.id)})})]})})}function He(e){const t=e.length===7?`${e}-01`:e,r=new Date(t).getTime();return Number.isFinite(r)?r:0}const ge=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function xe(e){const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()}}function Ot(e,t){if(e===t){const{year:d,month:f}=xe(e);return[{timestamp:new Date(d,f,1).getTime(),key:`${d}-${f}`,label:`${ge[f]} ${d}`}]}const r=xe(e),s=xe(t);if(r.year===s.year){const d=s.month-r.month+1;let f=1;const x=12;d>x&&(f=Math.ceil(d/x));const u=[];for(let h=r.month;h<=s.month;h+=f)u.push({timestamp:new Date(r.year,h,1).getTime(),key:`${r.year}-${h}`,label:d<=3?`${ge[h]} ${r.year}`:ge[h]});return u}const n=s.year-r.year+1;let i=1;const l=12;n>l&&(i=Math.ceil(n/l));const c=[];for(let d=r.year;d<=s.year;d+=i)c.push({timestamp:new Date(d,0,1).getTime(),key:String(d),label:String(d)});return c}const Ut=({points:e,metric:t})=>{const r=dt(),[s,n]=L.useState(null),i=880,l=320,c=60,d=30,f=40,x=50,u=e.map(o=>o.value),h=Math.min(...u),C=Math.max(...u)-h||1,P=i-c-d,S=l-f-x,g=e.map(o=>He(o.date)),k=Math.min(...g),B=Math.max(...g),j=B-k||1,D=o=>k===B?c+P/2:c+(o-k)/j*P,W=e.map((o,m)=>{const p=D(He(o.date)),y=(o.value-h)/C,T=f+S*(1-y);return{x:p,y:T,data:o,idx:m}}),w=W.filter(o=>o.data.isSota);let q="";if(w.length>=2){q=`M${w[0].x},${w[0].y}`;for(let o=1;o<w.length;o++){const m=w[o-1],p=w[o],y=(m.x+p.x)/2;q+=` C${y},${m.y} ${y},${p.y} ${p.x},${p.y}`}}const I=5.4,N=8,G=9,z=o=>{const m=o.data.modelName||o.data.paperTitle||"";if(!m)return null;const p=m.length>22?m.slice(0,21)+"…":m,y=p.length*I;let T=o.x-y/2,E=o.x+y/2,v="middle";return T<c?(T=c,E=c+y,v="start"):E>i-d&&(E=i-d,T=E-y,v="end"),{x:v==="start"?c:v==="end"?i-d:o.x,y:o.y-G,text:p,anchor:v,left:T,right:E}},ee=[],O=w.length>0?z(w[w.length-1]):null;let M=-1/0;for(let o=0;o<w.length-1;o++){const m=z(w[o]);m&&(m.left<M+N||O&&m.right>O.left-N||(M=m.right,ee.push({x:m.x,y:m.y,text:m.text,anchor:m.anchor})))}O&&ee.push({x:O.x,y:O.y,text:O.text,anchor:O.anchor});const U=Ot(k,B),K=5,_=o=>n(m=>m===o?null:m),X=o=>{o&&r(`/paper/${o}`)},Y=(o,m)=>{const y=`${o.data.modelName||o.data.paperTitle||"Unknown model"}: ${le(o.data.value)} on ${o.data.dateLabel}`,T=!!o.data.paperRouteId;return a.jsxs("g",{children:[m,a.jsx("circle",{cx:o.x,cy:o.y,r:"10",fill:"transparent",style:{cursor:T?"pointer":"default",outline:"none"},tabIndex:0,role:T?"link":"img","aria-label":y,onMouseEnter:()=>n(o.idx),onMouseLeave:()=>_(o.idx),onFocus:()=>n(o.idx),onBlur:()=>_(o.idx),onClick:()=>X(o.data.paperRouteId),onKeyDown:E=>{T&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),X(o.data.paperRouteId))},children:a.jsx("title",{children:y})})]},o.idx)};return a.jsxs("svg",{width:"100%",viewBox:`0 0 ${i} ${l}`,style:{display:"block"},children:[a.jsx("text",{x:c-38,y:f+S/2,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"middle",transform:`rotate(-90 ${c-38} ${f+S/2})`,children:t}),Array.from({length:K}).map((o,m)=>{const p=m/(K-1),y=f+S*(1-p),T=h+C*p;return a.jsxs("g",{children:[a.jsx("line",{x1:c,y1:y,x2:i-d,y2:y,stroke:"var(--hairline)",strokeWidth:"1"}),a.jsx("text",{x:c-10,y:y+4,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"end",children:le(T)})]},m)}),U.map(o=>{const m=D(o.timestamp);return a.jsx("text",{x:m,y:l-x+18,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:"middle",children:o.label},o.key)}),W.filter(o=>!o.data.isSota).map(o=>{const m=s===o.idx;return Y(o,a.jsx("circle",{cx:o.x,cy:o.y,r:m?3:2,fill:"var(--ink-faint)",opacity:m?1:.45,style:{transition:"r 0.12s ease, opacity 0.12s ease"}}))}),q&&a.jsx("path",{d:q,stroke:"var(--accent)",strokeWidth:"2",fill:"none",strokeLinejoin:"round",strokeLinecap:"round"}),w.map(o=>{const m=s===o.idx;return Y(o,a.jsx("circle",{cx:o.x,cy:o.y,r:m?4.5:3,fill:m?"var(--accent)":"var(--bg-elevated)",stroke:"var(--accent)",strokeWidth:"1.5",style:{transition:"r 0.12s ease, fill 0.12s ease"}}))}),ee.map((o,m)=>a.jsx("text",{x:o.x,y:o.y,fontSize:"9.5",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:o.anchor,pointerEvents:"none",style:{paintOrder:"stroke",stroke:"var(--bg-elevated)",strokeWidth:3,strokeLinejoin:"round"},children:o.text},`label-${m}`)),s!==null&&W[s]&&(()=>{const o=W[s],m=o.data.modelName||o.data.paperTitle||"Unknown model",y=`${m.length>40?m.slice(0,39)+"…":m}: ${le(o.data.value)}`,E=Math.max(120,Math.min(340,y.length*6.6+24)),v=30;let H=o.x-E/2;H<c&&(H=c),H+E>i-d&&(H=i-d-E);const Q=o.y-v-14>=f?o.y-v-12:o.y+12;return a.jsxs("g",{pointerEvents:"none",children:[a.jsx("rect",{x:H,y:Q,width:E,height:v,rx:"6",ry:"6",fill:"var(--bg-elevated)",stroke:"var(--hairline-strong)",strokeWidth:"1",style:{filter:"drop-shadow(0 2px 6px rgba(0,0,0,0.08))"}}),a.jsx("text",{x:H+12,y:Q+19,fontSize:"12",fontFamily:"var(--sans)",fill:"var(--ink)",fontWeight:500,children:y})]})})()]})};function qt(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const r=document.implementation.createHTMLDocument(),s=r.createElement("base"),n=r.createElement("a");return r.head.appendChild(s),r.body.appendChild(n),t&&(s.href=t),n.href=e,n.href}const zt=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function Z(e){const t=[];for(let r=0,s=e.length;r<s;r++)t.push(e[r]);return t}let ae=null;function Je(e={}){return ae||(e.includeStyleProperties?(ae=e.includeStyleProperties,ae):(ae=Z(window.getComputedStyle(document.documentElement)),ae))}function me(e,t){const s=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return s?parseFloat(s.replace("px","")):0}function Kt(e){const t=me(e,"border-left-width"),r=me(e,"border-right-width");return e.clientWidth+t+r}function Qt(e){const t=me(e,"border-top-width"),r=me(e,"border-bottom-width");return e.clientHeight+t+r}function Ze(e,t={}){const r=t.width||Kt(e),s=t.height||Qt(e);return{width:r,height:s}}function Gt(){let e,t;try{t=process}catch{}const r=t&&t.env?t.env.devicePixelRatio:null;return r&&(e=parseInt(r,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}const V=16384;function Xt(e){(e.width>V||e.height>V)&&(e.width>V&&e.height>V?e.width>e.height?(e.height*=V/e.width,e.width=V):(e.width*=V/e.height,e.height=V):e.width>V?(e.height*=V/e.width,e.width=V):(e.width*=V/e.height,e.height=V))}function Yt(e,t={}){return e.toBlob?new Promise(r=>{e.toBlob(r,t.type?t.type:"image/png",t.quality?t.quality:1)}):new Promise(r=>{const s=window.atob(e.toDataURL(t.type?t.type:void 0,t.quality?t.quality:void 0).split(",")[1]),n=s.length,i=new Uint8Array(n);for(let l=0;l<n;l+=1)i[l]=s.charCodeAt(l);r(new Blob([i],{type:t.type?t.type:"image/png"}))})}function he(e){return new Promise((t,r)=>{const s=new Image;s.onload=()=>{s.decode().then(()=>{requestAnimationFrame(()=>t(s))})},s.onerror=r,s.crossOrigin="anonymous",s.decoding="async",s.src=e})}async function Jt(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function Zt(e,t,r){const s="http://www.w3.org/2000/svg",n=document.createElementNS(s,"svg"),i=document.createElementNS(s,"foreignObject");return n.setAttribute("width",`${t}`),n.setAttribute("height",`${r}`),n.setAttribute("viewBox",`0 0 ${t} ${r}`),i.setAttribute("width","100%"),i.setAttribute("height","100%"),i.setAttribute("x","0"),i.setAttribute("y","0"),i.setAttribute("externalResourcesRequired","true"),n.appendChild(i),i.appendChild(e),Jt(n)}const A=(e,t)=>{if(e instanceof t)return!0;const r=Object.getPrototypeOf(e);return r===null?!1:r.constructor.name===t.name||A(r,t)};function er(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function tr(e,t){return Je(t).map(r=>{const s=e.getPropertyValue(r),n=e.getPropertyPriority(r);return`${r}: ${s}${n?" !important":""};`}).join(" ")}function rr(e,t,r,s){const n=`.${e}:${t}`,i=r.cssText?er(r):tr(r,s);return document.createTextNode(`${n}{${i}}`)}function Ve(e,t,r,s){const n=window.getComputedStyle(e,r),i=n.getPropertyValue("content");if(i===""||i==="none")return;const l=zt();try{t.className=`${t.className} ${l}`}catch{return}const c=document.createElement("style");c.appendChild(rr(l,r,n,s)),t.appendChild(c)}function ar(e,t,r){Ve(e,t,":before",r),Ve(e,t,":after",r)}const We="application/font-woff",Oe="image/jpeg",sr={woff:We,woff2:We,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:Oe,jpeg:Oe,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function nr(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function ve(e){const t=nr(e).toLowerCase();return sr[t]||""}function ir(e){return e.split(/,/)[1]}function ye(e){return e.search(/^(data:)/)!==-1}function lr(e,t){return`data:${t};base64,${e}`}async function et(e,t,r){const s=await fetch(e,t);if(s.status===404)throw new Error(`Resource "${s.url}" not found`);const n=await s.blob();return new Promise((i,l)=>{const c=new FileReader;c.onerror=l,c.onloadend=()=>{try{i(r({res:s,result:c.result}))}catch(d){l(d)}},c.readAsDataURL(n)})}const be={};function or(e,t,r){let s=e.replace(/\?.*/,"");return r&&(s=e),/ttf|otf|eot|woff2?/i.test(s)&&(s=s.replace(/.*\//,"")),t?`[${t}]${s}`:s}async function je(e,t,r){const s=or(e,t,r.includeQueryParams);if(be[s]!=null)return be[s];r.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let n;try{const i=await et(e,r.fetchRequestInit,({res:l,result:c})=>(t||(t=l.headers.get("Content-Type")||""),ir(c)));n=lr(i,t)}catch(i){n=r.imagePlaceholder||"";let l=`Failed to fetch resource: ${e}`;i&&(l=typeof i=="string"?i:i.message),l&&console.warn(l)}return be[s]=n,n}async function cr(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):he(t)}async function dr(e,t){if(e.currentSrc){const i=document.createElement("canvas"),l=i.getContext("2d");i.width=e.clientWidth,i.height=e.clientHeight,l==null||l.drawImage(e,0,0,i.width,i.height);const c=i.toDataURL();return he(c)}const r=e.poster,s=ve(r),n=await je(r,s,t);return he(n)}async function ur(e,t){var r;try{if(!((r=e==null?void 0:e.contentDocument)===null||r===void 0)&&r.body)return await fe(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function mr(e,t){return A(e,HTMLCanvasElement)?cr(e):A(e,HTMLVideoElement)?dr(e,t):A(e,HTMLIFrameElement)?ur(e,t):e.cloneNode(tt(e))}const hr=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",tt=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function fr(e,t,r){var s,n;if(tt(t))return t;let i=[];return hr(e)&&e.assignedNodes?i=Z(e.assignedNodes()):A(e,HTMLIFrameElement)&&(!((s=e.contentDocument)===null||s===void 0)&&s.body)?i=Z(e.contentDocument.body.childNodes):i=Z(((n=e.shadowRoot)!==null&&n!==void 0?n:e).childNodes),i.length===0||A(e,HTMLVideoElement)||await i.reduce((l,c)=>l.then(()=>fe(c,r)).then(d=>{d&&t.appendChild(d)}),Promise.resolve()),t}function pr(e,t,r){const s=t.style;if(!s)return;const n=window.getComputedStyle(e);n.cssText?(s.cssText=n.cssText,s.transformOrigin=n.transformOrigin):Je(r).forEach(i=>{let l=n.getPropertyValue(i);i==="font-size"&&l.endsWith("px")&&(l=`${Math.floor(parseFloat(l.substring(0,l.length-2)))-.1}px`),A(e,HTMLIFrameElement)&&i==="display"&&l==="inline"&&(l="block"),i==="d"&&t.getAttribute("d")&&(l=`path(${t.getAttribute("d")})`),s.setProperty(i,l,n.getPropertyPriority(i))})}function gr(e,t){A(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),A(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function xr(e,t){if(A(e,HTMLSelectElement)){const r=t,s=Array.from(r.children).find(n=>e.value===n.getAttribute("value"));s&&s.setAttribute("selected","")}}function br(e,t,r){return A(t,Element)&&(pr(e,t,r),ar(e,t,r),gr(e,t),xr(e,t)),t}async function yr(e,t){const r=e.querySelectorAll?e.querySelectorAll("use"):[];if(r.length===0)return e;const s={};for(let i=0;i<r.length;i++){const c=r[i].getAttribute("xlink:href");if(c){const d=e.querySelector(c),f=document.querySelector(c);!d&&f&&!s[c]&&(s[c]=await fe(f,t,!0))}}const n=Object.values(s);if(n.length){const i="http://www.w3.org/1999/xhtml",l=document.createElementNS(i,"svg");l.setAttribute("xmlns",i),l.style.position="absolute",l.style.width="0",l.style.height="0",l.style.overflow="hidden",l.style.display="none";const c=document.createElementNS(i,"defs");l.appendChild(c);for(let d=0;d<n.length;d++)c.appendChild(n[d]);e.appendChild(l)}return e}async function fe(e,t,r){return!r&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(s=>mr(s,t)).then(s=>fr(e,s,t)).then(s=>br(e,s,t)).then(s=>yr(s,t))}const rt=/url\((['"]?)([^'"]+?)\1\)/g,wr=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,vr=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function jr(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function _r(e){const t=[];return e.replace(rt,(r,s,n)=>(t.push(n),r)),t.filter(r=>!ye(r))}async function Sr(e,t,r,s,n){try{const i=r?qt(t,r):t,l=ve(t);let c;return n||(c=await je(i,l,s)),e.replace(jr(t),`$1${c}$3`)}catch{}return e}function kr(e,{preferredFontFormat:t}){return t?e.replace(vr,r=>{for(;;){const[s,,n]=wr.exec(r)||[];if(!n)return"";if(n===t)return`src: ${s};`}}):e}function at(e){return e.search(rt)!==-1}async function st(e,t,r){if(!at(e))return e;const s=kr(e,r);return _r(s).reduce((i,l)=>i.then(c=>Sr(c,l,t,r)),Promise.resolve(s))}async function se(e,t,r){var s;const n=(s=t.style)===null||s===void 0?void 0:s.getPropertyValue(e);if(n){const i=await st(n,null,r);return t.style.setProperty(e,i,t.style.getPropertyPriority(e)),!0}return!1}async function Cr(e,t){await se("background",e,t)||await se("background-image",e,t),await se("mask",e,t)||await se("-webkit-mask",e,t)||await se("mask-image",e,t)||await se("-webkit-mask-image",e,t)}async function Er(e,t){const r=A(e,HTMLImageElement);if(!(r&&!ye(e.src))&&!(A(e,SVGImageElement)&&!ye(e.href.baseVal)))return;const s=r?e.src:e.href.baseVal,n=await je(s,ve(s),t);await new Promise((i,l)=>{e.onload=i,e.onerror=t.onImageErrorHandler?(...d)=>{try{i(t.onImageErrorHandler(...d))}catch(f){l(f)}}:l;const c=e;c.decode&&(c.decode=i),c.loading==="lazy"&&(c.loading="eager"),r?(e.srcset="",e.src=n):e.href.baseVal=n})}async function Nr(e,t){const s=Z(e.childNodes).map(n=>nt(n,t));await Promise.all(s).then(()=>e)}async function nt(e,t){A(e,Element)&&(await Cr(e,t),await Er(e,t),await Nr(e,t))}function Rr(e,t){const{style:r}=e;t.backgroundColor&&(r.backgroundColor=t.backgroundColor),t.width&&(r.width=`${t.width}px`),t.height&&(r.height=`${t.height}px`);const s=t.style;return s!=null&&Object.keys(s).forEach(n=>{r[n]=s[n]}),e}const Ue={};async function qe(e){let t=Ue[e];if(t!=null)return t;const s=await(await fetch(e)).text();return t={url:e,cssText:s},Ue[e]=t,t}async function ze(e,t){let r=e.cssText;const s=/url\(["']?([^"')]+)["']?\)/g,i=(r.match(/url\([^)]+\)/g)||[]).map(async l=>{let c=l.replace(s,"$1");return c.startsWith("https://")||(c=new URL(c,e.url).href),et(c,t.fetchRequestInit,({result:d})=>(r=r.replace(l,`url(${d})`),[l,d]))});return Promise.all(i).then(()=>r)}function Ke(e){if(e==null)return[];const t=[],r=/(\/\*[\s\S]*?\*\/)/gi;let s=e.replace(r,"");const n=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const d=n.exec(s);if(d===null)break;t.push(d[0])}s=s.replace(n,"");const i=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,l="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",c=new RegExp(l,"gi");for(;;){let d=i.exec(s);if(d===null){if(d=c.exec(s),d===null)break;i.lastIndex=c.lastIndex}else c.lastIndex=i.lastIndex;t.push(d[0])}return t}async function Pr(e,t){const r=[],s=[];return e.forEach(n=>{if("cssRules"in n)try{Z(n.cssRules||[]).forEach((i,l)=>{if(i.type===CSSRule.IMPORT_RULE){let c=l+1;const d=i.href,f=qe(d).then(x=>ze(x,t)).then(x=>Ke(x).forEach(u=>{try{n.insertRule(u,u.startsWith("@import")?c+=1:n.cssRules.length)}catch(h){console.error("Error inserting rule from remote css",{rule:u,error:h})}})).catch(x=>{console.error("Error loading remote css",x.toString())});s.push(f)}})}catch(i){const l=e.find(c=>c.href==null)||document.styleSheets[0];n.href!=null&&s.push(qe(n.href).then(c=>ze(c,t)).then(c=>Ke(c).forEach(d=>{l.insertRule(d,l.cssRules.length)})).catch(c=>{console.error("Error loading remote stylesheet",c)})),console.error("Error inlining remote css file",i)}}),Promise.all(s).then(()=>(e.forEach(n=>{if("cssRules"in n)try{Z(n.cssRules||[]).forEach(i=>{r.push(i)})}catch(i){console.error(`Error while reading CSS rules from ${n.href}`,i)}}),r))}function Tr(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>at(t.style.getPropertyValue("src")))}async function Mr(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=Z(e.ownerDocument.styleSheets),s=await Pr(r,t);return Tr(s)}function it(e){return e.trim().replace(/["']/g,"")}function $r(e){const t=new Set;function r(s){(s.style.fontFamily||getComputedStyle(s).fontFamily).split(",").forEach(i=>{t.add(it(i))}),Array.from(s.children).forEach(i=>{i instanceof HTMLElement&&r(i)})}return r(e),t}async function Fr(e,t){const r=await Mr(e,t),s=$r(e);return(await Promise.all(r.filter(i=>s.has(it(i.style.fontFamily))).map(i=>{const l=i.parentStyleSheet?i.parentStyleSheet.href:null;return st(i.cssText,l,t)}))).join(`
|
| 2 |
`)}async function Lr(e,t){const r=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await Fr(e,t);if(r){const s=document.createElement("style"),n=document.createTextNode(r);s.appendChild(n),e.firstChild?e.insertBefore(s,e.firstChild):e.appendChild(s)}}async function Ir(e,t={}){const{width:r,height:s}=Ze(e,t),n=await fe(e,t,!0);return await Lr(n,t),await nt(n,t),Rr(n,t),await Zt(n,r,s)}async function Ar(e,t={}){const{width:r,height:s}=Ze(e,t),n=await Ir(e,t),i=await he(n),l=document.createElement("canvas"),c=l.getContext("2d"),d=t.pixelRatio||Gt(),f=t.canvasWidth||r,x=t.canvasHeight||s;return l.width=f*d,l.height=x*d,t.skipAutoScale||Xt(l),l.style.width=`${f}`,l.style.height=`${x}`,t.backgroundColor&&(c.fillStyle=t.backgroundColor,c.fillRect(0,0,l.width,l.height)),c.drawImage(i,0,0,l.width,l.height),l}async function Br(e,t={}){const r=await Ar(e,t);return await Yt(r)}const we="#ffffff";function Dr(){return typeof window>"u"?we:window.getComputedStyle(document.documentElement).getPropertyValue("--bg-elevated").trim()||we}function Hr(e){if(typeof window>"u")return we;const t=window.getComputedStyle(e).backgroundColor;return!t||t==="rgba(0, 0, 0, 0)"||t==="transparent"?Dr():t}async function Vr(e){var r,s;if(typeof window>"u"||!((s=(r=window.navigator)==null?void 0:r.clipboard)!=null&&s.write))throw new Error("Clipboard image copy is not supported in this browser.");if(typeof window.ClipboardItem>"u")throw new Error("Clipboard image copy is not supported in this browser.");const t=await Br(e,{pixelRatio:2,cacheBust:!0,backgroundColor:Hr(e)});if(!t)throw new Error("Failed to render screenshot.");await window.navigator.clipboard.write([new window.ClipboardItem({"image/png":t})])}const lt=({targetRef:e,label:t})=>{const{toast:r}=ut(),[s,n]=L.useState("idle"),i=L.useRef(null);L.useEffect(()=>()=>{i.current!==null&&window.clearTimeout(i.current)},[]);const l=L.useCallback(async()=>{const d=e.current;if(d){n("copying"),d.classList.add("is-capturing"),d.offsetHeight,await new Promise(f=>window.requestAnimationFrame(()=>f()));try{await Vr(d),n("copied"),r({title:"Screenshot copied",description:`Image of the ${t} copied to your clipboard.`}),i.current!==null&&window.clearTimeout(i.current),i.current=window.setTimeout(()=>n("idle"),1500)}catch(f){n("idle"),r({title:"Copy failed",description:f instanceof Error&&f.message?f.message:"Could not copy the screenshot to your clipboard.",variant:"destructive"})}finally{d.classList.remove("is-capturing")}}},[e,t,r]),c=s==="copied"?"Copied":s==="copying"?"Copying…":"Copy image";return a.jsxs("button",{type:"button",className:"bm-copy-btn",onClick:l,disabled:s==="copying","aria-label":`Copy ${t} screenshot to clipboard`,title:`Copy ${t} screenshot to clipboard`,children:[a.jsx(wt,{name:"copy",size:11}),c]})};function Wr({model:e,datasetName:t,hideClosed:r,setHideClosed:s,setMetric:n}){const i=L.useRef(null),{isInitialFilteredViewLoading:l,chartPoints:c,activeMetric:d,allowedMetrics:f,orderedMetrics:x,parameterBound:u}=e;return l||c.length===0?null:a.jsxs("div",{className:"bm-card",ref:i,children:[a.jsxs("div",{className:"bm-card-screenshot-header","aria-hidden":"true",children:[a.jsxs("div",{className:"bm-card-screenshot-title",children:[a.jsx("span",{className:"bm-card-screenshot-eyebrow",children:"Benchmark"}),a.jsx("span",{className:"bm-card-screenshot-name",children:t})]}),a.jsxs("div",{className:"bm-card-screenshot-brand",children:[a.jsxs("span",{className:"brand",children:[a.jsx("span",{className:"brand-mark"}),a.jsxs("span",{className:"brand-name",children:["Papers ",a.jsx("em",{children:"With Code"})]})]}),a.jsx("span",{className:"bm-card-screenshot-url",children:"paperswithcode.co"})]})]}),a.jsxs("div",{className:"bm-card-head",children:[a.jsx("div",{className:"bm-card-title",children:"SOTA progression"}),a.jsxs("div",{className:"bm-card-actions",children:[f.length>1&&a.jsxs("label",{className:"bm-view-select",children:[a.jsx("span",{className:"bm-view-select-label",children:"View"}),a.jsx("select",{value:d,onChange:h=>n(h.target.value),children:x.map(h=>a.jsx("option",{value:h,children:h},h))})]}),a.jsxs("label",{className:"bm-closed-toggle",title:"Show or hide evaluations of closed-source models",children:[a.jsx(Ge,{className:"bm-closed-toggle-switch",checked:!r,onCheckedChange:h=>{s(!h)},"aria-label":"Show closed-source models"}),a.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),a.jsx(lt,{targetRef:i,label:"SOTA chart"})]})]}),a.jsx("div",{className:"bm-chart-wrap",children:a.jsx(Ut,{points:c,metric:d})}),a.jsxs("div",{className:"bm-chart-foot",children:[a.jsx("span",{className:"legend-dot"}),u===void 0?"All models":"Filtered models"," over time · highlighted dots track the running best · hover for the model · click to open the paper"]})]})}function Or(e){if(!e)return null;const t=e.trim(),r=t.match(/^https?:\/\/(?:www\.)?arxiv\.org\/(?:abs|pdf)\/([^/?#]+)/i);if(r!=null&&r[1])return r[1].replace(/\.pdf$/i,"");const s=t.match(/^(?:https?:\/\/(?:www\.)?paperswithcode\.co)?\/paper\/([^/?#]+)/i);return(s==null?void 0:s[1])??null}function Qe(e,t){return e?a.jsx(ce,{title:e}):t||"—"}const ma=()=>{var _e,Se,ke,Ce,Ee,Ne,Re,Pe,Te,Me,$e;const{datasetSlug:e}=mt(),[t,r]=ht(),s=t.get("task")||void 0,n=t.get("eval")||void 0,i=Nt(t.get("max_parameters_exclusive")),{preferences:l,setHideClosedSourceEvals:c}=yt(),d=L.useRef(null),f=L.useRef(!1),x=L.useRef(null),[u,h]=L.useState(null),R=`${e}:${s||""}`,C=u===R,[P,S]=L.useState(1),g=te({queryKey:[...de.dataset(e),"with-paper",s,l.hide_closed_source_evals?"open":"all"],queryFn:()=>re.getDatasetBySlug(e,{include_paper:!0,task:s,is_open:l.hide_closed_source_evals?!0:void 0}),enabled:!!e,staleTime:oe}),k=te({queryKey:ft.byDataset((_e=g.data)==null?void 0:_e.id),queryFn:()=>bt.byDataset(g.data.id),enabled:!!((Se=g.data)!=null&&Se.id),staleTime:5*60*1e3}),B=te({queryKey:[...de.datasetTasks,(ke=g.data)==null?void 0:ke.id],queryFn:()=>re.datasetTasks(g.data.id),enabled:!!((Ce=g.data)!=null&&Ce.id),staleTime:oe}),j=te({queryKey:["metric-directions"],queryFn:()=>re.metricDirections(),staleTime:60*60*1e3}),D=Ye(B.data||[],k.data||[],s,n),W=te({queryKey:[...de.taskBenchmarkTrends,D,l.hide_closed_source_evals?!0:void 0],queryFn:()=>re.trendingBenchmarks(D,{limit:100,min_recent_papers:0,is_open:l.hide_closed_source_evals?!0:void 0}),enabled:!!D&&!!((Ee=g.data)!=null&&Ee.id),staleTime:oe}),w=L.useMemo(()=>{var b;return(((b=W.data)==null?void 0:b.results)||[]).find($=>{var F;return $.id===((F=g.data)==null?void 0:F.id)})||null},[W.data,(Ne=g.data)==null?void 0:Ne.id]),q=te({queryKey:["leaderboard-metrics",(Re=g.data)==null?void 0:Re.id,D],queryFn:()=>re.leaderboardMetrics(g.data.id,D),enabled:!!((Pe=g.data)!=null&&Pe.id)&&!!D,staleTime:oe}),I=Bt({evaluations:k.data||[],tasks:B.data||[],configuredMetrics:q.data||[],directions:j.data,initialSummary:(Te=g.data)==null?void 0:Te.leaderboard_summary,taskSlug:s,highlightEvalId:n,metric:t.get("metric")||void 0,hideClosed:l.hide_closed_source_evals,parameterBound:i,showMoreMetrics:C,fittingMetricCount:P,ready:{evaluations:k.isSuccess,tasks:B.isSuccess,directions:j.isSuccess,metrics:q.isSuccess}}),{primaryTask:N,hiddenClosedEvals:G,hiddenClosedTopEval:z,isSummaryLoading:ee,displayedMetric:O,displayedSota:M,displayedSotaModel:U,isInitialFilteredViewLoading:K,highlightedEval:_,hasParameterMetadata:X,parameterCoverage:Y,orderedMetrics:o}=I;L.useEffect(()=>{if(f.current||!n||!k.data||k.data.length===0)return;const b=d.current;b&&(f.current=!0,b.scrollIntoView({behavior:"smooth",block:"start"}))},[n,k.data]);const m=te({queryKey:de.area(N==null?void 0:N.area_id),queryFn:()=>re.getArea(N.area_id),enabled:!!(N!=null&&N.area_id),staleTime:oe});if(g.isLoading)return a.jsxs("div",{className:"page",children:[a.jsx(ue,{className:"h-12 w-1/2 mb-6"}),a.jsx(ue,{className:"h-64 w-full"})]});if(Ct(g.error))return a.jsx(Et,{});if(g.error||!g.data)return a.jsx("div",{className:"page",children:a.jsx(vt,{variant:"destructive",children:a.jsx(jt,{children:"Benchmark not found."})})});const p=g.data,y=!!p.supports_harness,T=b=>{r($=>{const F=new URLSearchParams($);return b===void 0?F.delete("max_parameters_exclusive"):F.set("max_parameters_exclusive",String(b)),F})},E=b=>{r($=>{const F=new URLSearchParams($);return F.set("metric",b),F})},v=p.introducing_paper??void 0,H=(v==null?void 0:v.arxiv_id)||(v==null?void 0:v.id)||Or(p.paper_url),J=(v==null?void 0:v.title)||p.introducing_paper_title||null,Q=((Me=v==null?void 0:v.published)==null?void 0:Me.slice(0,4))||p.introduced_year||null,ot=!!H||!!p.paper_url||!!J,ct=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-${kt(m.data.name)}`,children:m.data.name})]}),N&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"sep",children:"/"}),a.jsx(ne,{to:`/tasks/${N.slug||N.id}`,children:N.name})]}),a.jsx("span",{className:"sep",children:"/"}),a.jsx("span",{style:{color:"var(--accent-text)"},children:p.name})]}),a.jsxs("div",{className:"bm-title-row",children:[a.jsx("h1",{className:"bm-title",children:p.name}),w&&a.jsxs("div",{className:"bm-title-trend","aria-label":`${p.name} reporting trend`,children:[a.jsx(_t,{history:w.history,benchmarkName:w.name}),a.jsxs("span",{className:"bm-title-trend-summary",children:[a.jsx("strong",{children:w.recent_paper_count})," ",w.recent_paper_count===1?"paper":"papers",w.rate_change==null?w.recent_paper_count>0&&a.jsx("span",{className:"benchmark-trend-change is-new",children:"new"}):a.jsxs("span",{className:`benchmark-trend-change ${w.rate_change>=1?"is-up":"is-down"}`,children:[w.rate_change>=1?"↑":"↓"," ",w.rate_change.toFixed(1),"×"]})]})]})]}),a.jsx(pt,{kind:"benchmark",entityId:p.id}),a.jsxs("div",{className:"bm-subtitle",children:[ee?a.jsx(ue,{className:"h-5 w-64 bm-summary-skeleton","aria-label":"Loading benchmark summary"}):a.jsxs("span",{children:[O&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"metric-tag",children:O}),a.jsx("span",{style:{color:"var(--hairline-strong)",margin:"0 8px"},children:"·"})]}),U?a.jsxs("span",{children:["Best: ",a.jsx("span",{className:"best-name",children:le(M)})," by ",a.jsx("span",{className:"best-name",style:{fontStyle:"normal"},children:U})]}):a.jsxs("span",{children:[I.rows.length," evaluations"]})]}),p.hf_url&&a.jsxs("a",{className:"bm-action-btn",href:p.hf_url,target:"_blank",rel:"noopener noreferrer",children:[a.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),p.description&&a.jsx("p",{className:"bm-description",children:p.description}),l.hide_closed_source_evals&&G.length>0&&a.jsxs("div",{className:"bm-hidden-closed-notice",children:[a.jsxs("span",{children:[G.length," closed-source ",G.length===1?"row is":"rows are"," hidden",z!=null&&z.model_name?a.jsxs(a.Fragment,{children:[", including ",a.jsx("strong",{children:z.model_name})]}):null,"."]}),a.jsx("button",{type:"button",className:"bm-hidden-closed-action",onClick:()=>{c(!1)},children:"Show closed-source"})]}),ot&&a.jsxs("div",{className:"method-source",style:{marginTop:0,marginBottom:18},children:[a.jsx("span",{className:"method-source-label",children:"Source"}),H?a.jsxs(ne,{to:`/paper/${H}`,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[a.jsx("span",{className:"method-source-title",children:J?a.jsx(ce,{title:J}):ct}),Q&&a.jsx("span",{className:"method-source-meta",children:Q})]}):p.paper_url?a.jsxs("a",{href:St(p.paper_url)??void 0,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[a.jsx("span",{className:"method-source-title",children:J?a.jsx(ce,{title:J}):p.paper_url}),Q&&a.jsx("span",{className:"method-source-meta",children:Q})]}):a.jsxs("div",{className:"method-source-link is-static",children:[a.jsx("span",{className:"method-source-title",children:J?a.jsx(ce,{title:J}):null}),Q&&a.jsx("span",{className:"method-source-meta",children:Q})]})]}),a.jsx(Wr,{model:I,datasetName:p.name,hideClosed:l.hide_closed_source_evals,setHideClosed:c,setMetric:E}),_&&(()=>{var Le,Ie;const b=_.paper_arxiv_id||_.paper_id,$=_.paper_title||(_.paper_arxiv_id?`arXiv:${_.paper_arxiv_id}`:null),F=_.best_metric&&((Le=_.metrics)==null?void 0:Le[_.best_metric])!==void 0?_.best_metric:I.activeMetric,Fe=(Ie=_.metrics)==null?void 0:Ie[F];return a.jsxs("div",{className:"bm-highlight-banner",role:"status",children:[a.jsx("span",{className:"bm-highlight-dot","aria-hidden":"true"}),a.jsxs("div",{className:"bm-highlight-text",children:[a.jsx("span",{className:"bm-highlight-label",children:"Comparing result"}),a.jsxs("span",{className:"bm-highlight-paper",children:[_.model_name||$||"—",_.harness?` · ${_.harness}`:""]}),a.jsxs("span",{className:"bm-highlight-meta",children:[Fe!==void 0&&F?a.jsxs(a.Fragment,{children:[F,": ",le(Fe),$?" · ":""]}):null,b?a.jsx(ne,{to:`/paper/${b}`,children:Qe(_.paper_title,$)}):Qe(_.paper_title,$)]})]})]})})(),a.jsxs("div",{className:"bm-card",ref:x,children:[a.jsxs("div",{className:"bm-card-screenshot-header","aria-hidden":"true",children:[a.jsxs("div",{className:"bm-card-screenshot-title",children:[a.jsx("span",{className:"bm-card-screenshot-eyebrow",children:"Benchmark"}),a.jsx("span",{className:"bm-card-screenshot-name",children:p.name})]}),a.jsxs("div",{className:"bm-card-screenshot-brand",children:[a.jsxs("span",{className:"brand",children:[a.jsx("span",{className:"brand-mark"}),a.jsxs("span",{className:"brand-name",children:["Papers ",a.jsx("em",{children:"With Code"})]})]}),a.jsx("span",{className:"bm-card-screenshot-url",children:"paperswithcode.co"})]})]}),a.jsxs("div",{className:"bm-card-head",children:[a.jsx("div",{className:"bm-card-title",children:"Leaderboard"}),a.jsxs("div",{className:"bm-card-actions",children:[I.allowedMetrics.length>1&&a.jsxs("label",{className:"bm-view-select",children:[a.jsx("span",{className:"bm-view-select-label",children:"View"}),a.jsx("select",{value:I.activeMetric,onChange:b=>E(b.target.value),children:o.map(b=>a.jsx("option",{value:b,children:b},b))})]}),a.jsxs("label",{className:"bm-closed-toggle",title:"Show or hide evaluations of closed-source models",children:[a.jsx(Ge,{className:"bm-closed-toggle-switch",checked:!l.hide_closed_source_evals,onCheckedChange:b=>{c(!b)},"aria-label":"Show closed-source models"}),a.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),!K&&!X&&k.isSuccess?a.jsx("span",{className:"bm-parameter-unavailable",children:"Parameter metadata unavailable"}):null,a.jsx(lt,{targetRef:x,label:"leaderboard"})]})]}),!K&&X&&a.jsxs("div",{className:"bm-parameter-filter-bar",children:[a.jsx("span",{className:"bm-parameter-filter-label",children:"Parameters Size"}),a.jsx("div",{className:"bm-parameter-filter-options",role:"group","aria-label":"Filter leaderboard by parameter size",children:I.parameterFilters.map(b=>{const{selected:$,disabled:F}=b;return a.jsx("button",{type:"button",className:`bm-parameter-filter-option${$?" is-active":""}`,"aria-pressed":$,disabled:F,onClick:()=>T(b.maxParametersExclusive),children:b.label},b.label)})}),a.jsxs("span",{className:"bm-parameter-coverage",children:["Parameters known for ",Y.parameter_coverage_known," of ",Y.parameter_coverage_total," entries"]})]}),k.isLoading||K?a.jsx("div",{style:{padding:16},children:Array.from({length:5}).map((b,$)=>a.jsx(ue,{className:"h-10 w-full mb-2"},$))}):I.rows.length===0?i?a.jsxs("div",{className:"no-results",children:["No known parameter counts match this filter. "," ",a.jsx("button",{type:"button",className:"bm-empty-filter-action",onClick:()=>T(void 0),children:"Show all"})]}):a.jsx("div",{className:"no-results",children:"No evaluations submitted yet."}):a.jsxs(a.Fragment,{children:[o.length>P&&a.jsxs("div",{className:"bm-metric-columns-control",children:[a.jsx("button",{type:"button",className:"bm-metric-columns-toggle","aria-expanded":C,"aria-controls":"benchmark-leaderboard",onClick:()=>h(C?null:R),children:C?"Show fewer metrics":`Show more metrics (${o.length-P})`}),C&&a.jsx("span",{children:"Scroll metrics horizontally; model and paper details stay visible."})]}),a.jsx(Wt,{model:I,showHarness:y,setMetric:E,highlightRowRef:d,onFittingMetricCountChange:S})]})]})]})})};export{ma as default};
|
assets/{BenchmarkTrendSparkline-dQdt-ejq.js → BenchmarkTrendSparkline-DRl3gbu-.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{d as C,j as t}from"./index-
|
|
|
|
| 1 |
+
import{d as C,j as t}from"./index-BuF8ktG8.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-C5CxvSnT.js → CatalogEntityPreviewLink-BxpIu72v.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import{s as m,a5 as h,V as d,b as g,j as s,L as f,a3 as k}from"./index-
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
|
|
|
| 1 |
+
import{s as m,a5 as h,V as d,b as g,j as s,L as f,a3 as k}from"./index-BuF8ktG8.js";import{H as w,a as y,b as v}from"./hover-card-yQsLTE4d.js";import{c as l}from"./catalog-QOvavbkR.js";/**
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
assets/{ChatView-BYQGLYvv.js → ChatView-DfNYGQIS.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
var It=Object.defineProperty;var Nt=(t,e,r)=>e in t?It(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var se=(t,e,r)=>Nt(t,typeof e!="symbol"?e+"":e,r);import{s as Dt,d as l,j as s,X as yt,x as bt,b as Re,L as wt,_ as Lt,$ as Ft,a0 as Pt,a1 as nt,V as Oe,g as vt,e as St,q as _t,i as xt,h as Bt,a as Et,u as Ot,A as qt}from"./index-
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
|
|
|
| 1 |
+
var It=Object.defineProperty;var Nt=(t,e,r)=>e in t?It(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var se=(t,e,r)=>Nt(t,typeof e!="symbol"?e+"":e,r);import{s as Dt,d as l,j as s,X as yt,x as bt,b as Re,L as wt,_ as Lt,$ as Ft,a0 as Pt,a1 as nt,V as Oe,g as vt,e as St,q as _t,i as xt,h as Bt,a as Et,u as Ot,A as qt}from"./index-BuF8ktG8.js";import{C as Ut,U as at,b as Ht,f as Ce,A as Wt,a as zt,c as Kt,g as Qt,h as Vt,i as Pe,j as Yt,k as it,t as $t,l as Gt,E as Xt,m as Jt,n as Zt,o as ot}from"./chatLifecycle-D28Ky42L.js";import{g as Ie,h as es,j as Ct,k as ts,T as ss,e as Rt,l as Te,m as We,r as rs,n as ns,o as oe,D as ze,s as as,t as is,v as os,w as cs,x as ls,y as us,z as ds,B as hs,C as ps,E as Xe,F as fs,G as ct,H as jt,I as lt,J as Ke,f as ms,K as gs,L as ys,M as At,N as bs,O as ws,Q as vs,R as Ss,S as _s}from"./chatSessions-B7iq-KqS.js";import{M as xs}from"./McpShowcase-D4TTJi6V.js";import{c as ce}from"./chat-CHBkoU9A.js";import{S as Es}from"./share-2-DwfIgR_P.js";import{u as qe}from"./useMutation-H0Ru2KmC.js";import{u as Cs,O as Rs}from"./openrouter-DmRs8Gyk.js";/* empty css */import"./hover-card-yQsLTE4d.js";import"./CatalogEntityPreviewLink-BxpIu72v.js";import"./catalog-QOvavbkR.js";import"./github-BiawQL9z.js";import"./file-text-C-3F9H6w.js";import"./PaperPreviewLink-rxrEwjIH.js";import"./index-BwrKSI2t.js";import"./index-Duf3Rq7e.js";import"./katex-DkKDou_j.js";import"./papers-DOWhzKgr.js";import"./curation-rx4Y4ai_.js";import"./thumbs-up-DazJcOnS.js";import"./copy-C2OymkVV.js";import"./queryOptions-C9woPjwX.js";import"./arrow-left-DHCUWtMI.js";import"./external-link-nrKLPLKY.js";import"./plus-9o2YwICS.js";import"./search-C8dgBkSf.js";import"./chevron-up-BsnqoNYc.js";import"./AuthorAvatar-CIgdnsA4.js";import"./AgentLogos-BPQPDQNU.js";/**
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
assets/{ConferenceDetailView-BEtffUKD.js → ConferenceDetailView-DfZeI9bC.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{u as y,b as k,d as _,j as e,L as h,T as S}from"./index-
|
|
|
|
| 1 |
+
import{u as y,b as k,d as _,j as e,L as h,T as S}from"./index-BuF8ktG8.js";import{a as f,A as b,b as E}from"./AreaSection-DPzsnyZc.js";import{M as j}from"./MarkdownText-C90Ontxz.js";import{c as A}from"./catalog-QOvavbkR.js";import{i as C}from"./apiErrors-Bu7TuOPW.js";import{s as F}from"./areas-Dvi8w2dp.js";import{c as T,h as L}from"./colors-BkWRhvFI.js";import{C as $}from"./conferenceListings-BnmhBx-_.js";import{f as w}from"./deadlines-BH32v7D1.js";import{d as D}from"./transform-CHck6g-D.js";import{S as P}from"./skeleton-Dp4VcttN.js";import{A as M,a as R}from"./alert-ClESc45e.js";import{s as B}from"./safeExternalHref-CkBrsh84.js";import I from"./NotFound-BiuJcE21.js";/* empty css */import"./PaperPreviewLink-rxrEwjIH.js";import"./index-BwrKSI2t.js";import"./index-Duf3Rq7e.js";import"./katex-DkKDou_j.js";import"./hover-card-yQsLTE4d.js";import"./papers-DOWhzKgr.js";import"./curation-rx4Y4ai_.js";import"./useMutation-H0Ru2KmC.js";const ce=()=>{var g,x;const{confSlug:o}=y(),t=k({queryKey:["conference-areas-with-tasks",o],queryFn:()=>A.conferenceAreasWithTasks(o),enabled:!!o,staleTime:S}),m=_.useMemo(()=>{var a;return F(((a=t.data)==null?void 0:a.results)??[])},[t.data]),s=(g=t.data)==null?void 0:g.conference,d=((x=t.data)==null?void 0:x.total_paper_count)??0,N=$.filter(a=>{var r;return(((r=t.data)==null?void 0:r[a.countKey])??0)>0});if(C(t.error))return e.jsx(I,{});if(t.error)return e.jsx("div",{className:"page",children:e.jsx(M,{variant:"destructive",children:e.jsx(R,{children:"Failed to load conference. Please try again."})})});const p=s?w(s.start_date,s.end_date):null,u=s?[s.venue,s.location].filter(Boolean).join(", "):null,n=s==null?void 0:s.name;return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:s!=null&&s.image_url?"task-hero-grid":void 0,children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:"CONFERENCE"}),e.jsx("h1",{className:"feed-title",children:n??e.jsx(P,{className:"h-10 w-64 inline-block"})}),e.jsxs("div",{className:"feed-subtitle",style:{display:"flex",flexDirection:"column",gap:4},children:[p&&e.jsx("span",{children:p}),u&&e.jsx("span",{children:u}),(s==null?void 0:s.url)&&e.jsx("a",{href:B(s.url)??void 0,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent-text)"},children:s.url.replace(/^https?:\/\//,"")}),(s==null?void 0:s.hf_url)&&e.jsxs("a",{className:"bm-action-btn",href:s.hf_url,target:"_blank",rel:"noopener noreferrer",style:{alignSelf:"flex-start",marginTop:4},children:[e.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),(s==null?void 0:s.description)&&e.jsx(j,{className:"method-description",text:s.description})]}),(s==null?void 0:s.image_url)&&e.jsxs("figure",{className:"task-figure-card",children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:s.image_url,alt:n?`${n} visual`:"Conference visual",onError:a=>{var r,c;(c=(r=a.currentTarget.parentElement)==null?void 0:r.parentElement)==null||c.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",n??"Conference",s.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(j,{className:"task-image-credit",text:s.image_credit})]})]})]})]}),!t.isLoading&&d>0&&e.jsx(f,{title:"Browse papers",description:"All accepted papers, plus oral, spotlight, outstanding, and best paper finalists.",meta:`${d.toLocaleString()} papers`,style:{marginTop:48},children:N.map(a=>{var r;return e.jsxs(h,{to:`/conferences/${o}/${a.slug}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:a.dotColor}}),a.label]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(((r=t.data)==null?void 0:r[a.countKey])??0).toLocaleString()," papers"]})})]},a.slug)})}),t.isLoading?e.jsx(b,{tiles:6,tileClassName:"h-24"}):m.map(a=>{const r=a.tasks;if(r.length===0)return null;const c=r.reduce((i,l)=>i+(l.paper_count||0),0);return e.jsx(f,{title:a.name,description:a.description,meta:`${r.length} ${r.length===1?"task":"tasks"} · ${c.toLocaleString()} papers`,children:r.map(i=>{const l=i.slug||"",v=T(L(l));return e.jsxs(h,{to:`/conferences/${o}/${l}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:v.dot}}),D(i.name,l)]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(i.paper_count??0).toLocaleString()," papers"]})})]},i.id)})},a.id)}),e.jsx(E,{areas:m})]})};export{ce as default};
|
assets/{ConferenceTaskView-BAq9JbyI.js → ConferenceTaskView-ToLG2N24.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{u as S,b as _,p as R,d as C,j as e,L as x,o as M,T as E}from"./index-
|
|
|
|
| 1 |
+
import{u as S,b as _,p as R,d as C,j as e,L as x,o as M,T as E}from"./index-BuF8ktG8.js";import{u as L,b as Q,a as q}from"./PaperFeed-BkUBd-xO.js";import{M as g}from"./MarkdownText-C90Ontxz.js";import{c as F}from"./catalog-QOvavbkR.js";import{p as B}from"./papers-DOWhzKgr.js";import{i as A}from"./apiErrors-Bu7TuOPW.js";import{C as O}from"./conferenceListings-BnmhBx-_.js";import{t as z,d as H}from"./transform-CHck6g-D.js";import{u as I}from"./usePapers-3mHbxOSK.js";import{A as K,a as $}from"./alert-ClESc45e.js";import V from"./NotFound-BiuJcE21.js";import"./PaperCard-C_kRm1Bt.js";import"./AuthorAvatar-CIgdnsA4.js";import"./SotaBadges-BFyAOF4Y.js";import"./colors-BkWRhvFI.js";import"./Icon-aDKp5nB1.js";import"./LatexTitle-CXoQ1Bzq.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-NrNmZ8VR.js";import"./skeleton-Dp4VcttN.js";import"./useIntersectionObserver-Cvgl2pBE.js";/* empty css */import"./PaperPreviewLink-rxrEwjIH.js";import"./index-BwrKSI2t.js";import"./index-Duf3Rq7e.js";import"./katex-DkKDou_j.js";import"./hover-card-yQsLTE4d.js";import"./useMutation-H0Ru2KmC.js";import"./curation-rx4Y4ai_.js";import"./useInfiniteQuery-DnjhR627.js";const D={"iclr-2026/outstanding":"ICLR 2026 recognized two Outstanding Papers and one Honorable Mention. [Read the announcement](https://blog.iclr.cc/2026/04/23/announcing-the-iclr-2026-outstanding-papers/).","icml-2026/outstanding":"ICML 2026 recognized two Outstanding Papers and five Honorable Mentions. [Read the announcement](https://blog.icml.cc/2026/07/05/announcing-the-icml-2026-awards/).","cvpr-2026/best-paper-finalists":"CVPR 2026 recognized fifteen Best Paper Award finalists, including the winners. [Read the announcement](https://x.com/CVPR/status/2062912519522717978)."},Pe=()=>{var b,y,v,P,k,w;const{confSlug:t,taskSlug:n}=S(),p=L(),a=O.find(r=>r.slug===n),u=!!(a!=null&&a.award),i=_({queryKey:["conference",t],queryFn:()=>F.getConference(t),enabled:!!t,staleTime:E}),c=_({queryKey:M.task(n),queryFn:()=>F.getTask(n),enabled:!!n&&!a,staleTime:E}),l=I([...R.feeds.conference,t,n,p.filters],r=>B.forConference(t,{...p.filters,task:a?void 0:n,presentation:a==null?void 0:a.presentation,page:r,page_size:12}),{enabled:!!t}),f=C.useMemo(()=>{var r;return((r=l.data)==null?void 0:r.pages.flatMap(o=>o.results))??[]},[l.data]),h=C.useMemo(()=>f.map(z),[f]),d=(a==null?void 0:a.label)??H(((b=c.data)==null?void 0:b.name)||n||"",((y=c.data)==null?void 0:y.slug)||n),j=D[`${t}/${n}`],N=((P=(v=l.data)==null?void 0:v.pages[0])==null?void 0:P.count)??((k=i.data)==null?void 0:k.paper_count)??0,s=c.data;return A(i.error)||A(c.error)?e.jsx(V,{}):i.error||c.error||l.error?e.jsx("div",{className:"page",children:e.jsx(K,{variant:"destructive",children:e.jsx($,{children:"Failed to load conference papers. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(x,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(x,{to:"/conferences",children:"Conferences"}),e.jsx("span",{children:" / "}),e.jsx(x,{to:`/conferences/${t}`,children:((w=i.data)==null?void 0:w.name)??t}),e.jsx("span",{children:" / "}),e.jsx("span",{children:d})]}),e.jsxs("div",{className:!a&&(s!=null&&s.image_url)?"task-hero-grid":void 0,style:{marginTop:16,marginBottom:28},children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:a?"BROWSE PAPERS":"TASK"}),e.jsx("h1",{className:"domain-mega-title",children:d}),j&&e.jsx(g,{className:"task-explainer",text:j}),!a&&(s==null?void 0:s.description)&&e.jsx(g,{className:"task-explainer",text:s.description}),i.data&&e.jsxs("div",{className:"task-quickstats",style:{marginTop:12},children:[e.jsxs("span",{children:[e.jsx("span",{className:"num",children:N.toLocaleString()}),"PAPERS"]}),e.jsx("span",{children:i.data.name})]})]}),!a&&(s==null?void 0:s.image_url)&&e.jsxs("figure",{className:"task-figure-card",children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:s.image_url,alt:`${d} schematic`,onError:r=>{var o,m;(m=(o=r.currentTarget.parentElement)==null?void 0:o.parentElement)==null||m.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",d,s.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(g,{className:"task-image-credit",text:s.image_credit})]})]})]})]}),e.jsxs("div",{className:"task-section-head",children:[e.jsx("div",{className:"task-section-eyebrow",children:u?"Award papers":"Conference papers · sort below"}),e.jsxs("div",{className:"task-section-title",children:["Papers ",e.jsxs("span",{className:"meta",children:["[",N.toLocaleString(),"]"]})]})]}),e.jsx(Q,{feed:p,sorts:u?null:void 0,children:!u&&e.jsxs("div",{className:"results-count",children:[h.length," loaded in ",e.jsx("span",{children:d})]})}),e.jsx(q,{query:l,cards:h,empty:"No papers found for this selection.",cardHeader:r=>{var T;const o=(T=f[r])==null?void 0:T.conference_award,m=o==="outstanding"?"Outstanding Paper":o==="honorable_mention"?"Honorable Mention":o==="best_paper_finalist"&&(a==null?void 0:a.presentation)!=="best_paper_finalist"?"Best Paper Finalist":null;return m&&e.jsx("div",{className:"conference-award-label",children:m})}})]})};export{Pe as default};
|
assets/{ConferencesIndexView-CYTn_PTx.js → ConferencesIndexView-DnzCKyxg.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{b as d,d as m,j as e,L as c,T as p}from"./index-
|
|
|
|
| 1 |
+
import{b as d,d as m,j as e,L as c,T as p}from"./index-BuF8ktG8.js";import{c as u}from"./catalog-QOvavbkR.js";import{f}from"./deadlines-BH32v7D1.js";import{A as h,a as x}from"./alert-ClESc45e.js";import{A as g,a as j}from"./AreaSection-DPzsnyZc.js";import{T as N}from"./TaxonomySuggestionTile-DHRiovjc.js";import"./skeleton-Dp4VcttN.js";import"./SignInToEditDialog-CejkAYkt.js";import"./button-kiAIp5NU.js";import"./input-CApr9J-O.js";import"./textarea-D-LxcCMY.js";import"./searchable-select-BgxTwWoR.js";import"./popover-NrNmZ8VR.js";import"./dialog-B5pjhpY5.js";import"./search-C8dgBkSf.js";import"./loader-circle-DUEYvkt2.js";import"./useMutation-H0Ru2KmC.js";import"./submissions-DCMnKq0E.js";import"./plus-9o2YwICS.js";const v=r=>{var t;if(r.year!=null)return r.year;if(r.start_date)return Number(r.start_date.slice(0,4));const a=(t=r.slug.match(/-(\d{4})$/))==null?void 0:t[1];return a?Number(a):0},_=(r,a)=>{if(r.start_date&&a.start_date){const t=r.start_date.localeCompare(a.start_date);if(t!==0)return t}else{if(r.start_date)return-1;if(a.start_date)return 1}return r.name.localeCompare(a.name)},Q=()=>{const r=d({queryKey:["conferences"],queryFn:()=>u.conferences(),staleTime:p}),a=m.useMemo(()=>{var i;if(!((i=r.data)!=null&&i.results))return null;const t={};return r.data.results.forEach(n=>{const s=v(n);(t[s]||(t[s]=[])).push(n)}),Object.values(t).forEach(n=>n.sort(_)),Object.keys(t).map(Number).sort((n,s)=>s-n).map(n=>({year:n,conferences:t[n]}))},[r.data]);return r.error?e.jsx("div",{className:"page",children:e.jsx(h,{variant:"destructive",children:e.jsx(x,{children:"Failed to load conferences. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["All ",e.jsx("em",{children:"Conferences"})]}),e.jsx("div",{className:"feed-subtitle",children:"Browse accepted papers from major AI conferences, grouped by research area and task."}),e.jsxs("div",{className:"conference-deadlines-link",children:["Find deadlines for upcoming conferences"," ",e.jsx(c,{to:"/ai-deadlines",className:"underline underline-offset-2 hover:text-foreground",children:"here"}),". Conference information is based on"," ",e.jsx("a",{href:"https://huggingface.co/ai-conferences",target:"_blank",rel:"noreferrer",className:"underline underline-offset-2 hover:text-foreground",children:"Hugging Face AI Conferences"}),"."]})]})}),r.isLoading?e.jsx(g,{sections:2,tiles:3,tileClassName:"h-32"}):a==null?void 0:a.map(({year:t,conferences:i})=>{const n=i.reduce((s,o)=>s+(o.paper_count??0),0);return e.jsxs(j,{title:t>0?String(t):"Unknown year",meta:`${i.length} ${i.length===1?"conference":"conferences"} · ${n.toLocaleString()} papers`,children:[i.map(s=>{const o=f(s.start_date,s.end_date),l=[s.venue,s.location].filter(Boolean).join(", ");return e.jsxs(c,{to:`/conferences/${s.slug}`,className:"tag-cell",children:[e.jsx("div",{className:"name",children:s.name}),e.jsxs("div",{className:"meta",style:{display:"flex",flexDirection:"column",gap:4},children:[o&&e.jsx("span",{children:o}),l&&e.jsx("span",{children:l}),e.jsxs("span",{children:[(s.paper_count??0).toLocaleString()," papers"]})]})]},s.id)}),e.jsx(N,{kind:"conference"})]},t)})]})};export{Q as default};
|
assets/{CronDashboard-BrJey03Y.js → CronDashboard-Dy6JF0vV.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import{s as O,d as h,N as is,B as cs,j as e,z as ie,af as ls,R as ds,O as os,E as oe,P as ms,G as us,Q as Ae,I as L,b as G,J as $,i as xe,A as Re,L as pe,a as hs,q as xs}from"./index-
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
|
|
|
| 1 |
+
import{s as O,d as h,N as is,B as cs,j as e,z as ie,af as ls,R as ds,O as os,E as oe,P as ms,G as us,Q as Ae,I as L,b as G,J as $,i as xe,A as Re,L as pe,a as hs,q as xs}from"./index-BuF8ktG8.js";import{u as P}from"./useMutation-H0Ru2KmC.js";import{t as ge,f as v,a as S,S as Te,o as ue,C as g,b as N,c as b,d as F,e as j,g as C}from"./CronDashboard-OYygS5RT.js";import{B as D}from"./badge-DGbLiWuK.js";import{B as y}from"./button-kiAIp5NU.js";import{C as ps,a as gs}from"./chevron-up-BsnqoNYc.js";import{D as fe}from"./database-CiHYBZ78.js";import{T as js}from"./trending-up-D3iZwzv1.js";import{A as ne}from"./activity-CKvEBdtE.js";import{F as Ne}from"./file-text-C-3F9H6w.js";import{T as Ee,I as vs}from"./triangle-alert-DPdYilt1.js";import{E as Y}from"./external-link-nrKLPLKY.js";import{C as Z,R as be}from"./refresh-cw-BZ4anXLY.js";import{L as R}from"./loader-circle-DUEYvkt2.js";import{C as je}from"./circle-check-Dpxm4egN.js";import{c as M,A as _s}from"./codex-CUfU5Z6o.js";import{u as fs}from"./useInfiniteQuery-DnjhR627.js";import{p as Me}from"./paperEdits-wCAl1e4-.js";import{c as me}from"./catalog-QOvavbkR.js";import{c as ye}from"./chat-CHBkoU9A.js";/**
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
assets/{CronDashboard-CgnzKY0g.js → CronDashboard-OYygS5RT.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import{s as c,d as a,j as r,I as n,ac as u}from"./index-
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
|
|
|
| 1 |
+
import{s as c,d as a,j as r,I as n,ac as u}from"./index-BuF8ktG8.js";/**
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
assets/{ExternalSourceEvalBadge-CMfiSNvf.js → ExternalSourceEvalBadge-xcz_QKFV.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{p as o}from"./curation-
|
|
|
|
| 1 |
+
import{p as o}from"./curation-rx4Y4ai_.js";import{ac as g,j as a,L as l}from"./index-BuF8ktG8.js";import{H as u,a as c,b as d}from"./hover-card-yQsLTE4d.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-wNAf1UnM.js → FeedView-6f9XH-U-.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{j as e,L as F,a as _e,c as Ce,b as H,r as ie,d as h,h as Ee,C as Fe,T as Q,e as je,f as Le,g as Ae,p as se,i as De,k as Re,l as re,m as ve,n as Me,o as qe}from"./index-CHGpuh10.js";import{S as Ie}from"./sparkles-BSDHUYSH.js";import{D as Oe,a as He,b as $e}from"./dialog-BfI2DQVf.js";import{c as J}from"./catalog-DMzmJg__.js";import{u as Ne,a as Se,b as ke,T as me,s as ze,c as Ke,r as ee,d as ge,e as fe,f as Be}from"./researchTopic-DK_KbYKH.js";import{d as le,t as Ue}from"./transform-Cs8_lTDx.js";import{P as Ge}from"./plus-CYgr1KdS.js";import{A as Qe}from"./arrow-right-CUTKRnAt.js";import{r as We,P as Xe,w as Ye,a as Ze}from"./PaperFeed-DjmnPHUi.js";import{M as Ve}from"./McpShowcase-D5BEHBL4.js";import{u as Je,a as es,P as ss,i as ts,A as as,b as os,S as $,c as ns,D as te,q as is,d as rs}from"./chatSessions-BuiIkSLS.js";import{c as ls}from"./chat-CuiFt2kN.js";import{u as cs}from"./usePapers-DzyOc-Ae.js";import{p as xe}from"./papers-BPpxs2sO.js";import{S as ae}from"./skeleton-Df0GaMuw.js";import{A as oe,a as ne}from"./alert-DPvmCXZT.js";import"./useMutation-3fOqWcpt.js";import"./PaperCard-BtCEa6CD.js";import"./AuthorAvatar-fJxhX3fO.js";import"./SotaBadges-D825CK6n.js";import"./colors-BkWRhvFI.js";import"./Icon-CRWrVPWO.js";import"./LatexTitle-CfeEppH3.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-BHpRw7vT.js";import"./useIntersectionObserver-DZSpsOQX.js";import"./AgentLogos-PqR86_NK.js";import"./useInfiniteQuery-DhWyWKGj.js";import"./curation-DI9_zYNx.js";function ds({onBuild:r}){return e.jsxs("section",{className:"following-intro","aria-labelledby":"following-intro-title",children:[e.jsx("h2",{id:"following-intro-title",children:"Build your personal research feed"}),e.jsx("p",{className:"following-intro-lead",children:"Describe a topic in your own words, or follow the tasks, benchmarks, authors, and organizations you care about, and this page collects their latest papers and results in one place."}),r&&e.jsxs("button",{type:"button",className:"research-topic-save following-intro-topic",onClick:r,children:[e.jsx(Ie,{"aria-hidden":"true"}),"Build your feed"]}),e.jsxs("p",{className:"following-intro-note",children:["Matching papers also arrive as a weekly email, which you can turn off in"," ",e.jsx(F,{to:"/settings",children:"Settings"}),"."]})]})}const we=16;function us({open:r,onOpenChange:o}){return e.jsx(Oe,{open:r,onOpenChange:o,children:e.jsx(He,{className:"topic-dialog","aria-describedby":void 0,children:e.jsx(ps,{onDone:()=>o(!1)})})})}function ps({onDone:r}){var W,X,Y,Z,O,z,B;const{user:o}=_e(),m=Ce(),l=H({queryKey:ie.topic(o==null?void 0:o.hf_subject),queryFn:ee.topic,enabled:!!o}),t=Ne(),w=H({queryKey:["trending-tasks-follow"],queryFn:()=>J.trendingTasks({limit:we,level:0}),staleTime:Q}),y=H({queryKey:["trending-methods-follow"],queryFn:()=>J.trendingMethods({limit:we}),staleTime:Q}),c=H({queryKey:["research-follow-suggestions"],queryFn:ee.followSuggestions,staleTime:Q}),j=(i=[])=>i.map(p=>({id:String(p.entity_id),name:p.name,image:p.image_url})),[S,L]=h.useState(null),[P,v]=h.useState([]),_=Se(),M=ke(),b=((W=l.data)==null?void 0:W.text)??"",n=S??b,d=n.trim().replace(/\s+/g," "),C=((X=l.data)==null?void 0:X.status)==="failed"&&d===b,A=d.length>=3&&(d!==b||C),D=_.isPending||M.isPending,a=(i,p)=>{var N;return((N=t.data)==null?void 0:N.some(k=>k.kind===i&&String(k.entity_id)===p))??!1},g=(i,p)=>{var N;return((N=P.find(k=>k.kind===i&&k.id===p))==null?void 0:N.follow)??a(i,p)},f=P.filter(i=>i.follow!==a(i.kind,i.id)),E=!D&&(A||f.length>0),R=(i,p,N)=>v(k=>[...k.filter(U=>U.kind!==i||U.id!==p),{kind:i,id:p,name:N,follow:!g(i,p)}]),q=()=>{if(!E)return;if(!o){A&&ze(d),f.length&&Ke(f),window.location.href=Ee(`${m.pathname}${m.search}`);return}const i=[...f.length?[M.mutateAsync(f)]:[],...A?[_.mutateAsync(d)]:[]];Promise.allSettled(i).then(p=>{p.every(N=>N.status==="fulfilled")&&r()})},I=(i,p,N,k)=>{const V=[...(t.data??[]).filter(x=>x.kind===p).map(x=>({id:String(x.entity_id),name:x.name,slug:x.url.split("/").pop(),image:x.image_url})),...N.filter(x=>!a(p,x.id)).map(x=>({...x,suggested:!0}))];return V.length>0&&e.jsxs("div",{className:"topic-dialog-group",children:[e.jsx("h3",{children:i}),e.jsxs(hs,{children:[V.map(x=>{const G=g(p,x.id),K=p==="task"?le(x.name,x.slug??void 0):x.name;return e.jsxs("button",{type:"button",className:"topic-dialog-chip","aria-pressed":G,disabled:D,"data-suggested":"suggested"in x||void 0,onClick:()=>R(p,x.id,K),children:[G?e.jsx(Fe,{"aria-hidden":"true"}):e.jsx(Ge,{"aria-hidden":"true"}),(p==="author"||p==="organization")&&e.jsx(ms,{kind:p,name:K,src:x.image}),K]},x.id)}),k&&e.jsxs(F,{to:k.to,className:"topic-dialog-browse",children:[k.label,e.jsx(Qe,{"aria-hidden":"true"})]})]})]})};return e.jsxs("form",{className:"topic-dialog-form",onSubmit:i=>{i.preventDefault(),q()},children:[e.jsx($e,{className:"topic-dialog-title",children:b||(Y=t.data)!=null&&Y.length?"Edit your research feed":"Build your research feed"}),e.jsxs("div",{className:"topic-dialog-group",children:[e.jsx("h3",{children:e.jsx("label",{htmlFor:"topic-dialog-input",children:"Describe a topic in your own words"})}),e.jsx("p",{className:"topic-dialog-hint",children:"A model reads every new paper and adds the ones that match to your Following feed."}),e.jsx("textarea",{id:"topic-dialog-input",className:"research-topic-input",rows:4,maxLength:me,"aria-label":"Research topic",placeholder:"e.g. diffusion policies for robot manipulation, or speculative decoding for LLM inference",value:n,onChange:i=>L(i.target.value),onKeyDown:i=>{i.key==="Enter"&&!i.shiftKey&&!i.nativeEvent.isComposing&&(i.preventDefault(),q())}}),e.jsxs("span",{className:"research-topic-count",children:[n.length,"/",me]})]}),I("Trending tasks","task",((Z=w.data)==null?void 0:Z.results)??[],{to:"/tasks",label:"Browse tasks"}),I("Trending methods","method",((O=y.data)==null?void 0:O.results)??[],{to:"/methods",label:"Browse methods"}),I("Benchmarks","benchmark",[],{to:"/tasks",label:"Browse benchmarks"}),I("Popular authors","author",j((z=c.data)==null?void 0:z.authors)),I("Popular organizations","organization",j((B=c.data)==null?void 0:B.organizations),{to:"/organizations",label:"Browse organizations"}),(_.error||M.error)&&e.jsx("p",{className:"settings-token-error",role:"alert",children:"Could not save your feed. Please try again."}),e.jsxs("div",{className:"topic-dialog-actions",children:[b&&e.jsx("button",{type:"button",className:"research-follow-action topic-dialog-remove",disabled:D,onClick:()=>_.mutate(null,{onSuccess:r}),children:"Remove topic"}),e.jsx("button",{type:"button",className:"research-follow-action",disabled:D,onClick:r,children:"Cancel"}),e.jsx("button",{type:"submit",className:"research-topic-save",disabled:!E,children:f.some(i=>i.follow===!1)?"Save":f.length?"Follow":C?"Retry":b?"Update topic":"Follow"})]})]})}function hs({children:r}){const o=h.useRef(null);return h.useLayoutEffect(()=>{const m=o.current;if(!m)return;const l=()=>{const t=[...m.children],w=t.filter(c=>c.dataset.suggested);w.forEach(c=>{c.hidden=!1});const y=()=>new Set(t.filter(c=>!c.hidden).map(c=>c.offsetTop)).size;for(let c=w.length-1;c>=0&&y()>2;c--)w[c].hidden=!0};return l(),window.addEventListener("resize",l),()=>window.removeEventListener("resize",l)}),e.jsx("div",{ref:o,className:"topic-dialog-chips",children:r})}function ms({kind:r,name:o,src:m}){const[l,t]=h.useState(!1);if(m&&!l)return e.jsx("img",{className:`topic-dialog-chip-image is-${r}`,src:m,alt:"",loading:"lazy",onError:()=>t(!0)});if(r!=="author")return null;const w=o.split(/\s+/).filter(Boolean).map(y=>y[0]).slice(0,2).join("").toUpperCase();return e.jsx("span",{className:"topic-dialog-chip-image is-author is-initials","aria-hidden":"true",children:w})}const be=45,gs=1800,fs=25,xs=350,ws=r=>{const[o,m]=h.useState($[0].slice(0,1)),[l,t]=h.useState(0);return h.useEffect(()=>{var L,P;if(!r)return;if((P=(L=window.matchMedia)==null?void 0:L.call(window,"(prefers-reduced-motion: reduce)"))!=null&&P.matches){m($[0]),t(0);return}let w=0,y=1,c=!1,j;m($[0].slice(0,y)),t(0);const S=()=>{const v=$[w];if(!c){if(y+=1,m(v.slice(0,y)),y===v.length){c=!0,j=window.setTimeout(S,gs);return}j=window.setTimeout(S,be);return}if(y-=1,m(v.slice(0,y)),y===0){c=!1,w=(w+1)%$.length,t(w),j=window.setTimeout(S,xs);return}j=window.setTimeout(S,fs)};return j=window.setTimeout(S,be),()=>window.clearTimeout(j)},[r]),{placeholder:o,prompt:$[l]}},bs=()=>{var D;const r=je(),o=ve(),[m,l]=h.useState({text:"",paperMentions:[]}),t=m.text,[w,y]=h.useState(0),[c,j]=h.useState(!1),[S,L]=h.useState(null),{placeholder:P,prompt:v}=ws(!t),_=h.useRef(null),M=H({queryKey:["chatAvailability"],queryFn:()=>ls.getAvailability(),retry:!1,enabled:re()}),b=re()&&((D=M.data)==null?void 0:D.paper_mentions_enabled)!==!1,n=Je({draft:m,onChange:l,enabled:b,textareaRef:_}),d=es(m,n.open),C=t?d.completion:v;h.useLayoutEffect(()=>{const a=_.current;if(!a)return;const g=()=>{if(a.style.height="auto",t){a.style.height=`${Math.min(ns(a),160)}px`;return}const f=a.placeholder,E=$.reduce((R,q)=>(a.placeholder=q,Math.max(R,a.scrollHeight)),0);a.placeholder=f,a.style.height=`${Math.min(E,160)}px`};return g(),window.addEventListener("resize",g),()=>window.removeEventListener("resize",g)},[t,C]);const A=async(a=m)=>{const g=a.text.trim();if(!(!g||c)){if(o){const f=new URLSearchParams({q:g,model:te}),E=`${Me}?${f}`,R=window.open(E,"_blank");if(!R){L(E);return}R.opener=null,L(null),l({text:"",paperMentions:[]});return}j(!0),is(a,te);try{const f=await rs(te);r(`/chat/${f.id}`)}catch{r("/chat")}}};return e.jsxs(e.Fragment,{children:[!o&&e.jsx("div",{className:"ask-home-new",children:"Hint: type @ to bring papers into context, or press Tab to use a suggestion"}),e.jsxs("div",{className:"ask-home",children:[e.jsxs("div",{className:"ask-home-row",children:[e.jsxs("div",{className:"ask-home-textarea-wrap",children:[e.jsx(ss,{text:m.text,mentions:m.paperMentions,scrollTop:w,variant:"home",completion:t?C:""}),e.jsx("textarea",{ref:_,rows:1,value:t,placeholder:P,"aria-label":"Ask the assistant",disabled:c,onChange:a=>{n.updateText(a.target.value,a.target.selectionStart),d.trackCaret(a.target)},onSelect:a=>{n.refresh(a.currentTarget.selectionStart),d.trackCaret(a.currentTarget)},onClick:a=>{n.refresh(a.currentTarget.selectionStart),d.trackCaret(a.currentTarget)},onScroll:a=>y(a.currentTarget.scrollTop),onBlur:a=>{var g,f;(f=(g=a.relatedTarget)==null?void 0:g.closest)!=null&&f.call(g,".chat-paper-picker")||window.setTimeout(n.close,0)},onKeyDown:a=>{if(!n.keyDown(a)){if(ts(a)&&C){a.preventDefault();const g=t+C;n.updateText(g,g.length),window.requestAnimationFrame(()=>{var f;return(f=_.current)==null?void 0:f.setSelectionRange(g.length,g.length)});return}a.key==="Enter"&&!a.shiftKey&&(a.preventDefault(),A())}},role:b?"combobox":void 0,"aria-expanded":b?n.open:void 0,"aria-controls":n.open?n.pickerId:void 0,"aria-activedescendant":n.open&&n.results.length?`${n.optionIdPrefix}-${n.activeIndex}`:void 0,"aria-autocomplete":b?"list":void 0,"aria-describedby":n.message?"ask-home-paper-mention-message":void 0})]}),e.jsx("button",{type:"button",className:`chat-send${t.trim()?" chat-send-on":""}`,onClick:()=>void A(),disabled:!t.trim()||c,"aria-label":"Ask the assistant",children:e.jsx(as,{})})]}),S&&e.jsx("div",{className:"chat-paper-mention-message",role:"alert",children:e.jsx("a",{href:S,target:"_blank",rel:"noreferrer",children:"Open this question on paperswithcode.co"})}),n.message&&e.jsx("div",{id:"ask-home-paper-mention-message",className:"chat-paper-mention-message",role:"alert",children:n.message}),e.jsx(os,{open:n.open,query:n.query,results:n.results,activeIndex:n.activeIndex,loading:n.loading,error:n.error,onSelect:n.select,id:n.pickerId,optionIdPrefix:n.optionIdPrefix})]})]})},Te={task:"Tasks",method:"Methods",benchmark:"Benchmarks",author:"Authors",organization:"Orgs"},ys=Object.keys(Te),js=30,ye=40,vs=async r=>{const o=await r;return{results:o.results.map(m=>({paper:m})),next_page:o.next_page}},Ns=({mode:r})=>{var G,K,ce,de,ue,pe,he;const o=r==="following",m=je(),l=Le(),t=l==null?void 0:l.user,[w,y]=Ae(),c=We(w,void 0,r==="trending"?"week":"month"),j=s=>{const u=new URLSearchParams(w);u.delete("order_by"),u.delete("only");const T=u.toString();m(T?`${s}?${T}`:s)},S=s=>{const u=new URLSearchParams(w);s?u.set("only","topic"):u.delete("only");const T=u.toString();return T?`/following?${T}`:"/following"},L=H({queryKey:qe.topTasksSidebar,queryFn:()=>J.topTasks(8),staleTime:Q}),P=H({queryKey:["trending-tasks-sidebar"],queryFn:()=>J.trendingTasks({limit:8,level:0}),staleTime:Q}),v=o&&w.get("only")==="topic",_={start_date:c.startDate,end_date:c.endDate},M={...c,topicOnly:v},b=cs(o?[...se.feeds.following,t==null?void 0:t.hf_subject,M]:[...r==="x"?se.feeds.xTrending:se.feeds.trending,_],async s=>{if(o){const T=await ee.following(s,M),Pe=T.length===ye?s+ye:null;return{results:T,next_page:Pe}}const u={..._,page:s,page_size:js,include_resources:!0};return vs(r==="x"?xe.xTrending(u):xe.list({...u,order_by:"trending",order_dir:"desc",latest_only:!0}))},{enabled:!o||!!t,initialPage:o?0:1}),n=Ne(o),d=H({queryKey:ie.topic(t==null?void 0:t.hf_subject),queryFn:ee.topic,enabled:o&&!!t,refetchInterval:s=>s.state.data&&["pending","running"].includes(s.state.data.status)?1e4:!1}),C=!!d.data&&["pending","running"].includes(d.data.status),A=d.data?d.data.label??d.data.text:"",[D,a]=h.useState(!1),g=De(),f=h.useRef(!1);h.useEffect(()=>{f.current&&!C&&g.invalidateQueries({queryKey:ie.feed(t==null?void 0:t.hf_subject)}),f.current=C},[C,g,t==null?void 0:t.hf_subject]);const E=o&&!!t&&((G=n.data)==null?void 0:G.length)===0&&d.isSuccess&&!d.data,R=o&&!(l!=null&&l.isLoading)&&!t||E,q=!!t||!Re(),[I,W]=h.useState(!1),[X]=h.useState(()=>!!ge()||fe().length>0),[Y,Z]=h.useState(!1);!I&&(d.data||(K=n.data)!=null&&K.length)&&W(!0),R&&!Y&&(Z(!0),q&&!I&&!X&&a(!0));const O=Se(),{mutate:z}=O,B=h.useRef(!1);h.useEffect(()=>{var u;const s=ge();!t||!d.isSuccess||!s||B.current||(B.current=!0,s===((u=d.data)==null?void 0:u.text)?Be():z(s))},[t,d.isSuccess,d.data,z]);const i=ke(),{mutate:p}=i,N=h.useRef(!1);h.useEffect(()=>{const s=fe();!t||!s.length||N.current||(N.current=!0,p(s))},[t,p]);const k=h.useMemo(()=>ys.map(s=>{var u;return{kind:s,follows:o?((u=n.data)==null?void 0:u.filter(T=>T.kind===s))??[]:[]}}).filter(s=>s.follows.length>0),[o,n.data]),U=o&&(!!(l!=null&&l.isLoading)||!!t&&!E),V=h.useMemo(()=>{var s;return((s=b.data)==null?void 0:s.pages.flatMap(u=>u.results.map(T=>({...Ue(T.paper),followReasons:T.reasons}))))??[]},[b.data]),x=b.error;return e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Trending ",e.jsx("em",{children:"Research"})]}),e.jsx("div",{className:"feed-subtitle",children:r==="x"?"Papers people share most on X, picked daily":"Curated daily from arXiv and Hugging Face"})]})}),e.jsxs("div",{className:"layout-with-sidebar",children:[e.jsxs("aside",{className:"sidebar feed-sidebar",children:[U?e.jsxs("div",{className:"sidebar-section sidebar-section-follows",children:[e.jsx("div",{className:"sidebar-label",children:"You follow"}),((l==null?void 0:l.isLoading)||n.isLoading)&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:4}).map((s,u)=>e.jsx(ae,{className:"h-5 w-full"},u))}),n.isError&&e.jsx("div",{style:{fontSize:12,color:"var(--ink-faint)"},children:"Couldn't load your follows."}),e.jsxs("div",{className:"sidebar-links",children:[d.data&&e.jsxs("div",{className:`sidebar-follow-topic ${v?"active":""}`,children:[e.jsxs(F,{to:S(!v),className:"sidebar-link sidebar-follow-link",title:v?"Show papers from everything you follow":`Show only papers about “${d.data.text}”`,"aria-current":v?"true":void 0,children:[e.jsx("span",{className:"sidebar-follow-kind",children:"Topic"}),e.jsx("span",{className:"sidebar-follow-name",children:A})]}),e.jsx("button",{type:"button",className:"sidebar-follow-edit","aria-label":"Edit topic","aria-expanded":D,onClick:()=>a(!0),children:"edit"})]}),k.map(s=>e.jsxs("div",{className:"sidebar-follow-group",children:[e.jsx("span",{className:"sidebar-follow-kind",children:Te[s.kind]}),s.follows.map(u=>e.jsx(F,{to:u.url,className:"sidebar-link sidebar-follow-link",children:e.jsx("span",{className:"sidebar-follow-name",children:u.name})},u.entity_id))]},s.kind))]}),e.jsx(F,{to:"/settings",className:"sidebar-follow-manage",children:"Manage in Settings"})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"sidebar-section sidebar-section-top-domains",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),L.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,u)=>e.jsx(ae,{className:"h-5 w-full"},u))}),e.jsxs("div",{className:"sidebar-links",children:[(ce=L.data)==null?void 0:ce.map(s=>e.jsxs(F,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[le(s.name,s.slug),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count})]},s.id)),e.jsx(F,{to:"/tasks",className:"sidebar-link sidebar-link-more",children:"all domains →"})]})]}),e.jsxs("div",{className:"sidebar-section sidebar-section-trending-domains",children:[e.jsx("div",{className:"sidebar-label",children:"Trending Domains"}),P.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,u)=>e.jsx(ae,{className:"h-5 w-full"},u))}),((ue=(de=P.data)==null?void 0:de.results)==null?void 0:ue.length)===0&&!P.isLoading&&e.jsx("div",{style:{fontSize:12,color:"var(--ink-faint)"},children:"No domains gaining momentum right now."}),e.jsx("div",{className:"sidebar-links",children:(he=(pe=P.data)==null?void 0:pe.results)==null?void 0:he.map(s=>e.jsxs(F,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[le(s.name,s.slug),e.jsxs("span",{className:"count",children:[s.share_lift.toFixed(1),"x"]})]},s.id))})]})]}),e.jsx(Ve,{})]}),e.jsxs("div",{className:"feed-main",children:[(re()||ve())&&e.jsx("div",{className:"feed-chat",children:e.jsx(bs,{})}),e.jsxs("div",{className:"feed-content",children:[e.jsxs("div",{className:"sort-bar home-feed-sort-bar",children:[e.jsx("div",{className:"paper-feed-toolbar-controls",children:e.jsxs("div",{className:"sort-options",children:[e.jsx("button",{className:`sort-btn ${r==="trending"?"active":""}`,onClick:()=>j("/"),children:"trending"}),e.jsx("button",{className:`sort-btn ${r==="x"?"active":""}`,onClick:()=>j("/x-trending"),children:"trending (X)"}),e.jsx("button",{className:`sort-btn ${o?"active":""}`,onClick:()=>j("/following"),children:"following"})]})}),e.jsx(Xe,{startDate:c.startDate,endDate:c.endDate,onChange:s=>y(Ye(w,s))})]}),x&&e.jsx(oe,{variant:"destructive",className:"mb-4",children:e.jsxs(ne,{children:["Failed to load papers. ",e.jsx("button",{type:"button",onClick:()=>void b.refetch(),children:"Try again"})]})}),O.isError&&O.variables&&e.jsx(oe,{variant:"destructive",className:"mb-4",children:e.jsxs(ne,{children:["Could not follow “",O.variables,"”. ",e.jsx("button",{type:"button",onClick:()=>z(O.variables),children:"Try again"})]})}),i.isError&&i.variables&&e.jsx(oe,{variant:"destructive",className:"mb-4",children:e.jsxs(ne,{children:["Could not follow ",i.variables.map(s=>s.name).join(", "),". ",e.jsx("button",{type:"button",onClick:()=>p(i.variables),children:"Try again"})]})}),o&&!!t&&d.isSuccess&&!n.isPending&&!E&&(d.data?C?e.jsxs("div",{className:"following-topic-note",role:"status",children:["Showing the closest papers about “",A,"” now. A model is reading papers to refine these matches, which takes a few minutes."]}):null:e.jsxs("div",{className:"following-topic-note",role:"status",children:["Describe a topic in your own words, and a model adds matching new papers to this feed."," ",e.jsx("button",{type:"button",className:"link-button",onClick:()=>a(!0),children:"Follow a topic"})]})),o&&q&&e.jsx(us,{open:D,onOpenChange:a}),v&&d.data&&e.jsxs("div",{className:"following-topic-note following-topic-filter",role:"status",children:["Showing only papers about “",A,"”."," ",e.jsx(F,{to:S(!1),children:"Show everything you follow"})]}),R?e.jsx(ds,{onBuild:q?()=>a(!0):void 0}):e.jsx(Ze,{query:b,isLoading:b.isLoading||o&&!!(l!=null&&l.isLoading),cards:V,skeleton:"card",rootMargin:"400px",empty:x?null:v?e.jsxs(e.Fragment,{children:["No papers about your topic match these filters. Widen the date range or ",e.jsx("button",{type:"button",className:"link-button",onClick:()=>a(!0),children:"edit your topic"}),"."]}):o?e.jsxs(e.Fragment,{children:["No papers from your topic or follows match these filters. Widen the date range, or follow more from ",e.jsx(F,{to:"/tasks",children:"tasks"}),", ",e.jsx(F,{to:"/methods",children:"methods"}),", benchmark, author, or organization pages."]}):r==="x"?"No papers shared on X in this window.":"No papers in this window."})]})]})]})]})},Js=({xTrending:r=!1})=>e.jsx(Ns,{mode:r?"x":"trending"});export{bs as AskAssistant,Ns as HomeFeed,Js as default};
|
|
|
|
| 1 |
+
import{j as e,L as F,a as _e,c as Ce,b as H,r as ie,d as h,h as Ee,C as Fe,T as Q,e as je,f as Le,g as Ae,p as se,i as De,k as Re,l as re,m as ve,n as Me,o as qe}from"./index-BuF8ktG8.js";import{S as Ie}from"./sparkles-CTLVCcnK.js";import{D as Oe,a as He,b as $e}from"./dialog-B5pjhpY5.js";import{c as J}from"./catalog-QOvavbkR.js";import{u as Ne,a as Se,b as ke,T as me,s as ze,c as Ke,r as ee,d as ge,e as fe,f as Be}from"./researchTopic-Cz5Cn_RO.js";import{d as le,t as Ue}from"./transform-CHck6g-D.js";import{P as Ge}from"./plus-9o2YwICS.js";import{A as Qe}from"./arrow-right-RMviEElY.js";import{r as We,P as Xe,w as Ye,a as Ze}from"./PaperFeed-BkUBd-xO.js";import{M as Ve}from"./McpShowcase-D4TTJi6V.js";import{u as Je,a as es,P as ss,i as ts,A as as,b as os,S as $,c as ns,D as te,q as is,d as rs}from"./chatSessions-B7iq-KqS.js";import{c as ls}from"./chat-CHBkoU9A.js";import{u as cs}from"./usePapers-3mHbxOSK.js";import{p as xe}from"./papers-DOWhzKgr.js";import{S as ae}from"./skeleton-Dp4VcttN.js";import{A as oe,a as ne}from"./alert-ClESc45e.js";import"./useMutation-H0Ru2KmC.js";import"./PaperCard-C_kRm1Bt.js";import"./AuthorAvatar-CIgdnsA4.js";import"./SotaBadges-BFyAOF4Y.js";import"./colors-BkWRhvFI.js";import"./Icon-aDKp5nB1.js";import"./LatexTitle-CXoQ1Bzq.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-NrNmZ8VR.js";import"./useIntersectionObserver-Cvgl2pBE.js";import"./AgentLogos-BPQPDQNU.js";import"./useInfiniteQuery-DnjhR627.js";import"./curation-rx4Y4ai_.js";function ds({onBuild:r}){return e.jsxs("section",{className:"following-intro","aria-labelledby":"following-intro-title",children:[e.jsx("h2",{id:"following-intro-title",children:"Build your personal research feed"}),e.jsx("p",{className:"following-intro-lead",children:"Describe a topic in your own words, or follow the tasks, benchmarks, authors, and organizations you care about, and this page collects their latest papers and results in one place."}),r&&e.jsxs("button",{type:"button",className:"research-topic-save following-intro-topic",onClick:r,children:[e.jsx(Ie,{"aria-hidden":"true"}),"Build your feed"]}),e.jsxs("p",{className:"following-intro-note",children:["Matching papers also arrive as a weekly email, which you can turn off in"," ",e.jsx(F,{to:"/settings",children:"Settings"}),"."]})]})}const we=16;function us({open:r,onOpenChange:o}){return e.jsx(Oe,{open:r,onOpenChange:o,children:e.jsx(He,{className:"topic-dialog","aria-describedby":void 0,children:e.jsx(ps,{onDone:()=>o(!1)})})})}function ps({onDone:r}){var W,X,Y,Z,O,z,B;const{user:o}=_e(),m=Ce(),l=H({queryKey:ie.topic(o==null?void 0:o.hf_subject),queryFn:ee.topic,enabled:!!o}),t=Ne(),w=H({queryKey:["trending-tasks-follow"],queryFn:()=>J.trendingTasks({limit:we,level:0}),staleTime:Q}),y=H({queryKey:["trending-methods-follow"],queryFn:()=>J.trendingMethods({limit:we}),staleTime:Q}),c=H({queryKey:["research-follow-suggestions"],queryFn:ee.followSuggestions,staleTime:Q}),j=(i=[])=>i.map(p=>({id:String(p.entity_id),name:p.name,image:p.image_url})),[S,L]=h.useState(null),[P,v]=h.useState([]),_=Se(),M=ke(),b=((W=l.data)==null?void 0:W.text)??"",n=S??b,d=n.trim().replace(/\s+/g," "),C=((X=l.data)==null?void 0:X.status)==="failed"&&d===b,A=d.length>=3&&(d!==b||C),D=_.isPending||M.isPending,a=(i,p)=>{var N;return((N=t.data)==null?void 0:N.some(k=>k.kind===i&&String(k.entity_id)===p))??!1},g=(i,p)=>{var N;return((N=P.find(k=>k.kind===i&&k.id===p))==null?void 0:N.follow)??a(i,p)},f=P.filter(i=>i.follow!==a(i.kind,i.id)),E=!D&&(A||f.length>0),R=(i,p,N)=>v(k=>[...k.filter(U=>U.kind!==i||U.id!==p),{kind:i,id:p,name:N,follow:!g(i,p)}]),q=()=>{if(!E)return;if(!o){A&&ze(d),f.length&&Ke(f),window.location.href=Ee(`${m.pathname}${m.search}`);return}const i=[...f.length?[M.mutateAsync(f)]:[],...A?[_.mutateAsync(d)]:[]];Promise.allSettled(i).then(p=>{p.every(N=>N.status==="fulfilled")&&r()})},I=(i,p,N,k)=>{const V=[...(t.data??[]).filter(x=>x.kind===p).map(x=>({id:String(x.entity_id),name:x.name,slug:x.url.split("/").pop(),image:x.image_url})),...N.filter(x=>!a(p,x.id)).map(x=>({...x,suggested:!0}))];return V.length>0&&e.jsxs("div",{className:"topic-dialog-group",children:[e.jsx("h3",{children:i}),e.jsxs(hs,{children:[V.map(x=>{const G=g(p,x.id),K=p==="task"?le(x.name,x.slug??void 0):x.name;return e.jsxs("button",{type:"button",className:"topic-dialog-chip","aria-pressed":G,disabled:D,"data-suggested":"suggested"in x||void 0,onClick:()=>R(p,x.id,K),children:[G?e.jsx(Fe,{"aria-hidden":"true"}):e.jsx(Ge,{"aria-hidden":"true"}),(p==="author"||p==="organization")&&e.jsx(ms,{kind:p,name:K,src:x.image}),K]},x.id)}),k&&e.jsxs(F,{to:k.to,className:"topic-dialog-browse",children:[k.label,e.jsx(Qe,{"aria-hidden":"true"})]})]})]})};return e.jsxs("form",{className:"topic-dialog-form",onSubmit:i=>{i.preventDefault(),q()},children:[e.jsx($e,{className:"topic-dialog-title",children:b||(Y=t.data)!=null&&Y.length?"Edit your research feed":"Build your research feed"}),e.jsxs("div",{className:"topic-dialog-group",children:[e.jsx("h3",{children:e.jsx("label",{htmlFor:"topic-dialog-input",children:"Describe a topic in your own words"})}),e.jsx("p",{className:"topic-dialog-hint",children:"A model reads every new paper and adds the ones that match to your Following feed."}),e.jsx("textarea",{id:"topic-dialog-input",className:"research-topic-input",rows:4,maxLength:me,"aria-label":"Research topic",placeholder:"e.g. diffusion policies for robot manipulation, or speculative decoding for LLM inference",value:n,onChange:i=>L(i.target.value),onKeyDown:i=>{i.key==="Enter"&&!i.shiftKey&&!i.nativeEvent.isComposing&&(i.preventDefault(),q())}}),e.jsxs("span",{className:"research-topic-count",children:[n.length,"/",me]})]}),I("Trending tasks","task",((Z=w.data)==null?void 0:Z.results)??[],{to:"/tasks",label:"Browse tasks"}),I("Trending methods","method",((O=y.data)==null?void 0:O.results)??[],{to:"/methods",label:"Browse methods"}),I("Benchmarks","benchmark",[],{to:"/tasks",label:"Browse benchmarks"}),I("Popular authors","author",j((z=c.data)==null?void 0:z.authors)),I("Popular organizations","organization",j((B=c.data)==null?void 0:B.organizations),{to:"/organizations",label:"Browse organizations"}),(_.error||M.error)&&e.jsx("p",{className:"settings-token-error",role:"alert",children:"Could not save your feed. Please try again."}),e.jsxs("div",{className:"topic-dialog-actions",children:[b&&e.jsx("button",{type:"button",className:"research-follow-action topic-dialog-remove",disabled:D,onClick:()=>_.mutate(null,{onSuccess:r}),children:"Remove topic"}),e.jsx("button",{type:"button",className:"research-follow-action",disabled:D,onClick:r,children:"Cancel"}),e.jsx("button",{type:"submit",className:"research-topic-save",disabled:!E,children:f.some(i=>i.follow===!1)?"Save":f.length?"Follow":C?"Retry":b?"Update topic":"Follow"})]})]})}function hs({children:r}){const o=h.useRef(null);return h.useLayoutEffect(()=>{const m=o.current;if(!m)return;const l=()=>{const t=[...m.children],w=t.filter(c=>c.dataset.suggested);w.forEach(c=>{c.hidden=!1});const y=()=>new Set(t.filter(c=>!c.hidden).map(c=>c.offsetTop)).size;for(let c=w.length-1;c>=0&&y()>2;c--)w[c].hidden=!0};return l(),window.addEventListener("resize",l),()=>window.removeEventListener("resize",l)}),e.jsx("div",{ref:o,className:"topic-dialog-chips",children:r})}function ms({kind:r,name:o,src:m}){const[l,t]=h.useState(!1);if(m&&!l)return e.jsx("img",{className:`topic-dialog-chip-image is-${r}`,src:m,alt:"",loading:"lazy",onError:()=>t(!0)});if(r!=="author")return null;const w=o.split(/\s+/).filter(Boolean).map(y=>y[0]).slice(0,2).join("").toUpperCase();return e.jsx("span",{className:"topic-dialog-chip-image is-author is-initials","aria-hidden":"true",children:w})}const be=45,gs=1800,fs=25,xs=350,ws=r=>{const[o,m]=h.useState($[0].slice(0,1)),[l,t]=h.useState(0);return h.useEffect(()=>{var L,P;if(!r)return;if((P=(L=window.matchMedia)==null?void 0:L.call(window,"(prefers-reduced-motion: reduce)"))!=null&&P.matches){m($[0]),t(0);return}let w=0,y=1,c=!1,j;m($[0].slice(0,y)),t(0);const S=()=>{const v=$[w];if(!c){if(y+=1,m(v.slice(0,y)),y===v.length){c=!0,j=window.setTimeout(S,gs);return}j=window.setTimeout(S,be);return}if(y-=1,m(v.slice(0,y)),y===0){c=!1,w=(w+1)%$.length,t(w),j=window.setTimeout(S,xs);return}j=window.setTimeout(S,fs)};return j=window.setTimeout(S,be),()=>window.clearTimeout(j)},[r]),{placeholder:o,prompt:$[l]}},bs=()=>{var D;const r=je(),o=ve(),[m,l]=h.useState({text:"",paperMentions:[]}),t=m.text,[w,y]=h.useState(0),[c,j]=h.useState(!1),[S,L]=h.useState(null),{placeholder:P,prompt:v}=ws(!t),_=h.useRef(null),M=H({queryKey:["chatAvailability"],queryFn:()=>ls.getAvailability(),retry:!1,enabled:re()}),b=re()&&((D=M.data)==null?void 0:D.paper_mentions_enabled)!==!1,n=Je({draft:m,onChange:l,enabled:b,textareaRef:_}),d=es(m,n.open),C=t?d.completion:v;h.useLayoutEffect(()=>{const a=_.current;if(!a)return;const g=()=>{if(a.style.height="auto",t){a.style.height=`${Math.min(ns(a),160)}px`;return}const f=a.placeholder,E=$.reduce((R,q)=>(a.placeholder=q,Math.max(R,a.scrollHeight)),0);a.placeholder=f,a.style.height=`${Math.min(E,160)}px`};return g(),window.addEventListener("resize",g),()=>window.removeEventListener("resize",g)},[t,C]);const A=async(a=m)=>{const g=a.text.trim();if(!(!g||c)){if(o){const f=new URLSearchParams({q:g,model:te}),E=`${Me}?${f}`,R=window.open(E,"_blank");if(!R){L(E);return}R.opener=null,L(null),l({text:"",paperMentions:[]});return}j(!0),is(a,te);try{const f=await rs(te);r(`/chat/${f.id}`)}catch{r("/chat")}}};return e.jsxs(e.Fragment,{children:[!o&&e.jsx("div",{className:"ask-home-new",children:"Hint: type @ to bring papers into context, or press Tab to use a suggestion"}),e.jsxs("div",{className:"ask-home",children:[e.jsxs("div",{className:"ask-home-row",children:[e.jsxs("div",{className:"ask-home-textarea-wrap",children:[e.jsx(ss,{text:m.text,mentions:m.paperMentions,scrollTop:w,variant:"home",completion:t?C:""}),e.jsx("textarea",{ref:_,rows:1,value:t,placeholder:P,"aria-label":"Ask the assistant",disabled:c,onChange:a=>{n.updateText(a.target.value,a.target.selectionStart),d.trackCaret(a.target)},onSelect:a=>{n.refresh(a.currentTarget.selectionStart),d.trackCaret(a.currentTarget)},onClick:a=>{n.refresh(a.currentTarget.selectionStart),d.trackCaret(a.currentTarget)},onScroll:a=>y(a.currentTarget.scrollTop),onBlur:a=>{var g,f;(f=(g=a.relatedTarget)==null?void 0:g.closest)!=null&&f.call(g,".chat-paper-picker")||window.setTimeout(n.close,0)},onKeyDown:a=>{if(!n.keyDown(a)){if(ts(a)&&C){a.preventDefault();const g=t+C;n.updateText(g,g.length),window.requestAnimationFrame(()=>{var f;return(f=_.current)==null?void 0:f.setSelectionRange(g.length,g.length)});return}a.key==="Enter"&&!a.shiftKey&&(a.preventDefault(),A())}},role:b?"combobox":void 0,"aria-expanded":b?n.open:void 0,"aria-controls":n.open?n.pickerId:void 0,"aria-activedescendant":n.open&&n.results.length?`${n.optionIdPrefix}-${n.activeIndex}`:void 0,"aria-autocomplete":b?"list":void 0,"aria-describedby":n.message?"ask-home-paper-mention-message":void 0})]}),e.jsx("button",{type:"button",className:`chat-send${t.trim()?" chat-send-on":""}`,onClick:()=>void A(),disabled:!t.trim()||c,"aria-label":"Ask the assistant",children:e.jsx(as,{})})]}),S&&e.jsx("div",{className:"chat-paper-mention-message",role:"alert",children:e.jsx("a",{href:S,target:"_blank",rel:"noreferrer",children:"Open this question on paperswithcode.co"})}),n.message&&e.jsx("div",{id:"ask-home-paper-mention-message",className:"chat-paper-mention-message",role:"alert",children:n.message}),e.jsx(os,{open:n.open,query:n.query,results:n.results,activeIndex:n.activeIndex,loading:n.loading,error:n.error,onSelect:n.select,id:n.pickerId,optionIdPrefix:n.optionIdPrefix})]})]})},Te={task:"Tasks",method:"Methods",benchmark:"Benchmarks",author:"Authors",organization:"Orgs"},ys=Object.keys(Te),js=30,ye=40,vs=async r=>{const o=await r;return{results:o.results.map(m=>({paper:m})),next_page:o.next_page}},Ns=({mode:r})=>{var G,K,ce,de,ue,pe,he;const o=r==="following",m=je(),l=Le(),t=l==null?void 0:l.user,[w,y]=Ae(),c=We(w,void 0,r==="trending"?"week":"month"),j=s=>{const u=new URLSearchParams(w);u.delete("order_by"),u.delete("only");const T=u.toString();m(T?`${s}?${T}`:s)},S=s=>{const u=new URLSearchParams(w);s?u.set("only","topic"):u.delete("only");const T=u.toString();return T?`/following?${T}`:"/following"},L=H({queryKey:qe.topTasksSidebar,queryFn:()=>J.topTasks(8),staleTime:Q}),P=H({queryKey:["trending-tasks-sidebar"],queryFn:()=>J.trendingTasks({limit:8,level:0}),staleTime:Q}),v=o&&w.get("only")==="topic",_={start_date:c.startDate,end_date:c.endDate},M={...c,topicOnly:v},b=cs(o?[...se.feeds.following,t==null?void 0:t.hf_subject,M]:[...r==="x"?se.feeds.xTrending:se.feeds.trending,_],async s=>{if(o){const T=await ee.following(s,M),Pe=T.length===ye?s+ye:null;return{results:T,next_page:Pe}}const u={..._,page:s,page_size:js,include_resources:!0};return vs(r==="x"?xe.xTrending(u):xe.list({...u,order_by:"trending",order_dir:"desc",latest_only:!0}))},{enabled:!o||!!t,initialPage:o?0:1}),n=Ne(o),d=H({queryKey:ie.topic(t==null?void 0:t.hf_subject),queryFn:ee.topic,enabled:o&&!!t,refetchInterval:s=>s.state.data&&["pending","running"].includes(s.state.data.status)?1e4:!1}),C=!!d.data&&["pending","running"].includes(d.data.status),A=d.data?d.data.label??d.data.text:"",[D,a]=h.useState(!1),g=De(),f=h.useRef(!1);h.useEffect(()=>{f.current&&!C&&g.invalidateQueries({queryKey:ie.feed(t==null?void 0:t.hf_subject)}),f.current=C},[C,g,t==null?void 0:t.hf_subject]);const E=o&&!!t&&((G=n.data)==null?void 0:G.length)===0&&d.isSuccess&&!d.data,R=o&&!(l!=null&&l.isLoading)&&!t||E,q=!!t||!Re(),[I,W]=h.useState(!1),[X]=h.useState(()=>!!ge()||fe().length>0),[Y,Z]=h.useState(!1);!I&&(d.data||(K=n.data)!=null&&K.length)&&W(!0),R&&!Y&&(Z(!0),q&&!I&&!X&&a(!0));const O=Se(),{mutate:z}=O,B=h.useRef(!1);h.useEffect(()=>{var u;const s=ge();!t||!d.isSuccess||!s||B.current||(B.current=!0,s===((u=d.data)==null?void 0:u.text)?Be():z(s))},[t,d.isSuccess,d.data,z]);const i=ke(),{mutate:p}=i,N=h.useRef(!1);h.useEffect(()=>{const s=fe();!t||!s.length||N.current||(N.current=!0,p(s))},[t,p]);const k=h.useMemo(()=>ys.map(s=>{var u;return{kind:s,follows:o?((u=n.data)==null?void 0:u.filter(T=>T.kind===s))??[]:[]}}).filter(s=>s.follows.length>0),[o,n.data]),U=o&&(!!(l!=null&&l.isLoading)||!!t&&!E),V=h.useMemo(()=>{var s;return((s=b.data)==null?void 0:s.pages.flatMap(u=>u.results.map(T=>({...Ue(T.paper),followReasons:T.reasons}))))??[]},[b.data]),x=b.error;return e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Trending ",e.jsx("em",{children:"Research"})]}),e.jsx("div",{className:"feed-subtitle",children:r==="x"?"Papers people share most on X, picked daily":"Curated daily from arXiv and Hugging Face"})]})}),e.jsxs("div",{className:"layout-with-sidebar",children:[e.jsxs("aside",{className:"sidebar feed-sidebar",children:[U?e.jsxs("div",{className:"sidebar-section sidebar-section-follows",children:[e.jsx("div",{className:"sidebar-label",children:"You follow"}),((l==null?void 0:l.isLoading)||n.isLoading)&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:4}).map((s,u)=>e.jsx(ae,{className:"h-5 w-full"},u))}),n.isError&&e.jsx("div",{style:{fontSize:12,color:"var(--ink-faint)"},children:"Couldn't load your follows."}),e.jsxs("div",{className:"sidebar-links",children:[d.data&&e.jsxs("div",{className:`sidebar-follow-topic ${v?"active":""}`,children:[e.jsxs(F,{to:S(!v),className:"sidebar-link sidebar-follow-link",title:v?"Show papers from everything you follow":`Show only papers about “${d.data.text}”`,"aria-current":v?"true":void 0,children:[e.jsx("span",{className:"sidebar-follow-kind",children:"Topic"}),e.jsx("span",{className:"sidebar-follow-name",children:A})]}),e.jsx("button",{type:"button",className:"sidebar-follow-edit","aria-label":"Edit topic","aria-expanded":D,onClick:()=>a(!0),children:"edit"})]}),k.map(s=>e.jsxs("div",{className:"sidebar-follow-group",children:[e.jsx("span",{className:"sidebar-follow-kind",children:Te[s.kind]}),s.follows.map(u=>e.jsx(F,{to:u.url,className:"sidebar-link sidebar-follow-link",children:e.jsx("span",{className:"sidebar-follow-name",children:u.name})},u.entity_id))]},s.kind))]}),e.jsx(F,{to:"/settings",className:"sidebar-follow-manage",children:"Manage in Settings"})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"sidebar-section sidebar-section-top-domains",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),L.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,u)=>e.jsx(ae,{className:"h-5 w-full"},u))}),e.jsxs("div",{className:"sidebar-links",children:[(ce=L.data)==null?void 0:ce.map(s=>e.jsxs(F,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[le(s.name,s.slug),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count})]},s.id)),e.jsx(F,{to:"/tasks",className:"sidebar-link sidebar-link-more",children:"all domains →"})]})]}),e.jsxs("div",{className:"sidebar-section sidebar-section-trending-domains",children:[e.jsx("div",{className:"sidebar-label",children:"Trending Domains"}),P.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,u)=>e.jsx(ae,{className:"h-5 w-full"},u))}),((ue=(de=P.data)==null?void 0:de.results)==null?void 0:ue.length)===0&&!P.isLoading&&e.jsx("div",{style:{fontSize:12,color:"var(--ink-faint)"},children:"No domains gaining momentum right now."}),e.jsx("div",{className:"sidebar-links",children:(he=(pe=P.data)==null?void 0:pe.results)==null?void 0:he.map(s=>e.jsxs(F,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[le(s.name,s.slug),e.jsxs("span",{className:"count",children:[s.share_lift.toFixed(1),"x"]})]},s.id))})]})]}),e.jsx(Ve,{})]}),e.jsxs("div",{className:"feed-main",children:[(re()||ve())&&e.jsx("div",{className:"feed-chat",children:e.jsx(bs,{})}),e.jsxs("div",{className:"feed-content",children:[e.jsxs("div",{className:"sort-bar home-feed-sort-bar",children:[e.jsx("div",{className:"paper-feed-toolbar-controls",children:e.jsxs("div",{className:"sort-options",children:[e.jsx("button",{className:`sort-btn ${r==="trending"?"active":""}`,onClick:()=>j("/"),children:"trending"}),e.jsx("button",{className:`sort-btn ${r==="x"?"active":""}`,onClick:()=>j("/x-trending"),children:"trending (X)"}),e.jsx("button",{className:`sort-btn ${o?"active":""}`,onClick:()=>j("/following"),children:"following"})]})}),e.jsx(Xe,{startDate:c.startDate,endDate:c.endDate,onChange:s=>y(Ye(w,s))})]}),x&&e.jsx(oe,{variant:"destructive",className:"mb-4",children:e.jsxs(ne,{children:["Failed to load papers. ",e.jsx("button",{type:"button",onClick:()=>void b.refetch(),children:"Try again"})]})}),O.isError&&O.variables&&e.jsx(oe,{variant:"destructive",className:"mb-4",children:e.jsxs(ne,{children:["Could not follow “",O.variables,"”. ",e.jsx("button",{type:"button",onClick:()=>z(O.variables),children:"Try again"})]})}),i.isError&&i.variables&&e.jsx(oe,{variant:"destructive",className:"mb-4",children:e.jsxs(ne,{children:["Could not follow ",i.variables.map(s=>s.name).join(", "),". ",e.jsx("button",{type:"button",onClick:()=>p(i.variables),children:"Try again"})]})}),o&&!!t&&d.isSuccess&&!n.isPending&&!E&&(d.data?C?e.jsxs("div",{className:"following-topic-note",role:"status",children:["Showing the closest papers about “",A,"” now. A model is reading papers to refine these matches, which takes a few minutes."]}):null:e.jsxs("div",{className:"following-topic-note",role:"status",children:["Describe a topic in your own words, and a model adds matching new papers to this feed."," ",e.jsx("button",{type:"button",className:"link-button",onClick:()=>a(!0),children:"Follow a topic"})]})),o&&q&&e.jsx(us,{open:D,onOpenChange:a}),v&&d.data&&e.jsxs("div",{className:"following-topic-note following-topic-filter",role:"status",children:["Showing only papers about “",A,"”."," ",e.jsx(F,{to:S(!1),children:"Show everything you follow"})]}),R?e.jsx(ds,{onBuild:q?()=>a(!0):void 0}):e.jsx(Ze,{query:b,isLoading:b.isLoading||o&&!!(l!=null&&l.isLoading),cards:V,skeleton:"card",rootMargin:"400px",empty:x?null:v?e.jsxs(e.Fragment,{children:["No papers about your topic match these filters. Widen the date range or ",e.jsx("button",{type:"button",className:"link-button",onClick:()=>a(!0),children:"edit your topic"}),"."]}):o?e.jsxs(e.Fragment,{children:["No papers from your topic or follows match these filters. Widen the date range, or follow more from ",e.jsx(F,{to:"/tasks",children:"tasks"}),", ",e.jsx(F,{to:"/methods",children:"methods"}),", benchmark, author, or organization pages."]}):r==="x"?"No papers shared on X in this window.":"No papers in this window."})]})]})]})]})},Js=({xTrending:r=!1})=>e.jsx(Ns,{mode:r?"x":"trending"});export{bs as AskAssistant,Ns as HomeFeed,Js as default};
|
assets/FollowingView-CDE0hOj_.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{j as o}from"./index-BuF8ktG8.js";import{HomeFeed as r}from"./FeedView-6f9XH-U-.js";import"./sparkles-CTLVCcnK.js";import"./dialog-B5pjhpY5.js";import"./catalog-QOvavbkR.js";import"./researchTopic-Cz5Cn_RO.js";import"./useMutation-H0Ru2KmC.js";import"./transform-CHck6g-D.js";import"./plus-9o2YwICS.js";import"./arrow-right-RMviEElY.js";import"./PaperFeed-BkUBd-xO.js";import"./PaperCard-C_kRm1Bt.js";import"./AuthorAvatar-CIgdnsA4.js";import"./SotaBadges-BFyAOF4Y.js";import"./colors-BkWRhvFI.js";import"./Icon-aDKp5nB1.js";import"./LatexTitle-CXoQ1Bzq.js";import"./papers-DOWhzKgr.js";import"./curation-rx4Y4ai_.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-NrNmZ8VR.js";import"./skeleton-Dp4VcttN.js";import"./useIntersectionObserver-Cvgl2pBE.js";import"./McpShowcase-D4TTJi6V.js";import"./AgentLogos-BPQPDQNU.js";import"./chatSessions-B7iq-KqS.js";import"./chat-CHBkoU9A.js";import"./usePapers-3mHbxOSK.js";import"./useInfiniteQuery-DnjhR627.js";import"./alert-ClESc45e.js";function B(){return o.jsx(r,{mode:"following"})}export{B as default};
|
assets/FollowingView-e1HW5vmf.js
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
import{j as o}from"./index-CHGpuh10.js";import{HomeFeed as r}from"./FeedView-wNAf1UnM.js";import"./sparkles-BSDHUYSH.js";import"./dialog-BfI2DQVf.js";import"./catalog-DMzmJg__.js";import"./researchTopic-DK_KbYKH.js";import"./useMutation-3fOqWcpt.js";import"./transform-Cs8_lTDx.js";import"./plus-CYgr1KdS.js";import"./arrow-right-CUTKRnAt.js";import"./PaperFeed-DjmnPHUi.js";import"./PaperCard-BtCEa6CD.js";import"./AuthorAvatar-fJxhX3fO.js";import"./SotaBadges-D825CK6n.js";import"./colors-BkWRhvFI.js";import"./Icon-CRWrVPWO.js";import"./LatexTitle-CfeEppH3.js";import"./papers-BPpxs2sO.js";import"./curation-DI9_zYNx.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-BHpRw7vT.js";import"./skeleton-Df0GaMuw.js";import"./useIntersectionObserver-DZSpsOQX.js";import"./McpShowcase-D5BEHBL4.js";import"./AgentLogos-PqR86_NK.js";import"./chatSessions-BuiIkSLS.js";import"./chat-CuiFt2kN.js";import"./usePapers-DzyOc-Ae.js";import"./useInfiniteQuery-DhWyWKGj.js";import"./alert-DPvmCXZT.js";function B(){return o.jsx(r,{mode:"following"})}export{B as default};
|
|
|
|
|
|
assets/{FrameworksIndexView-D3oe8htL.js → FrameworksIndexView-B3GB1NaJ.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{e as d,j as e,L as c,b as m,V as h}from"./index-
|
|
|
|
| 1 |
+
import{e as d,j as e,L as c,b as m,V as h}from"./index-BuF8ktG8.js";import{I as p}from"./Icon-aDKp5nB1.js";import{c as u}from"./catalog-QOvavbkR.js";import{c as g,h as x}from"./colors-BkWRhvFI.js";import{P as f}from"./frameworks-DDA0P4Tf.js";const j={fontFamily:"var(--mono)",fontSize:13,fontWeight:600,letterSpacing:"0.04em",textTransform:"uppercase",color:"var(--ink)",marginBottom:6},k=({platform:s})=>{const n=g(x(s));return e.jsx("span",{className:"framework-platform-chip",style:{background:n.bg,color:n.text},children:f[s]})},_=({framework:s})=>{const n=d(),t=`/papers?framework=${encodeURIComponent(s.slug)}`;return e.jsxs("article",{id:`framework-${s.slug}`,className:"framework-card framework-card-clickable",role:"link",tabIndex:0,"aria-label":`View papers implemented by ${s.name}`,onClick:a=>{a.target.closest("a, button")||n(t)},onKeyDown:a=>{a.target===a.currentTarget&&(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),n(t))},children:[e.jsxs("div",{className:"framework-card-head",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"framework-card-name",children:s.name}),s.organization_name&&e.jsx("div",{className:"framework-card-org",children:s.organization_name})]}),s.platforms&&s.platforms.length>0&&e.jsx("div",{className:"framework-platform-row",children:s.platforms.map(a=>e.jsx(k,{platform:a},a))})]}),e.jsx("p",{className:"framework-card-desc",children:s.description}),s.when_to_use&&e.jsxs("div",{className:"framework-card-when",children:[e.jsx("span",{className:"framework-card-when-label",children:"When to use"}),s.when_to_use]}),(s.github_url||s.docs_url||s.introducing_paper_arxiv_id)&&e.jsxs("div",{className:"framework-card-links",children:[s.introducing_paper_arxiv_id&&e.jsx(c,{to:`/paper/${s.introducing_paper_arxiv_id}`,className:"framework-link",children:"Introducing paper"}),s.github_url&&s.paper_count>0&&e.jsxs(c,{to:t,className:"framework-link",children:["Implements ",s.paper_count," ",s.paper_count===1?"paper":"papers"]}),s.github_url&&s.paper_count===0&&e.jsx("span",{className:"framework-link framework-link-disabled","aria-disabled":"true",children:"Implements 0 papers"}),s.github_url&&e.jsxs("a",{href:s.github_url,target:"_blank",rel:"noopener noreferrer",className:"framework-link",children:[e.jsx(p,{name:"github",size:13}),"GitHub"]}),s.docs_url&&s.docs_url!==s.github_url&&e.jsx("a",{href:s.docs_url,target:"_blank",rel:"noopener noreferrer",className:"framework-link",children:"Docs"})]})]})},I=()=>{var a;const s=m({queryKey:["framework-catalog"],queryFn:()=>u.frameworkCatalog()}),n=((a=s.data)==null?void 0:a.domains)??[],t=n.reduce((i,r)=>i+r.categories.reduce((l,o)=>l+o.frameworks.length,0),0);return h.useEffect(()=>{var r;const i=window.location.hash.slice(1);i&&((r=document.getElementById(i))==null||r.scrollIntoView())},[s.data]),e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["AI ",e.jsx("em",{children:"Frameworks"})]}),e.jsx("div",{className:"feed-subtitle",children:"Curated libraries and tools to run, serve, and train models — pick the right stack for your hardware and workload."})]})}),s.isLoading&&e.jsx("div",{className:"empty",children:"Loading frameworks…"}),s.isError&&e.jsx("div",{className:"empty",children:"Could not load frameworks."}),n.map(i=>e.jsxs("section",{style:{marginBottom:56},children:[e.jsxs("div",{className:"area-section-head",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"area-section-title",children:i.name}),e.jsx("div",{className:"area-section-description",children:i.description})]}),e.jsxs("div",{className:"area-section-meta",children:[i.categories.length," ",i.categories.length===1?"category":"categories"," ·"," ",i.categories.reduce((r,l)=>r+l.frameworks.length,0)," frameworks"]})]}),i.categories.map(r=>e.jsxs("div",{className:"framework-category",children:[e.jsxs("div",{className:"framework-category-head",children:[e.jsxs("div",{children:[e.jsx("h3",{style:j,children:r.name}),r.description&&e.jsx("p",{className:"framework-category-blurb",children:r.description}),r.guide_url&&e.jsxs("a",{href:r.guide_url,target:"_blank",rel:"noopener noreferrer",className:"framework-guide-link",children:[r.guide_label??"Read guide"," →"]})]}),e.jsxs("div",{className:"framework-category-meta",children:[r.frameworks.length," ",r.frameworks.length===1?"framework":"frameworks"]})]}),e.jsx("div",{className:"framework-grid",children:r.frameworks.map(l=>e.jsx(_,{framework:l},l.slug))})]},r.slug))]},i.slug)),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:8},children:[t," frameworks across ",n.length," ",n.length===1?"domain":"domains",". More areas coming soon."]})]})};export{_ as FrameworkCard,I as default};
|
assets/{Icon-CRWrVPWO.js → Icon-aDKp5nB1.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{j as o}from"./index-
|
|
|
|
| 1 |
+
import{j as o}from"./index-BuF8ktG8.js";const s=({name:t,size:r=14})=>{const e={search:o.jsx("path",{d:"M11 11l3 3M7 12.5a5.5 5.5 0 110-11 5.5 5.5 0 010 11z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round"}),arrowUp:o.jsx("path",{d:"M8 3l5 6H3l5-6z",fill:"currentColor"}),arrowLeft:o.jsx("path",{d:"M9 3l-4 5 4 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),arrowRight:o.jsx("path",{d:"M7 3l4 5-4 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),external:o.jsx("path",{d:"M5 3h-2v8h8v-2M9 3h3v3M7 9l5-5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),github:o.jsx("path",{d:"M8 1a7 7 0 00-2.21 13.64c.35.06.48-.15.48-.34v-1.2c-1.95.42-2.36-.94-2.36-.94-.32-.81-.78-1.03-.78-1.03-.64-.43.05-.43.05-.43.7.05 1.07.72 1.07.72.62 1.07 1.64.76 2.04.58.06-.45.24-.76.44-.94-1.55-.18-3.18-.78-3.18-3.46 0-.76.27-1.39.72-1.88-.07-.18-.31-.89.07-1.86 0 0 .59-.19 1.92.72.56-.15 1.16-.23 1.75-.24.59 0 1.19.08 1.75.24 1.33-.9 1.92-.72 1.92-.72.38.97.14 1.68.07 1.86.45.49.72 1.12.72 1.88 0 2.69-1.64 3.28-3.19 3.45.25.22.48.65.48 1.32v1.95c0 .19.13.41.49.34A7 7 0 008 1z",fill:"currentColor"}),citation:o.jsx("path",{d:"M3 4h3v3H3zM4 7v1.5a1.5 1.5 0 01-1.5 1.5M9 4h3v3H9zM10 7v1.5a1.5 1.5 0 01-1.5 1.5",stroke:"currentColor",strokeWidth:"1.2",fill:"none"}),bookmark:o.jsx("path",{d:"M4 2h8v12l-4-3-4 3V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),chart:o.jsx("path",{d:"M2 13h12M3 11l3-4 3 2 4-5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),chat:o.jsx("path",{d:"M3 3h10v7H7l-3 3v-3H3V3z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),pdf:o.jsx("path",{d:"M5 2h5l3 3v9H5V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),copy:o.jsx("path",{d:"M5 5h7v8H5V5zM3 3h7v2M3 3v8h2",stroke:"currentColor",strokeWidth:"1.2",fill:"none",strokeLinejoin:"round"}),sparkle:o.jsx("path",{d:"M8 2l1.2 3.8L13 7l-3.8 1.2L8 12l-1.2-3.8L3 7l3.8-1.2L8 2z",fill:"currentColor"}),user:o.jsx("path",{d:"M8 8a3 3 0 100-6 3 3 0 000 6zM2 14c0-3 2.5-5 6-5s6 2 6 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round"}),globe:o.jsx("path",{d:"M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM1.5 8h13M8 1.5c1.7 1.9 2.6 4.2 2.6 6.5s-.9 4.6-2.6 6.5M8 1.5C6.3 3.4 5.4 5.7 5.4 8s.9 4.6 2.6 6.5",stroke:"currentColor",strokeWidth:"1.2",fill:"none",strokeLinecap:"round"}),menu:o.jsx("path",{d:"M2 4h12M2 8h12M2 12h12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),close:o.jsx("path",{d:"M3 3l10 10M13 3L3 13",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),pencil:o.jsx("path",{d:"M10.5 2.5l3 3L6 13H3v-3l7.5-7.5zM9 4l3 3",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})};return o.jsx("svg",{className:r===11?"icon-sm":"icon",viewBox:"0 0 16 16",width:r,height:r,children:e[t]})};export{s as I};
|
assets/{LatexTitle-CfeEppH3.js → LatexTitle-CXoQ1Bzq.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
| 1 |
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/katex-wklAmtGL.css"])))=>i.map(i=>d[i]);
|
| 2 |
-
import{j as u,d as A,a7 as L}from"./index-
|
|
|
|
| 1 |
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/katex-wklAmtGL.css"])))=>i.map(i=>d[i]);
|
| 2 |
+
import{j as u,d as A,a7 as L}from"./index-BuF8ktG8.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-D0AGKKJ1.js → MarkdownText-C90Ontxz.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{w as c,j as o,L as u}from"./index-
|
|
|
|
| 1 |
+
import{w as c,j as o,L as u}from"./index-BuF8ktG8.js";/* empty css */import{r as p,a as m,P as d}from"./PaperPreviewLink-rxrEwjIH.js";import{M as h}from"./index-BwrKSI2t.js";import{r as f}from"./index-Duf3Rq7e.js";function w(e){return(e??"").split(",").map(a=>a.trim().toLowerCase()).filter(Boolean)}const x=new Set(["paperswithcode.co","www.paperswithcode.co","localhost","127.0.0.1",...w(void 0)]),P=["/methods","/paper","/papers","/tasks","/benchmark","/conferences"];function k(e,a=window.location.origin){if(!e)return null;let t;if(e.startsWith("/"))t=e;else try{const n=new URL(e,a);if(!x.has(n.hostname))return null;t=`${n.pathname}${n.search}${n.hash}`}catch{return null}const r=t.split(/[?#]/,1)[0];return P.some(n=>r===n||r.startsWith(`${n}/`))?t:null}function I(e){const t=e.split(/[?#]/,1)[0].match(/^\/papers?\/([^/]+)$/);if(!t||t[1].includes("%"))return null;const r=t[1],n=/^\d{4}[.-]\d{4,5}(?:v\d+)?$/.test(r),s=/^[1-9]\d*$/.test(r);return!n&&!s?null:c(r)}const M=({text:e,className:a=""})=>o.jsx("div",{className:a,children:o.jsx(h,{remarkPlugins:[f,m],rehypePlugins:[p],components:{a:({href:t,children:r,node:n,...s})=>{const i=k(t);if(i){const l=I(i);return l?o.jsx(d,{routeId:l,to:i,...s,children:r}):o.jsx(u,{to:i,...s,children:r})}return o.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",...s,children:r})}},children:e})});export{M,k as r};
|
assets/{McpShowcase-D5BEHBL4.js → McpShowcase-D4TTJi6V.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{j as e,L as t}from"./index-
|
|
|
|
| 1 |
+
import{j as e,L as t}from"./index-BuF8ktG8.js";import{A as a}from"./AgentLogos-BPQPDQNU.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-B1VMxy4R.js → McpView-DK648tGI.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import{s as b,b as x,V as m,j as e,C as j}from"./index-
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
|
|
|
| 1 |
+
import{s as b,b as x,V as m,j as e,C as j}from"./index-BuF8ktG8.js";import{u as g,f as y}from"./useDocumentTitle-DZHc-0SQ.js";import{q as f}from"./queryOptions-C9woPjwX.js";import{G as v}from"./github-BiawQL9z.js";import{E as o}from"./external-link-nrKLPLKY.js";import{C as w}from"./copy-C2OymkVV.js";/**
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
assets/{MethodDetailView-BI5O9w4y.js → MethodDetailView-BFmmUqL-.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{j as e,d as I,u as P,b as k,p as V,L as _,o as A,T as v}from"./index-CHGpuh10.js";import{R as H}from"./ResearchFollowButton-DFGdTBex.js";import{M as Q}from"./SotaBadges-D825CK6n.js";import{u as q,b as K,a as R}from"./PaperFeed-DjmnPHUi.js";import{r as G,M as L}from"./MarkdownText-D0AGKKJ1.js";import{c as b}from"./catalog-DMzmJg__.js";import{p as U}from"./papers-BPpxs2sO.js";import{i as O}from"./apiErrors-CvxFAcrW.js";import{s as W}from"./slug-BpH-Nkvz.js";import{t as Z}from"./transform-Cs8_lTDx.js";import{u as X}from"./usePapers-DzyOc-Ae.js";import{S as N}from"./skeleton-Df0GaMuw.js";import{A as Y,a as J}from"./alert-DPvmCXZT.js";import{s as ee}from"./safeExternalHref-CkBrsh84.js";import te from"./NotFound-Bc6y0g0J.js";import"./researchTopic-DK_KbYKH.js";import"./useMutation-3fOqWcpt.js";import"./plus-CYgr1KdS.js";import"./colors-BkWRhvFI.js";import"./PaperCard-BtCEa6CD.js";import"./AuthorAvatar-fJxhX3fO.js";import"./Icon-CRWrVPWO.js";import"./LatexTitle-CfeEppH3.js";import"./popover-BHpRw7vT.js";import"./useIntersectionObserver-DZSpsOQX.js";/* empty css */import"./PaperPreviewLink-CPkn2Kqv.js";import"./index-B141zdPU.js";import"./index-BzjqtLRb.js";import"./katex-DkKDou_j.js";import"./hover-card-Dz7z6DCn.js";import"./curation-DI9_zYNx.js";import"./useInfiniteQuery-DhWyWKGj.js";const t={pink:"#F8D7D9",pinkS:"#D9B0B3",yellow:"#FBEFC2",yellowS:"#C9B97D",orange:"#F8D7B3",orangeS:"#C99466",blue:"#CDE2EE",blueS:"#7FA4BA",purple:"#D4D2EA",purpleS:"#8E8AC0",green:"#CCE2C5",greenS:"#7DA475",ink:"#1A1814",faint:"#8E8678"},n=({x:s,y:r,w:l,h:d,fill:o,stroke:p,label:h,fontSize:c=10})=>e.jsxs("g",{children:[e.jsx("rect",{x:s,y:r,width:l,height:d,rx:"3",ry:"3",fill:o,stroke:p,strokeWidth:"1"}),e.jsx("text",{x:s+l/2,y:r+d/2,fontSize:c,fontFamily:"var(--sans)",fill:t.ink,textAnchor:"middle",dominantBaseline:"middle",children:h})]}),se=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Scaled Dot-Product Attention"}),e.jsx(n,{x:140,y:40,w:80,h:26,fill:t.yellow,stroke:t.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M180 66 L180 80",stroke:t.ink}),e.jsx(n,{x:140,y:80,w:80,h:26,fill:t.green,stroke:t.greenS,label:"SoftMax",fontSize:11}),e.jsx("path",{d:"M180 106 L180 120",stroke:t.ink}),e.jsx(n,{x:140,y:120,w:80,h:26,fill:t.purple,stroke:t.purpleS,label:"Mask (opt.)",fontSize:11}),e.jsx("path",{d:"M180 146 L180 160",stroke:t.ink}),e.jsx(n,{x:140,y:160,w:80,h:26,fill:t.blue,stroke:t.blueS,label:"Scale ÷√dₖ",fontSize:11}),e.jsx("path",{d:"M180 186 L180 200",stroke:t.ink}),e.jsx(n,{x:140,y:200,w:80,h:26,fill:t.yellow,stroke:t.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M156 226 L120 270",stroke:t.ink}),e.jsx("path",{d:"M180 226 L180 270",stroke:t.ink}),e.jsx("path",{d:"M204 226 L240 270",stroke:t.ink}),e.jsx(n,{x:100,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"Q",fontSize:13}),e.jsx(n,{x:160,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"K",fontSize:13}),e.jsx(n,{x:220,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"V",fontSize:13}),e.jsxs("text",{x:"180",y:"330",fontSize:"14",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:["softmax(QK",e.jsx("tspan",{fontSize:"9",baselineShift:"super",children:"⊤"})," / √d) V"]})]}),ae=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Contrastive learning"}),e.jsx(n,{x:120,y:40,w:120,h:26,fill:t.blue,stroke:t.blueS,label:"Input x",fontSize:11}),e.jsx("path",{d:"M180 66 V76 M90 76 H270 M90 76 V88 M270 76 V88",stroke:t.ink}),e.jsx(n,{x:35,y:88,w:110,h:26,fill:t.yellow,stroke:t.yellowS,label:"Augment t₁",fontSize:11}),e.jsx(n,{x:215,y:88,w:110,h:26,fill:t.yellow,stroke:t.yellowS,label:"Augment t₂",fontSize:11}),e.jsx("path",{d:"M90 114 V138 M270 114 V138",stroke:t.ink}),e.jsx(n,{x:35,y:138,w:110,h:26,fill:t.orange,stroke:t.orangeS,label:"Encoder f",fontSize:11}),e.jsx(n,{x:215,y:138,w:110,h:26,fill:t.orange,stroke:t.orangeS,label:"Encoder f",fontSize:11}),e.jsx("text",{x:"180",y:"155",fontSize:"9",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"shared weights"}),e.jsx("path",{d:"M90 164 V188 M270 164 V188",stroke:t.ink}),e.jsx(n,{x:35,y:188,w:110,h:26,fill:t.purple,stroke:t.purpleS,label:"Projection g",fontSize:11}),e.jsx(n,{x:215,y:188,w:110,h:26,fill:t.purple,stroke:t.purpleS,label:"Projection g",fontSize:11}),e.jsx("path",{d:"M90 214 V238 M270 214 V238",stroke:t.ink}),e.jsx(n,{x:35,y:238,w:110,h:26,fill:t.pink,stroke:t.pinkS,label:"z₁",fontSize:13}),e.jsx(n,{x:215,y:238,w:110,h:26,fill:t.pink,stroke:t.pinkS,label:"z₂",fontSize:13}),e.jsx("path",{d:"M145 251 H215",stroke:t.greenS,strokeWidth:"1.5",strokeDasharray:"4 3"}),e.jsx("text",{x:"180",y:"244",fontSize:"9",fontFamily:"var(--sans)",fill:t.greenS,textAnchor:"middle",children:"attract"}),e.jsx("text",{x:"180",y:"318",fontSize:"12",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:"Positive pair: pull together"}),e.jsx("text",{x:"180",y:"336",fontSize:"12",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:"Other samples: push apart"}),e.jsx("text",{x:"180",y:"370",fontSize:"11",fontFamily:"var(--serif)",fill:t.faint,textAnchor:"middle",children:"InfoNCE: maximize sim(z₁, z₂) / τ"})]}),re=[["my-skill/",""],["├── SKILL.md","# Required: metadata + instructions"],["├── scripts/","# Optional: executable code"],["├── references/","# Optional: documentation"],["├── assets/","# Optional: templates, resources"],["└── ...","# Any additional files or directories"]],le=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Skill package layout"}),e.jsx("rect",{x:"28",y:"48",width:"304",height:"318",rx:"8",fill:"#FFFDF8",stroke:t.faint,strokeWidth:"1"}),re.map(([s,r],l)=>{const d=92+l*44;return e.jsxs("g",{children:[e.jsx("text",{x:"44",y:d,fontSize:"11",fontFamily:"var(--mono)",fill:t.ink,dominantBaseline:"middle",children:s}),r?e.jsx("text",{x:"138",y:d,fontSize:"8.5",fontFamily:"var(--mono)",fill:t.faint,dominantBaseline:"middle",children:r}):null]},s)})]}),ie={attention:se,"contrastive-learning":ae,"agent-skills":le},ne=({method:s})=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:s.name||"method"}),e.jsx(n,{x:80,y:70,w:200,h:50,fill:t.blue,stroke:t.blueS,label:"Input",fontSize:12}),e.jsx("path",{d:"M180 120 L180 150",stroke:t.ink}),e.jsx(n,{x:80,y:150,w:200,h:70,fill:t.orange,stroke:t.orangeS,label:s.name||"transform",fontSize:13}),e.jsx("path",{d:"M180 220 L180 250",stroke:t.ink}),e.jsx(n,{x:80,y:250,w:200,h:50,fill:t.purple,stroke:t.purpleS,label:"Output",fontSize:12})]}),oe=({method:s})=>{const r=(s.slug||"").toLowerCase(),l=ie[r];if(l)return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(l,{})});if(s.image_url){const d=r==="transformer"||r==="gpt-4"||r==="gpt-4o"||r==="multi-head-attention"?" method-figure-svg--compact":r==="rpn"?" method-figure-svg--scaled-80":"";return e.jsx("div",{className:`method-figure-svg method-figure-svg--image${d}`,children:e.jsx("img",{className:"method-figure-img",src:s.image_url,alt:`${s.name} figure`})})}return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(ne,{method:s})})},w=720,M=138,x={top:8,right:10,bottom:25,left:36},E=56,ce=new Intl.DateTimeFormat("en",{month:"short",year:"2-digit",timeZone:"UTC"}),de=new Intl.DateTimeFormat("en",{year:"numeric",timeZone:"UTC"}),F=s=>ce.format(new Date(`${s}T00:00:00Z`)),me=(s,r)=>{if(s===0)return new Set;const l=s>48?12:s>36?6:s>18?3:2,d=Math.max(1,Math.ceil(E/r)),o=Math.max(l,d),p=s-1,h=new Set([0,p]);for(let c=o;c<p;c+=o)(p-c)*r>=E&&h.add(c);return h},T=s=>{if(s.coverage_status===void 0||["complete","not_applicable"].includes(s.coverage_status))return null;const r=s.processed_paper_count!==void 0&&s.eligible_paper_count!==void 0?`; ${s.processed_paper_count.toLocaleString()} of ${s.eligible_paper_count.toLocaleString()} eligible papers processed`:"";return`Historical tagging ${s.coverage_status==="failed"?"needs retry":"in progress"}${r}`},he=({history:s,methodName:r})=>{const[l,d]=I.useState(null),o=Math.max(1,...s.map(i=>i.paper_count)),p=w-x.left-x.right,h=M-x.top-x.bottom,c=s.length?p/s.length:p,a=Math.max(2,c*.68),g=me(s.length,c),j=Array.from(new Set([0,Math.ceil(o/2),o])),f=l==null?null:s[l],y=f?T(f):null;return e.jsxs("div",{className:"method-usage-chart-wrap",children:[e.jsxs("svg",{className:"method-usage-chart",viewBox:`0 0 ${w} ${M}`,role:"group","aria-label":`${r}: papers mentioning this method by publication month`,children:[e.jsxs("title",{children:[r,": papers mentioning this method by publication month"]}),j.map(i=>{const m=x.top+h-i/o*h;return e.jsxs("g",{children:[e.jsx("line",{className:"method-usage-gridline",x1:x.left,x2:w-x.right,y1:m,y2:m}),e.jsx("text",{className:"method-usage-y-label",x:x.left-8,y:m+3,textAnchor:"end",children:i})]},i)}),s.map((i,m)=>{const u=i.paper_count/o*h,S=i.paper_count>0?Math.max(1,u):0,C=x.left+c*m+(c-a)/2,D=x.top+h-S,$=l===m,B=m===s.length-1,z=T(i);return e.jsxs("g",{className:`method-usage-bar${$?" is-active":""}${B?" is-current":""}`,tabIndex:0,role:"img","aria-label":`${F(i.start_date)}: ${i.paper_count} ${i.paper_count===1?"paper":"papers"}${z?`. ${z}`:""}`,onMouseEnter:()=>d(m),onMouseLeave:()=>d(null),onFocus:()=>d(m),onBlur:()=>d(null),children:[e.jsx("rect",{className:"method-usage-bar-hit",x:x.left+c*m,y:x.top,width:c,height:h}),e.jsx("rect",{className:"method-usage-bar-mark",x:C,y:D,width:a,height:S,rx:"1.5"})]},i.start_date)}),s.map((i,m)=>g.has(m)?e.jsx("text",{className:"method-usage-x-label",x:x.left+c*(m+.5),y:M-11,textAnchor:"middle",children:s.length>48?de.format(new Date(`${i.start_date}T00:00:00Z`)):F(i.start_date)},i.start_date):null)]}),f&&e.jsxs("div",{className:"method-usage-tooltip",role:"status",children:[e.jsx("strong",{children:F(f.start_date)}),e.jsxs("span",{children:[f.paper_count," ",f.paper_count===1?"paper":"papers",l===s.length-1?" · month to date":""]}),e.jsxs("span",{children:[(f.catalog_share??0).toFixed(2),"% of"," ",(f.catalog_paper_count??0).toLocaleString()," catalog papers"]}),y&&e.jsx("span",{children:y})]})]})},Ge=()=>{var y,i,m;const{methodSlug:s}=P(),r=q(),l=k({queryKey:A.method(s),queryFn:()=>b.getMethod(s),enabled:!!s,staleTime:v}),d=k({queryKey:A.areas,queryFn:()=>b.listAreas({page_size:50,ordering:"name"}),enabled:!!((y=l.data)!=null&&y.area_id),staleTime:v}),o=k({queryKey:["method-trend",s],queryFn:()=>b.methodTrend(s),enabled:!!s,staleTime:v}),p=X([...V.feeds.method,s,r.filters],u=>U.forMethod(s,{...r.filters,page:u,page_size:20,repository_limit:1}),{enabled:!!s}),h=k({queryKey:["related-methods",s],queryFn:()=>b.relatedMethods(s),enabled:!!s,staleTime:v}),c=I.useMemo(()=>{var u;return((u=p.data)==null?void 0:u.pages.flatMap(S=>S.results.map(Z)))??[]},[p.data]);if(l.isLoading)return e.jsxs("div",{className:"page",children:[e.jsx(N,{className:"h-12 w-1/2 mb-4"}),e.jsx(N,{className:"h-64 w-full"})]});if(O(l.error))return e.jsx(te,{});if(l.error||!l.data)return e.jsx("div",{className:"page",children:e.jsx(Y,{variant:"destructive",children:e.jsx(J,{children:"Method not found."})})});const a=l.data,g=(i=d.data)==null?void 0:i.results.find(u=>u.id===a.area_id),j=G(a.source_url),f=j?null:ee(a.source_url);return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(_,{to:"/methods",children:"Methods"}),g&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(_,{to:`/methods#area-${W(g.name)}`,children:g.name})]}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:a.name})]}),e.jsxs("div",{className:`tag-hero method-hero-grid${a.slug==="grokking"||a.slug==="latent-reasoning"||a.slug==="world-action-models"?" method-hero-grid--wide-figure":""}`,children:[e.jsxs("div",{children:[e.jsx("div",{className:"tag-hero-eyebrow",children:"METHOD"}),e.jsx("h1",{className:"tag-hero-title method-hero-title",children:a.name}),e.jsx(H,{kind:"method",entityId:a.id}),a.full_name&&!a.name.includes(a.full_name)&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontSize:16,fontStyle:"italic",color:"var(--ink-soft)",marginTop:8},children:a.full_name}),a.description&&e.jsx(L,{className:"method-description",text:a.description}),a.source_url&&a.source_title&&e.jsxs("div",{className:"method-source",children:[e.jsx("span",{className:"method-source-label",children:"Source"}),j?e.jsxs(_,{className:"method-source-link",to:j,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:a.source_title}),a.introduced_year&&e.jsx("span",{className:"method-source-meta",children:a.introduced_year})]}):f?e.jsxs("a",{className:"method-source-link",href:f,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:a.source_title}),a.introduced_year&&e.jsx("span",{className:"method-source-meta",children:a.introduced_year})]}):e.jsxs("div",{className:"method-source-link is-static",children:[e.jsx("span",{className:"method-source-title",children:a.source_title}),a.introduced_year&&e.jsx("span",{className:"method-source-meta",children:a.introduced_year})]})]}),e.jsxs("div",{className:"tag-hero-meta",children:[e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Papers mentioning"}),e.jsx("span",{className:"value",children:(a.paper_count??0).toLocaleString()})]}),o.data&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Recent mentions"}),e.jsxs("span",{className:"value",children:[(o.data.recent_paper_count*30/o.data.recent_days).toFixed(1),e.jsx("small",{children:"/mo"})]}),!o.data.comparison_complete&&e.jsx("span",{title:"Tagging is still catching up. This rate reflects mentions found so far.",children:"Partial coverage"})]}),a.introduced_year!=null&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Introduced"}),e.jsx("span",{className:"value",children:a.introduced_year})]})]}),o.isLoading?e.jsx(N,{className:"h-36 w-full method-trend-skeleton"}):o.data?e.jsxs("section",{className:"method-trend-panel method-trend-panel--compact",children:[e.jsxs("div",{className:"method-trend-header",children:[e.jsx("div",{children:e.jsx("div",{className:"method-trend-eyebrow",children:"Usage trend"})}),e.jsxs("div",{className:"method-trend-summary",children:[e.jsx("strong",{children:o.data.recent_paper_count}),e.jsxs("span",{children:["papers / ",o.data.recent_days,"d"]})]})]}),e.jsx(he,{history:o.data.history,methodName:a.name})]}):null]}),e.jsxs("figure",{className:"method-figure-card",children:[e.jsx(oe,{method:a}),a.image_credit&&e.jsx("figcaption",{children:e.jsx(L,{className:"method-image-credit",text:a.image_credit})})]})]}),(((m=h.data)==null?void 0:m.results.length)??0)>0&&e.jsxs("div",{className:"filter-row",children:[e.jsx("span",{className:"label",children:"Related methods"}),h.data.results.map(u=>e.jsx(Q,{method:{slug:u.slug,name:u.name}},u.id))]}),e.jsx(K,{feed:r,children:e.jsxs("div",{className:"results-count",children:[c.length," papers mentioning ",a.name]})}),e.jsx(R,{query:p,cards:c,empty:"No papers tagged with this method yet."})]})};export{Ge as default};
|
|
|
|
| 1 |
+
import{j as e,d as I,u as P,b as k,p as V,L as _,o as A,T as v}from"./index-BuF8ktG8.js";import{R as H}from"./ResearchFollowButton-BWlDUBnb.js";import{M as Q}from"./SotaBadges-BFyAOF4Y.js";import{u as q,b as K,a as R}from"./PaperFeed-BkUBd-xO.js";import{r as G,M as L}from"./MarkdownText-C90Ontxz.js";import{c as b}from"./catalog-QOvavbkR.js";import{p as U}from"./papers-DOWhzKgr.js";import{i as O}from"./apiErrors-Bu7TuOPW.js";import{s as W}from"./slug-BpH-Nkvz.js";import{t as Z}from"./transform-CHck6g-D.js";import{u as X}from"./usePapers-3mHbxOSK.js";import{S as N}from"./skeleton-Dp4VcttN.js";import{A as Y,a as J}from"./alert-ClESc45e.js";import{s as ee}from"./safeExternalHref-CkBrsh84.js";import te from"./NotFound-BiuJcE21.js";import"./researchTopic-Cz5Cn_RO.js";import"./useMutation-H0Ru2KmC.js";import"./plus-9o2YwICS.js";import"./colors-BkWRhvFI.js";import"./PaperCard-C_kRm1Bt.js";import"./AuthorAvatar-CIgdnsA4.js";import"./Icon-aDKp5nB1.js";import"./LatexTitle-CXoQ1Bzq.js";import"./popover-NrNmZ8VR.js";import"./useIntersectionObserver-Cvgl2pBE.js";/* empty css */import"./PaperPreviewLink-rxrEwjIH.js";import"./index-BwrKSI2t.js";import"./index-Duf3Rq7e.js";import"./katex-DkKDou_j.js";import"./hover-card-yQsLTE4d.js";import"./curation-rx4Y4ai_.js";import"./useInfiniteQuery-DnjhR627.js";const t={pink:"#F8D7D9",pinkS:"#D9B0B3",yellow:"#FBEFC2",yellowS:"#C9B97D",orange:"#F8D7B3",orangeS:"#C99466",blue:"#CDE2EE",blueS:"#7FA4BA",purple:"#D4D2EA",purpleS:"#8E8AC0",green:"#CCE2C5",greenS:"#7DA475",ink:"#1A1814",faint:"#8E8678"},n=({x:s,y:r,w:l,h:d,fill:o,stroke:p,label:h,fontSize:c=10})=>e.jsxs("g",{children:[e.jsx("rect",{x:s,y:r,width:l,height:d,rx:"3",ry:"3",fill:o,stroke:p,strokeWidth:"1"}),e.jsx("text",{x:s+l/2,y:r+d/2,fontSize:c,fontFamily:"var(--sans)",fill:t.ink,textAnchor:"middle",dominantBaseline:"middle",children:h})]}),se=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Scaled Dot-Product Attention"}),e.jsx(n,{x:140,y:40,w:80,h:26,fill:t.yellow,stroke:t.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M180 66 L180 80",stroke:t.ink}),e.jsx(n,{x:140,y:80,w:80,h:26,fill:t.green,stroke:t.greenS,label:"SoftMax",fontSize:11}),e.jsx("path",{d:"M180 106 L180 120",stroke:t.ink}),e.jsx(n,{x:140,y:120,w:80,h:26,fill:t.purple,stroke:t.purpleS,label:"Mask (opt.)",fontSize:11}),e.jsx("path",{d:"M180 146 L180 160",stroke:t.ink}),e.jsx(n,{x:140,y:160,w:80,h:26,fill:t.blue,stroke:t.blueS,label:"Scale ÷√dₖ",fontSize:11}),e.jsx("path",{d:"M180 186 L180 200",stroke:t.ink}),e.jsx(n,{x:140,y:200,w:80,h:26,fill:t.yellow,stroke:t.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M156 226 L120 270",stroke:t.ink}),e.jsx("path",{d:"M180 226 L180 270",stroke:t.ink}),e.jsx("path",{d:"M204 226 L240 270",stroke:t.ink}),e.jsx(n,{x:100,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"Q",fontSize:13}),e.jsx(n,{x:160,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"K",fontSize:13}),e.jsx(n,{x:220,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"V",fontSize:13}),e.jsxs("text",{x:"180",y:"330",fontSize:"14",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:["softmax(QK",e.jsx("tspan",{fontSize:"9",baselineShift:"super",children:"⊤"})," / √d) V"]})]}),ae=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Contrastive learning"}),e.jsx(n,{x:120,y:40,w:120,h:26,fill:t.blue,stroke:t.blueS,label:"Input x",fontSize:11}),e.jsx("path",{d:"M180 66 V76 M90 76 H270 M90 76 V88 M270 76 V88",stroke:t.ink}),e.jsx(n,{x:35,y:88,w:110,h:26,fill:t.yellow,stroke:t.yellowS,label:"Augment t₁",fontSize:11}),e.jsx(n,{x:215,y:88,w:110,h:26,fill:t.yellow,stroke:t.yellowS,label:"Augment t₂",fontSize:11}),e.jsx("path",{d:"M90 114 V138 M270 114 V138",stroke:t.ink}),e.jsx(n,{x:35,y:138,w:110,h:26,fill:t.orange,stroke:t.orangeS,label:"Encoder f",fontSize:11}),e.jsx(n,{x:215,y:138,w:110,h:26,fill:t.orange,stroke:t.orangeS,label:"Encoder f",fontSize:11}),e.jsx("text",{x:"180",y:"155",fontSize:"9",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"shared weights"}),e.jsx("path",{d:"M90 164 V188 M270 164 V188",stroke:t.ink}),e.jsx(n,{x:35,y:188,w:110,h:26,fill:t.purple,stroke:t.purpleS,label:"Projection g",fontSize:11}),e.jsx(n,{x:215,y:188,w:110,h:26,fill:t.purple,stroke:t.purpleS,label:"Projection g",fontSize:11}),e.jsx("path",{d:"M90 214 V238 M270 214 V238",stroke:t.ink}),e.jsx(n,{x:35,y:238,w:110,h:26,fill:t.pink,stroke:t.pinkS,label:"z₁",fontSize:13}),e.jsx(n,{x:215,y:238,w:110,h:26,fill:t.pink,stroke:t.pinkS,label:"z₂",fontSize:13}),e.jsx("path",{d:"M145 251 H215",stroke:t.greenS,strokeWidth:"1.5",strokeDasharray:"4 3"}),e.jsx("text",{x:"180",y:"244",fontSize:"9",fontFamily:"var(--sans)",fill:t.greenS,textAnchor:"middle",children:"attract"}),e.jsx("text",{x:"180",y:"318",fontSize:"12",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:"Positive pair: pull together"}),e.jsx("text",{x:"180",y:"336",fontSize:"12",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:"Other samples: push apart"}),e.jsx("text",{x:"180",y:"370",fontSize:"11",fontFamily:"var(--serif)",fill:t.faint,textAnchor:"middle",children:"InfoNCE: maximize sim(z₁, z₂) / τ"})]}),re=[["my-skill/",""],["├── SKILL.md","# Required: metadata + instructions"],["├── scripts/","# Optional: executable code"],["├── references/","# Optional: documentation"],["├── assets/","# Optional: templates, resources"],["└── ...","# Any additional files or directories"]],le=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Skill package layout"}),e.jsx("rect",{x:"28",y:"48",width:"304",height:"318",rx:"8",fill:"#FFFDF8",stroke:t.faint,strokeWidth:"1"}),re.map(([s,r],l)=>{const d=92+l*44;return e.jsxs("g",{children:[e.jsx("text",{x:"44",y:d,fontSize:"11",fontFamily:"var(--mono)",fill:t.ink,dominantBaseline:"middle",children:s}),r?e.jsx("text",{x:"138",y:d,fontSize:"8.5",fontFamily:"var(--mono)",fill:t.faint,dominantBaseline:"middle",children:r}):null]},s)})]}),ie={attention:se,"contrastive-learning":ae,"agent-skills":le},ne=({method:s})=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:s.name||"method"}),e.jsx(n,{x:80,y:70,w:200,h:50,fill:t.blue,stroke:t.blueS,label:"Input",fontSize:12}),e.jsx("path",{d:"M180 120 L180 150",stroke:t.ink}),e.jsx(n,{x:80,y:150,w:200,h:70,fill:t.orange,stroke:t.orangeS,label:s.name||"transform",fontSize:13}),e.jsx("path",{d:"M180 220 L180 250",stroke:t.ink}),e.jsx(n,{x:80,y:250,w:200,h:50,fill:t.purple,stroke:t.purpleS,label:"Output",fontSize:12})]}),oe=({method:s})=>{const r=(s.slug||"").toLowerCase(),l=ie[r];if(l)return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(l,{})});if(s.image_url){const d=r==="transformer"||r==="gpt-4"||r==="gpt-4o"||r==="multi-head-attention"?" method-figure-svg--compact":r==="rpn"?" method-figure-svg--scaled-80":"";return e.jsx("div",{className:`method-figure-svg method-figure-svg--image${d}`,children:e.jsx("img",{className:"method-figure-img",src:s.image_url,alt:`${s.name} figure`})})}return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(ne,{method:s})})},w=720,M=138,x={top:8,right:10,bottom:25,left:36},E=56,ce=new Intl.DateTimeFormat("en",{month:"short",year:"2-digit",timeZone:"UTC"}),de=new Intl.DateTimeFormat("en",{year:"numeric",timeZone:"UTC"}),F=s=>ce.format(new Date(`${s}T00:00:00Z`)),me=(s,r)=>{if(s===0)return new Set;const l=s>48?12:s>36?6:s>18?3:2,d=Math.max(1,Math.ceil(E/r)),o=Math.max(l,d),p=s-1,h=new Set([0,p]);for(let c=o;c<p;c+=o)(p-c)*r>=E&&h.add(c);return h},T=s=>{if(s.coverage_status===void 0||["complete","not_applicable"].includes(s.coverage_status))return null;const r=s.processed_paper_count!==void 0&&s.eligible_paper_count!==void 0?`; ${s.processed_paper_count.toLocaleString()} of ${s.eligible_paper_count.toLocaleString()} eligible papers processed`:"";return`Historical tagging ${s.coverage_status==="failed"?"needs retry":"in progress"}${r}`},he=({history:s,methodName:r})=>{const[l,d]=I.useState(null),o=Math.max(1,...s.map(i=>i.paper_count)),p=w-x.left-x.right,h=M-x.top-x.bottom,c=s.length?p/s.length:p,a=Math.max(2,c*.68),g=me(s.length,c),j=Array.from(new Set([0,Math.ceil(o/2),o])),f=l==null?null:s[l],y=f?T(f):null;return e.jsxs("div",{className:"method-usage-chart-wrap",children:[e.jsxs("svg",{className:"method-usage-chart",viewBox:`0 0 ${w} ${M}`,role:"group","aria-label":`${r}: papers mentioning this method by publication month`,children:[e.jsxs("title",{children:[r,": papers mentioning this method by publication month"]}),j.map(i=>{const m=x.top+h-i/o*h;return e.jsxs("g",{children:[e.jsx("line",{className:"method-usage-gridline",x1:x.left,x2:w-x.right,y1:m,y2:m}),e.jsx("text",{className:"method-usage-y-label",x:x.left-8,y:m+3,textAnchor:"end",children:i})]},i)}),s.map((i,m)=>{const u=i.paper_count/o*h,S=i.paper_count>0?Math.max(1,u):0,C=x.left+c*m+(c-a)/2,D=x.top+h-S,$=l===m,B=m===s.length-1,z=T(i);return e.jsxs("g",{className:`method-usage-bar${$?" is-active":""}${B?" is-current":""}`,tabIndex:0,role:"img","aria-label":`${F(i.start_date)}: ${i.paper_count} ${i.paper_count===1?"paper":"papers"}${z?`. ${z}`:""}`,onMouseEnter:()=>d(m),onMouseLeave:()=>d(null),onFocus:()=>d(m),onBlur:()=>d(null),children:[e.jsx("rect",{className:"method-usage-bar-hit",x:x.left+c*m,y:x.top,width:c,height:h}),e.jsx("rect",{className:"method-usage-bar-mark",x:C,y:D,width:a,height:S,rx:"1.5"})]},i.start_date)}),s.map((i,m)=>g.has(m)?e.jsx("text",{className:"method-usage-x-label",x:x.left+c*(m+.5),y:M-11,textAnchor:"middle",children:s.length>48?de.format(new Date(`${i.start_date}T00:00:00Z`)):F(i.start_date)},i.start_date):null)]}),f&&e.jsxs("div",{className:"method-usage-tooltip",role:"status",children:[e.jsx("strong",{children:F(f.start_date)}),e.jsxs("span",{children:[f.paper_count," ",f.paper_count===1?"paper":"papers",l===s.length-1?" · month to date":""]}),e.jsxs("span",{children:[(f.catalog_share??0).toFixed(2),"% of"," ",(f.catalog_paper_count??0).toLocaleString()," catalog papers"]}),y&&e.jsx("span",{children:y})]})]})},Ge=()=>{var y,i,m;const{methodSlug:s}=P(),r=q(),l=k({queryKey:A.method(s),queryFn:()=>b.getMethod(s),enabled:!!s,staleTime:v}),d=k({queryKey:A.areas,queryFn:()=>b.listAreas({page_size:50,ordering:"name"}),enabled:!!((y=l.data)!=null&&y.area_id),staleTime:v}),o=k({queryKey:["method-trend",s],queryFn:()=>b.methodTrend(s),enabled:!!s,staleTime:v}),p=X([...V.feeds.method,s,r.filters],u=>U.forMethod(s,{...r.filters,page:u,page_size:20,repository_limit:1}),{enabled:!!s}),h=k({queryKey:["related-methods",s],queryFn:()=>b.relatedMethods(s),enabled:!!s,staleTime:v}),c=I.useMemo(()=>{var u;return((u=p.data)==null?void 0:u.pages.flatMap(S=>S.results.map(Z)))??[]},[p.data]);if(l.isLoading)return e.jsxs("div",{className:"page",children:[e.jsx(N,{className:"h-12 w-1/2 mb-4"}),e.jsx(N,{className:"h-64 w-full"})]});if(O(l.error))return e.jsx(te,{});if(l.error||!l.data)return e.jsx("div",{className:"page",children:e.jsx(Y,{variant:"destructive",children:e.jsx(J,{children:"Method not found."})})});const a=l.data,g=(i=d.data)==null?void 0:i.results.find(u=>u.id===a.area_id),j=G(a.source_url),f=j?null:ee(a.source_url);return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(_,{to:"/methods",children:"Methods"}),g&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(_,{to:`/methods#area-${W(g.name)}`,children:g.name})]}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:a.name})]}),e.jsxs("div",{className:`tag-hero method-hero-grid${a.slug==="grokking"||a.slug==="latent-reasoning"||a.slug==="world-action-models"?" method-hero-grid--wide-figure":""}`,children:[e.jsxs("div",{children:[e.jsx("div",{className:"tag-hero-eyebrow",children:"METHOD"}),e.jsx("h1",{className:"tag-hero-title method-hero-title",children:a.name}),e.jsx(H,{kind:"method",entityId:a.id}),a.full_name&&!a.name.includes(a.full_name)&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontSize:16,fontStyle:"italic",color:"var(--ink-soft)",marginTop:8},children:a.full_name}),a.description&&e.jsx(L,{className:"method-description",text:a.description}),a.source_url&&a.source_title&&e.jsxs("div",{className:"method-source",children:[e.jsx("span",{className:"method-source-label",children:"Source"}),j?e.jsxs(_,{className:"method-source-link",to:j,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:a.source_title}),a.introduced_year&&e.jsx("span",{className:"method-source-meta",children:a.introduced_year})]}):f?e.jsxs("a",{className:"method-source-link",href:f,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:a.source_title}),a.introduced_year&&e.jsx("span",{className:"method-source-meta",children:a.introduced_year})]}):e.jsxs("div",{className:"method-source-link is-static",children:[e.jsx("span",{className:"method-source-title",children:a.source_title}),a.introduced_year&&e.jsx("span",{className:"method-source-meta",children:a.introduced_year})]})]}),e.jsxs("div",{className:"tag-hero-meta",children:[e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Papers mentioning"}),e.jsx("span",{className:"value",children:(a.paper_count??0).toLocaleString()})]}),o.data&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Recent mentions"}),e.jsxs("span",{className:"value",children:[(o.data.recent_paper_count*30/o.data.recent_days).toFixed(1),e.jsx("small",{children:"/mo"})]}),!o.data.comparison_complete&&e.jsx("span",{title:"Tagging is still catching up. This rate reflects mentions found so far.",children:"Partial coverage"})]}),a.introduced_year!=null&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Introduced"}),e.jsx("span",{className:"value",children:a.introduced_year})]})]}),o.isLoading?e.jsx(N,{className:"h-36 w-full method-trend-skeleton"}):o.data?e.jsxs("section",{className:"method-trend-panel method-trend-panel--compact",children:[e.jsxs("div",{className:"method-trend-header",children:[e.jsx("div",{children:e.jsx("div",{className:"method-trend-eyebrow",children:"Usage trend"})}),e.jsxs("div",{className:"method-trend-summary",children:[e.jsx("strong",{children:o.data.recent_paper_count}),e.jsxs("span",{children:["papers / ",o.data.recent_days,"d"]})]})]}),e.jsx(he,{history:o.data.history,methodName:a.name})]}):null]}),e.jsxs("figure",{className:"method-figure-card",children:[e.jsx(oe,{method:a}),a.image_credit&&e.jsx("figcaption",{children:e.jsx(L,{className:"method-image-credit",text:a.image_credit})})]})]}),(((m=h.data)==null?void 0:m.results.length)??0)>0&&e.jsxs("div",{className:"filter-row",children:[e.jsx("span",{className:"label",children:"Related methods"}),h.data.results.map(u=>e.jsx(Q,{method:{slug:u.slug,name:u.name}},u.id))]}),e.jsx(K,{feed:r,children:e.jsxs("div",{className:"results-count",children:[c.length," papers mentioning ",a.name]})}),e.jsx(R,{query:p,cards:c,empty:"No papers tagged with this method yet."})]})};export{Ge as default};
|
assets/{MethodsIndexView-CPxYYZYk.js → MethodsIndexView-CvslIW0K.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import{s as f,b as c,d as l,j as s,L as _,o as N,T as m}from"./index-
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
|
|
|
| 1 |
+
import{s as f,b as c,d as l,j as s,L as _,o as N,T as m}from"./index-BuF8ktG8.js";import{c as p}from"./catalog-QOvavbkR.js";import{s as T}from"./areas-Dvi8w2dp.js";import{s as v}from"./slug-BpH-Nkvz.js";import{A as L,a as M}from"./alert-ClESc45e.js";import{A,a as F}from"./AreaSection-DPzsnyZc.js";import{T as q}from"./TaxonomySuggestionTile-DHRiovjc.js";import{u as S,T as I}from"./useHashScrollOnReady-D5qTRn2s.js";import"./skeleton-Dp4VcttN.js";import"./SignInToEditDialog-CejkAYkt.js";import"./button-kiAIp5NU.js";import"./input-CApr9J-O.js";import"./textarea-D-LxcCMY.js";import"./searchable-select-BgxTwWoR.js";import"./popover-NrNmZ8VR.js";import"./dialog-B5pjhpY5.js";import"./search-C8dgBkSf.js";import"./loader-circle-DUEYvkt2.js";import"./useMutation-H0Ru2KmC.js";import"./submissions-DCMnKq0E.js";import"./plus-9o2YwICS.js";import"./trending-up-D3iZwzv1.js";/**
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
assets/{NotFound-Bc6y0g0J.js → NotFound-BiuJcE21.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{c as o,d as s,j as t,L as a}from"./index-
|
|
|
|
| 1 |
+
import{c as o,d as s,j as t,L as a}from"./index-BuF8ktG8.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-Dd08m_k9.js → OrganizationContributionGraph-DHmvzALw.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{d as b,j as o,b as $,T as z}from"./index-
|
|
|
|
| 1 |
+
import{d as b,j as o,b as $,T as z}from"./index-BuF8ktG8.js";import{S as w}from"./skeleton-Dp4VcttN.js";import{c as y}from"./catalog-QOvavbkR.js";const x=24*60*60*1e3,f=12,N=3,v=new Map([[1,"Mon"],[3,"Wed"],[5,"Fri"]]),T=n=>new Date(`${n}T00:00:00Z`),_=n=>n.toISOString().slice(0,10),M=(n,a)=>{if(n===0)return 0;const i=a.findIndex(s=>n<=s);return i===-1?4:i+1},S=n=>{const a=T(n.start_date),i=T(n.end_date),s=new Date(a.getTime()-a.getUTCDay()*x),h=new Date(i.getTime()+(6-i.getUTCDay())*x),p=new Map(n.results.map(e=>[e.date,e.paper_count])),u=n.results.map(e=>e.paper_count).sort((e,g)=>e-g),c=[.25,.5,.75].map(e=>u[Math.min(u.length-1,Math.floor(u.length*e))]??1),l=[];for(let e=s.getTime();e<=h.getTime();e+=x){const g=new Date(e),d=_(g),m=e>=a.getTime()&&e<=i.getTime(),C=m?p.get(d)??0:0;l.push({key:d,date:g,count:C,inRange:m,level:M(C,c)})}const t=l.length/7,r=[];let j=-1;for(let e=0;e<t;e+=1){const d=l.slice(e*7,e*7+7).find(m=>m.inRange&&(e===0||m.date.getUTCDate()<=7));d&&d.date.getUTCMonth()!==j&&(j=d.date.getUTCMonth(),r.length>0&&e-r[r.length-1].column<3&&r.pop(),r.push({label:d.date.toLocaleString("en",{month:"short",timeZone:"UTC"}),column:e}))}return{days:l,months:r,weekCount:t}},D=({data:n,organizationName:a,title:i="Paper contributions",noun:s="paper"})=>{const h=b.useRef(null),{days:p,months:u,weekCount:c}=b.useMemo(()=>S(n),[n]),l=c*f+(c-1)*N;return b.useEffect(()=>{const t=h.current;t&&(t.scrollLeft=t.scrollWidth)},[c]),o.jsxs("section",{className:"organization-contributions","aria-labelledby":"organization-contributions-title",children:[o.jsxs("div",{className:"organization-contributions-header",children:[o.jsx("h2",{id:"organization-contributions-title",className:"organization-contributions-title",children:i}),o.jsxs("p",{className:"organization-contributions-summary",children:[n.total_count.toLocaleString()," ",n.total_count===1?s:`${s}s`," recorded in the last year"]})]}),o.jsx("div",{className:"organization-contributions-scroll",ref:h,children:o.jsxs("div",{className:"organization-contributions-plot",style:{width:l+34},role:"img","aria-label":`${a} recorded ${n.total_count} ${n.total_count===1?s:`${s}s`} in the last year`,children:[o.jsx("div",{className:"organization-contributions-weekdays","aria-hidden":"true",children:Array.from({length:7}).map((t,r)=>o.jsx("span",{children:v.get(r)??""},r))}),o.jsxs("div",{children:[o.jsx("div",{className:"organization-contributions-months",style:{width:l,gridTemplateColumns:`repeat(${c}, ${f}px)`},"aria-hidden":"true",children:u.map(t=>o.jsx("span",{style:{gridColumnStart:t.column+1},children:t.label},`${t.label}-${t.column}`))}),o.jsx("div",{className:"organization-contributions-grid",style:{width:l,gridTemplateColumns:`repeat(${c}, ${f}px)`},"aria-hidden":"true",children:p.map(t=>o.jsx("span",{className:`organization-contribution-cell ${t.inRange?`level-${t.level}`:"is-outside"}`,title:t.inRange?`${t.count} ${t.count===1?s:`${s}s`} on ${t.date.toLocaleDateString("en",{dateStyle:"long",timeZone:"UTC"})}`:void 0},t.key))})]})]})}),o.jsxs("div",{className:"organization-contributions-legend","aria-hidden":"true",children:[o.jsx("span",{children:"Fewer"}),[0,1,2,3,4].map(t=>o.jsx("span",{className:`organization-contribution-cell level-${t}`},t)),o.jsx("span",{children:"More"})]})]})},U=({organizationSlug:n,organizationName:a})=>{const i=$({queryKey:["organization-contributions",n],queryFn:()=>y.organizationContributions(n),staleTime:z});return i.isLoading?o.jsx(w,{className:"organization-contributions-skeleton"}):i.data?o.jsx(D,{data:i.data,organizationName:a}):null};export{D as C,U as O};
|
assets/{OrganizationDetailView-DiOUhHgj.js → OrganizationDetailView-D5IPFPbB.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{e as q,d,b as N,p as C,j as r,L as y,o as Q,T as F,u as z}from"./index-
|
|
|
|
| 1 |
+
import{e as q,d,b as N,p as C,j as r,L as y,o as Q,T as F,u as z}from"./index-BuF8ktG8.js";import{R as E}from"./ResearchFollowButton-BWlDUBnb.js";import{M as I}from"./MarkdownText-C90Ontxz.js";import{O as K}from"./OrganizationContributionGraph-DHmvzALw.js";import{u as R,b as G,a as H}from"./PaperFeed-BkUBd-xO.js";import{A as W,a as B}from"./alert-ClESc45e.js";import{S as D}from"./searchable-select-BgxTwWoR.js";import{S}from"./skeleton-Dp4VcttN.js";import{u as U}from"./usePapers-3mHbxOSK.js";import{c as v}from"./catalog-QOvavbkR.js";import{p as V}from"./papers-DOWhzKgr.js";import{i as Z}from"./apiErrors-Bu7TuOPW.js";import{d as L,t as J}from"./transform-CHck6g-D.js";import{o as X,i as Y}from"./organizationNames-BVKzYEBp.js";import k from"./NotFound-BiuJcE21.js";import"./researchTopic-Cz5Cn_RO.js";import"./useMutation-H0Ru2KmC.js";import"./plus-9o2YwICS.js";/* empty css */import"./PaperPreviewLink-rxrEwjIH.js";import"./index-BwrKSI2t.js";import"./index-Duf3Rq7e.js";import"./katex-DkKDou_j.js";import"./hover-card-yQsLTE4d.js";import"./PaperCard-C_kRm1Bt.js";import"./AuthorAvatar-CIgdnsA4.js";import"./SotaBadges-BFyAOF4Y.js";import"./colors-BkWRhvFI.js";import"./Icon-aDKp5nB1.js";import"./LatexTitle-CXoQ1Bzq.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-NrNmZ8VR.js";import"./useIntersectionObserver-Cvgl2pBE.js";import"./button-kiAIp5NU.js";import"./dialog-B5pjhpY5.js";import"./search-C8dgBkSf.js";import"./loader-circle-DUEYvkt2.js";import"./useInfiniteQuery-DnjhR627.js";import"./curation-rx4Y4ai_.js";const ee=({organizationSlug:a,taskSlug:n})=>{var f,x,j,_,b;const $=q(),c=R(),{searchParams:w}=c,[O,h]=d.useState(!1),u=N({queryKey:Q.organization(a),queryFn:()=>v.getOrganization(a),staleTime:F}),l=N({queryKey:["organization-areas-with-tasks",a],queryFn:()=>v.organizationAreasWithTasks(a),staleTime:F}),p=U([...C.feeds.organization,a,n,c.filters],t=>V.forOrganization(a,{...c.filters,task:n,page:t,page_size:12}),{enabled:!!a});d.useEffect(()=>{h(!1)},[a,n]);const g=d.useMemo(()=>{var t;return(((t=l.data)==null?void 0:t.results)??[]).flatMap(o=>o.tasks.filter(s=>!!s.slug).map(s=>({...s,slug:s.slug,label:L(s.name,s.slug)})))},[l.data]),i=g.find(t=>t.slug===n),T=d.useMemo(()=>{var t;return(((t=p.data)==null?void 0:t.pages)??[]).flatMap(o=>o.results.map(J))},[p.data]),e=u.data??((f=l.data)==null?void 0:f.organization),m=e?X(e):null,A=((j=(x=p.data)==null?void 0:x.pages[0])==null?void 0:j.count)??0;if([u.error,l.error,p.error].some(Z))return r.jsx(k,{});if(l.error||p.error)return r.jsx("div",{className:"page",children:r.jsx(W,{variant:"destructive",children:r.jsx(B,{children:"Failed to load organization papers. Please try again."})})});const P=t=>{const o=t.trim().toLocaleLowerCase();return g.filter(s=>`${s.label} ${s.slug}`.toLocaleLowerCase().includes(o)).map(s=>({value:s.slug,label:s.label,description:`${s.paper_count.toLocaleString()} ${s.paper_count===1?"paper":"papers"}`}))},M=t=>{const o=t==="__all__"?`/orgs/${a}`:`/orgs/${a}/${t}`,s=w.toString();$({pathname:o,search:s?`?${s}`:""})};return r.jsxs("div",{className:"page",children:[r.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[r.jsx(y,{to:"/",children:"Home"}),r.jsx("span",{children:" / "}),r.jsx(y,{to:"/organizations",children:"Organizations"}),r.jsx("span",{children:" / "}),r.jsx("span",{children:(e==null?void 0:e.name)??a}),i&&r.jsxs(r.Fragment,{children:[r.jsx("span",{children:" / "}),r.jsx("span",{children:L(i.name,i.slug)})]})]}),r.jsxs("header",{className:"organization-hero",children:[r.jsxs("div",{className:"organization-hero-profile",children:[r.jsx("div",{className:"organizations-eyebrow",children:"ORGANIZATION"}),r.jsxs("h1",{className:`feed-title organization-hero-title${e&&!m&&Y(e.name)?" organization-hero-title--long":""}`,children:[e!=null&&e.logo_url&&!O?r.jsx("img",{src:e.logo_url,alt:"",width:58,height:58,onError:()=>h(!0)}):e?r.jsx("span",{className:"organization-hero-monogram","aria-hidden":"true",children:(m??e.name).slice(0,1).toUpperCase()}):null,e?r.jsxs("span",{className:"organization-hero-name",children:[m??e.name,m&&r.jsx("span",{className:"organization-hero-full-name",children:e.name})]}):r.jsx(S,{className:"h-12 w-64"})]}),e&&r.jsx(E,{kind:"organization",entityId:e.id}),e&&r.jsxs("div",{className:"feed-subtitle",children:[((_=e.paper_count)==null?void 0:_.toLocaleString())??0," papers",(e.organization_trending_score??0)>0&&e.trending_rank&&r.jsxs(r.Fragment,{children:[" · #",e.trending_rank," trending this month"]})]}),(e==null?void 0:e.description)&&r.jsx(I,{className:"method-description",text:e.description}),e&&r.jsxs("div",{className:"organization-hero-links",children:[e.website_url&&r.jsx("a",{href:e.website_url,target:"_blank",rel:"noreferrer",children:"Website ↗"}),e.hf_url&&r.jsx("a",{href:e.hf_url,target:"_blank",rel:"noreferrer",children:"Hugging Face ↗"}),e.github_url&&r.jsx("a",{href:e.github_url,target:"_blank",rel:"noreferrer",children:"GitHub ↗"})]})]}),r.jsx(K,{organizationSlug:a,organizationName:(e==null?void 0:e.name)??a})]}),r.jsx(G,{feed:c,style:{alignItems:"center",gap:16},leading:r.jsx("div",{style:{minWidth:260},children:r.jsx(D,{value:n??"__all__",onChange:M,placeholder:"All tasks",searchPlaceholder:"Search organization tasks...",emptyMessage:"No matching tasks.",ariaLabel:"Filter papers by task",selectedOption:i?{value:i.slug,label:i.label,description:`${i.paper_count.toLocaleString()} ${i.paper_count===1?"paper":"papers"}`}:{value:"__all__",label:"All tasks",description:`${((b=e==null?void 0:e.paper_count)==null?void 0:b.toLocaleString())??0} papers`},queryKey:["organization-task-options",a],queryFn:async t=>{var o;return[{value:"__all__",label:"All tasks",description:`${((o=e==null?void 0:e.paper_count)==null?void 0:o.toLocaleString())??0} papers`},...P(t)]},enabled:!l.isLoading,className:"h-[38px]"})}),children:r.jsxs("div",{className:"results-count",children:[A.toLocaleString()," papers"]})}),r.jsx(H,{query:p,cards:T,showInstitution:!1,empty:(e==null?void 0:e.paper_count)===0?"No papers indexed yet":"No papers found for this selection."})]})},Ke=()=>{const{orgSlug:a,taskSlug:n}=z();return a?r.jsx(ee,{organizationSlug:a,taskSlug:n}):r.jsx(k,{})};export{Ke as default};
|
assets/{OrganizationsIndexView-BfbGHJbZ.js → OrganizationsIndexView-WPgntiLW.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{g as m,b as x,d as h,j as e,L as u,o as j,T as y}from"./index-
|
|
|
|
| 1 |
+
import{g as m,b as x,d as h,j as e,L as u,o as j,T as y}from"./index-BuF8ktG8.js";import{A as N,a as f}from"./alert-ClESc45e.js";import{c as _}from"./catalog-QOvavbkR.js";const v=n=>n==="papers"||n==="name"?n:"trending",z=({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)})})},L=()=>{const[n,d]=m(),i=v(n.get("sort")),c=n.get("q")??"",o=x({queryKey:[...j.organizations,"featured"],queryFn:()=>_.organizationIndex(),staleTime:y}),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)},g=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(N,{variant:"destructive",children:e.jsxs(f,{children:["Failed to load organizations."," ",e.jsx("button",{type:"button",onClick:()=>o.refetch(),children:"Try again"})]})}):g.length===0?e.jsxs("div",{className:"organizations-empty",children:["No organizations match “",c,"”."]}):e.jsx("div",{className:"organizations-grid",children:g.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(u,{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(z,{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{L as default};
|
assets/{PaperCard-BtCEa6CD.js → PaperCard-C_kRm1Bt.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{i as v,V as g,T as M,p as y,j as a,L as d}from"./index-
|
|
|
|
| 1 |
+
import{i as v,V as g,T as M,p as y,j as a,L as d}from"./index-BuF8ktG8.js";import{A as L}from"./AuthorAvatar-CIgdnsA4.js";import{P as Z,S as A,T as k,M as E}from"./SotaBadges-BFyAOF4Y.js";import{I as P}from"./Icon-aDKp5nB1.js";import{L as U,a as w}from"./LatexTitle-CXoQ1Bzq.js";import{p as C}from"./papers-DOWhzKgr.js";import{s as h}from"./safeExternalHref-CkBrsh84.js";const $=({size:s=16})=>a.jsxs("svg",{className:"hf-logo",width:s,height:s,viewBox:"0 0 95 88",fill:"none","aria-hidden":"true",focusable:"false",children:[a.jsx("path",{fill:"#FFD21E",d:"M47.21 76.5a34.75 34.75 0 1 0 0-69.5 34.75 34.75 0 0 0 0 69.5Z"}),a.jsx("path",{fill:"#FF9D0B",d:"M81.96 41.75a34.75 34.75 0 1 0-69.5 0 34.75 34.75 0 0 0 69.5 0Zm-73.5 0a38.75 38.75 0 1 1 77.5 0 38.75 38.75 0 0 1-77.5 0Z"}),a.jsx("path",{fill:"#3A3B45",d:"M58.5 32.3c1.28.44 1.78 3.06 3.07 2.38a5 5 0 1 0-6.76-2.07c.61 1.15 2.55-.72 3.7-.32ZM34.95 32.3c-1.28.44-1.79 3.06-3.07 2.38a5 5 0 1 1 6.76-2.07c-.61 1.15-2.56-.72-3.7-.32Z"}),a.jsx("path",{fill:"#FF323D",d:"M46.96 56.29c9.83 0 13-8.76 13-13.26 0-2.34-1.57-1.6-4.09-.36-2.33 1.15-5.46 2.74-8.9 2.74-7.19 0-13-6.88-13-2.38s3.16 13.26 13 13.26Z"}),a.jsx("path",{fill:"#3A3B45",fillRule:"evenodd",clipRule:"evenodd",d:"M39.43 54a8.7 8.7 0 0 1 5.3-4.49c.4-.12.81.57 1.24 1.28.4.68.82 1.37 1.24 1.37.45 0 .9-.68 1.33-1.35.45-.7.89-1.38 1.32-1.25a8.61 8.61 0 0 1 5 4.17c3.73-2.94 5.1-7.74 5.1-10.7 0-2.34-1.57-1.6-4.09-.36l-.14.07c-2.31 1.15-5.39 2.67-8.77 2.67s-6.45-1.52-8.77-2.67c-2.6-1.29-4.23-2.1-4.23.29 0 3.05 1.46 8.06 5.47 10.97Z"}),a.jsx("path",{fill:"#FF9D0B",d:"M70.71 37a3.25 3.25 0 1 0 0-6.5 3.25 3.25 0 0 0 0 6.5ZM24.21 37a3.25 3.25 0 1 0 0-6.5 3.25 3.25 0 0 0 0 6.5ZM17.52 48c-1.62 0-3.06.66-4.07 1.87a5.97 5.97 0 0 0-1.33 3.76 7.1 7.1 0 0 0-1.94-.3c-1.55 0-2.95.59-3.94 1.66a5.8 5.8 0 0 0-.8 7 5.3 5.3 0 0 0-1.79 2.82c-.24.9-.48 2.8.8 4.74a5.22 5.22 0 0 0-.37 5.02c1.02 2.32 3.57 4.14 8.52 6.1 3.07 1.22 5.89 2 5.91 2.01a44.33 44.33 0 0 0 10.93 1.6c5.86 0 10.05-1.8 12.46-5.34 3.88-5.69 3.33-10.9-1.7-15.92-2.77-2.78-4.62-6.87-5-7.77-.78-2.66-2.84-5.62-6.25-5.62a5.7 5.7 0 0 0-4.6 2.46c-1-1.26-1.98-2.25-2.86-2.82A7.4 7.4 0 0 0 17.52 48Zm0 4c.51 0 1.14.22 1.82.65 2.14 1.36 6.25 8.43 7.76 11.18.5.92 1.37 1.31 2.14 1.31 1.55 0 2.75-1.53.15-3.48-3.92-2.93-2.55-7.72-.68-8.01.08-.02.17-.02.24-.02 1.7 0 2.45 2.93 2.45 2.93s2.2 5.52 5.98 9.3c3.77 3.77 3.97 6.8 1.22 10.83-1.88 2.75-5.47 3.58-9.16 3.58-3.81 0-7.73-.9-9.92-1.46-.11-.03-13.45-3.8-11.76-7 .28-.54.75-.76 1.34-.76 2.38 0 6.7 3.54 8.57 3.54.41 0 .7-.17.83-.6.79-2.85-12.06-4.05-10.98-8.17.2-.73.71-1.02 1.44-1.02 3.14 0 10.2 5.53 11.68 5.53.11 0 .2-.03.24-.1.74-1.2.33-2.04-4.9-5.2-5.21-3.16-8.88-5.06-6.8-7.33.24-.26.58-.38 1-.38 3.17 0 10.66 6.82 10.66 6.82s2.02 2.1 3.25 2.1c.28 0 .52-.1.68-.38.86-1.46-8.06-8.22-8.56-11.01-.34-1.9.24-2.85 1.31-2.85Z"}),a.jsx("path",{fill:"#FFD21E",d:"M38.6 76.69c2.75-4.04 2.55-7.07-1.22-10.84-3.78-3.77-5.98-9.3-5.98-9.3s-.82-3.2-2.69-2.9c-1.87.3-3.24 5.08.68 8.01 3.91 2.93-.78 4.92-2.29 2.17-1.5-2.75-5.62-9.82-7.76-11.18-2.13-1.35-3.63-.6-3.13 2.2.5 2.79 9.43 9.55 8.56 11-.87 1.47-3.93-1.71-3.93-1.71s-9.57-8.71-11.66-6.44c-2.08 2.27 1.59 4.17 6.8 7.33 5.23 3.16 5.64 4 4.9 5.2-.75 1.2-12.28-8.53-13.36-4.4-1.08 4.11 11.77 5.3 10.98 8.15-.8 2.85-9.06-5.38-10.74-2.18-1.7 3.21 11.65 6.98 11.76 7.01 4.3 1.12 15.25 3.49 19.08-2.12Z"}),a.jsx("path",{fill:"#FF9D0B",d:"M77.4 48c1.62 0 3.07.66 4.07 1.87a5.97 5.97 0 0 1 1.33 3.76 7.1 7.1 0 0 1 1.95-.3c1.55 0 2.95.59 3.94 1.66a5.8 5.8 0 0 1 .8 7 5.3 5.3 0 0 1 1.78 2.82c.24.9.48 2.8-.8 4.74a5.22 5.22 0 0 1 .37 5.02c-1.02 2.32-3.57 4.14-8.51 6.1-3.08 1.22-5.9 2-5.92 2.01a44.33 44.33 0 0 1-10.93 1.6c-5.86 0-10.05-1.8-12.46-5.34-3.88-5.69-3.33-10.9 1.7-15.92 2.78-2.78 4.63-6.87 5.01-7.77.78-2.66 2.83-5.62 6.24-5.62a5.7 5.7 0 0 1 4.6 2.46c1-1.26 1.98-2.25 2.87-2.82A7.4 7.4 0 0 1 77.4 48Zm0 4c-.51 0-1.13.22-1.82.65-2.13 1.36-6.25 8.43-7.76 11.18a2.43 2.43 0 0 1-2.14 1.31c-1.54 0-2.75-1.53-.14-3.48 3.91-2.93 2.54-7.72.67-8.01a1.54 1.54 0 0 0-.24-.02c-1.7 0-2.45 2.93-2.45 2.93s-2.2 5.52-5.97 9.3c-3.78 3.77-3.98 6.8-1.22 10.83 1.87 2.75 5.47 3.58 9.15 3.58 3.82 0 7.73-.9 9.93-1.46.1-.03 13.45-3.8 11.76-7-.29-.54-.75-.76-1.34-.76-2.38 0-6.71 3.54-8.57 3.54-.42 0-.71-.17-.83-.6-.8-2.85 12.05-4.05 10.97-8.17-.19-.73-.7-1.02-1.44-1.02-3.14 0-10.2 5.53-11.68 5.53-.1 0-.19-.03-.23-.1-.74-1.2-.34-2.04 4.88-5.2 5.23-3.16 8.9-5.06 6.8-7.33-.23-.26-.57-.38-.98-.38-3.18 0-10.67 6.82-10.67 6.82s-2.02 2.1-3.24 2.1a.74.74 0 0 1-.68-.38c-.87-1.46 8.05-8.22 8.55-11.01.34-1.9-.24-2.85-1.31-2.85Z"}),a.jsx("path",{fill:"#FFD21E",d:"M56.33 76.69c-2.75-4.04-2.56-7.07 1.22-10.84 3.77-3.77 5.97-9.3 5.97-9.3s.82-3.2 2.7-2.9c1.86.3 3.23 5.08-.68 8.01-3.92 2.93.78 4.92 2.28 2.17 1.51-2.75 5.63-9.82 7.76-11.18 2.13-1.35 3.64-.6 3.13 2.2-.5 2.79-9.42 9.55-8.55 11 .86 1.47 3.92-1.71 3.92-1.71s9.58-8.71 11.66-6.44c2.08 2.27-1.58 4.17-6.8 7.33-5.23 3.16-5.63 4-4.9 5.2.75 1.2 12.28-8.53 13.36-4.4 1.08 4.11-11.76 5.3-10.97 8.15.8 2.85 9.05-5.38 10.74-2.18 1.69 3.21-11.65 6.98-11.76 7.01-4.31 1.12-15.26 3.49-19.08-2.12Z"})]});function T(s){const t=[...new Set(s.map(r=>r.replace(/ \(subtask\)$/,"")))],l=t.length>3?[...t.slice(0,2),`${t.length-2} more`]:t;return l.length>1?`${l.slice(0,-1).join(", ")} and ${l[l.length-1]}`:l[0]}const z="language-modeling";function p(s){return s?s.toLowerCase().replace(/\(.*?\)/g," ").replace(/[^a-z]+/g," ").replace(/\bllm\b/g," ").replace(/\s+/g," ").trim().replace(/s$/,""):""}function B(s){return p(s.slug)==="large language model"||p(s.name)==="large language model"}function D(s){return s.tags.includes(z)?s.methods.filter(t=>!B(t)):s.methods}const S=({name:s,slug:t,logoUrl:l})=>{const[r,i]=g.useState(!1);return!l||r?null:a.jsx(d,{to:`/orgs/${t}`,className:"paper-organization-logo","aria-label":`View ${s} organization`,title:s,children:a.jsx("img",{src:l,alt:"",onError:()=>i(!0)})})},q=({paper:s,priority:t=!1,showInstitution:l=!0,highlightQuery:r,followReasons:i})=>{const m=v(),u=`/paper/${s.id}`,n=g.useCallback(()=>{m.prefetchQuery({queryKey:y.detail(s.id),queryFn:()=>C.get(s.id,!0),staleTime:M})},[s.id,m]),F=s.authors.slice(0,3).map((e,o)=>{var b,N;const f=(b=s.authorIds)==null?void 0:b[o],j=(N=s.authorHfProfiles)==null?void 0:N[o];return a.jsxs(g.Fragment,{children:[o>0&&", ",j&&a.jsx(L,{className:"paper-card-author-avatar",url:j.avatarUrl}),f?a.jsx(d,{to:`/authors/${f}`,children:e}):e]},o)}),c=s.authors.length,x=D(s);return a.jsxs("article",{className:"paper-card",children:[a.jsx(d,{to:u,className:"paper-thumb-wrap",onFocus:n,onMouseEnter:n,children:a.jsx(Z,{paperId:s.id,title:s.title,thumbnailUrl:s.thumbnailUrl,priority:t})}),a.jsxs("div",{className:"paper-body",children:[a.jsxs("div",{className:"paper-body-main",children:[i&&i.length>0&&a.jsxs("div",{className:"paper-follow-reason",children:["Because you follow ",T(i)]}),a.jsxs("h3",{className:"paper-title",children:[a.jsx(d,{to:u,onFocus:n,onMouseEnter:n,children:a.jsx(U,{title:s.title,highlight:r})}),l&&s.organizations.length>0&&a.jsx("span",{className:"paper-organization-logos",children:s.organizations.map(e=>a.jsx(S,{...e},e.slug))})]}),a.jsxs("div",{className:"paper-authors",children:[F,c>3&&a.jsxs("span",{children:[", ","+",c-3," authors"]}),s.date&&a.jsxs(a.Fragment,{children:[c>0?" · ":"",a.jsx("span",{children:s.date})]}),s.citations>0&&a.jsxs(a.Fragment,{children:[c>0||s.date?" · ":"",a.jsxs("span",{children:[s.citations.toLocaleString()," citations"]})]})]}),s.abstract&&a.jsx("p",{className:"paper-abstract",children:a.jsx(w,{text:s.abstract,highlight:r})}),s.sotaRanks.length>0&&a.jsx(A,{ranks:s.sotaRanks,paperHref:u}),(s.tags.length>0||x.length>0)&&a.jsxs("div",{className:"paper-tags paper-tags--clamped",children:[s.tags.map(e=>a.jsx(k,{slug:e},e)),x.map(e=>a.jsx(E,{method:e},e.id||e.slug||e.name))]})]}),(s.githubUrl||s.hfUrl)&&a.jsxs("div",{className:"paper-resources",children:[h(s.githubUrl)&&a.jsxs("a",{className:"paper-resource is-link",href:h(s.githubUrl)??void 0,target:"_blank",rel:"noopener noreferrer","aria-label":"Open GitHub repository",onClick:e=>e.stopPropagation(),children:[a.jsx(P,{name:"github",size:20}),s.velocity24h!=null&&s.velocity24h>0&&a.jsxs("span",{className:"resource-stat",children:[a.jsxs("span",{className:"resource-value",children:[a.jsx("span",{className:"gh-rate-arrow",children:"↑"}),s.velocity24h.toFixed(1)]}),a.jsx("span",{className:"resource-label",children:"stars / hr"})]})]}),h(s.hfUrl)&&s.hfKind&&a.jsxs("a",{className:"paper-resource is-link",href:h(s.hfUrl)??void 0,target:"_blank",rel:"noopener noreferrer","aria-label":`Open Hugging Face ${s.hfKind}`,onClick:e=>e.stopPropagation(),children:[a.jsx($,{size:20}),a.jsxs("span",{className:"resource-stat",children:[a.jsx("span",{className:"resource-value",children:s.hfCount}),a.jsx("span",{className:"resource-label",children:s.hfKind})]})]})]})]})]})};export{q as P};
|
assets/PaperDetailView-BGo-dK6S.js
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
assets/PaperDetailView-yhifaccW.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
assets/{PaperFeed-DjmnPHUi.js → PaperFeed-BkUBd-xO.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{d as u,j as t,g as J,V as K}from"./index-CHGpuh10.js";import{P as X}from"./PaperCard-BtCEa6CD.js";import{P as ee,a as te,b as ae}from"./popover-BHpRw7vT.js";import{I as se}from"./Icon-CRWrVPWO.js";import{S as j}from"./skeleton-Df0GaMuw.js";import{u as ne}from"./useIntersectionObserver-DZSpsOQX.js";const Y=(e,a)=>{const s=new Date(a),n=new Date(s);return n.setUTCDate(s.getUTCDate()-(e==="week"?6:29)),{startDate:n.toISOString().slice(0,10),endDate:s.toISOString().slice(0,10)}},V=e=>({startDate:e.get("start_date")||void 0,endDate:e.get("end_date")||void 0}),Ne=(e,a=new Date,s="week")=>{const n=V(e);if(n.startDate||n.endDate||e.get("time")==="all_time")return n;const o=new Date(Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()));return Y(s,o)},Z=(e,a)=>{const s=new URLSearchParams(e);return a.startDate?s.set("start_date",a.startDate):s.delete("start_date"),a.endDate?s.set("end_date",a.endDate):s.delete("end_date"),s.delete("time"),s},Se=(e,a)=>{const s=Z(e,a);return!a.startDate&&!a.endDate&&s.set("time","all_time"),s},re=new Intl.DateTimeFormat("en",{month:"long",year:"numeric",timeZone:"UTC"}),H=new Intl.DateTimeFormat("en",{month:"short",timeZone:"UTC"}),O="(max-width: 640px)",oe=()=>{const[e,a]=u.useState(()=>typeof window<"u"&&window.matchMedia(O).matches);return u.useEffect(()=>{const s=window.matchMedia(O),n=o=>a(o.matches);return a(s.matches),s.addEventListener("change",n),()=>s.removeEventListener("change",n)},[]),e},W=e=>e.toISOString().slice(0,10),b=e=>new Date(`${e}T00:00:00Z`),ie=()=>{const e=new Date;return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()))},F=(e,a)=>new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth()+a,1)),v=e=>new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),1)),ce=(e,a)=>new Date(Date.UTC(a,e.getUTCMonth(),1)),w=(e,a)=>e.startDate===a.startDate&&e.endDate===a.endDate,le=(e,a)=>{const s=b(e),n=b(a),o=H.format(s),i=H.format(n),d=s.getUTCDate(),l=n.getUTCDate(),r=s.getUTCFullYear(),p=n.getUTCFullYear();return e===a?`${o} ${d}, ${r}`:r===p&&s.getUTCMonth()===n.getUTCMonth()?`${o} ${d}–${l}, ${r}`:r===p?`${o} ${d}–${i} ${l}, ${r}`:`${o} ${d}, ${r}–${i} ${l}, ${p}`},de=e=>{const a=e.getUTCFullYear(),s=e.getUTCMonth(),n=new Date(Date.UTC(a,s,1)),o=(n.getUTCDay()+6)%7,i=new Date(n);return i.setUTCDate(n.getUTCDate()-o),Array.from({length:42},(d,l)=>{const r=new Date(i);return r.setUTCDate(i.getUTCDate()+l),{iso:W(r),day:r.getUTCDate(),outsideMonth:r.getUTCMonth()!==s}})},L=({month:e,today:a,startDate:s,endDate:n,onSelect:o,yearLabel:i,yearValue:d,onYearChange:l,secondary:r=!1})=>{const p=u.useMemo(()=>de(e),[e]);return t.jsxs("section",{className:`paper-date-calendar${r?" paper-date-calendar-secondary":""}`,children:[t.jsxs("label",{className:"paper-date-year",children:[t.jsx("span",{children:i}),t.jsx("input",{type:"number",inputMode:"numeric",min:"1900",max:a.slice(0,4),step:"1",value:d,onChange:c=>l(c.target.value)})]}),t.jsx("h3",{children:re.format(e)}),t.jsx("div",{className:"paper-date-weekdays","aria-hidden":"true",children:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"].map(c=>t.jsx("span",{children:c},c))}),t.jsx("div",{className:"paper-date-days",children:p.map(c=>{const g=c.iso===s||c.iso===n,m=!!(s&&n&&c.iso>s&&c.iso<n),f=c.outsideMonth||c.iso>a;return t.jsx("button",{type:"button","aria-label":c.iso,"aria-selected":g,disabled:f,className:["paper-date-day",c.outsideMonth?"outside":"",g?"selected":"",m?"in-range":"",c.iso===a?"today":""].filter(Boolean).join(" "),onClick:()=>o(c.iso),children:c.day},c.iso)})})]})},I=({calendar:e,onPrevious:a,onNext:s,secondary:n=!1})=>t.jsxs("div",{className:`paper-date-navigation-group${n?" paper-date-navigation-group-secondary":""}`,children:[t.jsx("button",{type:"button","aria-label":`Previous ${e} month`,onClick:a,children:"←"}),t.jsx("button",{type:"button","aria-label":`Next ${e} month`,onClick:s,children:"→"})]}),he=({startDate:e,endDate:a,onChange:s,currentDate:n})=>{const o=oe(),i=n?b(n):ie(),[d,l]=u.useState(!1),[r,p]=u.useState(),[c,g]=u.useState(),[m,f]=u.useState(()=>v(i)),[_,T]=u.useState(()=>F(v(i),1)),[z,D]=u.useState(()=>String(i.getUTCFullYear())),[G,y]=u.useState(()=>String(i.getUTCFullYear())),N={startDate:e,endDate:a},M=Y("week",i),P=Y("month",i),k=W(i),R=!!(e&&a&&!w(N,M)&&!w(N,P)),Q=()=>{p(e),g(a);const h=v(e?b(e):i),x=v(a?b(a):F(h,1));f(h),T(x),D(String(h.getUTCFullYear())),y(String(x.getUTCFullYear())),l(!0)},E=(h,x,$)=>{if(x(h),!/^\d{4}$/.test(h))return;const C=Number(h);C>=1900&&C<=i.getUTCFullYear()&&$(U=>ce(U,C))},S=(h,x,$,C)=>{const U=F(h,x);$(U),C(String(U.getUTCFullYear()))},A=h=>{!r||c?(p(h),g(void 0)):h<r?p(h):g(h)},q=()=>{s({}),l(!1)};return t.jsxs("div",{className:`paper-date-filter${o?" paper-date-filter-single-calendar":""}`,role:"group","aria-label":"Publication date",children:[t.jsx("button",{type:"button",className:`sort-btn sort-btn-time${w(N,M)?" active":""}`,onClick:()=>s(M),children:"Last Week"}),t.jsx("button",{type:"button",className:`sort-btn sort-btn-time${w(N,P)?" active":""}`,onClick:()=>s(P),children:"Last Month"}),t.jsx("button",{type:"button",className:`sort-btn sort-btn-time${!e&&!a?" active":""}`,onClick:()=>s({}),children:"All Time"}),t.jsxs(ee,{open:d,onOpenChange:h=>{h?Q():l(!1)},children:[t.jsx(te,{asChild:!0,children:t.jsx("button",{type:"button",className:`sort-btn sort-btn-time${R?" active":""}`,"aria-label":R?"Change date range":"Select a range",children:R&&e&&a?le(e,a):"Select a range"})}),t.jsxs(ae,{align:"end",className:`paper-date-popover${o?" paper-date-popover-single-calendar":""}`,role:"dialog","aria-label":"Select a date range",children:[t.jsxs("div",{className:"paper-date-popover-header",children:[t.jsx("h2",{children:"Select a date range"}),t.jsx("p",{children:"Choose an inclusive start and end publication date."})]}),t.jsxs("div",{className:"paper-date-navigation",children:[t.jsx(I,{calendar:"start",onPrevious:()=>S(m,-1,f,D),onNext:()=>S(m,1,f,D)}),!o&&t.jsx(I,{calendar:"end",onPrevious:()=>S(_,-1,T,y),onNext:()=>S(_,1,T,y),secondary:!0})]}),t.jsxs("div",{className:"paper-date-calendars",children:[t.jsx(L,{month:m,today:k,startDate:r,endDate:c,onSelect:A,yearLabel:o?"Year":"Start year",yearValue:z,onYearChange:h=>E(h,D,f)}),!o&&t.jsx(L,{month:_,today:k,startDate:r,endDate:c,onSelect:A,yearLabel:"End year",yearValue:G,onYearChange:h=>E(h,y,T),secondary:!0})]}),t.jsxs("div",{className:"paper-date-actions",children:[t.jsx("button",{type:"button",className:"paper-date-clear",onClick:q,children:"Clear range"}),t.jsxs("div",{children:[t.jsx("button",{type:"button",onClick:()=>l(!1),children:"Cancel"}),t.jsx("button",{type:"button",className:"paper-date-apply",disabled:!r||!c,onClick:()=>{r&&c&&s({startDate:r,endDate:c}),l(!1)},children:"Apply"})]})]})]})]})]})},pe=()=>t.jsxs("span",{className:"hf-resource-logo",children:[t.jsx("img",{className:"hf-resource-logo-black",src:"/hf-logo-monochrome-black.svg?v=20260729",alt:""}),t.jsx("img",{className:"hf-resource-logo-white",src:"/hf-logo-monochrome-white.svg?v=20260729",alt:""})]}),B=({checked:e,icon:a,label:s,onChange:n})=>t.jsxs("button",{type:"button",className:`paper-feed-filter ${e?"active":""}`,"aria-pressed":e,onClick:()=>n(!e),children:[t.jsxs("span",{className:"paper-feed-filter-content",children:[t.jsx("span",{className:"paper-feed-filter-icon","aria-hidden":"true",children:a}),s]}),e&&t.jsx("span",{className:"paper-feed-filter-check","aria-hidden":"true",children:"✓"})]}),ge=({hasCode:e,hasHfArtifacts:a,onHasCodeChange:s,onHasHfArtifactsChange:n,showDivider:o=!0,showHasCode:i=!0})=>t.jsxs("div",{className:"paper-feed-resource-controls",role:"group","aria-label":"Resource filters",children:[o&&t.jsx("span",{className:"paper-feed-resource-divider","aria-hidden":"true"}),t.jsxs("div",{className:"paper-feed-filter-options",children:[i&&t.jsx(B,{checked:e,icon:t.jsx(se,{name:"github",size:14}),label:"Has code",onChange:s}),t.jsx(B,{checked:a,icon:t.jsx(pe,{}),label:"Has artifacts",onChange:n})]})]});function ue(e,a="200px"){const{targetRef:s,isIntersecting:n}=ne({rootMargin:a}),{data:o,hasNextPage:i,isFetchingNextPage:d,fetchNextPage:l}=e;return u.useEffect(()=>{n&&i&&!d&&l()},[n,i,d,l,o]),s}const me=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]];function Ue(){const[e,a]=J(),s=e.get("order_by"),n=s==="date_published"||s==="citation_count"?s:"trending",o=e.get("has_code")==="true",i=e.get("has_hf_artifacts")==="true",d=V(e),l=(r,p)=>{const c=new URLSearchParams(e);p?c.set(r,p):c.delete(r),a(c)};return{searchParams:e,setSearchParams:a,orderBy:n,hasCode:o,hasHfArtifacts:i,dateRange:d,setOrderBy:r=>l("order_by",r==="trending"?null:r),setHasCode:r=>l("has_code",r?"true":null),setHasHfArtifacts:r=>l("has_hf_artifacts",r?"true":null),setDateRange:r=>a(Z(e,r)),filters:{order_by:n,order_dir:"desc",latest_only:!0,include_resources:!0,has_code:o,has_hf_artifacts:i,start_date:d.startDate,end_date:d.endDate}}}const ve=({feed:e,sorts:a=me,activeSort:s=e.orderBy,showDateFilter:n=!0,showHasCode:o,style:i,leading:d,children:l})=>t.jsxs("div",{className:"sort-bar",style:i,children:[d,t.jsxs("div",{className:"paper-feed-toolbar-controls",children:[a&&t.jsx("div",{className:"sort-options",children:a.map(([r,p])=>t.jsx("button",{type:"button",className:`sort-btn ${s===r?"active":""}`,onClick:()=>e.setOrderBy(r),children:p},r))}),t.jsx(ge,{hasCode:e.hasCode,hasHfArtifacts:e.hasHfArtifacts,onHasCodeChange:e.setHasCode,onHasHfArtifactsChange:e.setHasHfArtifacts,showDivider:!!a,showHasCode:o})]}),n&&t.jsx(he,{startDate:e.dateRange.startDate,endDate:e.dateRange.endDate,onChange:e.setDateRange}),l]}),fe=()=>t.jsx(j,{className:"h-40 w-full"}),xe=()=>t.jsxs("div",{className:"paper-card",children:[t.jsx("div",{className:"paper-thumb-wrap",children:t.jsx(j,{className:"paper-thumb-skeleton"})}),t.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[t.jsx(j,{className:"h-6 w-3/4"}),t.jsx(j,{className:"h-4 w-1/2"}),t.jsx(j,{className:"h-12 w-full"})]})]}),we=({query:e,isLoading:a=e.isLoading,cards:s,empty:n,skeleton:o="block",showInstitution:i,highlightQuery:d,cardHeader:l,rootMargin:r,children:p})=>{const c=ue(e,r);if(a){const g=o==="card"?xe:fe;return t.jsx("div",{className:"paper-list",children:Array.from({length:o==="card"?6:4}).map((m,f)=>t.jsx(g,{},f))})}return s.length===0?n===null?null:t.jsx("div",{className:"no-results",children:n}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"paper-list",children:s.map((g,m)=>t.jsxs(K.Fragment,{children:[l==null?void 0:l(m),t.jsx(X,{paper:g,priority:m<3,showInstitution:i,highlightQuery:d,followReasons:g.followReasons})]},g.id))}),t.jsx("div",{ref:c,style:{height:1}}),e.isFetchingNextPage&&t.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"}),p]})};export{he as P,we as a,ve as b,me as c,Ne as r,Ue as u,Se as w};
|
|
|
|
| 1 |
+
import{d as u,j as t,g as J,V as K}from"./index-BuF8ktG8.js";import{P as X}from"./PaperCard-C_kRm1Bt.js";import{P as ee,a as te,b as ae}from"./popover-NrNmZ8VR.js";import{I as se}from"./Icon-aDKp5nB1.js";import{S as j}from"./skeleton-Dp4VcttN.js";import{u as ne}from"./useIntersectionObserver-Cvgl2pBE.js";const Y=(e,a)=>{const s=new Date(a),n=new Date(s);return n.setUTCDate(s.getUTCDate()-(e==="week"?6:29)),{startDate:n.toISOString().slice(0,10),endDate:s.toISOString().slice(0,10)}},V=e=>({startDate:e.get("start_date")||void 0,endDate:e.get("end_date")||void 0}),Ne=(e,a=new Date,s="week")=>{const n=V(e);if(n.startDate||n.endDate||e.get("time")==="all_time")return n;const o=new Date(Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()));return Y(s,o)},Z=(e,a)=>{const s=new URLSearchParams(e);return a.startDate?s.set("start_date",a.startDate):s.delete("start_date"),a.endDate?s.set("end_date",a.endDate):s.delete("end_date"),s.delete("time"),s},Se=(e,a)=>{const s=Z(e,a);return!a.startDate&&!a.endDate&&s.set("time","all_time"),s},re=new Intl.DateTimeFormat("en",{month:"long",year:"numeric",timeZone:"UTC"}),H=new Intl.DateTimeFormat("en",{month:"short",timeZone:"UTC"}),O="(max-width: 640px)",oe=()=>{const[e,a]=u.useState(()=>typeof window<"u"&&window.matchMedia(O).matches);return u.useEffect(()=>{const s=window.matchMedia(O),n=o=>a(o.matches);return a(s.matches),s.addEventListener("change",n),()=>s.removeEventListener("change",n)},[]),e},W=e=>e.toISOString().slice(0,10),b=e=>new Date(`${e}T00:00:00Z`),ie=()=>{const e=new Date;return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()))},F=(e,a)=>new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth()+a,1)),v=e=>new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),1)),ce=(e,a)=>new Date(Date.UTC(a,e.getUTCMonth(),1)),w=(e,a)=>e.startDate===a.startDate&&e.endDate===a.endDate,le=(e,a)=>{const s=b(e),n=b(a),o=H.format(s),i=H.format(n),d=s.getUTCDate(),l=n.getUTCDate(),r=s.getUTCFullYear(),p=n.getUTCFullYear();return e===a?`${o} ${d}, ${r}`:r===p&&s.getUTCMonth()===n.getUTCMonth()?`${o} ${d}–${l}, ${r}`:r===p?`${o} ${d}–${i} ${l}, ${r}`:`${o} ${d}, ${r}–${i} ${l}, ${p}`},de=e=>{const a=e.getUTCFullYear(),s=e.getUTCMonth(),n=new Date(Date.UTC(a,s,1)),o=(n.getUTCDay()+6)%7,i=new Date(n);return i.setUTCDate(n.getUTCDate()-o),Array.from({length:42},(d,l)=>{const r=new Date(i);return r.setUTCDate(i.getUTCDate()+l),{iso:W(r),day:r.getUTCDate(),outsideMonth:r.getUTCMonth()!==s}})},L=({month:e,today:a,startDate:s,endDate:n,onSelect:o,yearLabel:i,yearValue:d,onYearChange:l,secondary:r=!1})=>{const p=u.useMemo(()=>de(e),[e]);return t.jsxs("section",{className:`paper-date-calendar${r?" paper-date-calendar-secondary":""}`,children:[t.jsxs("label",{className:"paper-date-year",children:[t.jsx("span",{children:i}),t.jsx("input",{type:"number",inputMode:"numeric",min:"1900",max:a.slice(0,4),step:"1",value:d,onChange:c=>l(c.target.value)})]}),t.jsx("h3",{children:re.format(e)}),t.jsx("div",{className:"paper-date-weekdays","aria-hidden":"true",children:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"].map(c=>t.jsx("span",{children:c},c))}),t.jsx("div",{className:"paper-date-days",children:p.map(c=>{const g=c.iso===s||c.iso===n,m=!!(s&&n&&c.iso>s&&c.iso<n),f=c.outsideMonth||c.iso>a;return t.jsx("button",{type:"button","aria-label":c.iso,"aria-selected":g,disabled:f,className:["paper-date-day",c.outsideMonth?"outside":"",g?"selected":"",m?"in-range":"",c.iso===a?"today":""].filter(Boolean).join(" "),onClick:()=>o(c.iso),children:c.day},c.iso)})})]})},I=({calendar:e,onPrevious:a,onNext:s,secondary:n=!1})=>t.jsxs("div",{className:`paper-date-navigation-group${n?" paper-date-navigation-group-secondary":""}`,children:[t.jsx("button",{type:"button","aria-label":`Previous ${e} month`,onClick:a,children:"←"}),t.jsx("button",{type:"button","aria-label":`Next ${e} month`,onClick:s,children:"→"})]}),he=({startDate:e,endDate:a,onChange:s,currentDate:n})=>{const o=oe(),i=n?b(n):ie(),[d,l]=u.useState(!1),[r,p]=u.useState(),[c,g]=u.useState(),[m,f]=u.useState(()=>v(i)),[_,T]=u.useState(()=>F(v(i),1)),[z,D]=u.useState(()=>String(i.getUTCFullYear())),[G,y]=u.useState(()=>String(i.getUTCFullYear())),N={startDate:e,endDate:a},M=Y("week",i),P=Y("month",i),k=W(i),R=!!(e&&a&&!w(N,M)&&!w(N,P)),Q=()=>{p(e),g(a);const h=v(e?b(e):i),x=v(a?b(a):F(h,1));f(h),T(x),D(String(h.getUTCFullYear())),y(String(x.getUTCFullYear())),l(!0)},E=(h,x,$)=>{if(x(h),!/^\d{4}$/.test(h))return;const C=Number(h);C>=1900&&C<=i.getUTCFullYear()&&$(U=>ce(U,C))},S=(h,x,$,C)=>{const U=F(h,x);$(U),C(String(U.getUTCFullYear()))},A=h=>{!r||c?(p(h),g(void 0)):h<r?p(h):g(h)},q=()=>{s({}),l(!1)};return t.jsxs("div",{className:`paper-date-filter${o?" paper-date-filter-single-calendar":""}`,role:"group","aria-label":"Publication date",children:[t.jsx("button",{type:"button",className:`sort-btn sort-btn-time${w(N,M)?" active":""}`,onClick:()=>s(M),children:"Last Week"}),t.jsx("button",{type:"button",className:`sort-btn sort-btn-time${w(N,P)?" active":""}`,onClick:()=>s(P),children:"Last Month"}),t.jsx("button",{type:"button",className:`sort-btn sort-btn-time${!e&&!a?" active":""}`,onClick:()=>s({}),children:"All Time"}),t.jsxs(ee,{open:d,onOpenChange:h=>{h?Q():l(!1)},children:[t.jsx(te,{asChild:!0,children:t.jsx("button",{type:"button",className:`sort-btn sort-btn-time${R?" active":""}`,"aria-label":R?"Change date range":"Select a range",children:R&&e&&a?le(e,a):"Select a range"})}),t.jsxs(ae,{align:"end",className:`paper-date-popover${o?" paper-date-popover-single-calendar":""}`,role:"dialog","aria-label":"Select a date range",children:[t.jsxs("div",{className:"paper-date-popover-header",children:[t.jsx("h2",{children:"Select a date range"}),t.jsx("p",{children:"Choose an inclusive start and end publication date."})]}),t.jsxs("div",{className:"paper-date-navigation",children:[t.jsx(I,{calendar:"start",onPrevious:()=>S(m,-1,f,D),onNext:()=>S(m,1,f,D)}),!o&&t.jsx(I,{calendar:"end",onPrevious:()=>S(_,-1,T,y),onNext:()=>S(_,1,T,y),secondary:!0})]}),t.jsxs("div",{className:"paper-date-calendars",children:[t.jsx(L,{month:m,today:k,startDate:r,endDate:c,onSelect:A,yearLabel:o?"Year":"Start year",yearValue:z,onYearChange:h=>E(h,D,f)}),!o&&t.jsx(L,{month:_,today:k,startDate:r,endDate:c,onSelect:A,yearLabel:"End year",yearValue:G,onYearChange:h=>E(h,y,T),secondary:!0})]}),t.jsxs("div",{className:"paper-date-actions",children:[t.jsx("button",{type:"button",className:"paper-date-clear",onClick:q,children:"Clear range"}),t.jsxs("div",{children:[t.jsx("button",{type:"button",onClick:()=>l(!1),children:"Cancel"}),t.jsx("button",{type:"button",className:"paper-date-apply",disabled:!r||!c,onClick:()=>{r&&c&&s({startDate:r,endDate:c}),l(!1)},children:"Apply"})]})]})]})]})]})},pe=()=>t.jsxs("span",{className:"hf-resource-logo",children:[t.jsx("img",{className:"hf-resource-logo-black",src:"/hf-logo-monochrome-black.svg?v=20260729",alt:""}),t.jsx("img",{className:"hf-resource-logo-white",src:"/hf-logo-monochrome-white.svg?v=20260729",alt:""})]}),B=({checked:e,icon:a,label:s,onChange:n})=>t.jsxs("button",{type:"button",className:`paper-feed-filter ${e?"active":""}`,"aria-pressed":e,onClick:()=>n(!e),children:[t.jsxs("span",{className:"paper-feed-filter-content",children:[t.jsx("span",{className:"paper-feed-filter-icon","aria-hidden":"true",children:a}),s]}),e&&t.jsx("span",{className:"paper-feed-filter-check","aria-hidden":"true",children:"✓"})]}),ge=({hasCode:e,hasHfArtifacts:a,onHasCodeChange:s,onHasHfArtifactsChange:n,showDivider:o=!0,showHasCode:i=!0})=>t.jsxs("div",{className:"paper-feed-resource-controls",role:"group","aria-label":"Resource filters",children:[o&&t.jsx("span",{className:"paper-feed-resource-divider","aria-hidden":"true"}),t.jsxs("div",{className:"paper-feed-filter-options",children:[i&&t.jsx(B,{checked:e,icon:t.jsx(se,{name:"github",size:14}),label:"Has code",onChange:s}),t.jsx(B,{checked:a,icon:t.jsx(pe,{}),label:"Has artifacts",onChange:n})]})]});function ue(e,a="200px"){const{targetRef:s,isIntersecting:n}=ne({rootMargin:a}),{data:o,hasNextPage:i,isFetchingNextPage:d,fetchNextPage:l}=e;return u.useEffect(()=>{n&&i&&!d&&l()},[n,i,d,l,o]),s}const me=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]];function Ue(){const[e,a]=J(),s=e.get("order_by"),n=s==="date_published"||s==="citation_count"?s:"trending",o=e.get("has_code")==="true",i=e.get("has_hf_artifacts")==="true",d=V(e),l=(r,p)=>{const c=new URLSearchParams(e);p?c.set(r,p):c.delete(r),a(c)};return{searchParams:e,setSearchParams:a,orderBy:n,hasCode:o,hasHfArtifacts:i,dateRange:d,setOrderBy:r=>l("order_by",r==="trending"?null:r),setHasCode:r=>l("has_code",r?"true":null),setHasHfArtifacts:r=>l("has_hf_artifacts",r?"true":null),setDateRange:r=>a(Z(e,r)),filters:{order_by:n,order_dir:"desc",latest_only:!0,include_resources:!0,has_code:o,has_hf_artifacts:i,start_date:d.startDate,end_date:d.endDate}}}const ve=({feed:e,sorts:a=me,activeSort:s=e.orderBy,showDateFilter:n=!0,showHasCode:o,style:i,leading:d,children:l})=>t.jsxs("div",{className:"sort-bar",style:i,children:[d,t.jsxs("div",{className:"paper-feed-toolbar-controls",children:[a&&t.jsx("div",{className:"sort-options",children:a.map(([r,p])=>t.jsx("button",{type:"button",className:`sort-btn ${s===r?"active":""}`,onClick:()=>e.setOrderBy(r),children:p},r))}),t.jsx(ge,{hasCode:e.hasCode,hasHfArtifacts:e.hasHfArtifacts,onHasCodeChange:e.setHasCode,onHasHfArtifactsChange:e.setHasHfArtifacts,showDivider:!!a,showHasCode:o})]}),n&&t.jsx(he,{startDate:e.dateRange.startDate,endDate:e.dateRange.endDate,onChange:e.setDateRange}),l]}),fe=()=>t.jsx(j,{className:"h-40 w-full"}),xe=()=>t.jsxs("div",{className:"paper-card",children:[t.jsx("div",{className:"paper-thumb-wrap",children:t.jsx(j,{className:"paper-thumb-skeleton"})}),t.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[t.jsx(j,{className:"h-6 w-3/4"}),t.jsx(j,{className:"h-4 w-1/2"}),t.jsx(j,{className:"h-12 w-full"})]})]}),we=({query:e,isLoading:a=e.isLoading,cards:s,empty:n,skeleton:o="block",showInstitution:i,highlightQuery:d,cardHeader:l,rootMargin:r,children:p})=>{const c=ue(e,r);if(a){const g=o==="card"?xe:fe;return t.jsx("div",{className:"paper-list",children:Array.from({length:o==="card"?6:4}).map((m,f)=>t.jsx(g,{},f))})}return s.length===0?n===null?null:t.jsx("div",{className:"no-results",children:n}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"paper-list",children:s.map((g,m)=>t.jsxs(K.Fragment,{children:[l==null?void 0:l(m),t.jsx(X,{paper:g,priority:m<3,showInstitution:i,highlightQuery:d,followReasons:g.followReasons})]},g.id))}),t.jsx("div",{ref:c,style:{height:1}}),e.isFetchingNextPage&&t.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"}),p]})};export{he as P,we as a,ve as b,me as c,Ne as r,Ue as u,Se as w};
|
assets/{PaperPreviewLink-CPkn2Kqv.js → PaperPreviewLink-rxrEwjIH.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-BwrKSI2t.js";import{l as fe}from"./index-Duf3Rq7e.js";import R from"./katex-DkKDou_j.js";import{j as p,V as A,a3 as de,p as xe,w as C,f as ge,i as ye,L as T,b as we,A as be}from"./index-BuF8ktG8.js";import{H as Ne,a as ve,b as ke}from"./hover-card-yQsLTE4d.js";import{p as I}from"./papers-DOWhzKgr.js";import{u as Fe}from"./useMutation-H0Ru2KmC.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-BEoTUiXT.js → PaperReaderView-DkBLGada.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{d as s,b as Q,j as a,A as X,u as He,w as Fe,e as qe,a3 as Pe,Z as Ke,L as O}from"./index-CHGpuh10.js";import{u as Ue,R as De,A as Oe,c as Ve,d as Qe,a as Xe,P as Ze,e as Ye}from"./chatLifecycle-Bdz7bFwH.js";import{M as Ge}from"./MarkdownText-D0AGKKJ1.js";import{g as Je,a as et}from"./papers-BPpxs2sO.js";import{w as tt,e as rt,a as V,b as xe,c as we}from"./paperReader-h6jqpWHI.js";import{a as at}from"./usePapers-DzyOc-Ae.js";import{c as st}from"./chat-CuiFt2kN.js";import{s as Z}from"./safeExternalHref-CkBrsh84.js";import{ChatExperience as nt}from"./ChatView-BYQGLYvv.js";import"./chatSessions-BuiIkSLS.js";/* empty css */import"./hover-card-Dz7z6DCn.js";import"./CatalogEntityPreviewLink-C5CxvSnT.js";import"./catalog-DMzmJg__.js";import"./github-CRId1LT2.js";import"./file-text-DPLtNP9U.js";import"./PaperPreviewLink-CPkn2Kqv.js";import"./index-B141zdPU.js";import"./index-BzjqtLRb.js";import"./katex-DkKDou_j.js";import"./useMutation-3fOqWcpt.js";import"./thumbs-up-BGuynS0P.js";import"./copy-CvlL053K.js";import"./queryOptions-C9woPjwX.js";import"./arrow-left-C11GHdHp.js";import"./external-link-CeQVHd7V.js";import"./plus-CYgr1KdS.js";import"./search-Czb1C2Q7.js";import"./chevron-up-BnyqTe42.js";import"./AuthorAvatar-fJxhX3fO.js";import"./curation-DI9_zYNx.js";import"./useInfiniteQuery-DhWyWKGj.js";import"./McpShowcase-D5BEHBL4.js";import"./AgentLogos-PqR86_NK.js";import"./share-2-8l7A6ayI.js";import"./openrouter-CqtCKiJB.js";function ot(r){return r instanceof X&&r.status===422?"This page could not be turned into a readable paper.":r instanceof X&&r.status===503?"Paper content is still being prepared. Please try again later.":"The paper could not be loaded."}function it({paperId:r,paperKey:o,paperTitle:i,paperHref:g,sourceUrl:t,resources:c,paperVersion:h="",selectionEnabled:b=!1,onReady:P,onPaperSelection:W,onPaperSelectionError:l}){const C=s.useRef(null),f=Q({queryKey:["paperWebMarkdown",r],queryFn:()=>Je(r),staleTime:5*6e4,retry:(S,d)=>S<2&&!(d instanceof X&&d.status<500),retryDelay:3e3}),y=f.isSuccess;s.useEffect(()=>{y&&(P==null||P())},[P,y]),Ue({enabled:b&&!!h&&y,pagesRoot:C,routeId:o,paperVersion:h,numPages:1,onSelect:W,onError:l});const v=f.data?tt(f.data):"";return a.jsxs("div",{className:"pdf-viewer",children:[a.jsx(De,{paperTitle:i,paperHref:g,resources:c,label:"Paper controls",children:a.jsx("div",{className:"pdf-toolbar-controls",children:a.jsx("a",{href:t,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:f.isPending?a.jsx("div",{className:"pdf-loading",role:"status",children:"Preparing a readable version of this page…"}):f.isError?a.jsxs("div",{className:"pdf-error",role:"alert",children:[a.jsx("p",{children:ot(f.error)}),a.jsxs("div",{children:[a.jsx("button",{type:"button",onClick:()=>void f.refetch(),children:"Retry"})," ",a.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",children:"Open original"})]})]}):a.jsxs("article",{ref:C,className:"reader-web-document","data-page":"1",children:[!v.startsWith("# ")&&a.jsx("h1",{children:i}),a.jsx(Ge,{text:v})]})})})]})}const ye=66,ct=240,Y="pwc:reader:split-ratio";function lt(r){const o=Number(sessionStorage.getItem(we(r)));return Number.isInteger(o)&&o>0?o:1}function dt(){const r=Number(localStorage.getItem(Y));return Number.isFinite(r)&&r>=45&&r<=75?r:ye}function ut(r){const o=Z(r);if(!o)return null;const i=new URL(o);return(i.hostname==="arxiv.org"||i.hostname==="www.arxiv.org")&&i.pathname.startsWith("/pdf/")&&i.pathname.endsWith(".pdf")&&(i.pathname=i.pathname.slice(0,-4)),i.href}const ft=/^\/pdf\/(\d{4}\.\d{4,5}(?:v\d{1,3})?|[a-z]+(?:-[a-z]+)*(?:\.[A-Z]{2})?\/\d{7}(?:v\d{1,3})?)$/;function pt(r){const o=new URL(r),i=o.pathname.match(ft);return(o.hostname==="arxiv.org"||o.hostname==="www.arxiv.org")&&i&&!o.search?Pe(`/paper-assets/arxiv-pdf/${i[1]}`)??r:r}function mt(r){return new URL(r).hostname.replace(/^www\./,"")}function ht(r){if(!r)return{};const o={};for(const t of r.repositories??[]){if(!t.is_official)continue;const c=Z(t.url);if(!c)continue;const h=new URL(c),b=h.pathname.split("/").filter(Boolean);if((h.hostname==="github.com"||h.hostname==="www.github.com")&&b.length>=2){o.repository={href:c,stars:t.num_stars||0};break}}const i=[...r.project_pages??[]].sort((t,c)=>Number(c.is_official)-Number(t.is_official));for(const t of i){const c=Z(t.url);if(c){o.projectPage={href:c,label:mt(c)};break}}const g=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 g>0&&r.arxiv_id&&(o.huggingFace={href:`https://huggingface.co/papers/${r.arxiv_id.replace(/v\d+$/i,"")}`,count:g}),o}function gt({routeId:r}){var me,he,ge,be,ve;const o=qe(),i=at(r,!!r),g=Q({queryKey:["chatAvailability"],queryFn:()=>st.getAvailability(),refetchInterval:3e4,retry:!1}),t=i.data,c=t?rt(t):null,h=c?null:(t==null?void 0:t.source)==="external"?Pe(`/paper-assets/external/${t.id}/paper.pdf`):ut(t==null?void 0:t.url_pdf),b=h&&(t==null?void 0:t.source)!=="external"?pt(h):h,P=ht(t),W=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]),l=((me=t==null?void 0:t.arxiv_id)==null?void 0:me.replace(/v\d+$/i,""))||r,C=s.useCallback(()=>o(`/paper/${l}`),[l,o]),[f,y]=s.useState(()=>sessionStorage.getItem(V(r))||void 0),[v,S]=s.useState(dt),[d,Re]=s.useState(()=>sessionStorage.getItem(xe(r))==="1"),[x,k]=s.useState("paper"),[z,A]=s.useState(),[Se,je]=s.useState(),[_e,Ce]=s.useState(!1),ke=s.useCallback(()=>Ce(!0),[]),[Ae,R]=s.useState(""),[G]=s.useState(()=>lt(r)),[j,Ne]=s.useState(0),[J,ee]=s.useState(!1),[Ee,te]=s.useState(!1),N=s.useRef(null),L=s.useRef(null),E=s.useRef(null),re=s.useRef(null),ae=s.useRef(null),B=s.useRef(!1),T=s.useRef(!1),H=s.useRef(0),w=s.useRef(0),F=s.useRef(0),_=s.useRef(v),se=s.useRef(G),q=s.useRef(t==null?void 0:t.version),ne=Ve().reset,oe=s.useRef(f),p=j>=840;s.useEffect(()=>{oe.current!==f&&(oe.current=f,ne())},[f,ne]),s.useEffect(()=>{t!=null&&t.version&&q.current&&t.version!==q.current&&(A(void 0),R("")),q.current=t==null?void 0:t.version},[t==null?void 0:t.version]),s.useEffect(()=>()=>{window.clearTimeout(H.current),cancelAnimationFrame(w.current)},[]),s.useLayoutEffect(()=>{const e=N.current;if(!e)return;const n=()=>Ne(e.clientWidth);n();const u=new ResizeObserver(n);return u.observe(e),()=>u.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 u=e.content;e.content="noindex, nofollow";let m=document.querySelector('link[rel="canonical"]');const Le=!m;m||(m=document.createElement("link"),m.rel="canonical",document.head.appendChild(m));const Be=m.href;return m.href=`${window.location.origin}/paper/${l}`,()=>{document.title="Papers With Code",n?e==null||e.remove():e&&(e.content=u),Le?m==null||m.remove():m&&(m.href=Be)}},[l,t]);const $=s.useCallback(e=>{if(!j)return Math.max(45,Math.min(75,e));const n=480/j*100,u=100-360/j*100;return Math.max(n,Math.min(u,e))},[j]);s.useEffect(()=>S(e=>{const n=$(e);return _.current=n,n}),[$]);const I=e=>{const n=$(e);_.current=n,S(n),localStorage.setItem(Y,String(n))},ie=e=>{var u;const n=$(e);_.current=n,L.current&&(L.current.style.width=`${n}%`),E.current&&(E.current.style.width=`${100-n}%`),(u=re.current)==null||u.setAttribute("aria-valuenow",String(Math.round(n)))},ce=e=>{F.current=e,!w.current&&(w.current=requestAnimationFrame(()=>{var u;w.current=0;const n=(u=N.current)==null?void 0:u.getBoundingClientRect();n!=null&&n.width&&ie((F.current-n.left)/n.width*100)}))},Te=e=>{T.current=!0,ee(!0),e.currentTarget.setPointerCapture(e.pointerId),ce(e.clientX)},K=()=>{var e;if(T.current){if(w.current){cancelAnimationFrame(w.current),w.current=0;const n=(e=N.current)==null?void 0:e.getBoundingClientRect();n!=null&&n.width&&ie((F.current-n.left)/n.width*100)}T.current=!1,S(_.current),localStorage.setItem(Y,String(_.current)),ee(!1)}},le=e=>{window.clearTimeout(H.current),te(!0),Re(e),sessionStorage.setItem(xe(r),e?"1":"0"),H.current=window.setTimeout(()=>te(!1),ct+40)},de=e=>{B.current=!0,le(e)};s.useEffect(()=>{var e;B.current&&(B.current=!1,(e=d?ae.current:E.current)==null||e.focus())},[d]);const $e=e=>{y(e),sessionStorage.setItem(V(r),e)},Ie=()=>{y(void 0),sessionStorage.removeItem(V(r)),A(void 0),R("")},ue=((he=g.data)==null?void 0:he.paper_reader_selection_enabled)===!0,fe=e=>{A(e),R(`Selection from page ${e.page} added to chat`),p&&d&&le(!1)},Me=s.useCallback(e=>{A(e),e||R("")},[]),U=((ge=g.data)==null?void 0:ge.paper_reader_citations_enabled)===!0&&!!b,M=Q({queryKey:["paper-layout",l],queryFn:()=>et(l),enabled:U&&!!l,staleTime:5*6e4}).data,We=s.useMemo(()=>U?{layout:M,open:e=>{const n=M?Qe(M,e):[];n.length&&(je(u=>({boxes:n,nonce:((u==null?void 0:u.nonce)??0)+1})),k("paper"))}}:null,[U,M]),pe=Ke()&&((be=g.data)==null?void 0:be.paper_reader_chat_enabled)!==!1,D=!!(t&&pe&&!(c&&!_e)),ze=t&&pe&&!D?a.jsx("div",{className:"reader-chat-unavailable",role:"status",children:"Chat opens once the paper is ready."}):t&&D?a.jsx(nt,{mode:"paper",routeSessionId:f,primaryPaper:{id:t.id,routeId:l,title:t.title},currentPage:()=>se.current,paperSelection:z,onPaperSelectionChange:Me,onSessionId:$e,onReaderSubmit:()=>k("assistant"),onReaderNewChat:Ie,onReaderClose:p?()=>de(!0):void 0}):a.jsx("div",{className:"reader-chat-unavailable",children:"Chat is not enabled for this preview."});return i.isLoading?a.jsx("div",{className:"reader-status",role:"status",children:"Loading paper…"}):i.error||!t?a.jsxs("div",{className:"reader-status",role:"alert",children:[a.jsx("p",{children:"Paper not found."}),a.jsx(O,{to:"/papers",children:"Browse papers"})]}):((ve=g.data)==null?void 0:ve.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(O,{to:`/paper/${l}`,children:"Back to paper"})]}):!b&&!c?a.jsxs("div",{className:"reader-status",role:"alert",children:[a.jsx("p",{children:"Native reading is unavailable for this resource."}),a.jsx(O,{to:`/paper/${l}`,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":x==="paper",onClick:()=>k("paper"),children:"Paper"}),a.jsxs("button",{type:"button",role:"tab","aria-selected":x==="assistant","aria-label":z&&x!=="assistant"?"Chat, selection attached":"Chat",onClick:()=>k("assistant"),children:["Chat",z&&x!=="assistant"&&a.jsx("span",{className:"reader-tab-pending","aria-hidden":"true"})]})]}),a.jsx(Xe,{variant:"reader",children:a.jsxs("div",{ref:N,className:`reader-workspace${p?" is-desktop":" is-tabs"}${d?" is-assistant-collapsed":""}${J?" is-resizing":""}`,"data-testid":"paper-chat-workspace",children:[a.jsx("section",{ref:L,className:`reader-paper-pane${!p&&x!=="paper"?" is-hidden":""}`,style:p?{width:d?"100%":`${v}%`}:void 0,role:"tabpanel","aria-label":"Paper","aria-hidden":!p&&x!=="paper",children:c?a.jsx(it,{paperId:t.id,paperKey:l,paperTitle:t.title,paperHref:`/paper/${l}`,sourceUrl:c,resources:P,paperVersion:t.version,selectionEnabled:ue,onReady:ke,onPaperSelection:fe,onPaperSelectionError:R}):b&&a.jsx(Ze,{url:b,downloadUrl:h??b,paperKey:l,paperTitle:t.title,paperHref:`/paper/${l}`,onClose:C,resources:P,initialPage:G,resizeActive:J||Ee,selectionEnabled:ue,paperVersion:t.version,authors:W,loadErrorMessage:t.source==="external"?"Paper content is still being prepared. Please try again later.":void 0,onPaperSelection:fe,onPaperSelectionError:R,highlight:Se,onPageChange:e=>{se.current=e,sessionStorage.setItem(we(r),String(e))}})}),p&&!d&&a.jsx("div",{ref:re,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(v),tabIndex:0,onPointerDown:Te,onPointerMove:e=>{T.current&&ce(e.clientX)},onPointerUp:K,onPointerCancel:K,onLostPointerCapture:K,onDoubleClick:()=>I(ye),onKeyDown:e=>{(e.key==="ArrowLeft"||e.key==="ArrowRight")&&(e.preventDefault(),I(v+(e.key==="ArrowRight"?2:-2))),e.key==="Home"&&I(45),e.key==="End"&&I(75)}}),a.jsx("aside",{ref:E,id:"reader-chat-panel",className:`reader-assistant-pane${!p&&x!=="assistant"?" is-hidden":""}${p&&d?" is-collapsed":""}`,style:p?{width:d?0:`${100-v}%`}:void 0,role:"tabpanel","aria-label":"Chat","aria-hidden":!p&&x!=="assistant"||d,tabIndex:-1,children:a.jsx(Ye.Provider,{value:We,children:ze})}),a.jsx("div",{className:"sr-only","aria-live":"polite",children:Ae}),p&&(d||!D)&&a.jsx("button",{ref:ae,type:"button",className:"reader-collapse-assistant","aria-controls":"reader-chat-panel","aria-expanded":!d,onClick:()=>de(!d),children:d?"Open chat":"Hide chat"})]})})]})}function tr(){const{paperId:r=""}=He(),o=Fe(r).replace(/v\d+$/i,"");return a.jsx(Oe,{workspaceKey:`reader:${r}`,children:a.jsx(gt,{routeId:o},o)})}export{tr as default,ht as readerToolbarResources};
|
|
|
|
| 1 |
+
import{d as s,b as Q,j as a,A as X,u as He,w as Fe,e as qe,a3 as Pe,Z as Ke,L as O}from"./index-BuF8ktG8.js";import{u as Ue,R as De,A as Oe,c as Ve,d as Qe,a as Xe,P as Ze,e as Ye}from"./chatLifecycle-D28Ky42L.js";import{M as Ge}from"./MarkdownText-C90Ontxz.js";import{g as Je,a as et}from"./papers-DOWhzKgr.js";import{w as tt,e as rt,a as V,b as xe,c as we}from"./paperReader-h6jqpWHI.js";import{a as at}from"./usePapers-3mHbxOSK.js";import{c as st}from"./chat-CHBkoU9A.js";import{s as Z}from"./safeExternalHref-CkBrsh84.js";import{ChatExperience as nt}from"./ChatView-DfNYGQIS.js";import"./chatSessions-B7iq-KqS.js";/* empty css */import"./hover-card-yQsLTE4d.js";import"./CatalogEntityPreviewLink-BxpIu72v.js";import"./catalog-QOvavbkR.js";import"./github-BiawQL9z.js";import"./file-text-C-3F9H6w.js";import"./PaperPreviewLink-rxrEwjIH.js";import"./index-BwrKSI2t.js";import"./index-Duf3Rq7e.js";import"./katex-DkKDou_j.js";import"./useMutation-H0Ru2KmC.js";import"./thumbs-up-DazJcOnS.js";import"./copy-C2OymkVV.js";import"./queryOptions-C9woPjwX.js";import"./arrow-left-DHCUWtMI.js";import"./external-link-nrKLPLKY.js";import"./plus-9o2YwICS.js";import"./search-C8dgBkSf.js";import"./chevron-up-BsnqoNYc.js";import"./AuthorAvatar-CIgdnsA4.js";import"./curation-rx4Y4ai_.js";import"./useInfiniteQuery-DnjhR627.js";import"./McpShowcase-D4TTJi6V.js";import"./AgentLogos-BPQPDQNU.js";import"./share-2-DwfIgR_P.js";import"./openrouter-DmRs8Gyk.js";function ot(r){return r instanceof X&&r.status===422?"This page could not be turned into a readable paper.":r instanceof X&&r.status===503?"Paper content is still being prepared. Please try again later.":"The paper could not be loaded."}function it({paperId:r,paperKey:o,paperTitle:i,paperHref:g,sourceUrl:t,resources:c,paperVersion:h="",selectionEnabled:b=!1,onReady:P,onPaperSelection:W,onPaperSelectionError:l}){const C=s.useRef(null),f=Q({queryKey:["paperWebMarkdown",r],queryFn:()=>Je(r),staleTime:5*6e4,retry:(S,d)=>S<2&&!(d instanceof X&&d.status<500),retryDelay:3e3}),y=f.isSuccess;s.useEffect(()=>{y&&(P==null||P())},[P,y]),Ue({enabled:b&&!!h&&y,pagesRoot:C,routeId:o,paperVersion:h,numPages:1,onSelect:W,onError:l});const v=f.data?tt(f.data):"";return a.jsxs("div",{className:"pdf-viewer",children:[a.jsx(De,{paperTitle:i,paperHref:g,resources:c,label:"Paper controls",children:a.jsx("div",{className:"pdf-toolbar-controls",children:a.jsx("a",{href:t,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:f.isPending?a.jsx("div",{className:"pdf-loading",role:"status",children:"Preparing a readable version of this page…"}):f.isError?a.jsxs("div",{className:"pdf-error",role:"alert",children:[a.jsx("p",{children:ot(f.error)}),a.jsxs("div",{children:[a.jsx("button",{type:"button",onClick:()=>void f.refetch(),children:"Retry"})," ",a.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",children:"Open original"})]})]}):a.jsxs("article",{ref:C,className:"reader-web-document","data-page":"1",children:[!v.startsWith("# ")&&a.jsx("h1",{children:i}),a.jsx(Ge,{text:v})]})})})]})}const ye=66,ct=240,Y="pwc:reader:split-ratio";function lt(r){const o=Number(sessionStorage.getItem(we(r)));return Number.isInteger(o)&&o>0?o:1}function dt(){const r=Number(localStorage.getItem(Y));return Number.isFinite(r)&&r>=45&&r<=75?r:ye}function ut(r){const o=Z(r);if(!o)return null;const i=new URL(o);return(i.hostname==="arxiv.org"||i.hostname==="www.arxiv.org")&&i.pathname.startsWith("/pdf/")&&i.pathname.endsWith(".pdf")&&(i.pathname=i.pathname.slice(0,-4)),i.href}const ft=/^\/pdf\/(\d{4}\.\d{4,5}(?:v\d{1,3})?|[a-z]+(?:-[a-z]+)*(?:\.[A-Z]{2})?\/\d{7}(?:v\d{1,3})?)$/;function pt(r){const o=new URL(r),i=o.pathname.match(ft);return(o.hostname==="arxiv.org"||o.hostname==="www.arxiv.org")&&i&&!o.search?Pe(`/paper-assets/arxiv-pdf/${i[1]}`)??r:r}function mt(r){return new URL(r).hostname.replace(/^www\./,"")}function ht(r){if(!r)return{};const o={};for(const t of r.repositories??[]){if(!t.is_official)continue;const c=Z(t.url);if(!c)continue;const h=new URL(c),b=h.pathname.split("/").filter(Boolean);if((h.hostname==="github.com"||h.hostname==="www.github.com")&&b.length>=2){o.repository={href:c,stars:t.num_stars||0};break}}const i=[...r.project_pages??[]].sort((t,c)=>Number(c.is_official)-Number(t.is_official));for(const t of i){const c=Z(t.url);if(c){o.projectPage={href:c,label:mt(c)};break}}const g=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 g>0&&r.arxiv_id&&(o.huggingFace={href:`https://huggingface.co/papers/${r.arxiv_id.replace(/v\d+$/i,"")}`,count:g}),o}function gt({routeId:r}){var me,he,ge,be,ve;const o=qe(),i=at(r,!!r),g=Q({queryKey:["chatAvailability"],queryFn:()=>st.getAvailability(),refetchInterval:3e4,retry:!1}),t=i.data,c=t?rt(t):null,h=c?null:(t==null?void 0:t.source)==="external"?Pe(`/paper-assets/external/${t.id}/paper.pdf`):ut(t==null?void 0:t.url_pdf),b=h&&(t==null?void 0:t.source)!=="external"?pt(h):h,P=ht(t),W=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]),l=((me=t==null?void 0:t.arxiv_id)==null?void 0:me.replace(/v\d+$/i,""))||r,C=s.useCallback(()=>o(`/paper/${l}`),[l,o]),[f,y]=s.useState(()=>sessionStorage.getItem(V(r))||void 0),[v,S]=s.useState(dt),[d,Re]=s.useState(()=>sessionStorage.getItem(xe(r))==="1"),[x,k]=s.useState("paper"),[z,A]=s.useState(),[Se,je]=s.useState(),[_e,Ce]=s.useState(!1),ke=s.useCallback(()=>Ce(!0),[]),[Ae,R]=s.useState(""),[G]=s.useState(()=>lt(r)),[j,Ne]=s.useState(0),[J,ee]=s.useState(!1),[Ee,te]=s.useState(!1),N=s.useRef(null),L=s.useRef(null),E=s.useRef(null),re=s.useRef(null),ae=s.useRef(null),B=s.useRef(!1),T=s.useRef(!1),H=s.useRef(0),w=s.useRef(0),F=s.useRef(0),_=s.useRef(v),se=s.useRef(G),q=s.useRef(t==null?void 0:t.version),ne=Ve().reset,oe=s.useRef(f),p=j>=840;s.useEffect(()=>{oe.current!==f&&(oe.current=f,ne())},[f,ne]),s.useEffect(()=>{t!=null&&t.version&&q.current&&t.version!==q.current&&(A(void 0),R("")),q.current=t==null?void 0:t.version},[t==null?void 0:t.version]),s.useEffect(()=>()=>{window.clearTimeout(H.current),cancelAnimationFrame(w.current)},[]),s.useLayoutEffect(()=>{const e=N.current;if(!e)return;const n=()=>Ne(e.clientWidth);n();const u=new ResizeObserver(n);return u.observe(e),()=>u.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 u=e.content;e.content="noindex, nofollow";let m=document.querySelector('link[rel="canonical"]');const Le=!m;m||(m=document.createElement("link"),m.rel="canonical",document.head.appendChild(m));const Be=m.href;return m.href=`${window.location.origin}/paper/${l}`,()=>{document.title="Papers With Code",n?e==null||e.remove():e&&(e.content=u),Le?m==null||m.remove():m&&(m.href=Be)}},[l,t]);const $=s.useCallback(e=>{if(!j)return Math.max(45,Math.min(75,e));const n=480/j*100,u=100-360/j*100;return Math.max(n,Math.min(u,e))},[j]);s.useEffect(()=>S(e=>{const n=$(e);return _.current=n,n}),[$]);const I=e=>{const n=$(e);_.current=n,S(n),localStorage.setItem(Y,String(n))},ie=e=>{var u;const n=$(e);_.current=n,L.current&&(L.current.style.width=`${n}%`),E.current&&(E.current.style.width=`${100-n}%`),(u=re.current)==null||u.setAttribute("aria-valuenow",String(Math.round(n)))},ce=e=>{F.current=e,!w.current&&(w.current=requestAnimationFrame(()=>{var u;w.current=0;const n=(u=N.current)==null?void 0:u.getBoundingClientRect();n!=null&&n.width&&ie((F.current-n.left)/n.width*100)}))},Te=e=>{T.current=!0,ee(!0),e.currentTarget.setPointerCapture(e.pointerId),ce(e.clientX)},K=()=>{var e;if(T.current){if(w.current){cancelAnimationFrame(w.current),w.current=0;const n=(e=N.current)==null?void 0:e.getBoundingClientRect();n!=null&&n.width&&ie((F.current-n.left)/n.width*100)}T.current=!1,S(_.current),localStorage.setItem(Y,String(_.current)),ee(!1)}},le=e=>{window.clearTimeout(H.current),te(!0),Re(e),sessionStorage.setItem(xe(r),e?"1":"0"),H.current=window.setTimeout(()=>te(!1),ct+40)},de=e=>{B.current=!0,le(e)};s.useEffect(()=>{var e;B.current&&(B.current=!1,(e=d?ae.current:E.current)==null||e.focus())},[d]);const $e=e=>{y(e),sessionStorage.setItem(V(r),e)},Ie=()=>{y(void 0),sessionStorage.removeItem(V(r)),A(void 0),R("")},ue=((he=g.data)==null?void 0:he.paper_reader_selection_enabled)===!0,fe=e=>{A(e),R(`Selection from page ${e.page} added to chat`),p&&d&&le(!1)},Me=s.useCallback(e=>{A(e),e||R("")},[]),U=((ge=g.data)==null?void 0:ge.paper_reader_citations_enabled)===!0&&!!b,M=Q({queryKey:["paper-layout",l],queryFn:()=>et(l),enabled:U&&!!l,staleTime:5*6e4}).data,We=s.useMemo(()=>U?{layout:M,open:e=>{const n=M?Qe(M,e):[];n.length&&(je(u=>({boxes:n,nonce:((u==null?void 0:u.nonce)??0)+1})),k("paper"))}}:null,[U,M]),pe=Ke()&&((be=g.data)==null?void 0:be.paper_reader_chat_enabled)!==!1,D=!!(t&&pe&&!(c&&!_e)),ze=t&&pe&&!D?a.jsx("div",{className:"reader-chat-unavailable",role:"status",children:"Chat opens once the paper is ready."}):t&&D?a.jsx(nt,{mode:"paper",routeSessionId:f,primaryPaper:{id:t.id,routeId:l,title:t.title},currentPage:()=>se.current,paperSelection:z,onPaperSelectionChange:Me,onSessionId:$e,onReaderSubmit:()=>k("assistant"),onReaderNewChat:Ie,onReaderClose:p?()=>de(!0):void 0}):a.jsx("div",{className:"reader-chat-unavailable",children:"Chat is not enabled for this preview."});return i.isLoading?a.jsx("div",{className:"reader-status",role:"status",children:"Loading paper…"}):i.error||!t?a.jsxs("div",{className:"reader-status",role:"alert",children:[a.jsx("p",{children:"Paper not found."}),a.jsx(O,{to:"/papers",children:"Browse papers"})]}):((ve=g.data)==null?void 0:ve.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(O,{to:`/paper/${l}`,children:"Back to paper"})]}):!b&&!c?a.jsxs("div",{className:"reader-status",role:"alert",children:[a.jsx("p",{children:"Native reading is unavailable for this resource."}),a.jsx(O,{to:`/paper/${l}`,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":x==="paper",onClick:()=>k("paper"),children:"Paper"}),a.jsxs("button",{type:"button",role:"tab","aria-selected":x==="assistant","aria-label":z&&x!=="assistant"?"Chat, selection attached":"Chat",onClick:()=>k("assistant"),children:["Chat",z&&x!=="assistant"&&a.jsx("span",{className:"reader-tab-pending","aria-hidden":"true"})]})]}),a.jsx(Xe,{variant:"reader",children:a.jsxs("div",{ref:N,className:`reader-workspace${p?" is-desktop":" is-tabs"}${d?" is-assistant-collapsed":""}${J?" is-resizing":""}`,"data-testid":"paper-chat-workspace",children:[a.jsx("section",{ref:L,className:`reader-paper-pane${!p&&x!=="paper"?" is-hidden":""}`,style:p?{width:d?"100%":`${v}%`}:void 0,role:"tabpanel","aria-label":"Paper","aria-hidden":!p&&x!=="paper",children:c?a.jsx(it,{paperId:t.id,paperKey:l,paperTitle:t.title,paperHref:`/paper/${l}`,sourceUrl:c,resources:P,paperVersion:t.version,selectionEnabled:ue,onReady:ke,onPaperSelection:fe,onPaperSelectionError:R}):b&&a.jsx(Ze,{url:b,downloadUrl:h??b,paperKey:l,paperTitle:t.title,paperHref:`/paper/${l}`,onClose:C,resources:P,initialPage:G,resizeActive:J||Ee,selectionEnabled:ue,paperVersion:t.version,authors:W,loadErrorMessage:t.source==="external"?"Paper content is still being prepared. Please try again later.":void 0,onPaperSelection:fe,onPaperSelectionError:R,highlight:Se,onPageChange:e=>{se.current=e,sessionStorage.setItem(we(r),String(e))}})}),p&&!d&&a.jsx("div",{ref:re,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(v),tabIndex:0,onPointerDown:Te,onPointerMove:e=>{T.current&&ce(e.clientX)},onPointerUp:K,onPointerCancel:K,onLostPointerCapture:K,onDoubleClick:()=>I(ye),onKeyDown:e=>{(e.key==="ArrowLeft"||e.key==="ArrowRight")&&(e.preventDefault(),I(v+(e.key==="ArrowRight"?2:-2))),e.key==="Home"&&I(45),e.key==="End"&&I(75)}}),a.jsx("aside",{ref:E,id:"reader-chat-panel",className:`reader-assistant-pane${!p&&x!=="assistant"?" is-hidden":""}${p&&d?" is-collapsed":""}`,style:p?{width:d?0:`${100-v}%`}:void 0,role:"tabpanel","aria-label":"Chat","aria-hidden":!p&&x!=="assistant"||d,tabIndex:-1,children:a.jsx(Ye.Provider,{value:We,children:ze})}),a.jsx("div",{className:"sr-only","aria-live":"polite",children:Ae}),p&&(d||!D)&&a.jsx("button",{ref:ae,type:"button",className:"reader-collapse-assistant","aria-controls":"reader-chat-panel","aria-expanded":!d,onClick:()=>de(!d),children:d?"Open chat":"Hide chat"})]})})]})}function tr(){const{paperId:r=""}=He(),o=Fe(r).replace(/v\d+$/i,"");return a.jsx(Oe,{workspaceKey:`reader:${r}`,children:a.jsx(gt,{routeId:o},o)})}export{tr as default,ht as readerToolbarResources};
|
assets/{PapersListView-BkLVnEdQ.js → PapersListView-DIAhWDQT.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{d as f,p as M,b as K,j as e,L as x,l as V,o as X,T as J}from"./index-
|
|
|
|
| 1 |
+
import{d as f,p as M,b as K,j as e,L as x,l as V,o as X,T as J}from"./index-BuF8ktG8.js";import{T as W}from"./SotaBadges-BFyAOF4Y.js";import{I as H}from"./Icon-aDKp5nB1.js";import{u as Y,P as Z,b as ee,c as se,a as re}from"./PaperFeed-BkUBd-xO.js";import{c as ae}from"./catalog-QOvavbkR.js";import{p as O}from"./papers-DOWhzKgr.js";import{t as te,d as ne}from"./transform-CHck6g-D.js";import{u as Q}from"./usePapers-3mHbxOSK.js";import{u as ie}from"./useDebounce-BUkXLj1o.js";import{S as oe}from"./skeleton-Dp4VcttN.js";import{A as le,a as ce}from"./alert-ClESc45e.js";import{i as de}from"./apiErrors-Bu7TuOPW.js";import{f as me}from"./frameworks-DDA0P4Tf.js";import"./colors-BkWRhvFI.js";import"./PaperCard-C_kRm1Bt.js";import"./AuthorAvatar-CIgdnsA4.js";import"./LatexTitle-CXoQ1Bzq.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-NrNmZ8VR.js";import"./useIntersectionObserver-Cvgl2pBE.js";import"./curation-rx4Y4ai_.js";import"./useInfiniteQuery-DnjhR627.js";const g=360;function pe(r,t){const c=r.toLocaleLowerCase();return t.trim().split(/\s+/).filter(Boolean).reduce((i,l)=>{const o=c.indexOf(l.toLocaleLowerCase());return o>=0&&(i<0||o<i)?o:i},-1)}function z(r,t,c){if((r.slice(0,t).match(/\$/g)||[]).length%2===0)return t;if(c==="start")return r.lastIndexOf("$",t)+1;const l=r.indexOf("$",t);return l>=0?l+1:t}function he(r,t){if(r.length<=g)return r;const c=pe(r,t);if(c<0||c<g*.6)return r;let i=Math.max(0,c-Math.floor(g*.35)),l=Math.min(r.length,i+g);return i=z(r,i,"start"),l=z(r,l,"end"),`${i>0?"…":""}${r.slice(i,l).trim()}${l<r.length?"…":""}`}const ue=[["relevance","relevance"],["date_published","newest"],["citation_count","most cited"]],Ie=()=>{var L,R,T,D,$,A,I,B,q;const r=Y(),{searchParams:t,setSearchParams:c}=r,i=t.get("framework")||void 0,l=t.get("repository")||void 0,o=!!(i||l),d=t.get("search")||"",[b,F]=f.useState(d),h=ie(b,300),n=!o&&d.trim().length>0;f.useEffect(()=>F(d),[d]),f.useEffect(()=>{if(h===d)return;const a=new URLSearchParams(t);h?a.set("search",h):a.delete("search"),c(a,{replace:!0})},[h]),f.useEffect(()=>{const a=t.get("order_by"),m=new URLSearchParams(t);n&&!["relevance","date_published","citation_count"].includes(a||"")?(m.set("order_by","relevance"),c(m,{replace:!0})):!n&&a==="relevance"&&(m.delete("order_by"),c(m,{replace:!0}))},[n,t,c]);const j=n&&r.orderBy==="trending"?"relevance":r.orderBy,S=!o&&r.hasCode,P={...r.filters,has_code:S,search:o&&h||void 0,conference:t.get("conference")||void 0,latest_only:t.get("latest_only")!=="false",framework:i,repository:l},k=Q([...M.feeds.infinite,P],a=>O.list({...P,page:a,page_size:20}),{enabled:!n}),_={q:h.trim(),order_by:j==="trending"?"relevance":j,start_date:r.dateRange.startDate,end_date:r.dateRange.endDate,has_code:S,has_hf_artifacts:r.hasHfArtifacts},E=Q([...M.feeds.search,_],a=>O.searchFeed({..._,page:a,page_size:20,mode:"hybrid"}),{enabled:n&&_.q.length>0}),p=n?E:k,C=K({queryKey:X.topTasksSidebar,queryFn:()=>ae.topTasks(8),enabled:!o&&!n,staleTime:J}),v=f.useMemo(()=>{var m;return(((m=p.data)==null?void 0:m.pages.flatMap(N=>N.results))||[]).map(N=>{const w=te(N);return n?{...w,abstract:he(w.abstract,d)}:w})},[p.data,n,d]),u=((T=(R=(L=k.data)==null?void 0:L.pages)==null?void 0:R[0])==null?void 0:T.count)??0,s=(A=($=(D=k.data)==null?void 0:D.pages)==null?void 0:$[0])==null?void 0:A.scope,y=(B=(I=E.data)==null?void 0:I.pages)==null?void 0:B.at(-1),G=i&&de(p.error),U=(s==null?void 0:s.kind)==="framework"?s.framework_name:s==null?void 0:s.repository;return e.jsxs("div",{className:"page",children:[(s==null?void 0:s.kind)==="framework"&&e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(x,{to:"/",children:"Papers"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx(x,{to:"/frameworks",children:"Frameworks"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:s.framework_name})]}),e.jsxs("div",{className:"feed-header",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"feed-title",children:o?e.jsxs(e.Fragment,{children:["Papers implemented by ",e.jsx("em",{children:U||i||l})]}):n?e.jsxs(e.Fragment,{children:["Search results for ",e.jsxs("em",{children:["“",d,"”"]})]}):e.jsxs(e.Fragment,{children:["All ",e.jsx("em",{children:"Papers"})]})}),e.jsx("div",{className:"feed-subtitle",children:o?(s==null?void 0:s.kind)==="framework"?u>0&&`${u.toLocaleString()} papers.`:s!=null&&s.repository?e.jsxs(e.Fragment,{children:["GitHub repository ",e.jsx("strong",{children:s.repository}),". ",u>0&&`${u.toLocaleString()} papers.`]}):"Repository-scoped paper feed.":n?`${v.length} loaded from the most relevant results.`:e.jsxs(e.Fragment,{children:["Search the full corpus. ",u>0&&`${u.toLocaleString()} papers indexed.`]})}),o&&s&&e.jsxs("div",{className:"paper-feed-scope-links",children:[e.jsxs("div",{className:"paper-feed-primary-links",children:[s.github_url&&e.jsxs("a",{href:s.github_url,target:"_blank",rel:"noopener noreferrer",className:s.kind==="framework"?"task-framework-link":"framework-link",children:[e.jsx(H,{name:"github",size:13}),s.kind==="framework"?e.jsxs(e.Fragment,{children:[e.jsx("span",{children:s.repository||"GitHub"}),s.num_stars!=null&&e.jsxs("span",{className:"task-framework-link-stars",children:["★ ",me(s.num_stars)]})]}):"GitHub"]}),s.kind==="framework"&&s.introducing_paper_arxiv_id&&e.jsx(x,{to:`/paper/${s.introducing_paper_arxiv_id}`,className:"framework-link",children:"Introducing paper"})]}),s.kind==="framework"&&s.recommended_tasks&&s.recommended_tasks.length>0&&e.jsx("div",{className:"paper-feed-task-tags",children:s.recommended_tasks.map(a=>a.slug?e.jsx(W,{slug:a.slug,label:a.name},a.id):null)})]})]}),e.jsx(Z,{startDate:r.dateRange.startDate,endDate:r.dateRange.endDate,onChange:r.setDateRange})]}),e.jsx("div",{className:"papers-search-row",children:e.jsxs("div",{className:"papers-search-input-wrap",children:[e.jsx(H,{name:"search",size:14}),e.jsx("input",{className:"papers-search-input",placeholder:"Search title or abstract…",value:b,onChange:a=>F(a.target.value)})]})}),e.jsxs("div",{className:o||n?"papers-feed-layout-scoped":"layout-with-sidebar",children:[!o&&!n&&e.jsx("aside",{className:"sidebar",children:e.jsxs("div",{className:"sidebar-section",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),C.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((a,m)=>e.jsx(oe,{className:"h-5 w-full"},m))}),e.jsx("div",{className:"sidebar-links",children:(q=C.data)==null?void 0:q.map(a=>e.jsxs(x,{to:`/tasks/${a.slug}`,className:"sidebar-link",children:[ne(a.name,a.slug),a.paper_count!=null&&e.jsx("span",{className:"count",children:a.paper_count})]},a.id))})]})}),e.jsxs("div",{children:[e.jsx(ee,{feed:r,sorts:n?ue:se,activeSort:j,showDateFilter:!1,showHasCode:!o,children:e.jsxs("div",{className:"results-count",children:[v.length," loaded"]})}),G?e.jsx("div",{className:"no-results",children:"Framework not found."}):e.jsxs(e.Fragment,{children:[p.error&&e.jsx(le,{variant:"destructive",className:"mb-4",children:e.jsx(ce,{children:"Failed to load papers. Please try again."})}),e.jsx(re,{query:p,cards:v,skeleton:"card",highlightQuery:n?d:void 0,empty:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:"No matching papers."}),n&&V()&&e.jsx(x,{to:`/chat?q=${encodeURIComponent(d.trim())}`,children:"Ask the assistant instead"})]}),children:!p.hasNextPage&&!p.isFetchingNextPage&&n&&e.jsx("div",{className:"search-results-end",children:y!=null&&y.cap_reached?"End of the top 100 results":"End of results"})})]})]})]})]})};export{Ie as default};
|
assets/{PrivacyView-Dv3D7fuz.js → PrivacyView-D1F1BW5v.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{j as e}from"./index-
|
|
|
|
| 1 |
+
import{j as e}from"./index-BuF8ktG8.js";import{u as s,f as i}from"./useDocumentTitle-DZHc-0SQ.js";const t=()=>(s(i("Privacy Policy")),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{t as default};
|
assets/{RateLimitsView-CHGVVIWH.js → RateLimitsView-DwWJ7bNa.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{b as t,j as e}from"./index-
|
|
|
|
| 1 |
+
import{b as t,j as e}from"./index-BuF8ktG8.js";import{a as s}from"./account-BGPDCUJL.js";const n=()=>{const i=t({queryKey:["submission-rate-limit-policy"],queryFn:()=>s.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};
|
assets/{ResearchFollowButton-DFGdTBex.js → ResearchFollowButton-BWlDUBnb.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{f as x,c as j,d as b,k as F,j as e,h as N,C as S,L as i}from"./index-
|
|
|
|
| 1 |
+
import{f as x,c as j,d as b,k as F,j as e,h as N,C as S,L as i}from"./index-BuF8ktG8.js";import{u as y,g as C}from"./researchTopic-Cz5Cn_RO.js";import{P as w}from"./plus-9o2YwICS.js";const f={task:"Get new papers on this task",method:"Get new papers using this method",benchmark:"Get new results on this benchmark",author:"Get new papers by this author",organization:"Get new papers from this organization"};function R({kind:o,entityId:n}){var u;const l=x(),c=l==null?void 0:l.user,h=j(),[m,p]=b.useState(null),d=`${o}:${n}`,a=y(),s=((u=a.data)==null?void 0:u.some(r=>r.kind===o&&String(r.entity_id)===String(n)))??!1,t=C({onChanged:({follow:r})=>p(r?d:null),awaitRefresh:!0});if(!l||!c&&F())return null;if(!c)return e.jsxs("div",{className:"research-follow",children:[e.jsxs("a",{className:"research-follow-btn",href:N(h.pathname+h.search),children:[e.jsx(w,{"aria-hidden":"true"}),"Follow"]}),e.jsxs("span",{className:"research-follow-hint",children:["Sign in to ",f[o].toLowerCase(),"."]})]});const g=t.error||a.error;return e.jsxs("div",{className:"research-follow",children:[e.jsx("button",{type:"button",className:s?"research-follow-btn is-following":"research-follow-btn",disabled:a.isLoading||!!a.error||t.isPending,"aria-pressed":s,"aria-label":s?"Unfollow":"Follow",onClick:()=>t.mutate({kind:o,entityId:n,follow:!s}),children:s?e.jsxs(e.Fragment,{children:[e.jsx(S,{"aria-hidden":"true"}),e.jsx("span",{className:"research-follow-label",children:"Following"}),e.jsx("span",{className:"research-follow-label-hover",children:"Unfollow"})]}):e.jsxs(e.Fragment,{children:[e.jsx(w,{"aria-hidden":"true"}),"Follow"]})}),g?e.jsx("span",{className:"research-follow-hint is-error",role:"alert",children:"Could not update follows. Please try again."}):s?m===d&&e.jsxs("span",{className:"research-follow-hint",role:"status",children:["Added to ",e.jsx(i,{to:"/following",children:"your Following feed"})," · ",e.jsx(i,{to:"/settings",children:"Manage in Settings"})]}):e.jsxs("span",{className:"research-follow-hint",children:[f[o]," in ",e.jsx(i,{to:"/following",children:"your Following feed"}),"."]})]})}export{R};
|
assets/{SavedPapersView-B2OtoH-9.js → SavedPapersView-BkTuct4d.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{a as g,b as v,A as x,j as e,H as j,L as b,p as N}from"./index-
|
|
|
|
| 1 |
+
import{a as g,b as v,A as x,j as e,H as j,L as b,p as N}from"./index-BuF8ktG8.js";import{P as f}from"./PaperCard-C_kRm1Bt.js";import{T as k}from"./SotaBadges-BFyAOF4Y.js";import{S as r}from"./skeleton-Dp4VcttN.js";import{A as y,a as w}from"./alert-ClESc45e.js";import{a as A}from"./account-BGPDCUJL.js";import{t as B}from"./transform-CHck6g-D.js";import{s as F}from"./savedPapersAuth-CpvoczKN.js";import"./AuthorAvatar-CIgdnsA4.js";import"./Icon-aDKp5nB1.js";import"./LatexTitle-CXoQ1Bzq.js";import"./papers-DOWhzKgr.js";import"./curation-rx4Y4ai_.js";import"./safeExternalHref-CkBrsh84.js";import"./colors-BkWRhvFI.js";const U=()=>{var d,l;const{user:i,isLoading:m}=g(),a=v({queryKey:[...N.feeds.saved],queryFn:()=>A.getBookmarks(),enabled:!!i,staleTime:30*1e3}),c=a.error instanceof x&&a.error.code==="saved_papers_bucket_authorization_required",o=!!a.data&&!a.data.bucket_connected,n=()=>{window.location.assign(F())};if(m)return e.jsxs("div",{className:"page",children:[e.jsx(r,{className:"h-10 w-1/3 mb-4"}),e.jsx(r,{className:"h-6 w-1/2 mb-8"})]});if(!i)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:["Saved ",e.jsx("em",{children:"Papers"})]}),e.jsx("div",{className:"feed-subtitle",children:"Sign in with Hugging Face to save papers and revisit them later."})]})}),e.jsx("div",{className:"saved-signin-panel",children:e.jsx(j,{returnTo:"/saved"})})]});let h=0;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:["Saved ",e.jsx("em",{children:"Papers"})]}),e.jsxs("div",{className:"feed-subtitle",children:[(d=a.data)!=null&&d.count?`${a.data.count.toLocaleString()} saved · grouped by domain`:"Your bookmarked papers, grouped by domain.",(l=a.data)!=null&&l.bucket_connected?e.jsxs(e.Fragment,{children:[" · ",e.jsx("a",{href:`https://huggingface.co/buckets/${i.username}/pwc-saved-papers`,target:"_blank",rel:"noopener noreferrer",children:"Open your Hugging Face Bucket"})]}):null]})]})}),c?e.jsxs("div",{className:"saved-bucket-migration",children:[e.jsx("p",{children:"Your saved papers are still safe in Papers With Code. Approve Bucket access to copy them into a private Hugging Face Bucket that belongs to you."}),e.jsx("button",{type:"button",className:"hf-signin-btn",onClick:n,children:"Approve and migrate saved papers"})]}):a.error?e.jsx(y,{variant:"destructive",className:"mb-4",children:e.jsx(w,{children:"Failed to load your saved papers. Please try again."})}):null,o&&a.data.bucket_migrated?e.jsxs("div",{className:"saved-bucket-migration",children:[e.jsx("p",{children:"Your saved papers are already in your private Hugging Face Bucket. Reconnect it in this browser to read from it and save new papers there."}),e.jsx("button",{type:"button",className:"hf-signin-btn",onClick:n,children:"Reconnect Hugging Face Bucket"})]}):o?e.jsxs("div",{className:"saved-bucket-migration",children:[e.jsxs("p",{children:[a.data.count?`Your ${a.data.count.toLocaleString()} saved ${a.data.count===1?"paper is":"papers are"} still available below. `:"When you save your first paper, ","Approve Bucket access to copy saved papers into a private Hugging Face Bucket that belongs to you. The existing data is kept until the copy is verified."]}),e.jsx("button",{type:"button",className:"hf-signin-btn",onClick:n,children:a.data.count?"Approve and migrate saved papers":"Use a Hugging Face Bucket"})]}):null,c||a.error?null:a.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((t,s)=>e.jsxs("div",{className:"paper-card",children:[e.jsx(r,{className:"h-[220px] w-[160px]"}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(r,{className:"h-6 w-3/4"}),e.jsx(r,{className:"h-4 w-1/2"}),e.jsx(r,{className:"h-12 w-full"})]})]},s))}):!a.data||a.data.count===0?e.jsxs("div",{className:"no-results",children:["No saved papers yet."," ",e.jsx(b,{to:"/papers",className:"sidebar-link",style:{display:"inline"},children:"Browse papers →"})]}):a.data.areas.map(t=>e.jsxs("section",{className:"saved-area-section",children:[e.jsx("h2",{className:"saved-area-heading",children:t.name}),t.tasks.map(s=>{const p=s.papers.length;return e.jsxs("div",{className:"saved-task-block",children:[e.jsxs("div",{className:"saved-task-row",children:[s.slug?e.jsx(k,{slug:s.slug,label:s.name}):e.jsx("span",{className:"tag-chip",style:{background:"var(--surface)"},children:s.name}),e.jsxs("span",{className:"saved-task-count",children:[p," ",p===1?"paper":"papers"]})]}),e.jsx("div",{className:"paper-list",children:s.papers.map(u=>e.jsx(f,{paper:B(u),priority:h++<3},u.id))})]},`task-${t.id??"other"}-${s.id??"untagged"}`)})]},`area-${t.id??"other"}`))]})};export{U as default};
|
assets/{SearchOverlay-DLtGxH8I.js → SearchOverlay-v5_W9diY.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{d as K,e as O,V as M,l as B,b as i,j as e,p as H}from"./index-
|
|
|
|
| 1 |
+
import{d as K,e as O,V as M,l as B,b as i,j as e,p as H}from"./index-BuF8ktG8.js";import{L as U}from"./LatexTitle-CXoQ1Bzq.js";import{c as x}from"./catalog-QOvavbkR.js";import{p as R}from"./papers-DOWhzKgr.js";import{u as Y}from"./useDebounce-BUkXLj1o.js";import{c as G,h as V}from"./colors-BkWRhvFI.js";import{d as X}from"./transform-CHck6g-D.js";import"./curation-rx4Y4ai_.js";const Z=10,S=6,W=350,v=3,ls=({open:t,onClose:h})=>{var A,C,w,P,Q,z;const f=K.useRef(null),$=O(),[c,D]=M.useState(""),a=Y(c,W),j=c.trim(),r=a.trim().length>=v,y=B();K.useEffect(()=>{var l;if(!t)return;(l=f.current)==null||l.focus();const s=N=>{N.key==="Escape"&&(N.preventDefault(),N.stopPropagation(),h())};return window.addEventListener("keydown",s,!0),()=>window.removeEventListener("keydown",s,!0)},[t,h]);const k=i({queryKey:[...H.feeds.searchOverlay,a],queryFn:()=>R.search(a,1,Z),enabled:t&&r,staleTime:6e4,retry:!1}),_=i({queryKey:["search-tasks",a],queryFn:()=>x.listTasks({q:a,page_size:6}),enabled:t&&r,staleTime:6e4,retry:!1}),b=i({queryKey:["search-methods",a],queryFn:()=>x.listMethods({q:a,page_size:6}),enabled:t&&r,staleTime:6e4,retry:!1}),E=i({queryKey:["search-benchmarks",a],queryFn:()=>x.listDatasets({q:a,page_size:6}),enabled:t&&r,staleTime:6e4,retry:!1}),F=i({queryKey:["search-authors",a],queryFn:()=>R.searchAuthors(a,S),enabled:t&&r,staleTime:6e4,retry:!1}),q=i({queryKey:["search-organizations",a],queryFn:()=>x.searchOrganizations(a,S),enabled:t&&r,staleTime:6e4,retry:!1});if(!t)return null;const o=((A=_.data)==null?void 0:A.results)||[],d=((C=b.data)==null?void 0:C.results)||[],u=((w=E.data)==null?void 0:w.results)||[],m=((P=F.data)==null?void 0:P.results)||[],p=((Q=q.data)==null?void 0:Q.results)||[],g=((z=k.data)==null?void 0:z.results)||[],I=k.isFetching||_.isFetching||b.isFetching||E.isFetching||F.isFetching||q.isFetching,L=o.length||g.length||d.length||u.length||m.length||p.length,n=s=>{h(),$(s)},T=()=>{const s=c.trim();s&&n(`/chat?q=${encodeURIComponent(s)}`)};return e.jsx("div",{className:"search-overlay",onClick:h,children:e.jsxs("div",{className:"search-modal",onClick:s=>s.stopPropagation(),children:[e.jsx("input",{ref:f,className:"search-modal-input",placeholder:"Search papers, tasks, methods, benchmarks, authors, or organizations…",value:c,onChange:s=>D(s.target.value),onKeyDown:s=>{y&&s.key==="Enter"&&(s.preventDefault(),T())}}),e.jsxs("div",{className:"search-results",children:[y&&c.trim()&&e.jsxs("button",{type:"button",className:"search-ask-row",onClick:T,children:[e.jsx("span",{className:"search-ask-chip",children:"assistant"}),e.jsxs("span",{className:"search-ask-text",children:["Ask: “",c.trim(),"”"]}),e.jsx("kbd",{children:"↵"})]}),!a&&e.jsxs("div",{className:"search-empty",children:["Try “diffusion”, “object detection”, or an arXiv id.",y&&e.jsx("span",{className:"search-empty-sub",children:"Press Enter to ask the assistant"})]}),a&&!r&&e.jsxs("div",{className:"search-empty",children:["Keep typing: results appear from ",v," characters."]}),r&&!I&&!L&&e.jsxs("div",{className:"search-empty",children:['No matches for "',c,'"']}),o.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Tasks · ",o.length]}),o.map(s=>{const l=G(V(s.slug||""));return e.jsxs("div",{className:"search-result-tag",onClick:()=>n(`/tasks/${s.slug}`),children:[e.jsx("span",{className:"dot",style:{width:6,height:6,borderRadius:"50%",background:l.dot}}),e.jsx("span",{className:"name",children:X(s.name,s.slug)}),s.paper_count!=null&&e.jsxs("span",{className:"count",children:[s.paper_count," papers"]})]},s.id)})]}),d.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Methods · ",d.length]}),d.map(s=>e.jsxs("div",{className:"search-result-tag",onClick:()=>n(`/methods/${s.slug||s.id}`),children:[e.jsx("span",{style:{fontFamily:"var(--mono)",fontWeight:600},children:s.name}),s.paper_count!=null&&e.jsxs("span",{className:"count",children:[s.paper_count," papers"]})]},s.id))]}),u.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Benchmarks · ",u.length]}),u.map(s=>e.jsxs("div",{className:"search-result-tag",onClick:()=>n(`/benchmark/${s.slug||s.id}`),children:[e.jsx("span",{className:"name",children:s.name}),s.paper_count!=null&&s.paper_count>0&&e.jsxs("span",{className:"count",children:[s.paper_count," entries"]})]},s.id))]}),m.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Authors · ",m.length]}),m.map(s=>e.jsxs("div",{className:"search-result-tag",onClick:()=>n(`/authors/${s.id}`),children:[e.jsx("span",{className:"name",children:s.full_name}),s.hf_username&&e.jsxs("span",{className:"handle",children:["@",s.hf_username]}),s.paper_count>0&&e.jsxs("span",{className:"count",children:[s.paper_count," papers"]})]},s.id))]}),p.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Organizations · ",p.length]}),p.map(s=>e.jsxs("div",{className:"search-result-tag",onClick:()=>n(`/orgs/${s.slug}`),children:[s.logo_url&&e.jsx("img",{className:"logo",src:s.logo_url,alt:"",loading:"lazy"}),e.jsx("span",{className:"name",children:s.name}),s.paper_count!=null&&s.paper_count>0&&e.jsxs("span",{className:"count",children:[s.paper_count," papers"]})]},s.id))]}),g.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Papers · ",g.length]}),g.map(s=>{var l;return e.jsxs("div",{className:"search-result",onClick:()=>n(`/paper/${s.arxiv_id||s.id}`),children:[e.jsx("div",{className:"search-result-title",children:e.jsx(U,{title:s.title})}),e.jsxs("div",{className:"search-result-meta",children:[e.jsx("span",{children:s.arxiv_id?`arXiv:${s.arxiv_id}`:"External resource"}),((l=s.authors)==null?void 0:l[0])&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:[s.authors[0],s.authors.length>1?" et al.":""]})]}),s.citation_count!=null&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:["↑ ",s.citation_count.toLocaleString()]})]})]})]},s.id)})]}),j.length>=v&&e.jsxs("button",{type:"button",className:"search-view-all-row",onClick:()=>n(`/papers?search=${encodeURIComponent(j)}`),children:["View all paper results for “",j,"”"]})]})]})})};export{ls as default};
|
assets/{SettingsView-DSsDYMnQ.js → SettingsView-D0Pv1jC4.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import{s as k,a as A,c as ce,d as L,b as I,r as Q,j as e,L as T,i as W,H as C,h as de,aw as he,l as ue,V as P,A as ae}from"./index-
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
|
|
|
| 1 |
+
import{s as k,a as A,c as ce,d as L,b as I,r as Q,j as e,L as T,i as W,H as C,h as de,aw as he,l as ue,V as P,A as ae}from"./index-BuF8ktG8.js";import{u as E}from"./useMutation-H0Ru2KmC.js";import{a as ge,T as se,r as z,u as me,g as pe}from"./researchTopic-Cz5Cn_RO.js";import{S as K}from"./switch-BZ1Lljbb.js";import{S as fe}from"./sparkles-CTLVCcnK.js";import{A as ye}from"./arrow-right-RMviEElY.js";import{T as xe}from"./trophy-eAfVGkd1.js";import{c as N}from"./chat-CHBkoU9A.js";import{u as je,f as be}from"./useDocumentTitle-DZHc-0SQ.js";import{a as ve,u as we,r as ke,O as Y}from"./openrouter-DmRs8Gyk.js";import{u as Ne}from"./preferences-DbS0yVYy.js";import{E as ne}from"./external-link-nrKLPLKY.js";import{M as Ce}from"./moon-CmHAMra6.js";import"./index-DKuYr0yj.js";import"./account-BGPDCUJL.js";/**
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
assets/{SharedChatView-pWPy2puC.js → SharedChatView-X9FEgHfX.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{u as x,e as g,d as o,b as v,j as e,A as f,q as j}from"./index-
|
|
|
|
| 1 |
+
import{u as x,e as g,d as o,b as v,j as e,A as f,q as j}from"./index-BuF8ktG8.js";import{A as b,a as y,C as S,U as w,b as N,t as k}from"./chatLifecycle-D28Ky42L.js";import{e as C,p as q,f as A,q as P}from"./chatSessions-B7iq-KqS.js";import{c as _}from"./chat-CHBkoU9A.js";/* empty css */import"./hover-card-yQsLTE4d.js";import"./CatalogEntityPreviewLink-BxpIu72v.js";import"./catalog-QOvavbkR.js";import"./github-BiawQL9z.js";import"./file-text-C-3F9H6w.js";import"./PaperPreviewLink-rxrEwjIH.js";import"./index-BwrKSI2t.js";import"./index-Duf3Rq7e.js";import"./katex-DkKDou_j.js";import"./papers-DOWhzKgr.js";import"./curation-rx4Y4ai_.js";import"./useMutation-H0Ru2KmC.js";import"./thumbs-up-DazJcOnS.js";import"./copy-C2OymkVV.js";import"./queryOptions-C9woPjwX.js";import"./arrow-left-DHCUWtMI.js";import"./external-link-nrKLPLKY.js";import"./plus-9o2YwICS.js";import"./search-C8dgBkSf.js";import"./chevron-up-BsnqoNYc.js";import"./AuthorAvatar-CIgdnsA4.js";const m=s=>s instanceof f&&s.status===404,E=({detail:s})=>{const[n,i]=o.useState(()=>q(s)),h=o.useMemo(()=>A(n),[n]),l=(t,p)=>{i(u=>k(u,t,p))};return e.jsx("div",{className:"shared-chat-transcript",children:n.map(t=>t.role==="user"?e.jsx(w,{id:t.id,text:t.text??"",paperMentions:t.paperMentions??[],paperSelection:t.paperSelection},t.id):e.jsx(N,{msg:t,papers:h,onToggleBlock:l},t.id))})},se=()=>{const{shareId:s=""}=x(),n=g(),i=j(),[h,l]=o.useState(60),t=v({queryKey:["shared-chat",s],queryFn:()=>_.getSharedChat(s),retry:(r,a)=>!m(a)&&r<1});o.useEffect(()=>{const r=document.title,a=document.head.querySelector('meta[name="robots"]'),c=a==null?void 0:a.content,d=a??document.createElement("meta");return d.name="robots",d.content="noindex,nofollow",a||document.head.appendChild(d),document.title="Shared conversation",()=>{document.title=r,a?a.content=c??"":d.remove()}},[]),o.useLayoutEffect(()=>{const r=document.querySelector(".app-header");if(!r)return;const a=()=>l(r.offsetHeight);a();const c=new ResizeObserver(a);return c.observe(r),()=>c.disconnect()},[]);const p=r=>{P(r,void 0,{autoSend:!1}),n("/chat")},u=m(t.error);return t.isLoading?e.jsxs("div",{className:"shared-chat-state",role:"status",children:[e.jsx(C,{})," Loading shared conversation…"]}):u?e.jsxs("div",{className:"shared-chat-state shared-chat-not-found",children:[e.jsx("h1",{children:"Shared conversation not found"}),e.jsx("p",{children:"This link is invalid or is no longer available."})]}):t.isError||!t.data?e.jsxs("div",{className:"shared-chat-state",role:"alert",children:[e.jsx("h1",{children:"Couldn’t load this conversation"}),e.jsx("p",{children:"Please check your connection and try again."}),e.jsx("button",{type:"button",onClick:()=>void t.refetch(),children:"Try again"})]}):e.jsx(b,{workspaceKey:`share:${s}:${t.data.updated_at}`,autoOpenOnMount:!0,children:e.jsxs("div",{className:"shared-chat-page",style:{height:`calc(100dvh - ${h}px)`},children:[e.jsxs("div",{className:"shared-chat-heading",children:[e.jsx("h1",{children:"Shared conversation"}),i&&e.jsx("span",{className:"chat-staging-badge",children:"Staging"})]}),e.jsx(y,{variant:"shared",children:e.jsxs("div",{className:"shared-chat-content","data-testid":"shared-conversation-pane",children:[e.jsx(E,{detail:t.data},t.data.updated_at),t.data.model_label&&e.jsxs("div",{className:"shared-chat-attribution",children:[e.jsxs("span",{children:["Generated with ",t.data.model_label]}),t.data.model_provider==="huggingface"&&e.jsxs("span",{children:["Powered by ",e.jsx("span",{"aria-hidden":"true",children:"🤗"})," ",e.jsx("a",{href:"https://huggingface.co/docs/inference-providers/en/index",target:"_blank",rel:"noreferrer",children:"Inference Providers"})]}),t.data.model_provider==="openrouter"&&e.jsxs("span",{children:["Powered by ",e.jsx("a",{href:"https://openrouter.ai",target:"_blank",rel:"noreferrer",children:"OpenRouter"})]}),t.data.model_provider==="openai"&&e.jsx("span",{children:"Powered by OpenAI"})]}),e.jsxs("section",{className:"shared-chat-fresh","aria-labelledby":"shared-chat-fresh-title",children:[e.jsx("h2",{id:"shared-chat-fresh-title",children:"Start a new conversation"}),e.jsx("p",{children:"Your new question starts with an empty context."}),i&&e.jsxs("div",{className:"shared-chat-access-note",role:"note",children:[e.jsx("strong",{children:"Limited staging preview."})," Starting a chat is available only to approved Hugging Face users."]}),e.jsx(S,{onSend:r=>p(r.text),placeholder:"Ask a new research question…"})]})]})})]})})};export{se as default};
|
assets/{SignInToEditDialog-B3EJVut1.js → SignInToEditDialog-CejkAYkt.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import{s as be,d as a,j as e,ad as je,I as fe,ae as ye,x as Ne,y as we,X as Se,C as _e,H as ke}from"./index-
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
|
|
|
| 1 |
+
import{s as be,d as a,j as e,ad as je,I as fe,ae as ye,x as Ne,y as we,X as Se,C as _e,H as ke}from"./index-BuF8ktG8.js";import{B as P}from"./button-kiAIp5NU.js";import{I as u}from"./input-CApr9J-O.js";import{T as Ce}from"./textarea-D-LxcCMY.js";import{S as se}from"./searchable-select-BgxTwWoR.js";import{D as ie,a as oe,c as le,b as ce,d as de,e as De}from"./dialog-B5pjhpY5.js";import{u as Ie}from"./useMutation-H0Ru2KmC.js";import{s as b,p as j}from"./submissions-DCMnKq0E.js";import{c as te}from"./catalog-QOvavbkR.js";import{L as Ee}from"./loader-circle-DUEYvkt2.js";/**
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
assets/{SotaBadges-D825CK6n.js → SotaBadges-BFyAOF4Y.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{e as M,j as e,V as x,L as C}from"./index-
|
|
|
|
| 1 |
+
import{e as M,j as e,V as x,L as C}from"./index-BuF8ktG8.js";import{h as F,c as E}from"./colors-BkWRhvFI.js";import{d as A,h as P}from"./transform-CHck6g-D.js";const D=({slug:t,label:s,onClick:r})=>{const a=M(),j=F(t),o=E(j),p=c=>{if(c.stopPropagation(),r){r(t);return}a(`/tasks/${t}`)};return e.jsxs("span",{className:"tag-chip",style:{background:o.bg,color:o.text},onClick:p,children:[e.jsx("span",{className:"dot",style:{background:o.dot}}),A(s||P(t),t)]})},I=({method:t,onClick:s})=>{const r=M(),a=t.slug||t.id||"";if(!a)return null;const j=o=>{if(o.stopPropagation(),s){s(a);return}r(`/methods/${a}`)};return e.jsx("span",{className:"method-chip",onClick:j,children:t.name})},W=t=>{let s=2166136261;for(let r=0;r<t.length;r++)s=Math.imul(s^t.charCodeAt(r),16777619);return()=>(s=Math.imul(s^s>>>15,2246822507),s=Math.imul(s^s>>>13,3266489909),s^=s>>>16,(s>>>0)%1e4/1e4)},O=({paperId:t})=>{const s=W(t),r=160,a=220,j=[.85+s()*.1,.55+s()*.25],o=.45+s()*.3,p=[],c=9+Math.floor(s()*3);for(let y=0;y<c;y++)p.push(.55+s()*.4);const n=s()>.3,l=Math.floor(s()*3),m=[],$=6+Math.floor(s()*3);for(let y=0;y<$;y++)m.push(.5+s()*.45);const d="#9A9588",u="#3A352D",i=5,h=(r-i*2-2)/2,k=i,f=i+h+2;let w=i+2;const R=w;w+=6;const T=w+1;w+=5;const L=w;w+=3;const g=w+1;return e.jsx("div",{style:{width:r,height:a,background:"#FDFCF9",border:"1px solid var(--hairline-strong)",borderRadius:2,boxShadow:"0 1px 0 rgba(0,0,0,0.04), 0 4px 8px -4px rgba(0,0,0,0.08)",flexShrink:0,overflow:"hidden",position:"relative"},children:e.jsxs("svg",{width:r,height:a,viewBox:`0 0 ${r} ${a}`,style:{display:"block"},children:[j.map((y,v)=>e.jsx("rect",{x:i+(r-i*2)*(1-y)/2,y:R+v*2.4,width:(r-i*2)*y,height:1.4,fill:u,rx:.3},`t${v}`)),e.jsx("rect",{x:i+(r-i*2)*(1-o)/2,y:T,width:(r-i*2)*o,height:.9,fill:d,opacity:.7,rx:.2}),e.jsx("rect",{x:i,y:L,width:6,height:1,fill:u,opacity:.6}),p.map((y,v)=>{const b=g+v*2.1;return b>a-i-1?null:e.jsx("rect",{x:k,y:b,width:h*y,height:.8,fill:d,opacity:.55,rx:.2},`l${v}`)}),n&&e.jsxs("g",{children:[e.jsx("rect",{x:f,y:g,width:h,height:14,fill:"#F0EBE0",stroke:d,strokeWidth:.3,opacity:.9}),l===0&&e.jsx("g",{stroke:u,strokeWidth:.4,fill:"none",opacity:.6,children:e.jsx("polyline",{points:`${f+2},${g+11} ${f+6},${g+8} ${f+10},${g+9} ${f+14},${g+5} ${f+18},${g+6} ${f+22},${g+3}`})}),l===1&&e.jsxs("g",{opacity:.55,children:[e.jsx("circle",{cx:f+h/2,cy:g+7,r:3.5,fill:u}),e.jsx("rect",{x:f+2,y:g+11,width:h-4,height:1.5,fill:d})]}),l===2&&e.jsxs("g",{opacity:.55,children:[e.jsx("rect",{x:f+3,y:g+5,width:h-6,height:1,fill:u}),e.jsx("rect",{x:f+6,y:g+8,width:h-12,height:.8,fill:u})]})]}),m.map((y,v)=>{const b=g+(n?16:0)+v*2.1;return b>a-i-1?null:e.jsx("rect",{x:f,y:b,width:h*y,height:.8,fill:d,opacity:.55,rx:.2},`r${v}`)})]})})},Y=({paperId:t,title:s,thumbnailUrl:r,priority:a=!1})=>{const[j,o]=x.useState(!1),[p,c]=x.useState(0),[n,l]=x.useState(a),m=x.useRef(null);x.useEffect(()=>{o(!1),c(0)},[r]);const $=x.useMemo(()=>{if(!r)return null;if(p===0)return r;const d=r.includes("?")?"&":"?";return`${r}${d}retry=${p}`},[r,p]);return x.useEffect(()=>{if(a||n)return;const d=m.current;if(!d)return;const u=new IntersectionObserver(([i])=>{i.isIntersecting&&(l(!0),u.disconnect())},{rootMargin:"250px"});return u.observe(d),()=>u.disconnect()},[a,n]),r&&!j?e.jsx("div",{ref:m,style:{width:160,height:220,background:"#FDFCF9",border:"1px solid var(--hairline-strong)",borderRadius:2,boxShadow:"0 1px 0 rgba(0,0,0,0.04), 0 4px 8px -4px rgba(0,0,0,0.08)",flexShrink:0,overflow:"hidden",position:"relative"},children:(a||n)&&$&&e.jsx("img",{src:$,alt:`Thumbnail for ${s}`,loading:a?"eager":"lazy",decoding:"async",fetchPriority:a?"high":"auto",style:{width:"100%",height:"100%",objectFit:"contain",display:"block"},onError:()=>{if(p<1){c(d=>d+1);return}o(!0)}},$)}):e.jsx(O,{paperId:t})},S={1:"SOTA 🏆",2:"#2",3:"#3"},N=({units:t,paperHref:s})=>{const r=x.useRef(null),a=x.useRef(null),[j,o]=x.useState(t.length);if(x.useLayoutEffect(()=>{const n=r.current,l=a.current;if(!n||!l||t.length===0)return;const m=u=>(l.textContent=u,l.scrollWidth),$=()=>{const u=n.clientWidth;if(u<=0)return;let i=0,h=0;for(const k of t){const f=m(k.measureText);if(i+f<=u)i+=f,h+=1;else break}if(h<t.length){for(;h>0&&i+m(` · +${t.length-h} more`)>u;)h-=1,i-=m(t[h].measureText);h===0&&(h=1)}o(h)};$();const d=new ResizeObserver($);return d.observe(n),()=>d.disconnect()},[t]),t.length===0)return null;const p=t.slice(0,Math.max(1,Math.min(j,t.length))),c=t.length-p.length;return e.jsxs("div",{className:"paper-sota",ref:r,children:[e.jsx("span",{ref:a,className:"paper-sota-measure","aria-hidden":"true"}),p.map((n,l)=>e.jsxs(x.Fragment,{children:[n.isGroupStart?e.jsxs(e.Fragment,{children:[l>0&&e.jsx("span",{className:"paper-sota-sep",children:" · "}),e.jsx("span",{className:`paper-sota-label${n.rank===1?" paper-sota-label--sota":""}`,children:S[n.rank]}),e.jsx("span",{className:"paper-sota-on",children:" on "})]}):e.jsx("span",{className:"paper-sota-sep",children:", "}),n.href?e.jsx(C,{to:n.href,className:"paper-sota-name",onClick:m=>m.stopPropagation(),children:n.name}):e.jsx("span",{className:"paper-sota-name",children:n.name})]},`${n.href||n.name}-${l}`)),c>0&&e.jsxs(C,{to:`${s}#results`,className:"paper-sota-more",onClick:n=>n.stopPropagation(),children:[" · +",c," more"]})]})},V=({ranks:t,paperHref:s,wrap:r=!1})=>{const a=x.useMemo(()=>{const o=[];let p=!0;for(const c of[1,2,3]){const n=t.filter(l=>l.rank===c);n.forEach((l,m)=>{const $=m===0,d=$?`${p?"":" · "}${S[c]} on `:", ";o.push({name:l.name,href:l.href,rank:c,isGroupStart:$,measureText:d+l.name})}),n.length>0&&(p=!1)}return o},[t]),j=x.useMemo(()=>[1,2,3].map(o=>t.filter(c=>c.rank===o).map((c,n)=>({name:c.name,href:c.href,rank:o,isGroupStart:n===0,measureText:(n===0?`${S[o]} on `:", ")+c.name}))).filter(o=>o.length>0),[t]);return r?j.length===0?null:e.jsx("div",{className:"paper-sota-stack",children:j.map(o=>e.jsx(N,{units:o,paperHref:s},o[0].rank))}):a.length===0?null:e.jsx(N,{units:a,paperHref:s})};export{I as M,Y as P,V as S,D as T};
|