diff --git a/assets/AgentLogos-B5etEEwg.js b/assets/AgentLogos-BC7uX8n_.js similarity index 99% rename from assets/AgentLogos-B5etEEwg.js rename to assets/AgentLogos-BC7uX8n_.js index 8fc803d5c342790594c93532925e7b36412237b7..ed3471a9a78ea76aaa0ebf2e1337a6d6cb5aa149 100644 --- a/assets/AgentLogos-B5etEEwg.js +++ b/assets/AgentLogos-BC7uX8n_.js @@ -1 +1 @@ -import{j as e}from"./index-D2fBL-s6.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:"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 x(){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,x as a}; +import{j as e}from"./index-BeSw2DVP.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:"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 x(){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,x as a}; diff --git a/assets/AiDeadlinesView-BG77EAes.js b/assets/AiDeadlinesView-Bq7_kcGg.js similarity index 96% rename from assets/AiDeadlinesView-BG77EAes.js rename to assets/AiDeadlinesView-Bq7_kcGg.js index c1e4daaad6c916887dcf25745564dadd1d17acfc..0c89393fa874e69350c20369cc4b1e8a04a0b862 100644 --- a/assets/AiDeadlinesView-BG77EAes.js +++ b/assets/AiDeadlinesView-Bq7_kcGg.js @@ -1,3 +1,3 @@ -import{f as y,j as t,b as A,T as L}from"./index-D2fBL-s6.js";import{c as B}from"./catalog-5AxvKr4D.js";import{S as U}from"./switch-B4eVY4fu.js";import{S as W}from"./skeleton-BDwfco0_.js";import{A as M,a as O}from"./alert-PnePcfgX.js";import{s as _}from"./safeExternalHref-CkBrsh84.js";import{D as V,a as P,c as G,b as H,d as K}from"./dialog-DgUROq2j.js";import{s as Y,n as S,f as $,p as q,u as N,l as k,a as z,c as b,D as Q,i as E,b as F,d as J}from"./deadlines-BG5SWwEG.js";import"./index-C_9KPu-E.js";const w={fontFamily:"var(--mono)",fontSize:10,letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--ink-faint)"},X=(e,s)=>{const l=Math.ceil((e-s)/Q);return l<=0?"passed":`${l} ${l===1?"day":"days"}`},R=(e,s)=>{const l=$(e.start_date,e.end_date),r=e.venue||[e.city,e.country].filter(Boolean).join(", ");return[`${s.label||s.type||"Deadline"} for ${e.name}`,l?`Dates: ${l}`:null,r?`Location: ${r}`:null,e.url?`Website: ${e.url}`:null].filter(Boolean).join(` +import{f as y,j as t,b as A,T as L}from"./index-BeSw2DVP.js";import{c as B}from"./catalog-D3XT9SmX.js";import{S as U}from"./switch-4sA3DCrD.js";import{S as W}from"./skeleton-BBv4iC5Z.js";import{A as M,a as O}from"./alert-uwP129N7.js";import{s as _}from"./safeExternalHref-CkBrsh84.js";import{D as V,a as P,c as G,b as H,d as K}from"./dialog-EpDnY6a5.js";import{s as Y,n as S,f as $,p as q,u as N,l as k,a as z,c as b,D as Q,i as E,b as F,d as J}from"./deadlines-BG5SWwEG.js";import"./index-b5_7myf0.js";const w={fontFamily:"var(--mono)",fontSize:10,letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--ink-faint)"},X=(e,s)=>{const l=Math.ceil((e-s)/Q);return l<=0?"passed":`${l} ${l===1?"day":"days"}`},R=(e,s)=>{const l=$(e.start_date,e.end_date),r=e.venue||[e.city,e.country].filter(Boolean).join(", ");return[`${s.label||s.type||"Deadline"} for ${e.name}`,l?`Dates: ${l}`:null,r?`Location: ${r}`:null,e.url?`Website: ${e.url}`:null].filter(Boolean).join(` `)},T=e=>e.toISOString().replace(/[-:]/g,"").replace(/\.\d{3}/,""),Z=(e,s)=>{const l=new Date(s.deadline_at),r=new Date(l.getTime()+60*60*1e3),o=`${e.short_name||e.name} ${s.label||s.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=${T(l)}/${T(r)}&details=${encodeURIComponent(R(e,s))}&location=${encodeURIComponent(h)}`,p=_(n);p&&window.open(p,"_blank","noopener,noreferrer")},ee=(e,s)=>{const l=new Date(s.deadline_at),r=new Date(l.getTime()+60*60*1e3),o=`${e.short_name||e.name} ${s.label||s.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:${T(l)}`,`DTEND:${T(r)}`,`SUMMARY:${o}`,`DESCRIPTION:${R(e,s).replace(/\n/g,"\\n")}`,h?`LOCATION:${h}`:null,"END:VEVENT","END:VCALENDAR"].filter(Boolean).join(` `),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)},te=({conf:e,open:s,onOpenChange:l})=>{const[r,o]=y.useState(()=>Date.now());y.useEffect(()=>{if(!s)return;o(Date.now());const i=setInterval(()=>o(Date.now()),1e3);return()=>clearInterval(i)},[s]);const h=y.useMemo(()=>e?Y(e):[],[e]),n=y.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(V,{open:s,onOpenChange:l,children:t.jsx(P,{className:"max-w-xl",style:{background:"var(--bg-elevated)",maxHeight:"85vh",overflowY:"auto"},children:e&&t.jsxs(t.Fragment,{children:[t.jsxs(G,{children:[t.jsx(H,{asChild:!0,children:t.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.01em",margin:0},children:e.short_name?`${e.short_name} ${e.year??""}`.trim():e.name})}),e.short_name&&e.name||e.description?t.jsx(K,{asChild:!0,children:t.jsx("span",{style:{fontFamily:"var(--serif)",fontSize:14,color:"var(--ink-soft)"},children:e.short_name?e.name:e.description})}):null]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:20,marginTop:4},children:[t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:24},children:[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:q(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:"Deadlines not announced yet"}):h.map((i,c)=>{const f=new Date(i.deadline_at).getTime(),a=n!=null&&i.deadline_at===n.deadline_at&&i.type===n.type,u=f<=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:[z(i.deadline_at),i.timezone?` · ${i.timezone}`:""]})]}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:12,fontWeight:600,whiteSpace:"nowrap",color:N(u?null:f,r)},children:X(f,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:()=>Z(e,n),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Google Calendar"}),t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>ee(e,n),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Apple / .ics"})]})]})]})]})})})},I=({id:e,label:s,checked:l,onChange:r})=>t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:[t.jsx(U,{id:e,checked:l,onCheckedChange:r}),t.jsx("label",{htmlFor:e,style:{cursor:"pointer"},children:s})]}),ne=({conf:e,now:s,selectedDomains:l,onToggleDomain:r,onOpen:o})=>{const h=S(e,s),n=h??F(e),p=n?new Date(n.deadline_at).getTime():null,d=N(h?p:null,s),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)||"Deadlines"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:n?`${z(n.deadline_at)}${n.timezone?` · ${n.timezone}`:""}`:"Not announced yet"})]}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:14,fontWeight:600,color:d,whiteSpace:"nowrap"},children:p!=null?J(p,s):"TBA"})]}),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 f=l.has(c);return t.jsx("button",{className:"tag-chip",onClick:a=>{a.stopPropagation(),r(c)},style:{background:f?"var(--ink)":"var(--bg-subtle)",color:f?"var(--bg)":"var(--ink-soft)"},children:k(c)},c)})})]})},me=()=>{const[e,s]=y.useState(!0),[l,r]=y.useState(!1),[o,h]=y.useState(new Set),[n,p]=y.useState(null),d=y.useMemo(()=>Date.now(),[]),m=A({queryKey:["conference-deadlines"],queryFn:()=>B.conferenceDeadlines(),staleTime:L}),i=a=>{h(u=>{const x=new Set(u);return x.has(a)?x.delete(a):x.add(a),x})},c=y.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]),f=y.useMemo(()=>{var j;const u=(((j=m.data)==null?void 0:j.results)??[]).filter(g=>!(e&&g.tier!=="a"||o.size>0&&!b(g).some(v=>o.has(v))||!l&&!E(g)&&!S(g,d))),x=g=>{const D=S(g,d);if(D)return{group:0,time:new Date(D.deadline_at).getTime()};if(E(g))return{group:1,time:g.start_date?new Date(g.start_date).getTime():0};const v=F(g);return{group:2,time:-(v?new Date(v.deadline_at).getTime():0)}};return[...u].sort((g,D)=>{const v=x(g),C=x(D);return v.group!==C.group?v.group-C.group:v.time-C.time})},[m.data,e,l,o,d]);return m.error?t.jsx("div",{className:"page",children:t.jsx(M,{variant:"destructive",children:t.jsx(O,{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(I,{id:"top-tier-only",label:"Top tier only",checked:e,onChange:s}),t.jsx(I,{id:"show-past",label:"Show past conferences",checked:l,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?"…":`${f.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(W,{className:"h-44"},u))}):f.length===0?t.jsxs("div",{className:"no-results",children:["No conferences match these filters",l?".":" — try enabling “Show past conferences”."]}):t.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:16},children:f.map(a=>t.jsx(ne,{conf:a,now:d,selectedDomains:o,onToggleDomain:i,onOpen:p},a.id))}),t.jsx(te,{conf:n,open:n!==null,onOpenChange:a=>{a||p(null)}})]})};export{me as default}; diff --git a/assets/ApiDocsView-C6VvPmjf.js b/assets/ApiDocsView-DGZ54Cn7.js similarity index 98% rename from assets/ApiDocsView-C6VvPmjf.js rename to assets/ApiDocsView-DGZ54Cn7.js index eac7978f5ec19756f80e2c4ff179e39d82e61a3d..f1d0b1fccbf006bdb5eba1ff00098e1b1dfc79a9 100644 --- a/assets/ApiDocsView-C6VvPmjf.js +++ b/assets/ApiDocsView-DGZ54Cn7.js @@ -1,4 +1,4 @@ -import{ac as m,b as f,f as h,j as e}from"./index-D2fBL-s6.js";import{u as g}from"./useDocumentTitle-ibepJVy2.js";import{M as y}from"./index-BPshewTi.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 +import{ac as m,b as f,f as h,j as e}from"./index-BeSw2DVP.js";import{u as g}from"./useDocumentTitle-BD_JtGPy.js";import{M as y}from"./index-CbsMwfXw.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 response = requests.get(${JSON.stringify(s)}, timeout=30) response.raise_for_status() diff --git a/assets/AreaSection-COKqvfmt.js b/assets/AreaSection-DhnFgZsX.js similarity index 88% rename from assets/AreaSection-COKqvfmt.js rename to assets/AreaSection-DhnFgZsX.js index 9884d9d462432f2f6e263942ecd75755f91170de..d01336a2e531d329c564a2336afca2e2c7697aea 100644 --- a/assets/AreaSection-COKqvfmt.js +++ b/assets/AreaSection-DhnFgZsX.js @@ -1 +1 @@ -import{j as s}from"./index-D2fBL-s6.js";import{S as l}from"./skeleton-BDwfco0_.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}; +import{j as s}from"./index-BeSw2DVP.js";import{S as l}from"./skeleton-BBv4iC5Z.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}; diff --git a/assets/AstraForRoboticsView-4cqZq7Uv.js b/assets/AstraForRoboticsView-D8dJpc99.js similarity index 89% rename from assets/AstraForRoboticsView-4cqZq7Uv.js rename to assets/AstraForRoboticsView-D8dJpc99.js index 1cbc05599713f500410de5dfaabd61e1672d731f..20a06aaaa34115ae8009bb31ec8cf99998b6e4ca 100644 --- a/assets/AstraForRoboticsView-4cqZq7Uv.js +++ b/assets/AstraForRoboticsView-D8dJpc99.js @@ -1 +1 @@ -import{p,f as u,j as a,L as o}from"./index-D2fBL-s6.js";import{u as g,b as x,P as f}from"./PaperFeed-BERxHjrg.js";import{A as b,a as j}from"./alert-PnePcfgX.js";import{u as y}from"./usePapers-CAjdcUuj.js";import{p as v}from"./papers-khuZaSFb.js";import{u as k,f as w}from"./useDocumentTitle-ibepJVy2.js";import{t as A}from"./transform-B_GaHMvk.js";import"./PaperCard-DhorusY5.js";import"./AuthorAvatar-C8tz_syh.js";import"./SotaBadges-r6iGzLRW.js";import"./colors-BkWRhvFI.js";import"./Icon-Uhh78KjL.js";import"./LatexTitle-WIQJ1ke0.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-DS5Jzsg5.js";import"./skeleton-BDwfco0_.js";import"./useIntersectionObserver-C0Rq0EXm.js";import"./useInfiniteQuery-CjJA-90e.js";import"./curation-BtfabyzA.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(b,{variant:"destructive",children:a.jsx(j,{children:"Failed to load the collection. Please try again."})}):a.jsx(f,{query:e,cards:t,empty:"No papers match this selection yet."})]})};export{B as default}; +import{p,f as u,j as a,L as o}from"./index-BeSw2DVP.js";import{u as g,b as x,P as f}from"./PaperFeed-Cge1MWHJ.js";import{A as b,a as j}from"./alert-uwP129N7.js";import{u as y}from"./usePapers-Cj1tt_u6.js";import{p as v}from"./papers-B58HJw9r.js";import{u as k,f as w}from"./useDocumentTitle-BD_JtGPy.js";import{t as A}from"./transform-BadO0Aba.js";import"./PaperCard-Dx07g-aj.js";import"./AuthorAvatar-Dpan5W1F.js";import"./SotaBadges-FMpqi2HS.js";import"./colors-BkWRhvFI.js";import"./Icon-BWcOShxk.js";import"./LatexTitle-C5yrYbA-.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-CYoFzAud.js";import"./skeleton-BBv4iC5Z.js";import"./useIntersectionObserver-BBx3EHQ9.js";import"./useInfiniteQuery-C8JHYWz5.js";import"./curation-CCIsdsjV.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(b,{variant:"destructive",children:a.jsx(j,{children:"Failed to load the collection. Please try again."})}):a.jsx(f,{query:e,cards:t,empty:"No papers match this selection yet."})]})};export{B as default}; diff --git a/assets/AuthorAvatar-C8tz_syh.js b/assets/AuthorAvatar-Dpan5W1F.js similarity index 86% rename from assets/AuthorAvatar-C8tz_syh.js rename to assets/AuthorAvatar-Dpan5W1F.js index e476eb47dbb6c96ef75e16ef628ff2a50ad3fd13..6a2148d03c23f1d440c8a658a65882d963938fb8 100644 --- a/assets/AuthorAvatar-C8tz_syh.js +++ b/assets/AuthorAvatar-Dpan5W1F.js @@ -1 +1 @@ -import{f as c,j as r}from"./index-D2fBL-s6.js";const p=a=>a!=null&&a.startsWith("https://")&&!a.startsWith("https://huggingface.co/avatars/")?a:null,h=({url:a,className:o,href:t,label:n})=>{const[i,l]=c.useState(!1),s=i?null:p(a);if(!s)return null;const 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{h as A}; +import{f as c,j as r}from"./index-BeSw2DVP.js";const p=a=>a!=null&&a.startsWith("https://")&&!a.startsWith("https://huggingface.co/avatars/")?a:null,h=({url:a,className:o,href:t,label:n})=>{const[i,l]=c.useState(!1),s=i?null:p(a);if(!s)return null;const 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{h as A}; diff --git a/assets/AuthorDetailView-CDAXgj3C.js b/assets/AuthorDetailView-YZ5SXaLH.js similarity index 76% rename from assets/AuthorDetailView-CDAXgj3C.js rename to assets/AuthorDetailView-YZ5SXaLH.js index 5dbff802b80c00d6631e1347d7fc698232b240df..99f4352c3be6e92679440beb71ba76184ef3eafc 100644 --- a/assets/AuthorDetailView-CDAXgj3C.js +++ b/assets/AuthorDetailView-YZ5SXaLH.js @@ -1 +1 @@ -import{u as b,j as a,b as N,p as v,f as F,ao as y,L as A}from"./index-D2fBL-s6.js";import{A as P}from"./AuthorAvatar-C8tz_syh.js";import{u as k,b as $,P as S}from"./PaperFeed-BERxHjrg.js";import{R as L}from"./ResearchFollowButton-Bwb5EiPm.js";import{A as R,a as w}from"./alert-PnePcfgX.js";import{S as z}from"./skeleton-BDwfco0_.js";import{u as C}from"./usePapers-CAjdcUuj.js";import{p as m}from"./papers-khuZaSFb.js";import{i as H}from"./apiErrors-DV2aaDjL.js";import{t as q}from"./transform-B_GaHMvk.js";import f from"./NotFound-L0ldWZg9.js";import"./PaperCard-DhorusY5.js";import"./SotaBadges-r6iGzLRW.js";import"./colors-BkWRhvFI.js";import"./Icon-Uhh78KjL.js";import"./LatexTitle-WIQJ1ke0.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-DS5Jzsg5.js";import"./useIntersectionObserver-C0Rq0EXm.js";import"./researchTopic-jOpECA0z.js";import"./useMutation-9dlTbuQj.js";import"./plus-BI8-JXK0.js";import"./useInfiniteQuery-CjJA-90e.js";import"./curation-BtfabyzA.js";const Q=({authorId:r})=>{var n,i,l,p,c,d,h,u;const o=k(),{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(P,{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}; +import{u as b,j as a,b as N,p as v,f as F,ao as y,L as A}from"./index-BeSw2DVP.js";import{A as P}from"./AuthorAvatar-Dpan5W1F.js";import{u as k,b as $,P as S}from"./PaperFeed-Cge1MWHJ.js";import{R as L}from"./ResearchFollowButton-lzWAD6Jv.js";import{A as R,a as w}from"./alert-uwP129N7.js";import{S as z}from"./skeleton-BBv4iC5Z.js";import{u as C}from"./usePapers-Cj1tt_u6.js";import{p as m}from"./papers-B58HJw9r.js";import{i as H}from"./apiErrors-CXiv7lxc.js";import{t as q}from"./transform-BadO0Aba.js";import f from"./NotFound-BkVU3ijx.js";import"./PaperCard-Dx07g-aj.js";import"./SotaBadges-FMpqi2HS.js";import"./colors-BkWRhvFI.js";import"./Icon-BWcOShxk.js";import"./LatexTitle-C5yrYbA-.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-CYoFzAud.js";import"./useIntersectionObserver-BBx3EHQ9.js";import"./researchTopic-Cb4NrTKj.js";import"./useMutation-CsS-RfeE.js";import"./plus-imZJbVTM.js";import"./useInfiniteQuery-C8JHYWz5.js";import"./curation-CCIsdsjV.js";const Q=({authorId:r})=>{var n,i,l,p,c,d,h,u;const o=k(),{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(P,{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}; diff --git a/assets/AuthorizePaperEditView-DtkWcUHu.js b/assets/AuthorizePaperEditView-C0qgOk3Y.js similarity index 87% rename from assets/AuthorizePaperEditView-DtkWcUHu.js rename to assets/AuthorizePaperEditView-C0qgOk3Y.js index d8cec735ab858bda493b4bebfe25d5b6223ed83b..c3e658ced4cae203907dc9024b8adcd218e6065b 100644 --- a/assets/AuthorizePaperEditView-DtkWcUHu.js +++ b/assets/AuthorizePaperEditView-C0qgOk3Y.js @@ -1 +1 @@ -import{u,a as d,b as l,j as e,L as p,H as c}from"./index-D2fBL-s6.js";import{u as h}from"./useMutation-9dlTbuQj.js";import{B as g}from"./button-D0XfbdrX.js";import{p as n}from"./paperEdits-C-9tVqXs.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}; +import{u,a as d,b as l,j as e,L as p,H as c}from"./index-BeSw2DVP.js";import{u as h}from"./useMutation-CsS-RfeE.js";import{B as g}from"./button-CO2XYoBd.js";import{p as n}from"./paperEdits-CoVzQ5th.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}; diff --git a/assets/AutonomousOperations-CPgyKQKJ.js b/assets/AutonomousOperations-CMfRlc27.js similarity index 94% rename from assets/AutonomousOperations-CPgyKQKJ.js rename to assets/AutonomousOperations-CMfRlc27.js index 6469db2d160ef9f94767f2001ac583c58597719e..53e047e81ab9e6cf4def21b2806e6b1b52ddb8ab 100644 --- a/assets/AutonomousOperations-CPgyKQKJ.js +++ b/assets/AutonomousOperations-CMfRlc27.js @@ -1 +1 @@ -import{l as R,f as d,b as B,J as C,j as e,L as q}from"./index-D2fBL-s6.js";import{u as Q}from"./useMutation-9dlTbuQj.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-C733Wslj.js";import{B as I}from"./badge-Pw584nS3.js";import{B as h}from"./button-D0XfbdrX.js";import{I as u}from"./input-DdobyT4w.js";import{A as P}from"./activity-DWWgzth6.js";import{A as D}from"./arrow-left-CzTG6LBL.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}; +import{l as R,f as d,b as B,J as C,j as e,L as q}from"./index-BeSw2DVP.js";import{u as Q}from"./useMutation-CsS-RfeE.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-3jn82om4.js";import{B as I}from"./badge-PwLfXWCy.js";import{B as h}from"./button-CO2XYoBd.js";import{I as u}from"./input-B5SDgz8U.js";import{A as P}from"./activity-DCd4sApj.js";import{A as D}from"./arrow-left-C-qXYpsS.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}; diff --git a/assets/BenchmarkDetailView-CLQh8rRr.js b/assets/BenchmarkDetailView-YsyYtOrf.js similarity index 98% rename from assets/BenchmarkDetailView-CLQh8rRr.js rename to assets/BenchmarkDetailView-YsyYtOrf.js index fa4ef5c329645fa0d31f362ddb601e0ba0a76591..8bdfdc159c0e9a4150749f664c2ba4f52ec27480 100644 --- a/assets/BenchmarkDetailView-CLQh8rRr.js +++ b/assets/BenchmarkDetailView-YsyYtOrf.js @@ -1,2 +1,2 @@ -import{f as L,j as a,M as le,L as ne,k as dt,x as ut,u as mt,e as ht,b as te,q as de,t as ft,T as oe}from"./index-D2fBL-s6.js";import{R as pt}from"./ResearchFollowButton-Bwb5EiPm.js";import{c as re}from"./catalog-5AxvKr4D.js";import{C as gt,E as xt,e as bt}from"./ExternalSourceEvalBadge-C2AscbJz.js";import{u as yt}from"./preferences-BHmRHfHN.js";import{L as ce}from"./LatexTitle-WIQJ1ke0.js";import{S as Ge}from"./switch-B4eVY4fu.js";import{I as wt}from"./Icon-Uhh78KjL.js";import{S as ue}from"./skeleton-BDwfco0_.js";import{A as vt,a as jt}from"./alert-PnePcfgX.js";import{B as _t}from"./BenchmarkTrendSparkline-BV1XDSWE.js";import{s as St}from"./safeExternalHref-CkBrsh84.js";import{s as kt}from"./slug-BpH-Nkvz.js";import{i as Ct}from"./apiErrors-DV2aaDjL.js";import Et from"./NotFound-L0ldWZg9.js";import"./researchTopic-jOpECA0z.js";import"./useMutation-9dlTbuQj.js";import"./plus-BI8-JXK0.js";import"./curation-BtfabyzA.js";import"./hover-card-DWpZK4fW.js";import"./account-BHlQBDNT.js";import"./index-C_9KPu-E.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.parameterCounts+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.valuel;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(lr+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",CS.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{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 Ti-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;oO.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;Hi-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;rV||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{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;imr(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(` +import{f as L,j as a,M as le,L as ne,k as dt,x as ut,u as mt,e as ht,b as te,q as de,t as ft,T as oe}from"./index-BeSw2DVP.js";import{R as pt}from"./ResearchFollowButton-lzWAD6Jv.js";import{c as re}from"./catalog-D3XT9SmX.js";import{C as gt,E as xt,e as bt}from"./ExternalSourceEvalBadge-CfB9WUzn.js";import{u as yt}from"./preferences-BcztmdfT.js";import{L as ce}from"./LatexTitle-C5yrYbA-.js";import{S as Ge}from"./switch-4sA3DCrD.js";import{I as wt}from"./Icon-BWcOShxk.js";import{S as ue}from"./skeleton-BBv4iC5Z.js";import{A as vt,a as jt}from"./alert-uwP129N7.js";import{B as _t}from"./BenchmarkTrendSparkline-BwPQcLi3.js";import{s as St}from"./safeExternalHref-CkBrsh84.js";import{s as kt}from"./slug-BpH-Nkvz.js";import{i as Ct}from"./apiErrors-CXiv7lxc.js";import Et from"./NotFound-BkVU3ijx.js";import"./researchTopic-Cb4NrTKj.js";import"./useMutation-CsS-RfeE.js";import"./plus-imZJbVTM.js";import"./curation-CCIsdsjV.js";import"./hover-card-BbFULETs.js";import"./account-B-4MwKsq.js";import"./index-b5_7myf0.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.parameterCounts+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.valuel;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(lr+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",CS.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{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 Ti-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;oO.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;Hi-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;rV||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{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;imr(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(` `)}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}; diff --git a/assets/BenchmarkTrendSparkline-BV1XDSWE.js b/assets/BenchmarkTrendSparkline-BwPQcLi3.js similarity index 97% rename from assets/BenchmarkTrendSparkline-BV1XDSWE.js rename to assets/BenchmarkTrendSparkline-BwPQcLi3.js index 9832cff6d2e086ec2e85d35bcff98315accf224b..45696042dc52592839a0f8da83bd662f06dc25eb 100644 --- a/assets/BenchmarkTrendSparkline-BV1XDSWE.js +++ b/assets/BenchmarkTrendSparkline-BwPQcLi3.js @@ -1 +1 @@ -import{f as C,j as t}from"./index-D2fBL-s6.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),f=Math.max(1,...h),M=g-o*2,T=p-m*2,v=h.length>1?M/(h.length-1):0,a=h.map((s,c)=>({x:o+v*c,y:m+T-s/f*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}; +import{f as C,j as t}from"./index-BeSw2DVP.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),f=Math.max(1,...h),M=g-o*2,T=p-m*2,v=h.length>1?M/(h.length-1):0,a=h.map((s,c)=>({x:o+v*c,y:m+T-s/f*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}; diff --git a/assets/CatalogEntityPreviewLink-xL6TDpUk.js b/assets/CatalogEntityPreviewLink-BPnp82vP.js similarity index 97% rename from assets/CatalogEntityPreviewLink-xL6TDpUk.js rename to assets/CatalogEntityPreviewLink-BPnp82vP.js index 4abd9c177fffbf23a17d65d127d1dc221961f52a..e33db22b6aa2cc797fa842991475f72ba894a8b0 100644 --- a/assets/CatalogEntityPreviewLink-xL6TDpUk.js +++ b/assets/CatalogEntityPreviewLink-BPnp82vP.js @@ -1,4 +1,4 @@ -import{c as m,a5 as h,V as d,b as g,j as s,L as f,a3 as k}from"./index-D2fBL-s6.js";import{H as w,a as y,b as v}from"./hover-card-DWpZK4fW.js";import{c as l}from"./catalog-5AxvKr4D.js";/** +import{c as m,a5 as h,V as d,b as g,j as s,L as f,a3 as k}from"./index-BeSw2DVP.js";import{H as w,a as y,b as v}from"./hover-card-BbFULETs.js";import{c as l}from"./catalog-D3XT9SmX.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/ChatView-DAikess2.js b/assets/ChatView-2NhnPPPO.js similarity index 97% rename from assets/ChatView-DAikess2.js rename to assets/ChatView-2NhnPPPO.js index d42ff94290291e6f2b0e8ce9e964cbf007d9f409..2812002d373ab986942183041d3ba3d45858cc79 100644 --- a/assets/ChatView-DAikess2.js +++ b/assets/ChatView-2NhnPPPO.js @@ -1,4 +1,4 @@ -var Nt=Object.defineProperty;var Dt=(t,e,r)=>e in t?Nt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var ae=(t,e,r)=>Dt(t,typeof e!="symbol"?e+"":e,r);import{c as Lt,f as c,j as s,X as bt,x as wt,b as Te,L as vt,_ as Ft,$ as Bt,a0 as Ot,a1 as nt,V as qe,e as St,k as xt,s as _t,l as Et,h as Pt,a as Ct,u as qt,A as Ut}from"./index-D2fBL-s6.js";import{C as Ht,U as at,b as Kt,f as ke,A as Wt,a as zt,c as $t,g as Qt,h as Vt,i as Oe,j as Yt,k as it,t as Gt,l as Xt,E as Jt,m as Zt,n as es,o as ot}from"./chatLifecycle-nMvmiYGF.js";import{g as Fe,h as ts,j as ss,k as Rt,T as ct,e as kt,l as Le,m as Ke,r as rs,n as ns,o as he,D as We,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 lt,H as jt,I as ut,J as ze,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 xs}from"./chatSessions-CoHSP58H.js";import{M as _s}from"./McpShowcase-R1ucnqw2.js";import{c as pe}from"./chat-BOZIonsX.js";import{S as Es}from"./share-2-SmaUf3DC.js";import{u as Ue}from"./useMutation-9dlTbuQj.js";import{I as Cs}from"./Icon-Uhh78KjL.js";import{m as Rs}from"./mlIntern-KBHZ6tOl.js";import{u as ks,O as js}from"./openrouter-BRMbmxz_.js";/* empty css */import"./hover-card-DWpZK4fW.js";import"./CatalogEntityPreviewLink-xL6TDpUk.js";import"./catalog-5AxvKr4D.js";import"./github-DcIeypA5.js";import"./file-text-CikzkPqz.js";import"./PaperPreviewLink-BZuRBR1p.js";import"./index-BPshewTi.js";import"./index-BtZPsygG.js";import"./katex-DkKDou_j.js";import"./papers-khuZaSFb.js";import"./curation-BtfabyzA.js";import"./thumbs-up-BnMguJ3s.js";import"./copy-CcyqVsMW.js";import"./queryOptions-C9woPjwX.js";import"./arrow-left-CzTG6LBL.js";import"./external-link-Ddavpnin.js";import"./plus-BI8-JXK0.js";import"./search-0R_Hc3S2.js";import"./chevron-up-B9KJ5aUJ.js";import"./AuthorAvatar-C8tz_syh.js";import"./AgentLogos-B5etEEwg.js";/** +var Nt=Object.defineProperty;var Dt=(t,e,r)=>e in t?Nt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var ae=(t,e,r)=>Dt(t,typeof e!="symbol"?e+"":e,r);import{c as Lt,f as c,j as s,X as bt,x as wt,b as Te,L as vt,_ as Ft,$ as Bt,a0 as Ot,a1 as nt,V as qe,e as St,k as xt,s as _t,l as Et,h as Pt,a as Ct,u as qt,A as Ut}from"./index-BeSw2DVP.js";import{C as Ht,U as at,b as Kt,f as ke,A as Wt,a as zt,c as $t,g as Qt,h as Vt,i as Oe,j as Yt,k as it,t as Gt,l as Xt,E as Jt,m as Zt,n as es,o as ot}from"./chatLifecycle-ByiWkgE5.js";import{g as Fe,h as ts,j as ss,k as Rt,T as ct,e as kt,l as Le,m as Ke,r as rs,n as ns,o as he,D as We,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 lt,H as jt,I as ut,J as ze,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 xs}from"./chatSessions-v3d2DQH8.js";import{M as _s}from"./McpShowcase-CMNatnnu.js";import{c as pe}from"./chat-Bvpu56kX.js";import{S as Es}from"./share-2-CGSfn6ux.js";import{u as Ue}from"./useMutation-CsS-RfeE.js";import{I as Cs}from"./Icon-BWcOShxk.js";import{m as Rs}from"./mlIntern-C-RSIXvd.js";import{u as ks,O as js}from"./openrouter-C8otLyGB.js";/* empty css */import"./hover-card-BbFULETs.js";import"./CatalogEntityPreviewLink-BPnp82vP.js";import"./catalog-D3XT9SmX.js";import"./github-CTNIgqBO.js";import"./file-text-BHvaEohD.js";import"./PaperPreviewLink-BughwfUv.js";import"./index-CbsMwfXw.js";import"./index-XKdmo9ij.js";import"./katex-DkKDou_j.js";import"./papers-B58HJw9r.js";import"./curation-CCIsdsjV.js";import"./thumbs-up-DGIteJ7Z.js";import"./copy-3DjQpd64.js";import"./queryOptions-C9woPjwX.js";import"./arrow-left-C-qXYpsS.js";import"./external-link-BAPjX9Up.js";import"./plus-imZJbVTM.js";import"./search-B4RgSU4h.js";import"./chevron-up-CSi6wXAh.js";import"./AuthorAvatar-Dpan5W1F.js";import"./AgentLogos-BC7uX8n_.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/ConferenceDetailView-BapnrC2V.js b/assets/ConferenceDetailView-CBVBkALA.js similarity index 82% rename from assets/ConferenceDetailView-BapnrC2V.js rename to assets/ConferenceDetailView-CBVBkALA.js index 1b0d698fa74d4f6a6f44972454b746600b0fcb7f..8882ef8f046c09a453fb2d29601add8f0deacae0 100644 --- a/assets/ConferenceDetailView-BapnrC2V.js +++ b/assets/ConferenceDetailView-CBVBkALA.js @@ -1 +1 @@ -import{u as y,b as k,f as _,j as e,L as h,T as S}from"./index-D2fBL-s6.js";import{a as f,A as b,b as E}from"./AreaSection-COKqvfmt.js";import{M as j}from"./MarkdownText-ludE7yuw.js";import{c as A}from"./catalog-5AxvKr4D.js";import{i as C}from"./apiErrors-DV2aaDjL.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-BG5SWwEG.js";import{d as D}from"./transform-B_GaHMvk.js";import{S as P}from"./skeleton-BDwfco0_.js";import{A as M,a as R}from"./alert-PnePcfgX.js";import{s as B}from"./safeExternalHref-CkBrsh84.js";import I from"./NotFound-L0ldWZg9.js";/* empty css */import"./PaperPreviewLink-BZuRBR1p.js";import"./index-BPshewTi.js";import"./index-BtZPsygG.js";import"./katex-DkKDou_j.js";import"./hover-card-DWpZK4fW.js";import"./papers-khuZaSFb.js";import"./curation-BtfabyzA.js";import"./useMutation-9dlTbuQj.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}; +import{u as y,b as k,f as _,j as e,L as h,T as S}from"./index-BeSw2DVP.js";import{a as f,A as b,b as E}from"./AreaSection-DhnFgZsX.js";import{M as j}from"./MarkdownText-BdL6XBXC.js";import{c as A}from"./catalog-D3XT9SmX.js";import{i as C}from"./apiErrors-CXiv7lxc.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-BG5SWwEG.js";import{d as D}from"./transform-BadO0Aba.js";import{S as P}from"./skeleton-BBv4iC5Z.js";import{A as M,a as R}from"./alert-uwP129N7.js";import{s as B}from"./safeExternalHref-CkBrsh84.js";import I from"./NotFound-BkVU3ijx.js";/* empty css */import"./PaperPreviewLink-BughwfUv.js";import"./index-CbsMwfXw.js";import"./index-XKdmo9ij.js";import"./katex-DkKDou_j.js";import"./hover-card-BbFULETs.js";import"./papers-B58HJw9r.js";import"./curation-CCIsdsjV.js";import"./useMutation-CsS-RfeE.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}; diff --git a/assets/ConferenceTaskView-DG4QYE8x.js b/assets/ConferenceTaskView-DMB1KJgG.js similarity index 79% rename from assets/ConferenceTaskView-DG4QYE8x.js rename to assets/ConferenceTaskView-DMB1KJgG.js index 22b655f0cbce2720e2a0eb4b6edb186c1d963a1b..ac993fe9715d571b0eb50ac7386309a1a63305fb 100644 --- a/assets/ConferenceTaskView-DG4QYE8x.js +++ b/assets/ConferenceTaskView-DMB1KJgG.js @@ -1 +1 @@ -import{u as S,b as _,p as R,f as C,j as e,L as x,q as M,T as E}from"./index-D2fBL-s6.js";import{u as L,b as q,P as Q}from"./PaperFeed-BERxHjrg.js";import{M as g}from"./MarkdownText-ludE7yuw.js";import{c as F}from"./catalog-5AxvKr4D.js";import{p as B}from"./papers-khuZaSFb.js";import{i as A}from"./apiErrors-DV2aaDjL.js";import{C as O}from"./conferenceListings-BnmhBx-_.js";import{t as z,d as H}from"./transform-B_GaHMvk.js";import{u as I}from"./usePapers-CAjdcUuj.js";import{A as K,a as $}from"./alert-PnePcfgX.js";import V from"./NotFound-L0ldWZg9.js";import"./PaperCard-DhorusY5.js";import"./AuthorAvatar-C8tz_syh.js";import"./SotaBadges-r6iGzLRW.js";import"./colors-BkWRhvFI.js";import"./Icon-Uhh78KjL.js";import"./LatexTitle-WIQJ1ke0.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-DS5Jzsg5.js";import"./skeleton-BDwfco0_.js";import"./useIntersectionObserver-C0Rq0EXm.js";/* empty css */import"./PaperPreviewLink-BZuRBR1p.js";import"./index-BPshewTi.js";import"./index-BtZPsygG.js";import"./katex-DkKDou_j.js";import"./hover-card-DWpZK4fW.js";import"./useMutation-9dlTbuQj.js";import"./curation-BtfabyzA.js";import"./useInfiniteQuery-CjJA-90e.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}; +import{u as S,b as _,p as R,f as C,j as e,L as x,q as M,T as E}from"./index-BeSw2DVP.js";import{u as L,b as q,P as Q}from"./PaperFeed-Cge1MWHJ.js";import{M as g}from"./MarkdownText-BdL6XBXC.js";import{c as F}from"./catalog-D3XT9SmX.js";import{p as B}from"./papers-B58HJw9r.js";import{i as A}from"./apiErrors-CXiv7lxc.js";import{C as O}from"./conferenceListings-BnmhBx-_.js";import{t as z,d as H}from"./transform-BadO0Aba.js";import{u as I}from"./usePapers-Cj1tt_u6.js";import{A as K,a as $}from"./alert-uwP129N7.js";import V from"./NotFound-BkVU3ijx.js";import"./PaperCard-Dx07g-aj.js";import"./AuthorAvatar-Dpan5W1F.js";import"./SotaBadges-FMpqi2HS.js";import"./colors-BkWRhvFI.js";import"./Icon-BWcOShxk.js";import"./LatexTitle-C5yrYbA-.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-CYoFzAud.js";import"./skeleton-BBv4iC5Z.js";import"./useIntersectionObserver-BBx3EHQ9.js";/* empty css */import"./PaperPreviewLink-BughwfUv.js";import"./index-CbsMwfXw.js";import"./index-XKdmo9ij.js";import"./katex-DkKDou_j.js";import"./hover-card-BbFULETs.js";import"./useMutation-CsS-RfeE.js";import"./curation-CCIsdsjV.js";import"./useInfiniteQuery-C8JHYWz5.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}; diff --git a/assets/ConferencesIndexView-DGftnYu4.js b/assets/ConferencesIndexView-DKRLcCka.js similarity index 76% rename from assets/ConferencesIndexView-DGftnYu4.js rename to assets/ConferencesIndexView-DKRLcCka.js index 33cf06ed859b0a2f86663aac50a916a71a9308f6..251362b703686dcd7ab87317814e9640388864e1 100644 --- a/assets/ConferencesIndexView-DGftnYu4.js +++ b/assets/ConferencesIndexView-DKRLcCka.js @@ -1 +1 @@ -import{b as d,f as m,j as e,L as c,T as p}from"./index-D2fBL-s6.js";import{c as u}from"./catalog-5AxvKr4D.js";import{f}from"./deadlines-BG5SWwEG.js";import{A as h,a as x}from"./alert-PnePcfgX.js";import{A as g,a as j}from"./AreaSection-COKqvfmt.js";import{T as N}from"./TaxonomySuggestionTile-UxnpnHcy.js";import"./skeleton-BDwfco0_.js";import"./SignInToEditDialog-BBAwjxYj.js";import"./button-D0XfbdrX.js";import"./input-DdobyT4w.js";import"./textarea-B8b7WxcV.js";import"./searchable-select-CsXzzP_V.js";import"./popover-DS5Jzsg5.js";import"./dialog-DgUROq2j.js";import"./search-0R_Hc3S2.js";import"./loader-circle-CoLo2trx.js";import"./useMutation-9dlTbuQj.js";import"./submissions-LRopJJKL.js";import"./plus-BI8-JXK0.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}; +import{b as d,f as m,j as e,L as c,T as p}from"./index-BeSw2DVP.js";import{c as u}from"./catalog-D3XT9SmX.js";import{f}from"./deadlines-BG5SWwEG.js";import{A as h,a as x}from"./alert-uwP129N7.js";import{A as g,a as j}from"./AreaSection-DhnFgZsX.js";import{T as N}from"./TaxonomySuggestionTile-CEhbbEDc.js";import"./skeleton-BBv4iC5Z.js";import"./SignInToEditDialog-DDBzf9N6.js";import"./button-CO2XYoBd.js";import"./input-B5SDgz8U.js";import"./textarea-VtGLPxu8.js";import"./searchable-select-C_dIHH-q.js";import"./popover-CYoFzAud.js";import"./dialog-EpDnY6a5.js";import"./search-B4RgSU4h.js";import"./loader-circle-C4luyo5I.js";import"./useMutation-CsS-RfeE.js";import"./submissions-D_EEKc6c.js";import"./plus-imZJbVTM.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}; diff --git a/assets/CronDashboard-C733Wslj.js b/assets/CronDashboard-3jn82om4.js similarity index 97% rename from assets/CronDashboard-C733Wslj.js rename to assets/CronDashboard-3jn82om4.js index cb5491b784651bd2bdc7a14f8957052e5ab38eb0..f1a9c31d9e8b03ae7cf9168216b48851e4780e60 100644 --- a/assets/CronDashboard-C733Wslj.js +++ b/assets/CronDashboard-3jn82om4.js @@ -1,4 +1,4 @@ -import{c,f as a,j as r,I as n,ac as u}from"./index-D2fBL-s6.js";/** +import{c,f as a,j as r,I as n,ac as u}from"./index-BeSw2DVP.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/CronDashboard-Wker39-h.js b/assets/CronDashboard-8Mh93TaY.js similarity index 98% rename from assets/CronDashboard-Wker39-h.js rename to assets/CronDashboard-8Mh93TaY.js index d76027c39ee6879fec92d8384dbe0c85ef5ffe47..789650636cf055d227b0e4b79fd51a9b3fd3ff79 100644 --- a/assets/CronDashboard-Wker39-h.js +++ b/assets/CronDashboard-8Mh93TaY.js @@ -1,4 +1,4 @@ -import{c as O,f 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 $,l as xe,A as Re,L as pe,a as hs,s as xs}from"./index-D2fBL-s6.js";import{u as P}from"./useMutation-9dlTbuQj.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-C733Wslj.js";import{B as D}from"./badge-Pw584nS3.js";import{B as y}from"./button-D0XfbdrX.js";import{C as ps,a as gs}from"./chevron-up-B9KJ5aUJ.js";import{D as fe}from"./database-Ci0ufNyG.js";import{T as js}from"./trending-up-DFLWFJuY.js";import{A as ne}from"./activity-DWWgzth6.js";import{F as Ne}from"./file-text-CikzkPqz.js";import{T as Ee,I as vs}from"./triangle-alert-VQM9i8wl.js";import{E as Y}from"./external-link-Ddavpnin.js";import{C as Z,R as be}from"./refresh-cw-fOkD1TSw.js";import{L as R}from"./loader-circle-CoLo2trx.js";import{C as je}from"./circle-check-1e3iPSaF.js";import{c as M,A as _s}from"./codex-BUTI-2RM.js";import{u as fs}from"./useInfiniteQuery-CjJA-90e.js";import{p as Me}from"./paperEdits-C-9tVqXs.js";import{c as me}from"./catalog-5AxvKr4D.js";import{c as ye}from"./chat-BOZIonsX.js";/** +import{c as O,f 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 $,l as xe,A as Re,L as pe,a as hs,s as xs}from"./index-BeSw2DVP.js";import{u as P}from"./useMutation-CsS-RfeE.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-3jn82om4.js";import{B as D}from"./badge-PwLfXWCy.js";import{B as y}from"./button-CO2XYoBd.js";import{C as ps,a as gs}from"./chevron-up-CSi6wXAh.js";import{D as fe}from"./database-stY-9KZX.js";import{T as js}from"./trending-up-Bx9WuS-7.js";import{A as ne}from"./activity-DCd4sApj.js";import{F as Ne}from"./file-text-BHvaEohD.js";import{T as Ee,I as vs}from"./triangle-alert-1tg5iDLg.js";import{E as Y}from"./external-link-BAPjX9Up.js";import{C as Z,R as be}from"./refresh-cw-_ZzKdPgT.js";import{L as R}from"./loader-circle-C4luyo5I.js";import{C as je}from"./circle-check-fwAHrwbg.js";import{c as M,A as _s}from"./codex-JTzG52Zs.js";import{u as fs}from"./useInfiniteQuery-C8JHYWz5.js";import{p as Me}from"./paperEdits-CoVzQ5th.js";import{c as me}from"./catalog-D3XT9SmX.js";import{c as ye}from"./chat-Bvpu56kX.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/ExternalSourceEvalBadge-C2AscbJz.js b/assets/ExternalSourceEvalBadge-CfB9WUzn.js similarity index 94% rename from assets/ExternalSourceEvalBadge-C2AscbJz.js rename to assets/ExternalSourceEvalBadge-CfB9WUzn.js index 2263d29206ab1928737202521086a39adb3f3a79..d7c4f0167c12b32ce2ea16011d0083f605c88f3b 100644 --- a/assets/ExternalSourceEvalBadge-C2AscbJz.js +++ b/assets/ExternalSourceEvalBadge-CfB9WUzn.js @@ -1 +1 @@ -import{p as o}from"./curation-BtfabyzA.js";import{ac as g,j as a,L as l}from"./index-D2fBL-s6.js";import{H as u,a as c,b as d}from"./hover-card-DWpZK4fW.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}; +import{p as o}from"./curation-CCIsdsjV.js";import{ac as g,j as a,L as l}from"./index-BeSw2DVP.js";import{H as u,a as c,b as d}from"./hover-card-BbFULETs.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}; diff --git a/assets/FeedView-6xUWjpm4.js b/assets/FeedView-Bv5eNETi.js similarity index 94% rename from assets/FeedView-6xUWjpm4.js rename to assets/FeedView-Bv5eNETi.js index 05c5ee1f87992c04117c09e8592da99076709a83..f9af207a0abcd8ca334b11fea9a4148989c37e72 100644 --- a/assets/FeedView-6xUWjpm4.js +++ b/assets/FeedView-Bv5eNETi.js @@ -1 +1 @@ -import{j as e,L as A,a as Qe,g as We,k as Te,l as qe,b as G,f as p,C as Ee,h as Ye,r as ge,T as V,d as Xe,e as Ze,p as Le,i as Ve,m as ve,n as $e,o as Je,q as es}from"./index-D2fBL-s6.js";import{S as ss}from"./sparkles-4rJdywIs.js";import{D as ts,a as as,b as os}from"./dialog-DgUROq2j.js";import{c as fe}from"./catalog-5AxvKr4D.js";import{d as Oe,e as He,f as ze,b as Ke,g as Be,h as Ne,i as Fe,t as Pe,j as is,k as ns,r as _e,a as rs,l as ls,m as cs,n as Ae,o as De,p as ds}from"./researchTopic-jOpECA0z.js";import{d as Se,t as us}from"./transform-B_GaHMvk.js";import{P as ke}from"./plus-BI8-JXK0.js";import{A as ms}from"./arrow-right-COzkrAUH.js";import{S as ps}from"./SortableList-BzRDhhmi.js";import{r as hs,a as gs,w as fs,P as bs}from"./PaperFeed-BERxHjrg.js";import{M as xs}from"./McpShowcase-R1ucnqw2.js";import{u as ws,a as js,P as ys,i as vs,A as Ns,b as Ss,S as U,c as ks,D as xe,q as Ts,d as Ps}from"./chatSessions-CoHSP58H.js";import{c as _s}from"./chat-BOZIonsX.js";import{u as Cs}from"./usePapers-CAjdcUuj.js";import{p as Es}from"./papers-khuZaSFb.js";import{S as we}from"./skeleton-BDwfco0_.js";import{A as je,a as ye}from"./alert-PnePcfgX.js";import"./useMutation-9dlTbuQj.js";import"./PaperCard-DhorusY5.js";import"./AuthorAvatar-C8tz_syh.js";import"./SotaBadges-r6iGzLRW.js";import"./colors-BkWRhvFI.js";import"./Icon-Uhh78KjL.js";import"./LatexTitle-WIQJ1ke0.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-DS5Jzsg5.js";import"./useIntersectionObserver-C0Rq0EXm.js";import"./AgentLogos-B5etEEwg.js";import"./useInfiniteQuery-CjJA-90e.js";import"./curation-BtfabyzA.js";function Ls({onBuild:h}){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 topics 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."}),h&&e.jsxs("button",{type:"button",className:"research-topic-save following-intro-topic",onClick:h,children:[e.jsx(ss,{"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(A,{to:"/settings",children:"Settings"}),"."]})]})}const Re=16;function Fs({open:h,topicId:o=null,afterSavePath:l,onOpenChange:n}){return e.jsx(ts,{open:h,onOpenChange:n,children:e.jsx(as,{className:"topic-dialog","aria-describedby":void 0,children:e.jsx(As,{topicId:o,afterSavePath:l,onDone:()=>n(!1)},o??"new")})})}function As({topicId:h,afterSavePath:o,onDone:l}){var te,z,Y,ae,me,pe,he,oe,ie,ne;const{user:n}=Qe(),t=We(),b=Te(),j=qe(),u=Oe(),N=He(),S=G({queryKey:["trending-tasks-follow"],queryFn:()=>fe.trendingTasks({limit:Re,level:0}),staleTime:V}),D=G({queryKey:["trending-methods-follow"],queryFn:()=>fe.trendingMethods({limit:Re}),staleTime:V}),E=G({queryKey:["research-follow-suggestions"],queryFn:_e.followSuggestions,staleTime:V}),L=(a=[])=>a.map(c=>({id:String(c.entity_id),name:c.name,image:c.image_url})),[q,K]=p.useState(null),[R,m]=p.useState([]),[k,T]=p.useState([]),g=ze(),P=Ke(),i=Be(),r=(te=u.data)==null?void 0:te.find(a=>a.id===h),x=((z=u.data)==null?void 0:z.filter(a=>a.id!==h))??[],F=k.filter(a=>x.some(c=>c.id===a)),_=(r==null?void 0:r.text)??"",M=q??_,C=M.trim().replace(/\s+/g," "),J=(r==null?void 0:r.status)==="failed"&&C===_,ee=!r&&(((Y=u.data)==null?void 0:Y.length)??0)-F.length>=Ne,B=C.length>=3&&(C!==_||J)&&!ee,[ce,se]=p.useState(!1),Q=p.useRef(!0);p.useEffect(()=>(Q.current=!0,()=>{Q.current=!1}),[]);const I=g.isPending||P.isPending||i.isPending||ce,W=(a,c)=>{var v;return((v=N.data)==null?void 0:v.some(y=>y.kind===a&&String(y.entity_id)===c))??!1},de=(a,c)=>{var v;return((v=R.find(y=>y.kind===a&&y.id===c))==null?void 0:v.follow)??W(a,c)},$=R.filter(a=>a.follow!==W(a.kind,a.id)),ue=!I&&(B||$.length>0||F.length>0),be=(a,c,v)=>m(y=>[...y.filter(X=>X.kind!==a||X.id!==c),{kind:a,id:c,name:v,follow:!de(a,c)}]),H=()=>{if(!ue)return;if(!n){B&&is(C),$.length&&ns($),window.location.href=Ye(o??`${t.pathname}${t.search}`);return}const a=F.length?P.mutateAsync(F):Promise.resolve(),c=[...$.length?[i.mutateAsync($)]:[],a,...B?[a.catch(()=>{}).then(()=>g.mutateAsync({id:r==null?void 0:r.id,text:C}))]:[]];Promise.allSettled(c).then(async v=>{if(v.every(y=>y.status==="fulfilled")){if(o){if(se(!0),await Promise.all([j.refetchQueries({queryKey:ge.follows(n.hf_subject)}),j.refetchQueries({queryKey:ge.topics(n.hf_subject)})]),!Q.current)return;l(),b(o);return}l()}})},O=(a,c,v,y)=>{const re=[...(N.data??[]).filter(f=>f.kind===c).map(f=>({id:String(f.entity_id),name:f.name,slug:f.url.split("/").pop(),image:f.image_url})),...v.filter(f=>!W(c,f.id)).map(f=>({...f,suggested:!0}))];return re.length>0&&e.jsxs("div",{className:"topic-dialog-group",children:[e.jsx("h3",{children:a}),e.jsxs(Ds,{children:[re.map(f=>{const le=de(c,f.id),Z=c==="task"?Se(f.name,f.slug??void 0):f.name;return e.jsxs("button",{type:"button",className:"topic-dialog-chip","aria-pressed":le,disabled:I,"data-suggested":"suggested"in f||void 0,onClick:()=>be(c,f.id,Z),children:[le?e.jsx(Ee,{"aria-hidden":"true"}):e.jsx(ke,{"aria-hidden":"true"}),(c==="author"||c==="organization")&&e.jsx(Rs,{kind:c,name:Z,src:f.image}),Z]},f.id)}),y&&e.jsxs(A,{to:y.to,className:"topic-dialog-browse",children:[y.label,e.jsx(ms,{"aria-hidden":"true"})]})]})]})};return e.jsxs("form",{className:"topic-dialog-form",onSubmit:a=>{a.preventDefault(),H()},children:[e.jsx(os,{className:"topic-dialog-title",children:(ae=u.data)!=null&&ae.length||(me=N.data)!=null&&me.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:r?"Edit this topic":(pe=u.data)!=null&&pe.length?"Add a topic in your own words":"Describe a topic in your own words"})}),e.jsx("p",{className:"topic-dialog-hint",children:ee?`You follow ${Ne} topics, the most allowed. Remove one below to add another.`:"A model reads every new paper and adds the ones that match to your Following feed. New topics are public and show your Hugging Face username; make one private in Settings."}),e.jsx("textarea",{id:"topic-dialog-input",className:"research-topic-input",rows:4,maxLength:Fe,"aria-label":"Research topic",placeholder:"e.g. diffusion policies for robot manipulation, or speculative decoding for LLM inference",value:M,onChange:a=>K(a.target.value),onKeyDown:a=>{a.key==="Enter"&&!a.shiftKey&&!a.nativeEvent.isComposing&&(a.preventDefault(),H())}}),e.jsxs("span",{className:"research-topic-count",children:[M.length,"/",Fe]})]}),x.length>0&&e.jsxs("div",{className:"topic-dialog-group",children:[e.jsx("h3",{children:r?"Your other topics":"Your topics"}),e.jsx("div",{className:"topic-dialog-chips",children:x.map(a=>{const c=!k.includes(a.id);return e.jsxs("button",{type:"button",className:"topic-dialog-chip","aria-pressed":c,disabled:I,title:a.text,onClick:()=>T(v=>c?[...v,a.id]:v.filter(y=>y!==a.id)),children:[c?e.jsx(Ee,{"aria-hidden":"true"}):e.jsx(ke,{"aria-hidden":"true"}),Pe(a)]},a.id)})})]}),O("Trending tasks","task",((he=S.data)==null?void 0:he.results)??[],{to:"/tasks",label:"Browse tasks"}),O("Trending methods","method",((oe=D.data)==null?void 0:oe.results)??[],{to:"/methods",label:"Browse methods"}),O("Benchmarks","benchmark",[],{to:"/tasks",label:"Browse benchmarks"}),O("Popular authors","author",L((ie=E.data)==null?void 0:ie.authors)),O("Popular organizations","organization",L((ne=E.data)==null?void 0:ne.organizations),{to:"/organizations",label:"Browse organizations"}),(g.error||P.error||i.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:[r&&e.jsx("button",{type:"button",className:"research-follow-action topic-dialog-remove",disabled:I,onClick:()=>P.mutate([r.id],{onSuccess:l}),children:"Remove topic"}),e.jsx("button",{type:"button",className:"research-follow-action",disabled:I,onClick:l,children:"Cancel"}),e.jsx("button",{type:"submit",className:"research-topic-save",disabled:!ue,children:$.some(a=>a.follow===!1)||F.length?"Save":$.length?"Follow":J?"Retry":r?"Update topic":"Follow"})]})]})}function Ds({children:h}){const o=p.useRef(null);return p.useLayoutEffect(()=>{const l=o.current;if(!l)return;const n=()=>{const t=[...l.children],b=t.filter(u=>u.dataset.suggested);b.forEach(u=>{u.hidden=!1});const j=()=>new Set(t.filter(u=>!u.hidden).map(u=>u.offsetTop)).size;for(let u=b.length-1;u>=0&&j()>2;u--)b[u].hidden=!0};return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)}),e.jsx("div",{ref:o,className:"topic-dialog-chips",children:h})}function Rs({kind:h,name:o,src:l}){const[n,t]=p.useState(!1);if(l&&!n)return e.jsx("img",{className:`topic-dialog-chip-image is-${h}`,src:l,alt:"",loading:"lazy",onError:()=>t(!0)});if(h!=="author")return null;const b=o.split(/\s+/).filter(Boolean).map(j=>j[0]).slice(0,2).join("").toUpperCase();return e.jsx("span",{className:"topic-dialog-chip-image is-author is-initials","aria-hidden":"true",children:b})}function Ms({onAddTopic:h}){var l,n;const o=G({queryKey:ge.featuredTopics,queryFn:_e.featuredTopics,staleTime:V});return o.isPending||!((l=o.data)!=null&&l.length)&&!h?null:e.jsxs("nav",{className:"topic-bubbles","aria-label":"Popular topics",children:[(n=o.data)==null?void 0:n.map(t=>e.jsxs(A,{className:"topic-bubble",to:rs(t),title:`${t.followers.toLocaleString()} ${t.followers===1?"follower":"followers"}`,children:[t.creator&&e.jsx("img",{src:t.creator.avatar_url,alt:"",width:20,height:20,loading:"lazy"}),e.jsx("span",{className:"topic-bubble-name",children:Pe(t)}),t.creator&&e.jsxs("span",{className:"topic-bubble-creator",children:["@",t.creator.username]})]},t.id)),h&&e.jsxs("button",{type:"button",className:"topic-bubble topic-bubble-add",onClick:h,children:[e.jsx(ke,{size:14,"aria-hidden":"true"}),e.jsx("span",{className:"topic-bubble-name",children:"Add topic"})]})]})}const Me=45,Is=1800,qs=25,$s=350,Os=h=>{const[o,l]=p.useState(U[0].slice(0,1)),[n,t]=p.useState(0);return p.useEffect(()=>{var D,E;if(!h)return;if((E=(D=window.matchMedia)==null?void 0:D.call(window,"(prefers-reduced-motion: reduce)"))!=null&&E.matches){l(U[0]),t(0);return}let b=0,j=1,u=!1,N;l(U[0].slice(0,j)),t(0);const S=()=>{const L=U[b];if(!u){if(j+=1,l(L.slice(0,j)),j===L.length){u=!0,N=window.setTimeout(S,Is);return}N=window.setTimeout(S,Me);return}if(j-=1,l(L.slice(0,j)),j===0){u=!1,b=(b+1)%U.length,t(b),N=window.setTimeout(S,$s);return}N=window.setTimeout(S,qs)};return N=window.setTimeout(S,Me),()=>window.clearTimeout(N)},[h]),{placeholder:o,prompt:U[n]}},Hs=()=>{var P;const h=Te(),o=$e(),[l,n]=p.useState({text:"",paperMentions:[]}),t=l.text,[b,j]=p.useState(0),[u,N]=p.useState(!1),[S,D]=p.useState(null),{placeholder:E,prompt:L}=Os(!t),q=p.useRef(null),K=G({queryKey:["chatAvailability"],queryFn:()=>_s.getAvailability(),retry:!1,enabled:ve()}),R=ve()&&((P=K.data)==null?void 0:P.paper_mentions_enabled)!==!1,m=ws({draft:l,onChange:n,enabled:R,textareaRef:q}),k=js(l,m.open),T=t?k.completion:L;p.useLayoutEffect(()=>{const i=q.current;if(!i)return;const r=()=>{if(i.style.height="auto",t){i.style.height=`${Math.min(ks(i),160)}px`;return}const x=i.placeholder,F=U.reduce((_,M)=>(i.placeholder=M,Math.max(_,i.scrollHeight)),0);i.placeholder=x,i.style.height=`${Math.min(F,160)}px`};return r(),window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[t,T]);const g=async(i=l)=>{const r=i.text.trim();if(!(!r||u)){if(o){const x=new URLSearchParams({q:r,model:xe}),F=`${Je}?${x}`,_=window.open(F,"_blank");if(!_){D(F);return}_.opener=null,D(null),n({text:"",paperMentions:[]});return}N(!0),Ts(i,xe);try{const x=await Ps(xe);h(`/chat/${x.id}`)}catch{h("/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(ys,{text:l.text,mentions:l.paperMentions,scrollTop:b,variant:"home",completion:t?T:""}),e.jsx("textarea",{ref:q,rows:1,value:t,placeholder:E,"aria-label":"Ask the assistant",disabled:u,onChange:i=>{m.updateText(i.target.value,i.target.selectionStart),k.trackCaret(i.target)},onSelect:i=>{m.refresh(i.currentTarget.selectionStart),k.trackCaret(i.currentTarget)},onClick:i=>{m.refresh(i.currentTarget.selectionStart),k.trackCaret(i.currentTarget)},onScroll:i=>j(i.currentTarget.scrollTop),onBlur:i=>{var r,x;(x=(r=i.relatedTarget)==null?void 0:r.closest)!=null&&x.call(r,".chat-paper-picker")||window.setTimeout(m.close,0)},onKeyDown:i=>{if(!m.keyDown(i)){if(vs(i)&&T){i.preventDefault();const r=t+T;m.updateText(r,r.length),window.requestAnimationFrame(()=>{var x;return(x=q.current)==null?void 0:x.setSelectionRange(r.length,r.length)});return}i.key==="Enter"&&!i.shiftKey&&(i.preventDefault(),g())}},role:R?"combobox":void 0,"aria-expanded":R?m.open:void 0,"aria-controls":m.open?m.pickerId:void 0,"aria-activedescendant":m.open&&m.results.length?`${m.optionIdPrefix}-${m.activeIndex}`:void 0,"aria-autocomplete":R?"list":void 0,"aria-describedby":m.message?"ask-home-paper-mention-message":void 0})]}),e.jsx("button",{type:"button",className:`chat-send${t.trim()?" chat-send-on":""}`,onClick:()=>void g(),disabled:!t.trim()||u,"aria-label":"Ask the assistant",children:e.jsx(Ns,{})})]}),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"})}),m.message&&e.jsx("div",{id:"ask-home-paper-mention-message",className:"chat-paper-mention-message",role:"alert",children:m.message}),e.jsx(Ss,{open:m.open,query:m.query,results:m.results,activeIndex:m.activeIndex,loading:m.loading,error:m.error,onSelect:m.select,id:m.pickerId,optionIdPrefix:m.optionIdPrefix})]})]})},Ue={task:"Tasks",method:"Methods",benchmark:"Benchmarks",author:"Authors",organization:"Orgs"},zs=Object.keys(Ue),Ks=30,Ie=40,Bs=async h=>{const o=await h;return{results:o.results.map(l=>({paper:l})),next_page:o.next_page}},Us=({mode:h})=>{var ie,ne,a,c,v,y,X,re,f,le,Z,Ce;const o=h==="following",l=Te(),n=Xe(),t=n==null?void 0:n.user,[b,j]=Ze(),u=hs(b,void 0,h==="trending"?"week":"month"),N=s=>{const d=new URLSearchParams(b);d.delete("order_by"),d.delete("only"),d.delete("topic");const w=d.toString();l(w?`${s}?${w}`:s)},S=s=>{const d=new URLSearchParams(b);d.delete("only"),s===null?d.delete("topic"):d.set("topic",String(s));const w=d.toString();return w?`/following?${w}`:"/following"},D=G({queryKey:es.topTasksSidebar,queryFn:()=>fe.topTasks(8),staleTime:V}),E=G({queryKey:["trending-tasks-sidebar"],queryFn:()=>fe.trendingTasks({limit:8,level:0,min_recent_papers:10}),staleTime:V}),L=o&&b.get("only")==="topic",q=o?Number(b.get("topic")??NaN):NaN,K=Number.isInteger(q)?q:void 0,R={start_date:u.startDate,end_date:u.endDate},m={...u,topicOnly:L,topicId:K},k=Cs(o?[...Le.feeds.following,t==null?void 0:t.hf_subject,m]:[...Le.feeds.trending,R],async s=>{if(o){const w=await _e.following(s,m),Ge=w.length===Ie?s+Ie:null;return{results:w,next_page:Ge}}const d={...R,page:s,page_size:Ks,include_resources:!0};return Bs(Es.list({...d,order_by:"trending",order_dir:"desc",latest_only:!0}))},{enabled:!o||!!t,initialPage:o?0:1}),T=He(o),g=Oe(o,1e4),P=Pe,i=Ke(),r=ls(),x=((ie=g.data)==null?void 0:ie.filter(cs))??[],F=x.length>0,_=(ne=g.data)==null?void 0:ne.find(s=>s.id===K),[M,C]=p.useState(void 0),J=(((a=g.data)==null?void 0:a.length)??0)s.id).join(","),ce=p.useRef([]);p.useEffect(()=>{const s=B?B.split(","):[];ce.current.some(d=>!s.includes(d))&&ee.invalidateQueries({queryKey:ge.feed(t==null?void 0:t.hf_subject)}),ce.current=s},[B,ee,t==null?void 0:t.hf_subject]);const se=o&&!!t&&((c=T.data)==null?void 0:c.length)===0&&g.isSuccess&&g.data.length===0,Q=o&&!(n!=null&&n.isLoading)&&!t||se,I=!!t||!Ve(),[W,de]=p.useState(!1),[$]=p.useState(()=>!!Ae()||De().length>0),[ue,be]=p.useState(!1);!W&&((v=g.data)!=null&&v.length||(y=T.data)!=null&&y.length)&&de(!0),Q&&!ue&&(be(!0),I&&!W&&!$&&C(null));const H=ze(),{mutate:O}=H,te=p.useRef(!1);p.useEffect(()=>{const s=Ae();!t||!g.isSuccess||!s||te.current||(te.current=!0,g.data.some(d=>d.text===s)?ds():O({text:s}))},[t,g.isSuccess,g.data,O]);const z=Be(),{mutate:Y}=z,ae=p.useRef(!1);p.useEffect(()=>{const s=De();!t||!s.length||ae.current||(ae.current=!0,Y(s))},[t,Y]);const me=p.useMemo(()=>zs.map(s=>{var d;return{kind:s,follows:o?((d=T.data)==null?void 0:d.filter(w=>w.kind===s))??[]:[]}}).filter(s=>s.follows.length>0),[o,T.data]),pe=o&&(!!(n!=null&&n.isLoading)||!!t&&!se),he=p.useMemo(()=>{var s;return((s=k.data)==null?void 0:s.pages.flatMap(d=>d.results.map(w=>({...us(w.paper),followReasons:w.reasons}))))??[]},[k.data]),oe=k.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:"Curated daily from arXiv and Hugging Face"})]})}),e.jsxs("div",{className:"layout-with-sidebar",children:[e.jsxs("aside",{className:"sidebar feed-sidebar",children:[pe?e.jsxs("div",{className:"sidebar-section sidebar-section-follows",children:[e.jsx("div",{className:"sidebar-label",children:"You follow"}),((n==null?void 0:n.isLoading)||T.isLoading)&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:4}).map((s,d)=>e.jsx(we,{className:"h-5 w-full"},d))}),T.isError&&e.jsx("div",{style:{fontSize:12,color:"var(--ink-faint)"},children:"Couldn't load your follows."}),e.jsxs("div",{className:"sidebar-links",children:[!!((X=g.data)!=null&&X.length)&&e.jsxs("div",{className:"sidebar-follow-group sidebar-follow-topics",children:[e.jsx("span",{className:"sidebar-follow-kind",children:g.data.length===1?"Topic":"Topics"}),e.jsx(ps,{className:"sidebar-follow-topic-list",items:g.data,itemKey:s=>s.id,itemLabel:s=>P(s),disabled:r.isPending||i.isPending,onReorder:s=>r.mutate(s),renderItem:(s,d)=>{const w=s.id===K;return e.jsxs("div",{className:`sidebar-follow-topic ${w?"active":""}`,children:[d,e.jsx(A,{to:S(w?null:s.id),className:"sidebar-link sidebar-follow-link",title:w?"Show papers from everything you follow":`Show only papers about “${s.text}”`,"aria-current":w?"true":void 0,children:e.jsx("span",{className:"sidebar-follow-name",children:P(s)})}),e.jsx("button",{type:"button",className:"sidebar-follow-edit","aria-label":`Edit topic ${P(s)}`,"aria-expanded":M===s.id,onClick:()=>C(s.id),children:"edit"}),e.jsx("button",{type:"button",className:"sidebar-follow-edit sidebar-follow-remove","aria-label":`Remove topic ${P(s)}`,disabled:i.isPending,onClick:()=>{w&&l(S(null)),i.mutate([s.id])},children:"remove"})]})}}),(i.isError||r.isError)&&e.jsx("p",{className:"sidebar-follow-error",role:"alert",children:"Could not update your topics. Please try again."}),J&&e.jsx("button",{type:"button",className:"sidebar-follow-add","aria-expanded":M===null,onClick:()=>C(null),children:"+ Add topic"})]}),me.map(s=>e.jsxs("div",{className:"sidebar-follow-group",children:[e.jsx("span",{className:"sidebar-follow-kind",children:Ue[s.kind]}),s.follows.map(d=>e.jsx(A,{to:d.url,className:"sidebar-link sidebar-follow-link",children:e.jsx("span",{className:"sidebar-follow-name",children:d.name})},d.entity_id))]},s.kind))]}),e.jsx(A,{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"}),D.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,d)=>e.jsx(we,{className:"h-5 w-full"},d))}),e.jsxs("div",{className:"sidebar-links",children:[(re=D.data)==null?void 0:re.map(s=>e.jsxs(A,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[Se(s.name,s.slug),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count})]},s.id)),e.jsx(A,{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"}),E.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,d)=>e.jsx(we,{className:"h-5 w-full"},d))}),((le=(f=E.data)==null?void 0:f.results)==null?void 0:le.length)===0&&!E.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:(Ce=(Z=E.data)==null?void 0:Z.results)==null?void 0:Ce.map(s=>e.jsxs(A,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[Se(s.name,s.slug),e.jsxs("span",{className:"count",children:[s.share_lift.toFixed(1),"x"]})]},s.id))})]})]}),e.jsx(xs,{})]}),e.jsxs("div",{className:"feed-main",children:[(ve()||$e())&&e.jsx("div",{className:"feed-chat",children:e.jsx(Hs,{})}),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 ${h==="trending"?"active":""}`,onClick:()=>N("/"),children:"trending"}),e.jsx("button",{className:`sort-btn ${o?"active":""}`,onClick:()=>N("/following"),children:"following"})]})}),e.jsx(gs,{startDate:u.startDate,endDate:u.endDate,onChange:s=>j(fs(b,s))})]}),o&&e.jsx(Ms,{onAddTopic:I&&J?()=>C(null):void 0}),oe&&e.jsx(je,{variant:"destructive",className:"mb-4",children:e.jsxs(ye,{children:["Failed to load papers. ",e.jsx("button",{type:"button",onClick:()=>void k.refetch(),children:"Try again"})]})}),H.isError&&H.variables&&e.jsx(je,{variant:"destructive",className:"mb-4",children:e.jsxs(ye,{children:["Could not follow “",H.variables.text,"”. ",e.jsx("button",{type:"button",onClick:()=>O(H.variables),children:"Try again"})]})}),z.isError&&z.variables&&e.jsx(je,{variant:"destructive",className:"mb-4",children:e.jsxs(ye,{children:["Could not follow ",z.variables.map(s=>s.name).join(", "),". ",e.jsx("button",{type:"button",onClick:()=>Y(z.variables),children:"Try again"})]})}),o&&!!t&&g.isSuccess&&!T.isPending&&!se&&(g.data.length===0?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:()=>C(null),children:"Follow a topic"})]}):F?e.jsxs("div",{className:"following-topic-note",role:"status",children:["Showing the closest papers about ",x.map(s=>`“${P(s)}”`).join(" and ")," now. A model is reading papers to refine these matches, which takes a few minutes."]}):null),I&&e.jsx(Fs,{open:M!==void 0,topicId:M??null,afterSavePath:o?void 0:"/following",onOpenChange:s=>{s||C(void 0)}}),(L||_)&&e.jsxs("div",{className:"following-topic-note following-topic-filter",role:"status",children:["Showing only papers about ",_?`“${P(_)}”`:"your topics","."," ",e.jsx(A,{to:S(null),children:"Show everything you follow"})]}),Q?e.jsx(Ls,{onBuild:I?()=>C(null):void 0}):e.jsx(bs,{query:k,isLoading:k.isLoading||o&&!!(n!=null&&n.isLoading),cards:he,skeleton:"card",rootMargin:"400px",empty:oe?null:_?e.jsxs(e.Fragment,{children:["No papers about this topic match these filters. Widen the date range or ",e.jsx("button",{type:"button",className:"link-button",onClick:()=>C(_.id),children:"edit the topic"}),"."]}):L?e.jsx(e.Fragment,{children:"No papers about your topics match these filters. Widen the date range or follow more topics."}):o?e.jsxs(e.Fragment,{children:["No papers from your topics or follows match these filters. Widen the date range, or follow more from ",e.jsx(A,{to:"/tasks",children:"tasks"}),", ",e.jsx(A,{to:"/methods",children:"methods"}),", benchmark, author, or organization pages."]}):"No papers in this window."})]})]})]})]})},vt=()=>e.jsx(Us,{mode:"trending"});export{Hs as AskAssistant,Us as HomeFeed,vt as default}; +import{j as e,L as A,a as Qe,g as We,k as Te,l as qe,b as G,f as p,C as Ee,h as Ye,r as ge,T as V,d as Xe,e as Ze,p as Le,i as Ve,m as ve,n as $e,o as Je,q as es}from"./index-BeSw2DVP.js";import{S as ss}from"./sparkles-BjZnVOru.js";import{D as ts,a as as,b as os}from"./dialog-EpDnY6a5.js";import{c as fe}from"./catalog-D3XT9SmX.js";import{d as Oe,e as He,f as ze,b as Ke,g as Be,h as Ne,i as Fe,t as Pe,j as is,k as ns,r as _e,a as rs,l as ls,m as cs,n as Ae,o as De,p as ds}from"./researchTopic-Cb4NrTKj.js";import{d as Se,t as us}from"./transform-BadO0Aba.js";import{P as ke}from"./plus-imZJbVTM.js";import{A as ms}from"./arrow-right-3wBGidD3.js";import{S as ps}from"./SortableList-B8qe5lIn.js";import{r as hs,a as gs,w as fs,P as bs}from"./PaperFeed-Cge1MWHJ.js";import{M as xs}from"./McpShowcase-CMNatnnu.js";import{u as ws,a as js,P as ys,i as vs,A as Ns,b as Ss,S as U,c as ks,D as xe,q as Ts,d as Ps}from"./chatSessions-v3d2DQH8.js";import{c as _s}from"./chat-Bvpu56kX.js";import{u as Cs}from"./usePapers-Cj1tt_u6.js";import{p as Es}from"./papers-B58HJw9r.js";import{S as we}from"./skeleton-BBv4iC5Z.js";import{A as je,a as ye}from"./alert-uwP129N7.js";import"./useMutation-CsS-RfeE.js";import"./PaperCard-Dx07g-aj.js";import"./AuthorAvatar-Dpan5W1F.js";import"./SotaBadges-FMpqi2HS.js";import"./colors-BkWRhvFI.js";import"./Icon-BWcOShxk.js";import"./LatexTitle-C5yrYbA-.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-CYoFzAud.js";import"./useIntersectionObserver-BBx3EHQ9.js";import"./AgentLogos-BC7uX8n_.js";import"./useInfiniteQuery-C8JHYWz5.js";import"./curation-CCIsdsjV.js";function Ls({onBuild:h}){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 topics 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."}),h&&e.jsxs("button",{type:"button",className:"research-topic-save following-intro-topic",onClick:h,children:[e.jsx(ss,{"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(A,{to:"/settings",children:"Settings"}),"."]})]})}const Re=16;function Fs({open:h,topicId:o=null,afterSavePath:l,onOpenChange:n}){return e.jsx(ts,{open:h,onOpenChange:n,children:e.jsx(as,{className:"topic-dialog","aria-describedby":void 0,children:e.jsx(As,{topicId:o,afterSavePath:l,onDone:()=>n(!1)},o??"new")})})}function As({topicId:h,afterSavePath:o,onDone:l}){var te,z,Y,ae,me,pe,he,oe,ie,ne;const{user:n}=Qe(),t=We(),b=Te(),j=qe(),u=Oe(),N=He(),S=G({queryKey:["trending-tasks-follow"],queryFn:()=>fe.trendingTasks({limit:Re,level:0}),staleTime:V}),D=G({queryKey:["trending-methods-follow"],queryFn:()=>fe.trendingMethods({limit:Re}),staleTime:V}),E=G({queryKey:["research-follow-suggestions"],queryFn:_e.followSuggestions,staleTime:V}),L=(a=[])=>a.map(c=>({id:String(c.entity_id),name:c.name,image:c.image_url})),[q,K]=p.useState(null),[R,m]=p.useState([]),[k,T]=p.useState([]),g=ze(),P=Ke(),i=Be(),r=(te=u.data)==null?void 0:te.find(a=>a.id===h),x=((z=u.data)==null?void 0:z.filter(a=>a.id!==h))??[],F=k.filter(a=>x.some(c=>c.id===a)),_=(r==null?void 0:r.text)??"",M=q??_,C=M.trim().replace(/\s+/g," "),J=(r==null?void 0:r.status)==="failed"&&C===_,ee=!r&&(((Y=u.data)==null?void 0:Y.length)??0)-F.length>=Ne,B=C.length>=3&&(C!==_||J)&&!ee,[ce,se]=p.useState(!1),Q=p.useRef(!0);p.useEffect(()=>(Q.current=!0,()=>{Q.current=!1}),[]);const I=g.isPending||P.isPending||i.isPending||ce,W=(a,c)=>{var v;return((v=N.data)==null?void 0:v.some(y=>y.kind===a&&String(y.entity_id)===c))??!1},de=(a,c)=>{var v;return((v=R.find(y=>y.kind===a&&y.id===c))==null?void 0:v.follow)??W(a,c)},$=R.filter(a=>a.follow!==W(a.kind,a.id)),ue=!I&&(B||$.length>0||F.length>0),be=(a,c,v)=>m(y=>[...y.filter(X=>X.kind!==a||X.id!==c),{kind:a,id:c,name:v,follow:!de(a,c)}]),H=()=>{if(!ue)return;if(!n){B&&is(C),$.length&&ns($),window.location.href=Ye(o??`${t.pathname}${t.search}`);return}const a=F.length?P.mutateAsync(F):Promise.resolve(),c=[...$.length?[i.mutateAsync($)]:[],a,...B?[a.catch(()=>{}).then(()=>g.mutateAsync({id:r==null?void 0:r.id,text:C}))]:[]];Promise.allSettled(c).then(async v=>{if(v.every(y=>y.status==="fulfilled")){if(o){if(se(!0),await Promise.all([j.refetchQueries({queryKey:ge.follows(n.hf_subject)}),j.refetchQueries({queryKey:ge.topics(n.hf_subject)})]),!Q.current)return;l(),b(o);return}l()}})},O=(a,c,v,y)=>{const re=[...(N.data??[]).filter(f=>f.kind===c).map(f=>({id:String(f.entity_id),name:f.name,slug:f.url.split("/").pop(),image:f.image_url})),...v.filter(f=>!W(c,f.id)).map(f=>({...f,suggested:!0}))];return re.length>0&&e.jsxs("div",{className:"topic-dialog-group",children:[e.jsx("h3",{children:a}),e.jsxs(Ds,{children:[re.map(f=>{const le=de(c,f.id),Z=c==="task"?Se(f.name,f.slug??void 0):f.name;return e.jsxs("button",{type:"button",className:"topic-dialog-chip","aria-pressed":le,disabled:I,"data-suggested":"suggested"in f||void 0,onClick:()=>be(c,f.id,Z),children:[le?e.jsx(Ee,{"aria-hidden":"true"}):e.jsx(ke,{"aria-hidden":"true"}),(c==="author"||c==="organization")&&e.jsx(Rs,{kind:c,name:Z,src:f.image}),Z]},f.id)}),y&&e.jsxs(A,{to:y.to,className:"topic-dialog-browse",children:[y.label,e.jsx(ms,{"aria-hidden":"true"})]})]})]})};return e.jsxs("form",{className:"topic-dialog-form",onSubmit:a=>{a.preventDefault(),H()},children:[e.jsx(os,{className:"topic-dialog-title",children:(ae=u.data)!=null&&ae.length||(me=N.data)!=null&&me.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:r?"Edit this topic":(pe=u.data)!=null&&pe.length?"Add a topic in your own words":"Describe a topic in your own words"})}),e.jsx("p",{className:"topic-dialog-hint",children:ee?`You follow ${Ne} topics, the most allowed. Remove one below to add another.`:"A model reads every new paper and adds the ones that match to your Following feed. New topics are public and show your Hugging Face username; make one private in Settings."}),e.jsx("textarea",{id:"topic-dialog-input",className:"research-topic-input",rows:4,maxLength:Fe,"aria-label":"Research topic",placeholder:"e.g. diffusion policies for robot manipulation, or speculative decoding for LLM inference",value:M,onChange:a=>K(a.target.value),onKeyDown:a=>{a.key==="Enter"&&!a.shiftKey&&!a.nativeEvent.isComposing&&(a.preventDefault(),H())}}),e.jsxs("span",{className:"research-topic-count",children:[M.length,"/",Fe]})]}),x.length>0&&e.jsxs("div",{className:"topic-dialog-group",children:[e.jsx("h3",{children:r?"Your other topics":"Your topics"}),e.jsx("div",{className:"topic-dialog-chips",children:x.map(a=>{const c=!k.includes(a.id);return e.jsxs("button",{type:"button",className:"topic-dialog-chip","aria-pressed":c,disabled:I,title:a.text,onClick:()=>T(v=>c?[...v,a.id]:v.filter(y=>y!==a.id)),children:[c?e.jsx(Ee,{"aria-hidden":"true"}):e.jsx(ke,{"aria-hidden":"true"}),Pe(a)]},a.id)})})]}),O("Trending tasks","task",((he=S.data)==null?void 0:he.results)??[],{to:"/tasks",label:"Browse tasks"}),O("Trending methods","method",((oe=D.data)==null?void 0:oe.results)??[],{to:"/methods",label:"Browse methods"}),O("Benchmarks","benchmark",[],{to:"/tasks",label:"Browse benchmarks"}),O("Popular authors","author",L((ie=E.data)==null?void 0:ie.authors)),O("Popular organizations","organization",L((ne=E.data)==null?void 0:ne.organizations),{to:"/organizations",label:"Browse organizations"}),(g.error||P.error||i.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:[r&&e.jsx("button",{type:"button",className:"research-follow-action topic-dialog-remove",disabled:I,onClick:()=>P.mutate([r.id],{onSuccess:l}),children:"Remove topic"}),e.jsx("button",{type:"button",className:"research-follow-action",disabled:I,onClick:l,children:"Cancel"}),e.jsx("button",{type:"submit",className:"research-topic-save",disabled:!ue,children:$.some(a=>a.follow===!1)||F.length?"Save":$.length?"Follow":J?"Retry":r?"Update topic":"Follow"})]})]})}function Ds({children:h}){const o=p.useRef(null);return p.useLayoutEffect(()=>{const l=o.current;if(!l)return;const n=()=>{const t=[...l.children],b=t.filter(u=>u.dataset.suggested);b.forEach(u=>{u.hidden=!1});const j=()=>new Set(t.filter(u=>!u.hidden).map(u=>u.offsetTop)).size;for(let u=b.length-1;u>=0&&j()>2;u--)b[u].hidden=!0};return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)}),e.jsx("div",{ref:o,className:"topic-dialog-chips",children:h})}function Rs({kind:h,name:o,src:l}){const[n,t]=p.useState(!1);if(l&&!n)return e.jsx("img",{className:`topic-dialog-chip-image is-${h}`,src:l,alt:"",loading:"lazy",onError:()=>t(!0)});if(h!=="author")return null;const b=o.split(/\s+/).filter(Boolean).map(j=>j[0]).slice(0,2).join("").toUpperCase();return e.jsx("span",{className:"topic-dialog-chip-image is-author is-initials","aria-hidden":"true",children:b})}function Ms({onAddTopic:h}){var l,n;const o=G({queryKey:ge.featuredTopics,queryFn:_e.featuredTopics,staleTime:V});return o.isPending||!((l=o.data)!=null&&l.length)&&!h?null:e.jsxs("nav",{className:"topic-bubbles","aria-label":"Popular topics",children:[(n=o.data)==null?void 0:n.map(t=>e.jsxs(A,{className:"topic-bubble",to:rs(t),title:`${t.followers.toLocaleString()} ${t.followers===1?"follower":"followers"}`,children:[t.creator&&e.jsx("img",{src:t.creator.avatar_url,alt:"",width:20,height:20,loading:"lazy"}),e.jsx("span",{className:"topic-bubble-name",children:Pe(t)}),t.creator&&e.jsxs("span",{className:"topic-bubble-creator",children:["@",t.creator.username]})]},t.id)),h&&e.jsxs("button",{type:"button",className:"topic-bubble topic-bubble-add",onClick:h,children:[e.jsx(ke,{size:14,"aria-hidden":"true"}),e.jsx("span",{className:"topic-bubble-name",children:"Add topic"})]})]})}const Me=45,Is=1800,qs=25,$s=350,Os=h=>{const[o,l]=p.useState(U[0].slice(0,1)),[n,t]=p.useState(0);return p.useEffect(()=>{var D,E;if(!h)return;if((E=(D=window.matchMedia)==null?void 0:D.call(window,"(prefers-reduced-motion: reduce)"))!=null&&E.matches){l(U[0]),t(0);return}let b=0,j=1,u=!1,N;l(U[0].slice(0,j)),t(0);const S=()=>{const L=U[b];if(!u){if(j+=1,l(L.slice(0,j)),j===L.length){u=!0,N=window.setTimeout(S,Is);return}N=window.setTimeout(S,Me);return}if(j-=1,l(L.slice(0,j)),j===0){u=!1,b=(b+1)%U.length,t(b),N=window.setTimeout(S,$s);return}N=window.setTimeout(S,qs)};return N=window.setTimeout(S,Me),()=>window.clearTimeout(N)},[h]),{placeholder:o,prompt:U[n]}},Hs=()=>{var P;const h=Te(),o=$e(),[l,n]=p.useState({text:"",paperMentions:[]}),t=l.text,[b,j]=p.useState(0),[u,N]=p.useState(!1),[S,D]=p.useState(null),{placeholder:E,prompt:L}=Os(!t),q=p.useRef(null),K=G({queryKey:["chatAvailability"],queryFn:()=>_s.getAvailability(),retry:!1,enabled:ve()}),R=ve()&&((P=K.data)==null?void 0:P.paper_mentions_enabled)!==!1,m=ws({draft:l,onChange:n,enabled:R,textareaRef:q}),k=js(l,m.open),T=t?k.completion:L;p.useLayoutEffect(()=>{const i=q.current;if(!i)return;const r=()=>{if(i.style.height="auto",t){i.style.height=`${Math.min(ks(i),160)}px`;return}const x=i.placeholder,F=U.reduce((_,M)=>(i.placeholder=M,Math.max(_,i.scrollHeight)),0);i.placeholder=x,i.style.height=`${Math.min(F,160)}px`};return r(),window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[t,T]);const g=async(i=l)=>{const r=i.text.trim();if(!(!r||u)){if(o){const x=new URLSearchParams({q:r,model:xe}),F=`${Je}?${x}`,_=window.open(F,"_blank");if(!_){D(F);return}_.opener=null,D(null),n({text:"",paperMentions:[]});return}N(!0),Ts(i,xe);try{const x=await Ps(xe);h(`/chat/${x.id}`)}catch{h("/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(ys,{text:l.text,mentions:l.paperMentions,scrollTop:b,variant:"home",completion:t?T:""}),e.jsx("textarea",{ref:q,rows:1,value:t,placeholder:E,"aria-label":"Ask the assistant",disabled:u,onChange:i=>{m.updateText(i.target.value,i.target.selectionStart),k.trackCaret(i.target)},onSelect:i=>{m.refresh(i.currentTarget.selectionStart),k.trackCaret(i.currentTarget)},onClick:i=>{m.refresh(i.currentTarget.selectionStart),k.trackCaret(i.currentTarget)},onScroll:i=>j(i.currentTarget.scrollTop),onBlur:i=>{var r,x;(x=(r=i.relatedTarget)==null?void 0:r.closest)!=null&&x.call(r,".chat-paper-picker")||window.setTimeout(m.close,0)},onKeyDown:i=>{if(!m.keyDown(i)){if(vs(i)&&T){i.preventDefault();const r=t+T;m.updateText(r,r.length),window.requestAnimationFrame(()=>{var x;return(x=q.current)==null?void 0:x.setSelectionRange(r.length,r.length)});return}i.key==="Enter"&&!i.shiftKey&&(i.preventDefault(),g())}},role:R?"combobox":void 0,"aria-expanded":R?m.open:void 0,"aria-controls":m.open?m.pickerId:void 0,"aria-activedescendant":m.open&&m.results.length?`${m.optionIdPrefix}-${m.activeIndex}`:void 0,"aria-autocomplete":R?"list":void 0,"aria-describedby":m.message?"ask-home-paper-mention-message":void 0})]}),e.jsx("button",{type:"button",className:`chat-send${t.trim()?" chat-send-on":""}`,onClick:()=>void g(),disabled:!t.trim()||u,"aria-label":"Ask the assistant",children:e.jsx(Ns,{})})]}),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"})}),m.message&&e.jsx("div",{id:"ask-home-paper-mention-message",className:"chat-paper-mention-message",role:"alert",children:m.message}),e.jsx(Ss,{open:m.open,query:m.query,results:m.results,activeIndex:m.activeIndex,loading:m.loading,error:m.error,onSelect:m.select,id:m.pickerId,optionIdPrefix:m.optionIdPrefix})]})]})},Ue={task:"Tasks",method:"Methods",benchmark:"Benchmarks",author:"Authors",organization:"Orgs"},zs=Object.keys(Ue),Ks=30,Ie=40,Bs=async h=>{const o=await h;return{results:o.results.map(l=>({paper:l})),next_page:o.next_page}},Us=({mode:h})=>{var ie,ne,a,c,v,y,X,re,f,le,Z,Ce;const o=h==="following",l=Te(),n=Xe(),t=n==null?void 0:n.user,[b,j]=Ze(),u=hs(b,void 0,h==="trending"?"week":"month"),N=s=>{const d=new URLSearchParams(b);d.delete("order_by"),d.delete("only"),d.delete("topic");const w=d.toString();l(w?`${s}?${w}`:s)},S=s=>{const d=new URLSearchParams(b);d.delete("only"),s===null?d.delete("topic"):d.set("topic",String(s));const w=d.toString();return w?`/following?${w}`:"/following"},D=G({queryKey:es.topTasksSidebar,queryFn:()=>fe.topTasks(8),staleTime:V}),E=G({queryKey:["trending-tasks-sidebar"],queryFn:()=>fe.trendingTasks({limit:8,level:0,min_recent_papers:10}),staleTime:V}),L=o&&b.get("only")==="topic",q=o?Number(b.get("topic")??NaN):NaN,K=Number.isInteger(q)?q:void 0,R={start_date:u.startDate,end_date:u.endDate},m={...u,topicOnly:L,topicId:K},k=Cs(o?[...Le.feeds.following,t==null?void 0:t.hf_subject,m]:[...Le.feeds.trending,R],async s=>{if(o){const w=await _e.following(s,m),Ge=w.length===Ie?s+Ie:null;return{results:w,next_page:Ge}}const d={...R,page:s,page_size:Ks,include_resources:!0};return Bs(Es.list({...d,order_by:"trending",order_dir:"desc",latest_only:!0}))},{enabled:!o||!!t,initialPage:o?0:1}),T=He(o),g=Oe(o,1e4),P=Pe,i=Ke(),r=ls(),x=((ie=g.data)==null?void 0:ie.filter(cs))??[],F=x.length>0,_=(ne=g.data)==null?void 0:ne.find(s=>s.id===K),[M,C]=p.useState(void 0),J=(((a=g.data)==null?void 0:a.length)??0)s.id).join(","),ce=p.useRef([]);p.useEffect(()=>{const s=B?B.split(","):[];ce.current.some(d=>!s.includes(d))&&ee.invalidateQueries({queryKey:ge.feed(t==null?void 0:t.hf_subject)}),ce.current=s},[B,ee,t==null?void 0:t.hf_subject]);const se=o&&!!t&&((c=T.data)==null?void 0:c.length)===0&&g.isSuccess&&g.data.length===0,Q=o&&!(n!=null&&n.isLoading)&&!t||se,I=!!t||!Ve(),[W,de]=p.useState(!1),[$]=p.useState(()=>!!Ae()||De().length>0),[ue,be]=p.useState(!1);!W&&((v=g.data)!=null&&v.length||(y=T.data)!=null&&y.length)&&de(!0),Q&&!ue&&(be(!0),I&&!W&&!$&&C(null));const H=ze(),{mutate:O}=H,te=p.useRef(!1);p.useEffect(()=>{const s=Ae();!t||!g.isSuccess||!s||te.current||(te.current=!0,g.data.some(d=>d.text===s)?ds():O({text:s}))},[t,g.isSuccess,g.data,O]);const z=Be(),{mutate:Y}=z,ae=p.useRef(!1);p.useEffect(()=>{const s=De();!t||!s.length||ae.current||(ae.current=!0,Y(s))},[t,Y]);const me=p.useMemo(()=>zs.map(s=>{var d;return{kind:s,follows:o?((d=T.data)==null?void 0:d.filter(w=>w.kind===s))??[]:[]}}).filter(s=>s.follows.length>0),[o,T.data]),pe=o&&(!!(n!=null&&n.isLoading)||!!t&&!se),he=p.useMemo(()=>{var s;return((s=k.data)==null?void 0:s.pages.flatMap(d=>d.results.map(w=>({...us(w.paper),followReasons:w.reasons}))))??[]},[k.data]),oe=k.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:"Curated daily from arXiv and Hugging Face"})]})}),e.jsxs("div",{className:"layout-with-sidebar",children:[e.jsxs("aside",{className:"sidebar feed-sidebar",children:[pe?e.jsxs("div",{className:"sidebar-section sidebar-section-follows",children:[e.jsx("div",{className:"sidebar-label",children:"You follow"}),((n==null?void 0:n.isLoading)||T.isLoading)&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:4}).map((s,d)=>e.jsx(we,{className:"h-5 w-full"},d))}),T.isError&&e.jsx("div",{style:{fontSize:12,color:"var(--ink-faint)"},children:"Couldn't load your follows."}),e.jsxs("div",{className:"sidebar-links",children:[!!((X=g.data)!=null&&X.length)&&e.jsxs("div",{className:"sidebar-follow-group sidebar-follow-topics",children:[e.jsx("span",{className:"sidebar-follow-kind",children:g.data.length===1?"Topic":"Topics"}),e.jsx(ps,{className:"sidebar-follow-topic-list",items:g.data,itemKey:s=>s.id,itemLabel:s=>P(s),disabled:r.isPending||i.isPending,onReorder:s=>r.mutate(s),renderItem:(s,d)=>{const w=s.id===K;return e.jsxs("div",{className:`sidebar-follow-topic ${w?"active":""}`,children:[d,e.jsx(A,{to:S(w?null:s.id),className:"sidebar-link sidebar-follow-link",title:w?"Show papers from everything you follow":`Show only papers about “${s.text}”`,"aria-current":w?"true":void 0,children:e.jsx("span",{className:"sidebar-follow-name",children:P(s)})}),e.jsx("button",{type:"button",className:"sidebar-follow-edit","aria-label":`Edit topic ${P(s)}`,"aria-expanded":M===s.id,onClick:()=>C(s.id),children:"edit"}),e.jsx("button",{type:"button",className:"sidebar-follow-edit sidebar-follow-remove","aria-label":`Remove topic ${P(s)}`,disabled:i.isPending,onClick:()=>{w&&l(S(null)),i.mutate([s.id])},children:"remove"})]})}}),(i.isError||r.isError)&&e.jsx("p",{className:"sidebar-follow-error",role:"alert",children:"Could not update your topics. Please try again."}),J&&e.jsx("button",{type:"button",className:"sidebar-follow-add","aria-expanded":M===null,onClick:()=>C(null),children:"+ Add topic"})]}),me.map(s=>e.jsxs("div",{className:"sidebar-follow-group",children:[e.jsx("span",{className:"sidebar-follow-kind",children:Ue[s.kind]}),s.follows.map(d=>e.jsx(A,{to:d.url,className:"sidebar-link sidebar-follow-link",children:e.jsx("span",{className:"sidebar-follow-name",children:d.name})},d.entity_id))]},s.kind))]}),e.jsx(A,{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"}),D.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,d)=>e.jsx(we,{className:"h-5 w-full"},d))}),e.jsxs("div",{className:"sidebar-links",children:[(re=D.data)==null?void 0:re.map(s=>e.jsxs(A,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[Se(s.name,s.slug),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count})]},s.id)),e.jsx(A,{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"}),E.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,d)=>e.jsx(we,{className:"h-5 w-full"},d))}),((le=(f=E.data)==null?void 0:f.results)==null?void 0:le.length)===0&&!E.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:(Ce=(Z=E.data)==null?void 0:Z.results)==null?void 0:Ce.map(s=>e.jsxs(A,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[Se(s.name,s.slug),e.jsxs("span",{className:"count",children:[s.share_lift.toFixed(1),"x"]})]},s.id))})]})]}),e.jsx(xs,{})]}),e.jsxs("div",{className:"feed-main",children:[(ve()||$e())&&e.jsx("div",{className:"feed-chat",children:e.jsx(Hs,{})}),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 ${h==="trending"?"active":""}`,onClick:()=>N("/"),children:"trending"}),e.jsx("button",{className:`sort-btn ${o?"active":""}`,onClick:()=>N("/following"),children:"following"})]})}),e.jsx(gs,{startDate:u.startDate,endDate:u.endDate,onChange:s=>j(fs(b,s))})]}),o&&e.jsx(Ms,{onAddTopic:I&&J?()=>C(null):void 0}),oe&&e.jsx(je,{variant:"destructive",className:"mb-4",children:e.jsxs(ye,{children:["Failed to load papers. ",e.jsx("button",{type:"button",onClick:()=>void k.refetch(),children:"Try again"})]})}),H.isError&&H.variables&&e.jsx(je,{variant:"destructive",className:"mb-4",children:e.jsxs(ye,{children:["Could not follow “",H.variables.text,"”. ",e.jsx("button",{type:"button",onClick:()=>O(H.variables),children:"Try again"})]})}),z.isError&&z.variables&&e.jsx(je,{variant:"destructive",className:"mb-4",children:e.jsxs(ye,{children:["Could not follow ",z.variables.map(s=>s.name).join(", "),". ",e.jsx("button",{type:"button",onClick:()=>Y(z.variables),children:"Try again"})]})}),o&&!!t&&g.isSuccess&&!T.isPending&&!se&&(g.data.length===0?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:()=>C(null),children:"Follow a topic"})]}):F?e.jsxs("div",{className:"following-topic-note",role:"status",children:["Showing the closest papers about ",x.map(s=>`“${P(s)}”`).join(" and ")," now. A model is reading papers to refine these matches, which takes a few minutes."]}):null),I&&e.jsx(Fs,{open:M!==void 0,topicId:M??null,afterSavePath:o?void 0:"/following",onOpenChange:s=>{s||C(void 0)}}),(L||_)&&e.jsxs("div",{className:"following-topic-note following-topic-filter",role:"status",children:["Showing only papers about ",_?`“${P(_)}”`:"your topics","."," ",e.jsx(A,{to:S(null),children:"Show everything you follow"})]}),Q?e.jsx(Ls,{onBuild:I?()=>C(null):void 0}):e.jsx(bs,{query:k,isLoading:k.isLoading||o&&!!(n!=null&&n.isLoading),cards:he,skeleton:"card",rootMargin:"400px",empty:oe?null:_?e.jsxs(e.Fragment,{children:["No papers about this topic match these filters. Widen the date range or ",e.jsx("button",{type:"button",className:"link-button",onClick:()=>C(_.id),children:"edit the topic"}),"."]}):L?e.jsx(e.Fragment,{children:"No papers about your topics match these filters. Widen the date range or follow more topics."}):o?e.jsxs(e.Fragment,{children:["No papers from your topics or follows match these filters. Widen the date range, or follow more from ",e.jsx(A,{to:"/tasks",children:"tasks"}),", ",e.jsx(A,{to:"/methods",children:"methods"}),", benchmark, author, or organization pages."]}):"No papers in this window."})]})]})]})]})},vt=()=>e.jsx(Us,{mode:"trending"});export{Hs as AskAssistant,Us as HomeFeed,vt as default}; diff --git a/assets/FollowingView-BemIb4-Z.js b/assets/FollowingView-BemIb4-Z.js deleted file mode 100644 index 4f15beb6ae8d73dc09b591eafce1d8eecb5b6c2e..0000000000000000000000000000000000000000 --- a/assets/FollowingView-BemIb4-Z.js +++ /dev/null @@ -1 +0,0 @@ -import{j as o}from"./index-D2fBL-s6.js";import{HomeFeed as r}from"./FeedView-6xUWjpm4.js";import"./sparkles-4rJdywIs.js";import"./dialog-DgUROq2j.js";import"./catalog-5AxvKr4D.js";import"./researchTopic-jOpECA0z.js";import"./useMutation-9dlTbuQj.js";import"./transform-B_GaHMvk.js";import"./plus-BI8-JXK0.js";import"./arrow-right-COzkrAUH.js";import"./SortableList-BzRDhhmi.js";import"./PaperFeed-BERxHjrg.js";import"./PaperCard-DhorusY5.js";import"./AuthorAvatar-C8tz_syh.js";import"./SotaBadges-r6iGzLRW.js";import"./colors-BkWRhvFI.js";import"./Icon-Uhh78KjL.js";import"./LatexTitle-WIQJ1ke0.js";import"./papers-khuZaSFb.js";import"./curation-BtfabyzA.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-DS5Jzsg5.js";import"./skeleton-BDwfco0_.js";import"./useIntersectionObserver-C0Rq0EXm.js";import"./McpShowcase-R1ucnqw2.js";import"./AgentLogos-B5etEEwg.js";import"./chatSessions-CoHSP58H.js";import"./chat-BOZIonsX.js";import"./usePapers-CAjdcUuj.js";import"./useInfiniteQuery-CjJA-90e.js";import"./alert-PnePcfgX.js";function C(){return o.jsx(r,{mode:"following"})}export{C as default}; diff --git a/assets/FollowingView-Cfi3OwP1.js b/assets/FollowingView-Cfi3OwP1.js new file mode 100644 index 0000000000000000000000000000000000000000..645c8fdd522b897c21430957d4b911ff6df459b6 --- /dev/null +++ b/assets/FollowingView-Cfi3OwP1.js @@ -0,0 +1 @@ +import{j as o}from"./index-BeSw2DVP.js";import{HomeFeed as r}from"./FeedView-Bv5eNETi.js";import"./sparkles-BjZnVOru.js";import"./dialog-EpDnY6a5.js";import"./catalog-D3XT9SmX.js";import"./researchTopic-Cb4NrTKj.js";import"./useMutation-CsS-RfeE.js";import"./transform-BadO0Aba.js";import"./plus-imZJbVTM.js";import"./arrow-right-3wBGidD3.js";import"./SortableList-B8qe5lIn.js";import"./PaperFeed-Cge1MWHJ.js";import"./PaperCard-Dx07g-aj.js";import"./AuthorAvatar-Dpan5W1F.js";import"./SotaBadges-FMpqi2HS.js";import"./colors-BkWRhvFI.js";import"./Icon-BWcOShxk.js";import"./LatexTitle-C5yrYbA-.js";import"./papers-B58HJw9r.js";import"./curation-CCIsdsjV.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-CYoFzAud.js";import"./skeleton-BBv4iC5Z.js";import"./useIntersectionObserver-BBx3EHQ9.js";import"./McpShowcase-CMNatnnu.js";import"./AgentLogos-BC7uX8n_.js";import"./chatSessions-v3d2DQH8.js";import"./chat-Bvpu56kX.js";import"./usePapers-Cj1tt_u6.js";import"./useInfiniteQuery-C8JHYWz5.js";import"./alert-uwP129N7.js";function C(){return o.jsx(r,{mode:"following"})}export{C as default}; diff --git a/assets/FrameworksIndexView-CogZFpfQ.js b/assets/FrameworksIndexView-BUbqSHfG.js similarity index 95% rename from assets/FrameworksIndexView-CogZFpfQ.js rename to assets/FrameworksIndexView-BUbqSHfG.js index 9ff1d6587a7ad51bbcaa2a9cd61f4ff77ad3714e..6bf44652b2b937405f429b372353ecd30ede72a5 100644 --- a/assets/FrameworksIndexView-CogZFpfQ.js +++ b/assets/FrameworksIndexView-BUbqSHfG.js @@ -1 +1 @@ -import{k as d,j as e,L as c,b as m,V as h}from"./index-D2fBL-s6.js";import{I as p}from"./Icon-Uhh78KjL.js";import{c as u}from"./catalog-5AxvKr4D.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}; +import{k as d,j as e,L as c,b as m,V as h}from"./index-BeSw2DVP.js";import{I as p}from"./Icon-BWcOShxk.js";import{c as u}from"./catalog-D3XT9SmX.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}; diff --git a/assets/Icon-Uhh78KjL.js b/assets/Icon-BWcOShxk.js similarity index 98% rename from assets/Icon-Uhh78KjL.js rename to assets/Icon-BWcOShxk.js index 01329f58248b0104932564e485ccb78449087a32..f51884a1f6404242df8a3fda3541fcf118a9e545 100644 --- a/assets/Icon-Uhh78KjL.js +++ b/assets/Icon-BWcOShxk.js @@ -1 +1 @@ -import{j as o}from"./index-D2fBL-s6.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"}),robot:o.jsx("path",{d:"M6 12.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5M3 8.062C3 6.76 4.235 5.765 5.53 5.886a26.6 26.6 0 0 0 4.94 0C11.765 5.765 13 6.76 13 8.062v1.157a.93.93 0 0 1-.765.935c-.845.147-2.34.346-4.235.346s-3.39-.2-4.235-.346A.93.93 0 0 1 3 9.219zm4.542-.827a.25.25 0 0 0-.217.068l-.92.9a25 25 0 0 1-1.871-.183a.25.25 0 0 0-.068.495c.55.076 1.232.149 2.02.193a.25.25 0 0 0 .189-.071l.754-.736l.847 1.71a.25.25 0 0 0 .404.062l.932-.97a25 25 0 0 0 1.922-.188a.25.25 0 0 0-.068-.495c-.538.074-1.207.145-1.98.189a.25.25 0 0 0-.166.076l-.754.785l-.842-1.7a.25.25 0 0 0-.182-.135M8.5 1.866a1 1 0 1 0-1 0V3h-2A4.5 4.5 0 0 0 1 7.5V8a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1v1a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-1a1 1 0 0 0 1-1V9a1 1 0 0 0-1-1v-.5A4.5 4.5 0 0 0 10.5 3h-2zM14 7.5V13a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V7.5A3.5 3.5 0 0 1 5.5 4h5A3.5 3.5 0 0 1 14 7.5",fill:"currentColor"})};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}; +import{j as o}from"./index-BeSw2DVP.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"}),robot:o.jsx("path",{d:"M6 12.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5M3 8.062C3 6.76 4.235 5.765 5.53 5.886a26.6 26.6 0 0 0 4.94 0C11.765 5.765 13 6.76 13 8.062v1.157a.93.93 0 0 1-.765.935c-.845.147-2.34.346-4.235.346s-3.39-.2-4.235-.346A.93.93 0 0 1 3 9.219zm4.542-.827a.25.25 0 0 0-.217.068l-.92.9a25 25 0 0 1-1.871-.183a.25.25 0 0 0-.068.495c.55.076 1.232.149 2.02.193a.25.25 0 0 0 .189-.071l.754-.736l.847 1.71a.25.25 0 0 0 .404.062l.932-.97a25 25 0 0 0 1.922-.188a.25.25 0 0 0-.068-.495c-.538.074-1.207.145-1.98.189a.25.25 0 0 0-.166.076l-.754.785l-.842-1.7a.25.25 0 0 0-.182-.135M8.5 1.866a1 1 0 1 0-1 0V3h-2A4.5 4.5 0 0 0 1 7.5V8a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1v1a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-1a1 1 0 0 0 1-1V9a1 1 0 0 0-1-1v-.5A4.5 4.5 0 0 0 10.5 3h-2zM14 7.5V13a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V7.5A3.5 3.5 0 0 1 5.5 4h5A3.5 3.5 0 0 1 14 7.5",fill:"currentColor"})};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}; diff --git a/assets/LatexTitle-WIQJ1ke0.js b/assets/LatexTitle-C5yrYbA-.js similarity index 98% rename from assets/LatexTitle-WIQJ1ke0.js rename to assets/LatexTitle-C5yrYbA-.js index 9a016fcc675c13fee351adf06bc011ebd949b52f..03b900763201b7f0ec908914110f0879f0a720e5 100644 --- a/assets/LatexTitle-WIQJ1ke0.js +++ b/assets/LatexTitle-C5yrYbA-.js @@ -1,2 +1,2 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/katex-wklAmtGL.css"])))=>i.map(i=>d[i]); -import{j as u,f as A,a7 as L}from"./index-D2fBL-s6.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)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)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(;oe.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(;rr&&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}; +import{j as u,f as A,a7 as L}from"./index-BeSw2DVP.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)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)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(;oe.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(;rr&&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}; diff --git a/assets/MarkdownText-ludE7yuw.js b/assets/MarkdownText-BdL6XBXC.js similarity index 86% rename from assets/MarkdownText-ludE7yuw.js rename to assets/MarkdownText-BdL6XBXC.js index 04a1f856fb9be1267bdb00720bd46676e59a5f24..31295a3fed9b9f18d61f3975bb27e889831500db 100644 --- a/assets/MarkdownText-ludE7yuw.js +++ b/assets/MarkdownText-BdL6XBXC.js @@ -1 +1 @@ -import{w as c,j as o,L as u}from"./index-D2fBL-s6.js";/* empty css */import{r as p,a as m,P as d}from"./PaperPreviewLink-BZuRBR1p.js";import{M as h}from"./index-BPshewTi.js";import{r as f}from"./index-BtZPsygG.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}; +import{w as c,j as o,L as u}from"./index-BeSw2DVP.js";/* empty css */import{r as p,a as m,P as d}from"./PaperPreviewLink-BughwfUv.js";import{M as h}from"./index-CbsMwfXw.js";import{r as f}from"./index-XKdmo9ij.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}; diff --git a/assets/McpShowcase-R1ucnqw2.js b/assets/McpShowcase-CMNatnnu.js similarity index 84% rename from assets/McpShowcase-R1ucnqw2.js rename to assets/McpShowcase-CMNatnnu.js index 3092f713525199b6fb58ce821c8e9ba6d482bbd7..fd34733584b6d11336fcfd8bd40ea166af6919c4 100644 --- a/assets/McpShowcase-R1ucnqw2.js +++ b/assets/McpShowcase-CMNatnnu.js @@ -1 +1 @@ -import{j as e,L as t}from"./index-D2fBL-s6.js";import{A as a}from"./AgentLogos-B5etEEwg.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}; +import{j as e,L as t}from"./index-BeSw2DVP.js";import{A as a}from"./AgentLogos-BC7uX8n_.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}; diff --git a/assets/McpView-DPmcihrm.js b/assets/McpView--ssj-T70.js similarity index 97% rename from assets/McpView-DPmcihrm.js rename to assets/McpView--ssj-T70.js index 5209ea3ca0e7ea7f6d29b449ecedaa288435a943..18707e0f5fec6283739dfbd6bf761a49baad9e24 100644 --- a/assets/McpView-DPmcihrm.js +++ b/assets/McpView--ssj-T70.js @@ -1,4 +1,4 @@ -import{c as b,b as x,V as m,j as e,C as j}from"./index-D2fBL-s6.js";import{u as g,f as y}from"./useDocumentTitle-ibepJVy2.js";import{q as f}from"./queryOptions-C9woPjwX.js";import{G as v}from"./github-DcIeypA5.js";import{E as o}from"./external-link-Ddavpnin.js";import{C as w}from"./copy-CcyqVsMW.js";/** +import{c as b,b as x,V as m,j as e,C as j}from"./index-BeSw2DVP.js";import{u as g,f as y}from"./useDocumentTitle-BD_JtGPy.js";import{q as f}from"./queryOptions-C9woPjwX.js";import{G as v}from"./github-CTNIgqBO.js";import{E as o}from"./external-link-BAPjX9Up.js";import{C as w}from"./copy-3DjQpd64.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/MethodDetailView-BP_5bAuS.js b/assets/MethodDetailView-HXoiJFPs.js similarity index 92% rename from assets/MethodDetailView-BP_5bAuS.js rename to assets/MethodDetailView-HXoiJFPs.js index 2132ef8c52d8285fd9d29444df10f4346dec9b50..4c86fc3d8d4aaabcdfe910c240f0593a7ef39235 100644 --- a/assets/MethodDetailView-BP_5bAuS.js +++ b/assets/MethodDetailView-HXoiJFPs.js @@ -1 +1 @@ -import{j as e,f as D,u as P,b as k,p as V,L as _,q as A,T as v}from"./index-D2fBL-s6.js";import{R as q}from"./ResearchFollowButton-Bwb5EiPm.js";import{M as H}from"./SotaBadges-r6iGzLRW.js";import{u as Q,b as R,P as K}from"./PaperFeed-BERxHjrg.js";import{r as G,M as L}from"./MarkdownText-ludE7yuw.js";import{c as b}from"./catalog-5AxvKr4D.js";import{p as U}from"./papers-khuZaSFb.js";import{i as O}from"./apiErrors-DV2aaDjL.js";import{s as W}from"./slug-BpH-Nkvz.js";import{t as Z}from"./transform-B_GaHMvk.js";import{u as X}from"./usePapers-CAjdcUuj.js";import{S as N}from"./skeleton-BDwfco0_.js";import{A as Y,a as J}from"./alert-PnePcfgX.js";import{s as ee}from"./safeExternalHref-CkBrsh84.js";import te from"./NotFound-L0ldWZg9.js";import"./researchTopic-jOpECA0z.js";import"./useMutation-9dlTbuQj.js";import"./plus-BI8-JXK0.js";import"./colors-BkWRhvFI.js";import"./PaperCard-DhorusY5.js";import"./AuthorAvatar-C8tz_syh.js";import"./Icon-Uhh78KjL.js";import"./LatexTitle-WIQJ1ke0.js";import"./popover-DS5Jzsg5.js";import"./useIntersectionObserver-C0Rq0EXm.js";/* empty css */import"./PaperPreviewLink-BZuRBR1p.js";import"./index-BPshewTi.js";import"./index-BtZPsygG.js";import"./katex-DkKDou_j.js";import"./hover-card-DWpZK4fW.js";import"./curation-BtfabyzA.js";import"./useInfiniteQuery-CjJA-90e.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:i,h:c,fill:o,stroke:x,label:h,fontSize:d=10})=>e.jsxs("g",{children:[e.jsx("rect",{x:s,y:r,width:i,height:c,rx:"3",ry:"3",fill:o,stroke:x,strokeWidth:"1"}),e.jsx("text",{x:s+i/2,y:r+c/2,fontSize:d,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"]],ie=()=>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],i)=>{const c=92+i*44;return e.jsxs("g",{children:[e.jsx("text",{x:"44",y:c,fontSize:"11",fontFamily:"var(--mono)",fill:t.ink,dominantBaseline:"middle",children:s}),r?e.jsx("text",{x:"138",y:c,fontSize:"8.5",fontFamily:"var(--mono)",fill:t.faint,dominantBaseline:"middle",children:r}):null]},s)})]}),le={attention:se,"contrastive-learning":ae,"agent-skills":ie},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(),i=le[r];if(i)return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(i,{})});if(s.image_url){const c=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${c}`,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,p={top:8,right:10,bottom:25,left:36},T=56,de=new Intl.DateTimeFormat("en",{month:"short",year:"2-digit",timeZone:"UTC"}),ce=new Intl.DateTimeFormat("en",{year:"numeric",timeZone:"UTC"}),F=s=>de.format(new Date(`${s}T00:00:00Z`)),me=(s,r)=>{if(s===0)return new Set;const i=s>48?12:s>36?6:s>18?3:2,c=Math.max(1,Math.ceil(T/r)),o=Math.max(i,c),x=s-1,h=new Set([0,x]);for(let d=o;d=T&&h.add(d);return h},E=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[i,c]=D.useState(null),o=Math.max(1,...s.map(l=>l.paper_count)),x=w-p.left-p.right,h=M-p.top-p.bottom,d=s.length?x/s.length:x,a=Math.max(2,d*.68),g=me(s.length,d),j=Array.from(new Set([0,Math.ceil(o/2),o])),f=i==null?null:s[i],y=f?E(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(l=>{const m=p.top+h-l/o*h;return e.jsxs("g",{children:[e.jsx("line",{className:"method-usage-gridline",x1:p.left,x2:w-p.right,y1:m,y2:m}),e.jsx("text",{className:"method-usage-y-label",x:p.left-8,y:m+3,textAnchor:"end",children:l})]},l)}),s.map((l,m)=>{const u=l.paper_count/o*h,S=l.paper_count>0?Math.max(1,u):0,I=p.left+d*m+(d-a)/2,C=p.top+h-S,$=i===m,B=m===s.length-1,z=E(l);return e.jsxs("g",{className:`method-usage-bar${$?" is-active":""}${B?" is-current":""}`,tabIndex:0,role:"img","aria-label":`${F(l.start_date)}: ${l.paper_count} ${l.paper_count===1?"paper":"papers"}${z?`. ${z}`:""}`,onMouseEnter:()=>c(m),onMouseLeave:()=>c(null),onFocus:()=>c(m),onBlur:()=>c(null),children:[e.jsx("rect",{className:"method-usage-bar-hit",x:p.left+d*m,y:p.top,width:d,height:h}),e.jsx("rect",{className:"method-usage-bar-mark",x:I,y:C,width:a,height:S,rx:"1.5"})]},l.start_date)}),s.map((l,m)=>g.has(m)?e.jsx("text",{className:"method-usage-x-label",x:p.left+d*(m+.5),y:M-11,textAnchor:"middle",children:s.length>48?ce.format(new Date(`${l.start_date}T00:00:00Z`)):F(l.start_date)},l.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",i===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,l,m;const{methodSlug:s}=P(),r=Q({defaultToLastMonth:!0}),i=k({queryKey:A.method(s),queryFn:()=>b.getMethod(s),enabled:!!s,staleTime:v}),c=k({queryKey:A.areas,queryFn:()=>b.listAreas({page_size:50,ordering:"name"}),enabled:!!((y=i.data)!=null&&y.area_id),staleTime:v}),o=k({queryKey:["method-trend",s],queryFn:()=>b.methodTrend(s),enabled:!!s,staleTime:v}),x=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}),d=D.useMemo(()=>{var u;return((u=x.data)==null?void 0:u.pages.flatMap(S=>S.results.map(Z)))??[]},[x.data]);if(i.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(i.error))return e.jsx(te,{});if(i.error||!i.data)return e.jsx("div",{className:"page",children:e.jsx(Y,{variant:"destructive",children:e.jsx(J,{children:"Method not found."})})});const a=i.data,g=(l=c.data)==null?void 0:l.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(q,{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(H,{method:{slug:u.slug,name:u.name}},u.id))]}),e.jsx(R,{feed:r,children:e.jsxs("div",{className:"results-count",children:[d.length," papers mentioning ",a.name]})}),e.jsx(K,{query:x,cards:d,empty:r.dateRange.startDate||r.dateRange.endDate?"No papers tagged with this method in this date range.":"No papers tagged with this method yet."})]})};export{Ge as default}; +import{j as e,f as D,u as P,b as k,p as V,L as _,q as A,T as v}from"./index-BeSw2DVP.js";import{R as q}from"./ResearchFollowButton-lzWAD6Jv.js";import{M as H}from"./SotaBadges-FMpqi2HS.js";import{u as Q,b as R,P as K}from"./PaperFeed-Cge1MWHJ.js";import{r as G,M as L}from"./MarkdownText-BdL6XBXC.js";import{c as b}from"./catalog-D3XT9SmX.js";import{p as U}from"./papers-B58HJw9r.js";import{i as O}from"./apiErrors-CXiv7lxc.js";import{s as W}from"./slug-BpH-Nkvz.js";import{t as Z}from"./transform-BadO0Aba.js";import{u as X}from"./usePapers-Cj1tt_u6.js";import{S as N}from"./skeleton-BBv4iC5Z.js";import{A as Y,a as J}from"./alert-uwP129N7.js";import{s as ee}from"./safeExternalHref-CkBrsh84.js";import te from"./NotFound-BkVU3ijx.js";import"./researchTopic-Cb4NrTKj.js";import"./useMutation-CsS-RfeE.js";import"./plus-imZJbVTM.js";import"./colors-BkWRhvFI.js";import"./PaperCard-Dx07g-aj.js";import"./AuthorAvatar-Dpan5W1F.js";import"./Icon-BWcOShxk.js";import"./LatexTitle-C5yrYbA-.js";import"./popover-CYoFzAud.js";import"./useIntersectionObserver-BBx3EHQ9.js";/* empty css */import"./PaperPreviewLink-BughwfUv.js";import"./index-CbsMwfXw.js";import"./index-XKdmo9ij.js";import"./katex-DkKDou_j.js";import"./hover-card-BbFULETs.js";import"./curation-CCIsdsjV.js";import"./useInfiniteQuery-C8JHYWz5.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:i,h:c,fill:o,stroke:x,label:h,fontSize:d=10})=>e.jsxs("g",{children:[e.jsx("rect",{x:s,y:r,width:i,height:c,rx:"3",ry:"3",fill:o,stroke:x,strokeWidth:"1"}),e.jsx("text",{x:s+i/2,y:r+c/2,fontSize:d,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"]],ie=()=>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],i)=>{const c=92+i*44;return e.jsxs("g",{children:[e.jsx("text",{x:"44",y:c,fontSize:"11",fontFamily:"var(--mono)",fill:t.ink,dominantBaseline:"middle",children:s}),r?e.jsx("text",{x:"138",y:c,fontSize:"8.5",fontFamily:"var(--mono)",fill:t.faint,dominantBaseline:"middle",children:r}):null]},s)})]}),le={attention:se,"contrastive-learning":ae,"agent-skills":ie},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(),i=le[r];if(i)return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(i,{})});if(s.image_url){const c=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${c}`,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,p={top:8,right:10,bottom:25,left:36},T=56,de=new Intl.DateTimeFormat("en",{month:"short",year:"2-digit",timeZone:"UTC"}),ce=new Intl.DateTimeFormat("en",{year:"numeric",timeZone:"UTC"}),F=s=>de.format(new Date(`${s}T00:00:00Z`)),me=(s,r)=>{if(s===0)return new Set;const i=s>48?12:s>36?6:s>18?3:2,c=Math.max(1,Math.ceil(T/r)),o=Math.max(i,c),x=s-1,h=new Set([0,x]);for(let d=o;d=T&&h.add(d);return h},E=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[i,c]=D.useState(null),o=Math.max(1,...s.map(l=>l.paper_count)),x=w-p.left-p.right,h=M-p.top-p.bottom,d=s.length?x/s.length:x,a=Math.max(2,d*.68),g=me(s.length,d),j=Array.from(new Set([0,Math.ceil(o/2),o])),f=i==null?null:s[i],y=f?E(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(l=>{const m=p.top+h-l/o*h;return e.jsxs("g",{children:[e.jsx("line",{className:"method-usage-gridline",x1:p.left,x2:w-p.right,y1:m,y2:m}),e.jsx("text",{className:"method-usage-y-label",x:p.left-8,y:m+3,textAnchor:"end",children:l})]},l)}),s.map((l,m)=>{const u=l.paper_count/o*h,S=l.paper_count>0?Math.max(1,u):0,I=p.left+d*m+(d-a)/2,C=p.top+h-S,$=i===m,B=m===s.length-1,z=E(l);return e.jsxs("g",{className:`method-usage-bar${$?" is-active":""}${B?" is-current":""}`,tabIndex:0,role:"img","aria-label":`${F(l.start_date)}: ${l.paper_count} ${l.paper_count===1?"paper":"papers"}${z?`. ${z}`:""}`,onMouseEnter:()=>c(m),onMouseLeave:()=>c(null),onFocus:()=>c(m),onBlur:()=>c(null),children:[e.jsx("rect",{className:"method-usage-bar-hit",x:p.left+d*m,y:p.top,width:d,height:h}),e.jsx("rect",{className:"method-usage-bar-mark",x:I,y:C,width:a,height:S,rx:"1.5"})]},l.start_date)}),s.map((l,m)=>g.has(m)?e.jsx("text",{className:"method-usage-x-label",x:p.left+d*(m+.5),y:M-11,textAnchor:"middle",children:s.length>48?ce.format(new Date(`${l.start_date}T00:00:00Z`)):F(l.start_date)},l.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",i===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,l,m;const{methodSlug:s}=P(),r=Q({defaultToLastMonth:!0}),i=k({queryKey:A.method(s),queryFn:()=>b.getMethod(s),enabled:!!s,staleTime:v}),c=k({queryKey:A.areas,queryFn:()=>b.listAreas({page_size:50,ordering:"name"}),enabled:!!((y=i.data)!=null&&y.area_id),staleTime:v}),o=k({queryKey:["method-trend",s],queryFn:()=>b.methodTrend(s),enabled:!!s,staleTime:v}),x=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}),d=D.useMemo(()=>{var u;return((u=x.data)==null?void 0:u.pages.flatMap(S=>S.results.map(Z)))??[]},[x.data]);if(i.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(i.error))return e.jsx(te,{});if(i.error||!i.data)return e.jsx("div",{className:"page",children:e.jsx(Y,{variant:"destructive",children:e.jsx(J,{children:"Method not found."})})});const a=i.data,g=(l=c.data)==null?void 0:l.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(q,{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(H,{method:{slug:u.slug,name:u.name}},u.id))]}),e.jsx(R,{feed:r,children:e.jsxs("div",{className:"results-count",children:[d.length," papers mentioning ",a.name]})}),e.jsx(K,{query:x,cards:d,empty:r.dateRange.startDate||r.dateRange.endDate?"No papers tagged with this method in this date range.":"No papers tagged with this method yet."})]})};export{Ge as default}; diff --git a/assets/MethodsIndexView-DI2_sTpn.js b/assets/MethodsIndexView-tojTcao9.js similarity index 82% rename from assets/MethodsIndexView-DI2_sTpn.js rename to assets/MethodsIndexView-tojTcao9.js index f4be863cad8c996394dcdaba9ace6c0ab811e66c..fd2e59a9cea2c5ef652b4ab1e0982458cd68cc4e 100644 --- a/assets/MethodsIndexView-DI2_sTpn.js +++ b/assets/MethodsIndexView-tojTcao9.js @@ -1,4 +1,4 @@ -import{c as f,b as c,f as l,j as s,L as _,q as N,T as m}from"./index-D2fBL-s6.js";import{c as p}from"./catalog-5AxvKr4D.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-PnePcfgX.js";import{A as q,a as A}from"./AreaSection-COKqvfmt.js";import{T as F}from"./TaxonomySuggestionTile-UxnpnHcy.js";import{u as S,T as I}from"./useHashScrollOnReady-C36cVkc9.js";import"./skeleton-BDwfco0_.js";import"./SignInToEditDialog-BBAwjxYj.js";import"./button-D0XfbdrX.js";import"./input-DdobyT4w.js";import"./textarea-B8b7WxcV.js";import"./searchable-select-CsXzzP_V.js";import"./popover-DS5Jzsg5.js";import"./dialog-DgUROq2j.js";import"./search-0R_Hc3S2.js";import"./loader-circle-CoLo2trx.js";import"./useMutation-9dlTbuQj.js";import"./submissions-LRopJJKL.js";import"./plus-BI8-JXK0.js";import"./trending-up-DFLWFJuY.js";/** +import{c as f,b as c,f as l,j as s,L as _,q as N,T as m}from"./index-BeSw2DVP.js";import{c as p}from"./catalog-D3XT9SmX.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-uwP129N7.js";import{A as q,a as A}from"./AreaSection-DhnFgZsX.js";import{T as F}from"./TaxonomySuggestionTile-CEhbbEDc.js";import{u as S,T as I}from"./useHashScrollOnReady-BpiOpyLB.js";import"./skeleton-BBv4iC5Z.js";import"./SignInToEditDialog-DDBzf9N6.js";import"./button-CO2XYoBd.js";import"./input-B5SDgz8U.js";import"./textarea-VtGLPxu8.js";import"./searchable-select-C_dIHH-q.js";import"./popover-CYoFzAud.js";import"./dialog-EpDnY6a5.js";import"./search-B4RgSU4h.js";import"./loader-circle-C4luyo5I.js";import"./useMutation-CsS-RfeE.js";import"./submissions-D_EEKc6c.js";import"./plus-imZJbVTM.js";import"./trending-up-Bx9WuS-7.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/NotFound-L0ldWZg9.js b/assets/NotFound-BkVU3ijx.js similarity index 89% rename from assets/NotFound-L0ldWZg9.js rename to assets/NotFound-BkVU3ijx.js index 53c134d96a0f0cab458cb0171030ffd482195622..63329607e0b8be92e3c48d2dd239d5cf4194eb79 100644 --- a/assets/NotFound-L0ldWZg9.js +++ b/assets/NotFound-BkVU3ijx.js @@ -1 +1 @@ -import{g as o,f as s,j as t,L as a}from"./index-D2fBL-s6.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}; +import{g as o,f as s,j as t,L as a}from"./index-BeSw2DVP.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}; diff --git a/assets/OrganizationContributionGraph-BFOi-mI4.js b/assets/OrganizationContributionGraph-D-wuKwmH.js similarity index 94% rename from assets/OrganizationContributionGraph-BFOi-mI4.js rename to assets/OrganizationContributionGraph-D-wuKwmH.js index 60f6f80776b99242138a467f64c152ccc66f2f46..2755cebbedf6518f06ea99c7d205c0192c28f6be 100644 --- a/assets/OrganizationContributionGraph-BFOi-mI4.js +++ b/assets/OrganizationContributionGraph-D-wuKwmH.js @@ -1 +1 @@ -import{f as b,j as o,b as $,T as z}from"./index-D2fBL-s6.js";import{S as w}from"./skeleton-BDwfco0_.js";import{c as y}from"./catalog-5AxvKr4D.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;em.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}; +import{f as b,j as o,b as $,T as z}from"./index-BeSw2DVP.js";import{S as w}from"./skeleton-BBv4iC5Z.js";import{c as y}from"./catalog-D3XT9SmX.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;em.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}; diff --git a/assets/OrganizationDetailView-BFZVxf5K.js b/assets/OrganizationDetailView-CPbcJCA-.js similarity index 75% rename from assets/OrganizationDetailView-BFZVxf5K.js rename to assets/OrganizationDetailView-CPbcJCA-.js index 3231ad550c940f3c87cb9bb89325e8b004a28e91..e1427184ee5434d39cd19eb79d7360af2a420de5 100644 --- a/assets/OrganizationDetailView-BFZVxf5K.js +++ b/assets/OrganizationDetailView-CPbcJCA-.js @@ -1 +1 @@ -import{k as q,f as d,b as N,p as C,j as r,L as y,q as Q,T as F,u as z}from"./index-D2fBL-s6.js";import{R as E}from"./ResearchFollowButton-Bwb5EiPm.js";import{M as I}from"./MarkdownText-ludE7yuw.js";import{O as K}from"./OrganizationContributionGraph-BFOi-mI4.js";import{u as R,b as G,P as H}from"./PaperFeed-BERxHjrg.js";import{A as W,a as B}from"./alert-PnePcfgX.js";import{S as D}from"./searchable-select-CsXzzP_V.js";import{S}from"./skeleton-BDwfco0_.js";import{u as U}from"./usePapers-CAjdcUuj.js";import{c as v}from"./catalog-5AxvKr4D.js";import{p as V}from"./papers-khuZaSFb.js";import{i as Z}from"./apiErrors-DV2aaDjL.js";import{d as L,t as J}from"./transform-B_GaHMvk.js";import{o as X,i as Y}from"./organizationNames-BVKzYEBp.js";import k from"./NotFound-L0ldWZg9.js";import"./researchTopic-jOpECA0z.js";import"./useMutation-9dlTbuQj.js";import"./plus-BI8-JXK0.js";/* empty css */import"./PaperPreviewLink-BZuRBR1p.js";import"./index-BPshewTi.js";import"./index-BtZPsygG.js";import"./katex-DkKDou_j.js";import"./hover-card-DWpZK4fW.js";import"./PaperCard-DhorusY5.js";import"./AuthorAvatar-C8tz_syh.js";import"./SotaBadges-r6iGzLRW.js";import"./colors-BkWRhvFI.js";import"./Icon-Uhh78KjL.js";import"./LatexTitle-WIQJ1ke0.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-DS5Jzsg5.js";import"./useIntersectionObserver-C0Rq0EXm.js";import"./button-D0XfbdrX.js";import"./dialog-DgUROq2j.js";import"./search-0R_Hc3S2.js";import"./loader-circle-CoLo2trx.js";import"./useInfiniteQuery-CjJA-90e.js";import"./curation-BtfabyzA.js";const ee=({organizationSlug:a,taskSlug:n})=>{var f,x,j,_,b;const T=q(),c=R({defaultToLastMonth:!0}),{searchParams:$}=c,[w,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),O=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,P=((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 A=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=$.toString();T({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&&!w?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`},...A(t)]},enabled:!l.isLoading,className:"h-[38px]"})}),children:r.jsxs("div",{className:"results-count",children:[P.toLocaleString()," papers"]})}),r.jsx(H,{query:p,cards:O,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}; +import{k as q,f as d,b as N,p as C,j as r,L as y,q as Q,T as F,u as z}from"./index-BeSw2DVP.js";import{R as E}from"./ResearchFollowButton-lzWAD6Jv.js";import{M as I}from"./MarkdownText-BdL6XBXC.js";import{O as K}from"./OrganizationContributionGraph-D-wuKwmH.js";import{u as R,b as G,P as H}from"./PaperFeed-Cge1MWHJ.js";import{A as W,a as B}from"./alert-uwP129N7.js";import{S as D}from"./searchable-select-C_dIHH-q.js";import{S}from"./skeleton-BBv4iC5Z.js";import{u as U}from"./usePapers-Cj1tt_u6.js";import{c as v}from"./catalog-D3XT9SmX.js";import{p as V}from"./papers-B58HJw9r.js";import{i as Z}from"./apiErrors-CXiv7lxc.js";import{d as L,t as J}from"./transform-BadO0Aba.js";import{o as X,i as Y}from"./organizationNames-BVKzYEBp.js";import k from"./NotFound-BkVU3ijx.js";import"./researchTopic-Cb4NrTKj.js";import"./useMutation-CsS-RfeE.js";import"./plus-imZJbVTM.js";/* empty css */import"./PaperPreviewLink-BughwfUv.js";import"./index-CbsMwfXw.js";import"./index-XKdmo9ij.js";import"./katex-DkKDou_j.js";import"./hover-card-BbFULETs.js";import"./PaperCard-Dx07g-aj.js";import"./AuthorAvatar-Dpan5W1F.js";import"./SotaBadges-FMpqi2HS.js";import"./colors-BkWRhvFI.js";import"./Icon-BWcOShxk.js";import"./LatexTitle-C5yrYbA-.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-CYoFzAud.js";import"./useIntersectionObserver-BBx3EHQ9.js";import"./button-CO2XYoBd.js";import"./dialog-EpDnY6a5.js";import"./search-B4RgSU4h.js";import"./loader-circle-C4luyo5I.js";import"./useInfiniteQuery-C8JHYWz5.js";import"./curation-CCIsdsjV.js";const ee=({organizationSlug:a,taskSlug:n})=>{var f,x,j,_,b;const T=q(),c=R({defaultToLastMonth:!0}),{searchParams:$}=c,[w,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),O=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,P=((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 A=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=$.toString();T({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&&!w?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`},...A(t)]},enabled:!l.isLoading,className:"h-[38px]"})}),children:r.jsxs("div",{className:"results-count",children:[P.toLocaleString()," papers"]})}),r.jsx(H,{query:p,cards:O,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}; diff --git a/assets/OrganizationsIndexView-f5uEFGH-.js b/assets/OrganizationsIndexView-bxW7rJXB.js similarity index 97% rename from assets/OrganizationsIndexView-f5uEFGH-.js rename to assets/OrganizationsIndexView-bxW7rJXB.js index b5194699edcab4c2da24a950f364ece78b00df2d..9eb52a8a72ebbf6eb2a16fe65db3a7c175652c0e 100644 --- a/assets/OrganizationsIndexView-f5uEFGH-.js +++ b/assets/OrganizationsIndexView-bxW7rJXB.js @@ -1 +1 @@ -import{e as m,b as x,f as h,j as e,L as u,q as j,T as y}from"./index-D2fBL-s6.js";import{A as N,a as f}from"./alert-PnePcfgX.js";import{c as _}from"./catalog-5AxvKr4D.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}; +import{e as m,b as x,f as h,j as e,L as u,q as j,T as y}from"./index-BeSw2DVP.js";import{A as N,a as f}from"./alert-uwP129N7.js";import{c as _}from"./catalog-D3XT9SmX.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}; diff --git a/assets/PaperCard-DhorusY5.js b/assets/PaperCard-Dx07g-aj.js similarity index 96% rename from assets/PaperCard-DhorusY5.js rename to assets/PaperCard-Dx07g-aj.js index 5ce32821575412af45667520fbfa262cf0e7a36f..d960155132f67adad50c6c6dfbe7be688e872e8b 100644 --- a/assets/PaperCard-DhorusY5.js +++ b/assets/PaperCard-Dx07g-aj.js @@ -1 +1 @@ -import{l as v,V as g,T as M,p as y,j as a,L as d}from"./index-D2fBL-s6.js";import{A as L}from"./AuthorAvatar-C8tz_syh.js";import{P as Z,S as A,T as k,M as E}from"./SotaBadges-r6iGzLRW.js";import{I as P}from"./Icon-Uhh78KjL.js";import{L as U,a as w}from"./LatexTitle-WIQJ1ke0.js";import{p as C}from"./papers-khuZaSFb.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}; +import{l as v,V as g,T as M,p as y,j as a,L as d}from"./index-BeSw2DVP.js";import{A as L}from"./AuthorAvatar-Dpan5W1F.js";import{P as Z,S as A,T as k,M as E}from"./SotaBadges-FMpqi2HS.js";import{I as P}from"./Icon-BWcOShxk.js";import{L as U,a as w}from"./LatexTitle-C5yrYbA-.js";import{p as C}from"./papers-B58HJw9r.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}; diff --git a/assets/PaperDetailView-BRUxkorx.js b/assets/PaperDetailView-DAUcj691.js similarity index 54% rename from assets/PaperDetailView-BRUxkorx.js rename to assets/PaperDetailView-DAUcj691.js index 868af6e4276581c720f1cbcbfa5b98a7f797894f..8dbc82876206cc191d152a5a5a8f4f5b1782e0b1 100644 --- a/assets/PaperDetailView-BRUxkorx.js +++ b/assets/PaperDetailView-DAUcj691.js @@ -1,4 +1,4 @@ -import{c as ft,b as Q,t as ea,T as it,v as re,w as ta,k as rs,x as J,f as b,p as me,j as e,C as gt,l as Z,y as xt,X as ns,q as Lt,P as is,z as ee,B as os,D as pe,E as he,F as ls,G as bt,I as Ce,J as Tt,K as sa,L as K,M as aa,N as ra,R as na,O as ia,Q as cs,S as oa,h as la,U as ca,A as Se,m as da,a as Pe,V as Ee,W as se,i as ds,u as ua,Y as Dt,Z as ma,s as Ft,_ as ha,$ as pa,a0 as fa,a1 as ga,a2 as xa,a3 as ba}from"./index-D2fBL-s6.js";import{u as ae}from"./useMutation-9dlTbuQj.js";import{I as F}from"./Icon-Uhh78KjL.js";import{T as ja,M as va,S as ya,P as _a}from"./SotaBadges-r6iGzLRW.js";import{L as Ne,a as ot}from"./LatexTitle-WIQJ1ke0.js";import{e as $e,C as ka,E as Na}from"./ExternalSourceEvalBadge-C2AscbJz.js";import{p as U}from"./papers-khuZaSFb.js";import{s as wa,a as Ca}from"./transform-B_GaHMvk.js";import{r as us,p as Sa}from"./paperReader-td2aJigh.js";import{a as Ea}from"./usePapers-CAjdcUuj.js";import{u as Pa,f as $a}from"./useDocumentTitle-ibepJVy2.js";import{u as Ia}from"./preferences-BHmRHfHN.js";import{s as Y}from"./safeExternalHref-CkBrsh84.js";import{F as Ut,i as Ra,P as Aa}from"./curation-BtfabyzA.js";import{m as La}from"./mlIntern-KBHZ6tOl.js";import{S as ue}from"./skeleton-BDwfco0_.js";import{A as Ta,a as Da}from"./alert-PnePcfgX.js";import{B as A}from"./button-D0XfbdrX.js";import{D as Ie,a as Re,c as Ae,b as Le,d as Te,e as jt}from"./dialog-DgUROq2j.js";import{A as Fa,a as Ua}from"./AgentLogos-B5etEEwg.js";import{C as Ba}from"./copy-CcyqVsMW.js";import{u as ye,r as za,e as Ma}from"./evaluationQueryInvalidation-Cs0hE-wT.js";import{I as z}from"./input-DdobyT4w.js";import{S as Bt}from"./searchable-select-CsXzzP_V.js";import{L as vt}from"./loader-circle-CoLo2trx.js";import{T as fe,n as He,g as zt,C as Ha}from"./CatalogEntityPreviewLink-xL6TDpUk.js";import{S as ms,L as O,a as Oa}from"./SignInToEditDialog-BBAwjxYj.js";import{c as G}from"./catalog-5AxvKr4D.js";import{s as hs,p as ps}from"./submissions-LRopJJKL.js";import{i as fs,a as gs,r as qa}from"./queryInvalidation-BVOtRFkG.js";import{D as Ka}from"./database-Ci0ufNyG.js";import{P as ge}from"./plus-BI8-JXK0.js";import{S as lt}from"./search-0R_Hc3S2.js";import{B as xs}from"./badge-Pw584nS3.js";import{G as Mt}from"./globe-BPKDvPgp.js";import{G as Ht}from"./github-DcIeypA5.js";import{u as bs}from"./index-C_9KPu-E.js";import{c as Oe,A as Ga}from"./codex-BUTI-2RM.js";import{M as Qa}from"./index-BPshewTi.js";import{r as Xa}from"./index-BtZPsygG.js";import{u as Va}from"./useIntersectionObserver-C0Rq0EXm.js";import{a as ct}from"./account-BHlQBDNT.js";import{S as Ot,s as Wa}from"./savedPapersAuth-0s9GFyfF.js";import{o as Ya}from"./organizationNames-BVKzYEBp.js";import{A as Ja}from"./AuthorAvatar-C8tz_syh.js";import"./colors-BkWRhvFI.js";import"./hover-card-DWpZK4fW.js";import"./useInfiniteQuery-CjJA-90e.js";import"./popover-DS5Jzsg5.js";import"./textarea-B8b7WxcV.js";/** +import{c as ft,b as Q,t as ea,T as it,v as re,w as ta,k as rs,x as J,f as x,p as me,j as e,C as gt,l as Z,y as xt,X as ns,q as Lt,P as is,z as ee,B as os,D as pe,E as he,F as ls,G as bt,I as Ce,J as Tt,K as sa,L as O,M as aa,N as ra,R as na,O as ia,Q as cs,S as oa,h as la,U as ca,A as Se,m as da,a as Pe,V as Ee,W as se,i as ds,u as ua,Y as Dt,Z as ma,s as Ft,_ as ha,$ as pa,a0 as fa,a1 as ga,a2 as xa,a3 as ba}from"./index-BeSw2DVP.js";import{u as ae}from"./useMutation-CsS-RfeE.js";import{I as F}from"./Icon-BWcOShxk.js";import{T as ja,M as va,S as ya,P as _a}from"./SotaBadges-FMpqi2HS.js";import{L as Ne,a as ot}from"./LatexTitle-C5yrYbA-.js";import{e as $e,C as ka,E as Na}from"./ExternalSourceEvalBadge-CfB9WUzn.js";import{p as U}from"./papers-B58HJw9r.js";import{s as wa,a as Ca}from"./transform-BadO0Aba.js";import{r as us,p as Sa}from"./paperReader-td2aJigh.js";import{a as Ea}from"./usePapers-Cj1tt_u6.js";import{u as Pa,f as $a}from"./useDocumentTitle-BD_JtGPy.js";import{u as Ia}from"./preferences-BcztmdfT.js";import{s as Y}from"./safeExternalHref-CkBrsh84.js";import{F as Ut,i as Ra,P as Aa}from"./curation-CCIsdsjV.js";import{m as La}from"./mlIntern-C-RSIXvd.js";import{S as ue}from"./skeleton-BBv4iC5Z.js";import{A as Ta,a as Da}from"./alert-uwP129N7.js";import{B as A}from"./button-CO2XYoBd.js";import{D as Ie,a as Re,c as Ae,b as Le,d as Te,e as jt}from"./dialog-EpDnY6a5.js";import{A as Fa,a as Ua}from"./AgentLogos-BC7uX8n_.js";import{C as Ba}from"./copy-3DjQpd64.js";import{u as ye,r as za,e as Ma}from"./evaluationQueryInvalidation-Fkke0ERS.js";import{I as z}from"./input-B5SDgz8U.js";import{S as Bt}from"./searchable-select-C_dIHH-q.js";import{L as vt}from"./loader-circle-C4luyo5I.js";import{T as fe,n as He,g as zt,C as Ha}from"./CatalogEntityPreviewLink-BPnp82vP.js";import{S as ms,L as q,a as Oa}from"./SignInToEditDialog-DDBzf9N6.js";import{c as G}from"./catalog-D3XT9SmX.js";import{s as hs,p as ps}from"./submissions-D_EEKc6c.js";import{i as fs,a as gs,r as qa}from"./queryInvalidation-DU8xd9pK.js";import{D as Ka}from"./database-stY-9KZX.js";import{P as ge}from"./plus-imZJbVTM.js";import{S as lt}from"./search-B4RgSU4h.js";import{B as xs}from"./badge-PwLfXWCy.js";import{G as Mt}from"./globe-B-CTr8Vu.js";import{G as Ht}from"./github-CTNIgqBO.js";import{u as bs}from"./index-b5_7myf0.js";import{c as Oe,A as Ga}from"./codex-JTzG52Zs.js";import{M as Qa}from"./index-CbsMwfXw.js";import{r as Xa}from"./index-XKdmo9ij.js";import{u as Va}from"./useIntersectionObserver-BBx3EHQ9.js";import{a as ct}from"./account-B-4MwKsq.js";import{S as Ot,s as Wa}from"./savedPapersAuth-CcDg6HlA.js";import{o as Ya}from"./organizationNames-BVKzYEBp.js";import{A as Ja}from"./AuthorAvatar-Dpan5W1F.js";import"./colors-BkWRhvFI.js";import"./hover-card-BbFULETs.js";import"./useInfiniteQuery-C8JHYWz5.js";import"./popover-CYoFzAud.js";import"./textarea-VtGLPxu8.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. @@ -13,8 +13,8 @@ import{c as ft,b as Q,t as ea,T as it,v as re,w as ta,k as rs,x as J,f as b,p as * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const js=ft("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);function tr(t){return t!=null&&t.can_directly_edit_catalog?"direct":"pending"}function sr(t){return(t??[]).filter(s=>!!(s.dataset_slug&&s.task_slug))}function ar(t,s,r="https://paperswithcode.co"){return s.map(a=>{const i=encodeURIComponent(a.evaluation_id),d=`${r}/api/v1/papers/${encodeURIComponent(t)}/leaderboard-badge.svg?eval=${i}&live=1`,o=`${r}/api/v1/papers/${encodeURIComponent(t)}/leaderboard-badge-link?eval=${i}`;return`[![${`Papers with Code: ${a.best_rank===1?"SOTA":`#${a.best_rank}`} on ${a.dataset_name}`}](${d})](${o})`}).join(` -`)}function rr(t,s=!0){return Q({queryKey:ea.byPaper(t),queryFn:()=>{if(!t)throw new Error("Paper ID is required");return $e.byPaper(t)},enabled:s&&!!t,staleTime:0,refetchOnMount:"always"})}const nr={models:"https://huggingface.co/",datasets:"https://huggingface.co/datasets/",spaces:"https://huggingface.co/spaces/"},qe=(t,s)=>{const r=(t[s]||[]).length;return r<100?{count:r,isLimited:!1}:{count:r,isLimited:!0}},Ke=(t,s)=>{const r=t[s];return Array.isArray(r)?r.map(a=>{if(typeof a=="string")return a;if(a&&typeof a=="object"){const i=a;return i.id||i.repoId||null}return null}).filter(a=>!!a).map(a=>`${nr[s]}${a}`):[]},ir=async t=>{try{return(await fetch(`https://huggingface.co/api/papers/${re(t)}`)).ok}catch{return!1}},or=async t=>{const s=re(t),[r,a]=await Promise.all([fetch(`https://huggingface.co/api/arxiv/${s}/repos`).then(async l=>l.ok?l.json():(console.warn(`Failed to fetch repos for arXiv:${s}, status: ${l.status}`),null)).catch(l=>(console.warn(`Failed to fetch repos for arXiv:${s}:`,l),null)),ir(s)]);if(!r)return{models:0,datasets:0,spaces:0,modelUrls:[],datasetUrls:[],spaceUrls:[],isLimited:!1,paperExists:a};const i=qe(r,"models"),d=qe(r,"datasets"),o=qe(r,"spaces");return{models:i.count,datasets:d.count,spaces:o.count,modelUrls:Ke(r,"models"),datasetUrls:Ke(r,"datasets"),spaceUrls:Ke(r,"spaces"),isLimited:i.isLimited||d.isLimited||o.isLimited,paperExists:a}},lr=t=>Q({queryKey:["huggingface-repos",t],queryFn:()=>or(t),enabled:!!t,staleTime:it,retry:1});function cr(t,s){try{const r=new URL(t),a=r.pathname.split("/").filter(Boolean);return(a[0]==="datasets"||a[0]==="spaces")&&a.shift(),a.slice(0,2).join("/")||r.hostname.replace(/^www\./,"")}catch{return s}}function Ge(t,s,r){return[...new Set([...t,...s??[]])].map(a=>({href:a,label:cr(a,r)}))}function Qe(t,s,r){if(r==null&&t.length===0&&!(s!=null&&s.length))return;const a=new Set([...t,...s??[]]);return Math.max(a.size,r??0)}function Xe(t,s){if(!(t==null&&s==null))return Math.max(t??0,s??0)}function Ve(t){return t[0]??"https://huggingface.co"}function We(t,s){return s[0]??t}function dr(t){const s=`${t.title.slice(0,60)}${t.title.length>60?"…":""}`,r=`${t.authors[0]||""}${t.authors.length>1?" et al.":""}`,a=t.authors.join(" and "),i=(t.published||"").slice(0,4)||"—",d=(o,l)=>t.arxiv_id?`@article{${t.arxiv_id.replace(".","")}, + */const js=ft("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);function tr(t){return t!=null&&t.can_directly_edit_catalog?"direct":"pending"}function sr(t){return(t??[]).filter(s=>!!(s.dataset_slug&&s.task_slug))}function ar(t,s,r="https://paperswithcode.co"){return s.map(a=>{const i=encodeURIComponent(a.evaluation_id),c=`${r}/api/v1/papers/${encodeURIComponent(t)}/leaderboard-badge.svg?eval=${i}&live=1`,o=`${r}/api/v1/papers/${encodeURIComponent(t)}/leaderboard-badge-link?eval=${i}`;return`[![${`Papers with Code: ${a.best_rank===1?"SOTA":`#${a.best_rank}`} on ${a.dataset_name}`}](${c})](${o})`}).join(` +`)}function rr(t,s=!0){return Q({queryKey:ea.byPaper(t),queryFn:()=>{if(!t)throw new Error("Paper ID is required");return $e.byPaper(t)},enabled:s&&!!t,staleTime:0,refetchOnMount:"always"})}const nr={models:"https://huggingface.co/",datasets:"https://huggingface.co/datasets/",spaces:"https://huggingface.co/spaces/"},qe=(t,s)=>{const r=(t[s]||[]).length;return r<100?{count:r,isLimited:!1}:{count:r,isLimited:!0}},Ke=(t,s)=>{const r=t[s];return Array.isArray(r)?r.map(a=>{if(typeof a=="string")return a;if(a&&typeof a=="object"){const i=a;return i.id||i.repoId||null}return null}).filter(a=>!!a).map(a=>`${nr[s]}${a}`):[]},ir=async t=>{try{return(await fetch(`https://huggingface.co/api/papers/${re(t)}`)).ok}catch{return!1}},or=async t=>{const s=re(t),[r,a]=await Promise.all([fetch(`https://huggingface.co/api/arxiv/${s}/repos`).then(async l=>l.ok?l.json():(console.warn(`Failed to fetch repos for arXiv:${s}, status: ${l.status}`),null)).catch(l=>(console.warn(`Failed to fetch repos for arXiv:${s}:`,l),null)),ir(s)]);if(!r)return{models:0,datasets:0,spaces:0,modelUrls:[],datasetUrls:[],spaceUrls:[],isLimited:!1,paperExists:a};const i=qe(r,"models"),c=qe(r,"datasets"),o=qe(r,"spaces");return{models:i.count,datasets:c.count,spaces:o.count,modelUrls:Ke(r,"models"),datasetUrls:Ke(r,"datasets"),spaceUrls:Ke(r,"spaces"),isLimited:i.isLimited||c.isLimited||o.isLimited,paperExists:a}},lr=t=>Q({queryKey:["huggingface-repos",t],queryFn:()=>or(t),enabled:!!t,staleTime:it,retry:1});function cr(t,s){try{const r=new URL(t),a=r.pathname.split("/").filter(Boolean);return(a[0]==="datasets"||a[0]==="spaces")&&a.shift(),a.slice(0,2).join("/")||r.hostname.replace(/^www\./,"")}catch{return s}}function Ge(t,s,r){return[...new Set([...t,...s??[]])].map(a=>({href:a,label:cr(a,r)}))}function Qe(t,s,r){if(r==null&&t.length===0&&!(s!=null&&s.length))return;const a=new Set([...t,...s??[]]);return Math.max(a.size,r??0)}function Xe(t,s){if(!(t==null&&s==null))return Math.max(t??0,s??0)}function Ve(t){return t[0]??"https://huggingface.co"}function We(t,s){return s[0]??t}function dr(t){const s=`${t.title.slice(0,60)}${t.title.length>60?"…":""}`,r=`${t.authors[0]||""}${t.authors.length>1?" et al.":""}`,a=t.authors.join(" and "),i=(t.published||"").slice(0,4)||"—",c=(o,l)=>t.arxiv_id?`@article{${t.arxiv_id.replace(".","")}, title={{${o}}}, author=${l}, year={{${i}}}, @@ -25,5 +25,5 @@ import{c as ft,b as Q,t as ea,T as it,v as re,w as ta,k as rs,x as J,f as b,p as author=${l}, year={{${i}}}, url={{${t.source_url||t.url_abs||""}}} -}`;return{citationDisplay:d(s,`{{${r}}}`),citationCopy:d(t.title,`{${a}}`)}}function ur(t,s,r){var h,x,n;const a={models:t.hf_models??[],datasets:t.hf_datasets??[],spaces:t.hf_spaces??[]},i=t.linked_hf_artifacts,d=t.hf_artifact_summary,o={models:[...(s==null?void 0:s.modelUrls)??[],...(i==null?void 0:i.models)??[]],datasets:[...(s==null?void 0:s.datasetUrls)??[],...(i==null?void 0:i.datasets)??[]],spaces:[...(s==null?void 0:s.spaceUrls)??[],...(i==null?void 0:i.spaces)??[]]},l={models:Xe(s==null?void 0:s.models,d==null?void 0:d.model_count),datasets:Xe(s==null?void 0:s.datasets,d==null?void 0:d.dataset_count),spaces:Xe(s==null?void 0:s.spaces,d==null?void 0:d.space_count)},u={models:Ge(a.models,o.models,"Model"),datasets:Ge(a.datasets,o.datasets,"Dataset"),spaces:Ge(a.spaces,o.spaces,"Space")},v={models:u.models.map(({href:m})=>m),datasets:u.datasets.map(({href:m})=>m),spaces:u.spaces.map(({href:m})=>m)},p=t.arxiv_id!=null?re(t.arxiv_id):null,c=t.arxiv_id?{isLoading:r,paperHref:`https://huggingface.co/papers/${p}`,rows:[{label:"Models",href:We(`https://huggingface.co/models?other=arxiv:${t.arxiv_id}`,a.models),count:Qe(a.models,o.models,l.models),isLimited:s==null?void 0:s.isLimited,links:u.models},{label:"Datasets",href:We(`https://huggingface.co/datasets?other=arxiv:${t.arxiv_id}`,a.datasets),count:Qe(a.datasets,o.datasets,l.datasets),isLimited:s==null?void 0:s.isLimited,links:u.datasets},{label:"Spaces",href:We(`https://huggingface.co/papers/${p}`,a.spaces),count:Qe(a.spaces,o.spaces,l.spaces),isLimited:s==null?void 0:s.isLimited,links:u.spaces}],footer:`Cite arxiv.org/abs/${p} in a HF README to link it here.`}:{isLoading:!1,paperHref:null,rows:[{label:"Models",href:Ve(a.models),count:a.models.length,links:u.models},{label:"Datasets",href:Ve(a.datasets),count:a.datasets.length,links:u.datasets},{label:"Spaces",href:Ve(a.spaces),count:a.spaces.length,links:u.spaces}],footer:null},f=(t.methods??[]).filter(({source_paper_id:m})=>m===t.id),g=t.introduced_benchmarks??[],y=t.introduced_frameworks??[],w=[f.length&&(f.length===1?"this method":"these methods"),g.length&&(g.length===1?"this benchmark":"these benchmarks"),y.length&&(y.length===1?"this framework":"these frameworks")].filter(m=>!!m);return{...dr(t),allHfArtifactUrls:v,authorEntries:t.authors.map((m,j)=>{var S,E,C,R,L,B;return{name:m,id:((E=(S=t.author_links)==null?void 0:S[j])==null?void 0:E.id)??null,hf_username:((R=(C=t.author_links)==null?void 0:C[j])==null?void 0:R.hf_username)??null,hf_avatar_url:((B=(L=t.author_links)==null?void 0:L[j])==null?void 0:B.hf_avatar_url)??null}}),copyableRanks:sr(t.leaderboard_ranks),hasIntroducedItems:w.length>0,hasLineageItems:!!((h=t.predecessor_papers)!=null&&h.length||(x=t.successor_papers)!=null&&x.length),hfArtifactViewer:c,hfPaperExists:!!(s!=null&&s.paperExists),introducedBenchmarks:g,introducedFrameworks:y,introducedMethods:f,introducedSummary:w.join(" and "),numPages:t.num_pages||null,paperSourceLabel:t.arxiv_id?`arXiv:${t.arxiv_id}`:"External resource",predecessorPapers:t.predecessor_papers??[],projectPages:((n=t.project_pages)==null?void 0:n.filter(({url:m})=>m).map(m=>({...m,safeHref:Y(m.url)})))??[],repoSummary:wa(t.repositories),safeAbstractUrl:Y(t.url_abs),safeConferenceUrl:Y(t.conference_url_abs),safePdfUrl:Y(t.url_pdf),successorPapers:t.successor_papers??[]}}const mr=["tldr","abstract","tasks","methods","results"];function hr(t){if(!t)return{section:null,resultsTaskSlug:null};const[s,r]=t.split("?",2);if(!mr.includes(s))return{section:null,resultsTaskSlug:null};const a=s;return a!=="results"||!r?{section:a,resultsTaskSlug:null}:{section:a,resultsTaskSlug:new URLSearchParams(r).get("task")}}const vs=t=>`results-task-${t}`,pr=t=>`#results?task=${encodeURIComponent(t)}`;function fr({direct:t,paperId:s,refetchEvaluations:r,refetchPaper:a}){a(),r(),!(!t||!s)&&(U.primeCurationState(s,!0).catch(()=>{}),$e.primeCurationState(s,!0).catch(()=>{}))}function gr(t,s){const r=t?ta(t):"",a=rs(),{toast:i}=J(),{preferences:d}=Ia(),o=Ea(r,!!r),l=o.data,[u,v]=b.useState(!1);b.useEffect(()=>{!t||t===r||a(`/paper/${r}${window.location.search}${window.location.hash}`,{replace:!0})},[r,a,t]),Pa((l==null?void 0:l.title)&&(l.page_title||$a(l.title))),b.useEffect(()=>{if(v(!1),!(l!=null&&l.id))return;const m=window.setTimeout(()=>v(!0),0);return()=>window.clearTimeout(m)},[l==null?void 0:l.id]);const p=u&&!!(l!=null&&l.id),c=lr(u?l==null?void 0:l.arxiv_id:void 0),f=rr(l==null?void 0:l.id,p),g=Q({queryKey:[...me.feeds.versions,l==null?void 0:l.arxiv_id],queryFn:()=>U.versions(re(l.arxiv_id)),enabled:p&&!!(l!=null&&l.arxiv_id),staleTime:it}),y=Q({queryKey:[...me.feeds.related,l==null?void 0:l.id],queryFn:()=>U.related(l.arxiv_id||l.id,4),enabled:p,staleTime:it});b.useEffect(()=>{const m=()=>{fr({direct:s==="direct",paperId:l==null?void 0:l.id,refetchEvaluations:f.refetch,refetchPaper:o.refetch}),i({title:"This section changed",description:"The latest state has been reloaded. Review your changes before submitting again.",variant:"destructive"})};return window.addEventListener("pwc:catalog-conflict",m),()=>window.removeEventListener("pwc:catalog-conflict",m)},[s,f.refetch,l==null?void 0:l.id,o.refetch,i]);const w=b.useMemo(()=>{const m=f.data;return!m||!d.hide_closed_source_evals?m:m.filter(j=>j.is_open!==!1)},[f.data,d.hide_closed_source_evals]),h=b.useMemo(()=>{if(!w)return[];const m=new Map;for(const j of w){const S=m.get(j.task_id);S?S.rows.push(j):m.set(j.task_id,{taskId:j.task_id,taskName:j.task_name||"—",taskSlug:j.task_slug,rows:[j]})}return[...m.values()]},[w]),x=b.useMemo(()=>l?ur(l,c.data,c.isLoading):null,[c.data,c.isLoading,l]),n=b.useRef(!1);return b.useEffect(()=>{n.current=!1},[r]),b.useEffect(()=>{let m=0;const j=(E=!1,C=!1)=>{const{section:R,resultsTaskSlug:L}=hr(window.location.hash.slice(1));if(!R||!l||R==="tldr"&&!l.tldr||R==="results"&&(!p||f.isLoading)||!E&&n.current)return;let B=R==="results"&&L?document.getElementById(vs(L)):document.getElementById(R);if(!B&&R==="results"&&L){if(h.some(({taskSlug:H})=>H===L))return;B=document.getElementById("results")}B&&(m=window.requestAnimationFrame(()=>{n.current=!0,B.scrollIntoView({block:"start",behavior:C?"smooth":"auto"})}))};j();const S=()=>{n.current=!1,j(!0,!0)};return window.addEventListener("hashchange",S),()=>{window.removeEventListener("hashchange",S),m&&window.cancelAnimationFrame(m)}},[h,f.isLoading,l,p]),{arxivId:r,evaluations:f.data,evaluationsByTask:h,evaluationsLoading:f.isLoading,paper:l,paperError:o.error,paperLoading:o.isLoading,presentation:x,refetchEvaluations:f.refetch,refetchPaper:o.refetch,relatedQuery:y,versions:g.data??[],visibleEvaluations:w}}function xr(){const[t,s]=b.useState(null),r=b.useCallback(i=>{s(i)},[]),a=b.useCallback((i,d)=>{s(o=>d?i:o===i?null:o)},[]);return{activeEditor:t,openEditor:r,setEditorOpen:a}}function br({paperId:t}){const[s,r]=b.useState(!1),[a,i]=b.useState(!1),[d,o]=b.useState(!1),l=`Help me edit https://paperswithcode.co/paper/${t} using the public pwc CLI from https://github.com/huggingface/pwc-cli. Install or update the CLI following its README, then run pwc skills add to load its instructions. Run pwc auth login --paper ${t}; I will authorize this paper in my browser. Export with pwc paper edit export ${t} --output edits.json, make explicit operations for the corrections I request, and preview before submitting. For organization changes, use an organizations operation with payload {"organization_ids": [existing organization IDs]}; this replaces the paper’s organization links and publishes directly. Use existing organizations, benchmark and metric definitions, preserve unrelated entries, and cite source URLs where available. Never print or copy credentials. Ask me what to change if I have not specified it.`;return e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",className:"action-btn",title:"Edit this paper page with Claude, Codex, Cursor, or OpenCode",onClick:()=>{r(!1),i(!1),o(!0)},children:[e.jsx(Fa,{}),"Edit with your agent"]}),e.jsx(Ie,{open:d,onOpenChange:o,children:e.jsxs(Re,{className:"max-w-2xl",children:[e.jsxs(Ae,{children:[e.jsx(Le,{children:"Edit this paper with your agent"}),e.jsx(Te,{children:"Spotted a missing code link, a wrong task, or a missing benchmark result? Your favorite coding agent can fix it for you."})]}),e.jsx(Ua,{}),e.jsxs("ol",{className:"list-decimal space-y-1 pl-5 text-sm text-muted-foreground",children:[e.jsx("li",{children:"Copy the prompt below."}),e.jsx("li",{children:"Paste it into Claude Code, Codex, Cursor, OpenCode, or another coding agent, and tell it what to change."}),e.jsxs("li",{children:["The agent installs the ",e.jsx("a",{className:"underline",href:"https://github.com/huggingface/pwc-cli",target:"_blank",rel:"noreferrer",children:"pwc CLI"}),", asks you to authorize this paper with your Hugging Face account, and previews the edits before submitting them."]})]}),e.jsx("textarea",{"aria-label":"Paper edit prompt",readOnly:!0,value:l,className:"h-48 w-full resize-none rounded border bg-muted/40 p-3 font-mono text-xs",onFocus:u=>u.currentTarget.select()}),a&&e.jsx("p",{role:"alert",className:"text-sm text-destructive",children:"Could not copy automatically. Select the prompt above and copy it manually."}),e.jsxs(A,{className:"justify-self-end",onClick:async()=>{try{await navigator.clipboard.writeText(l),r(!0),i(!1)}catch{i(!0)}},children:[s?e.jsx(gt,{size:14}):e.jsx(Ba,{size:14}),s?"Prompt copied":"Copy prompt"]})]})})]})}function jr(t){return t.map(s=>{const r=s.best_metric||Object.keys(s.metrics)[0]||"";return{id:s.id,task_id:s.task_id,dataset_id:s.dataset_id,model_name:s.model_name||"",harness:s.harness||"",metric_name:r,metric_value:String(s.metrics[r]??""),original_metrics:{...s.metrics},original_metric_name:r,best_rank:s.best_rank!=null?String(s.best_rank):"",num_parameters:s.num_parameters!=null?String(s.num_parameters):"",hf_model_url:s.hf_model_url||"",is_open:s.is_open!==!1,operation:"unchanged"}})}function vr(t,s){const r={...t.original_metrics},a=r[t.original_metric_name];return t.original_metric_name!==s&&delete r[t.original_metric_name],r[s]=a!=null&&t.metric_value===String(a)?a:t.metric_value,r}function yr(t){const s=t==null?void 0:t.trim();return s?Number(s):void 0}function qt(t){const s=t.trim();return s?Number(s):null}function Ye(t){return t.trim()||null}function Je(t){return!!(t&&/^\d+$/.test(t.trim())&&Number.isSafeInteger(Number(t))&&Number(t)>0)}function ys(t){const s=[];return t.forEach((r,a)=>{var o;if(r.operation==="unchanged")return;const i=(l,u)=>{s.push({rowIndex:a,field:l,message:u})};if(r.operation!=="create"&&!Je(r.id)&&i("id","This result has no valid evaluation ID. Reload the paper before editing it."),r.operation==="delete")return;Je(r.task_id)||i("task_id","Select a valid task."),Je(r.dataset_id)||i("dataset_id","Select a valid dataset.");const d=r.metric_name.trim();d?d!==r.original_metric_name&&Object.prototype.hasOwnProperty.call(r.original_metrics,d)&&i("metric_name",`Cannot rename a metric to "${d}": this evaluation already has that score.`):i("metric_name","Select a metric."),(o=r.best_rank)!=null&&o.trim()&&!Number.isSafeInteger(Number(r.best_rank))&&i("best_rank","Enter a whole-number rank."),r.num_parameters.trim()&&(!Number.isSafeInteger(Number(r.num_parameters))||Number(r.num_parameters)<0)&&i("num_parameters","Enter a non-negative whole-number parameter count."),r.metric_value.trim()||i("metric_value","Enter a metric value.")}),s}function _r(t,s){const r=ys(t);return r.length?{valid:!1,errors:r}:{valid:!0,operations:kr(t,s)}}function kr(t,s){const r=[];for(const a of t){if(a.operation==="delete"){r.push({op:"delete",evaluation_id:Number(a.id)});continue}if(a.operation!=="create"&&a.operation!=="update")continue;const i=a.metric_name.trim(),d=s(a.task_id,a.dataset_id),o={task_id:Number(a.task_id),dataset_id:Number(a.dataset_id),metrics:vr(a,i),best_metric:i,is_open:a.is_open},l=a.model_name.trim(),u=yr(a.best_rank);if(a.operation==="create"){const v=qt(a.num_parameters),p=Ye(a.hf_model_url);r.push({op:"create",data:{...o,...l?{model_name:l}:{},...d&&a.harness.trim()?{harness:a.harness.trim()}:{},...u!==void 0?{best_rank:u}:{},...v!==null?{num_parameters:v}:{},...p!==null?{hf_model_url:p}:{}}});continue}r.push({op:"update",evaluation_id:Number(a.id),data:{...o,...l?{model_name:l}:{},harness:d?Ye(a.harness):null,...u!==void 0?{best_rank:u}:{},num_parameters:qt(a.num_parameters),hf_model_url:Ye(a.hf_model_url)}})}return r}function Nr(t,s){return s.map(r=>{switch(r.op){case"delete":return{operation:"delete",evaluation_id:r.evaluation_id};case"update":return{operation:"update",evaluation_id:r.evaluation_id,payload:r.data};case"create":return{operation:"create",payload:{paper_id:t,...r.data}}}})}function wr(t,s){const r=t.metrics(s.task_id,s.dataset_id).metrics.map(a=>({value:a.metric_name,label:a.metric_name,description:a.metric_direction==="higher_is_better"?"Higher is better":"Lower is better"}));return s.metric_name&&!r.some(a=>a.value===s.metric_name)&&r.unshift({value:s.metric_name,label:`${s.metric_name} (legacy)`}),r}const q="text-left py-2 px-2 font-medium text-sm";function Cr({rows:t,catalog:s,draftErrors:r,errorId:a,isAdmin:i,showHarnessColumn:d,onFieldChange:o,onOpenSourceChange:l,onDelete:u}){const v=(f,g)=>r.some(y=>y.rowIndex===f&&y.field===g),p=(f,g)=>{const y=r.find(w=>w.rowIndex===f&&w.field===g);return y?e.jsx("p",{id:`${a}-${f}-${g}-error`,className:"text-xs text-destructive",children:y.message}):null},c=(f,g)=>({id:`${a}-${f}-${g}`,"aria-invalid":v(f,g),"aria-describedby":`${a}-${f}-${g}-error`});return e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full border-collapse",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-border",children:[e.jsx("th",{className:`${q} min-w-[180px]`,children:"Task"}),e.jsx("th",{className:`${q} min-w-[180px]`,children:"Dataset"}),e.jsx("th",{className:`${q} ${d?"min-w-[140px]":"min-w-[240px]"}`,children:"Model"}),d&&e.jsx("th",{className:`${q} min-w-[140px]`,children:"Harness"}),e.jsx("th",{className:`${q} min-w-[140px]`,children:"Metric"}),e.jsx("th",{className:q,children:"Value"}),e.jsx("th",{className:q,children:"Parameters"}),e.jsx("th",{className:`${q} min-w-[200px]`,children:"HF model URL"}),e.jsx("th",{className:`${q} w-20`,children:"Open source"}),e.jsx("th",{className:`${q} w-16`,children:"Action"})]})}),e.jsx("tbody",{children:t.map((f,g)=>{if(f.operation==="delete")return null;const y=s.task(f.task_id),w=s.dataset(f.dataset_id),h=s.metrics(f.task_id,f.dataset_id),x=wr(s,f);return e.jsxs("tr",{className:"border-b border-border",children:[e.jsx("td",{className:"py-2 px-2",children:e.jsxs("div",{role:"group","aria-label":"Task","aria-describedby":`${a}-${g}-task_id-error`,children:[e.jsx(Bt,{value:f.task_id,onChange:n=>o(g,"task_id",n),placeholder:"Select task",searchPlaceholder:"Search tasks...",emptyMessage:"No tasks found.",selectedOption:y?{value:y.id,label:y.name}:null,queryKey:["eval-edit-task-search"],queryFn:s.searchTasks}),p(g,"task_id")]})}),e.jsx("td",{className:"py-2 px-2",children:e.jsxs("div",{role:"group","aria-label":"Dataset","aria-describedby":`${a}-${g}-dataset_id-error`,children:[e.jsx(Bt,{value:f.dataset_id,onChange:n=>o(g,"dataset_id",n),placeholder:f.task_id?"Select dataset":"Select task first",searchPlaceholder:"Search datasets...",emptyMessage:f.task_id?"No datasets found for this task.":"Select a task first.",disabled:!f.task_id,selectedOption:w?{value:w.id,label:w.name}:null,queryKey:["eval-edit-dataset-search",f.task_id],queryFn:s.searchDatasets(f.task_id),enabled:!!f.task_id}),p(g,"dataset_id")]})}),e.jsx("td",{className:"py-2 px-2",children:e.jsx(z,{type:"text",className:"w-full text-sm",placeholder:"Model name",value:f.model_name,onChange:n=>o(g,"model_name",n.target.value)})}),d&&e.jsx("td",{className:"py-2 px-2",children:s.supportsHarness(f.task_id,f.dataset_id)?e.jsx(z,{type:"text",className:"w-full text-sm",placeholder:"Claude Code, Terminus, ...",value:f.harness,onChange:n=>o(g,"harness",n.target.value)}):e.jsx("span",{className:"text-xs text-muted-foreground",children:"Not supported"})}),e.jsxs("td",{className:"py-2 px-2",children:[!f.task_id||!f.dataset_id?e.jsx("span",{className:"text-xs text-muted-foreground",children:"Select task + dataset"}):h.loading?e.jsxs("span",{className:"inline-flex items-center text-xs text-muted-foreground",children:[e.jsx(vt,{className:"mr-1 h-3 w-3 animate-spin"}),"Loading metrics..."]}):x.length>0?e.jsxs("select",{className:"w-full rounded-md border border-border bg-background px-2 py-1 text-sm",...c(g,"metric_name"),value:f.metric_name,onChange:n=>o(g,"metric_name",n.target.value),children:[e.jsx("option",{value:"",children:"Select metric"}),x.map(n=>e.jsx("option",{value:n.value,children:n.label},n.value))]}):!h.error&&e.jsx("span",{className:"text-xs text-muted-foreground",children:"No configured metrics"}),h.error&&e.jsx("p",{className:"text-xs text-destructive",children:"Could not load metrics"}),p(g,"metric_name")]}),e.jsxs("td",{className:"py-2 px-2",children:[e.jsx(z,{type:"text",className:"w-full text-sm",placeholder:"44.9",...c(g,"metric_value"),value:f.metric_value,onChange:n=>o(g,"metric_value",n.target.value)}),p(g,"metric_value")]}),e.jsxs("td",{className:"py-2 px-2",children:[e.jsx(z,{type:"number",min:0,step:1,className:"w-full text-sm",placeholder:"e.g. 7000000000",...c(g,"num_parameters"),value:f.num_parameters,onChange:n=>o(g,"num_parameters",n.target.value),title:"Raw model parameter count (e.g. 7000000000 for a 7B model). Leave blank if unknown."}),p(g,"num_parameters")]}),e.jsx("td",{className:"py-2 px-2",children:e.jsx(z,{type:"url",className:"w-full text-sm",placeholder:"https://huggingface.co/org/model",value:f.hf_model_url,onChange:n=>o(g,"hf_model_url",n.target.value),title:"Hugging Face model page for this row (must start with https://huggingface.co/). Leave blank if none."})}),e.jsx("td",{className:"py-2 px-2 text-center",children:e.jsx("input",{type:"checkbox",className:"h-4 w-4 align-middle",checked:f.is_open,onChange:n=>l(g,n.target.checked),title:"Whether the evaluated model is open-source. Uncheck for closed-source models."})}),e.jsx("td",{className:"py-2 px-2",children:e.jsx(A,{variant:"ghost",size:"sm",onClick:()=>u(g),className:"h-8 w-8 p-0 text-destructive hover:text-destructive",title:f.id&&!i?"Only administrators can delete published results":"Remove row",disabled:!!f.id&&!i,children:e.jsx(fe,{className:"w-4 h-4"})})})]},g)})})]})})}function Sr(t){const s=typeof window<"u"&&window.location.hostname==="staging.paperswithcode.co";return e.jsxs("div",{className:"rounded-md border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-900 dark:border-amber-900 dark:bg-amber-950/40 dark:text-amber-100",children:[e.jsx("p",{className:"font-medium",children:s?"Test-only: this change stays on staging.":"Your changes go live right away."}),e.jsx("p",{className:"mt-1 leading-snug",children:s?"This exercises staging-local pending behavior and is not queued for production review.":"Edits are applied immediately and reviewed afterwards. A few, such as links to unfamiliar sites, are held for an admin first."})]})}function V({title:t,description:s,className:r,submitMode:a,isAuthor:i=!1,onOpenChange:d,onSave:o,isSaving:l,saveDisabled:u=!1,footerStart:v,children:p}){const c=a==="pending";return e.jsx(Ie,{open:!0,onOpenChange:d,children:e.jsxs(Re,{className:r,children:[e.jsxs(Ae,{children:[e.jsx(Le,{children:t}),e.jsx(Te,{children:s})]}),c&&e.jsx(Sr,{isAuthor:i}),p,e.jsxs(jt,{children:[v,e.jsx(A,{variant:"outline",onClick:()=>d(!1),children:"Cancel"}),e.jsx(A,{onClick:o,disabled:l||u,children:l?e.jsxs(e.Fragment,{children:[e.jsx(vt,{className:"w-4 h-4 mr-2 animate-spin"}),c?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(gt,{className:"w-4 h-4 mr-2"}),c?"Submit for review":"Save Changes"]})})]})]})})}const Ze=100,Kt=t=>["eval-edit","task",t],Gt=t=>["eval-edit","dataset",t];function ce(...t){return new Map(t.flat().flatMap(s=>s?[[s.id,s]]:[]))}function et(t){return[...new Set(t.filter(Boolean))]}function Er(t,s){var x;const r=Z(),a=b.useMemo(()=>et(t.map(n=>n.task_id)),[t]),i=b.useMemo(()=>et(t.map(n=>n.dataset_id)),[t]),d=b.useMemo(()=>et(t.map(n=>n.task_id&&n.dataset_id?`${n.task_id}:${n.dataset_id}`:"")),[t]),o=b.useMemo(()=>ce(s.map(n=>n.task_name?{id:n.task_id,name:n.task_name,slug:n.task_slug,level:0}:void 0)),[s]),l=b.useMemo(()=>ce(s.map(n=>n.dataset_name?{id:n.dataset_id,name:n.dataset_name,slug:n.dataset_slug}:void 0)),[s]),u=ye({queries:a.filter(n=>!o.has(n)).map(n=>({queryKey:Kt(n),queryFn:()=>G.getTask(n),staleTime:1/0})),combine:n=>n.map(m=>m.data)}),v=ye({queries:a.map(n=>({queryKey:["eval-edit","task-datasets",n],queryFn:async()=>(await G.listDatasets({task_id:Number(n),page_size:Ze})).results}))}),p=ce(...v.map(n=>n.data??[])),c=ye({queries:i.filter(n=>!l.has(n)&&!p.has(n)).map(n=>({queryKey:Gt(n),queryFn:()=>G.getDataset(n),staleTime:1/0})),combine:n=>({data:n.map(m=>m.data),loaded:n.every(m=>m.isSuccess)})}),f=ye({queries:d.map(n=>{const[m,j]=n.split(":");return{queryKey:["eval-edit","leaderboard-metrics",m,j],queryFn:()=>G.leaderboardMetrics(j,m)}})}),g=ce([...o.values()],u),y=ce([...l.values()],[...p.values()],c.data),w=((x=v.find(n=>n.error))==null?void 0:x.error)??null,h=v.every(n=>n.isSuccess)&&c.loaded;return{task:n=>g.get(n),dataset:n=>y.get(n),supportsHarness:(n,m)=>{var j;return!!(n&&m&&((j=y.get(m))!=null&&j.supports_harness))},metrics:(n,m)=>{const j=f[d.indexOf(`${n}:${m}`)];return{metrics:(j==null?void 0:j.data)??[],loading:(j==null?void 0:j.isFetching)??!1,error:(j==null?void 0:j.error)??null}},datasetListError:w,harnessSupportKnown:h,searchTasks:async n=>{const m=await G.listTasks({page_size:Ze,...n?{q:n}:{}});return m.results.forEach(j=>r.setQueryData(Kt(j.id),j)),m.results.map(j=>{var S;return{value:j.id,label:j.name,description:(S=j.description)==null?void 0:S.slice(0,100)}})},searchDatasets:n=>async m=>{const j=await G.listDatasets({task_id:Number(n),page_size:Ze,...m?{q:m}:{}});return j.results.forEach(S=>r.setQueryData(Gt(S.id),S)),j.results.map(S=>({value:S.id,label:S.name,description:S.full_name}))}}}function Pr(t,{toast:s,queryClient:r,paperIds:a,queuedDescription:i}){if(t.status==="approved"){fs(r,a),gs(r),s({title:"Edit applied",description:"Your change is now live on this paper."});return}s({title:"Edit submitted for review",description:i})}function W({editType:t,paperId:s,arxivId:r,submitMode:a,messages:i,toPendingPayload:d,applyDirect:o,applyOptimistic:l,onSaved:u,onClose:v}){const p=Z(),{toast:c}=J(),f=a==="pending";return ae({mutationFn:async g=>f?{submitted:await hs.submit(ps(Number(s),t,d(g)))}:{paper:await o(g)},onMutate:async g=>{if(f||!l)return{};const y=await l(g);return v(),{rollback:y}},onSuccess:(g,y)=>{"submitted"in g?(Pr(g.submitted,{toast:c,queryClient:p,paperIds:[s,r],queuedDescription:`Thanks! An admin will review your proposed ${i.proposal} shortly.`}),u==null||u(y,{direct:!1,live:g.submitted.status==="approved"})):(g.paper&&qa(p,g.paper,[s,r]),u==null||u(y,{direct:!0,live:!0})),v()},onError:(g,y,w)=>{var h;(h=w==null?void 0:w.rollback)==null||h.call(w),c({title:f?"Could not submit edit":`Could not save ${i.noun}`,description:xt(g,f?"Failed to submit your edit. Please try again.":i.failure),variant:"destructive"})}})}const $r={task_id:"",dataset_id:"",model_name:"",harness:"",metric_name:"",metric_value:"",original_metrics:{},original_metric_name:"",best_rank:"",num_parameters:"",hf_model_url:"",is_open:!0,operation:"create"};function Ir(t){return(t??[]).some(s=>s.slug==="coding-agents"||s.name.trim().toLowerCase()==="coding agents")}function Qt(t,s){return{...t,...s,operation:t.operation==="unchanged"?"update":t.operation}}function Rr({onOpenChange:t,paperId:s,arxivId:r,initialEvaluations:a,paperTasks:i,submitMode:d="direct",isAdmin:o=!1,isAuthor:l=!1}){const u=b.useId(),v=Ir(i),[p,c]=b.useState(null),f=b.useMemo(()=>jr(a),[a]),g=p??f,[y,w]=b.useState(!1),h=y?ys(g):[],[x,n]=b.useState(null),m=Er(g,a),j=Z(),{toast:S}=J(),E=W({editType:"evaluations",paperId:s,arxivId:r,submitMode:d,messages:{proposal:"evaluation changes",noun:"evaluations",failure:"Failed to update evaluations."},toPendingPayload:P=>({operations:P}),applyDirect:async P=>{if(!o&&P.length>50)throw new Error("Contributor evaluation batches are limited to 50 operations; contact an admin.");const N=Number(s);await $e.batch(N,Nr(N,P))},onSaved:(P,{live:N})=>{N&&za(j,Ma(s,a,P,r))},onClose:()=>t(!1)}),C=(P,N)=>c(g.map((_,I)=>I===P?N(_):_)),R=P=>{if(!g[P].id){c(g.filter((N,_)=>_!==P));return}window.confirm("Delete this evaluation? You will be asked to sign in again if your session is older than 15 minutes.")&&C(P,N=>({...N,operation:"delete"}))},L=(P,N,_)=>{C(P,I=>{if(I[N]===_)return I;const $={[N]:_};return(N==="task_id"||N==="dataset_id")&&Object.assign($,{original_metrics:{},original_metric_name:"",metric_value:"",best_rank:"",metric_name:""}),N==="task_id"&&Object.assign($,{dataset_id:"",harness:""}),N==="dataset_id"&&_&&!m.supportsHarness(I.task_id,_)&&($.harness=""),Qt(I,$)})},B=()=>{w(!0);const P=_r(g,m.supportsHarness);if(P.valid){if(P.operations.length===0){S({title:"No changes to submit",description:"Your evaluation list matches the existing data."});return}E.mutate(P.operations)}},H=P=>g.slice(0,P+1).filter(N=>N.operation!=="delete").length;return e.jsxs(e.Fragment,{children:[e.jsxs(V,{title:"Edit Evaluation Results",description:"Add, edit, or remove evaluation results for this paper. Each row represents a benchmark result.",className:"max-w-6xl max-h-[800px]",submitMode:d,isAuthor:l,onOpenChange:t,onSave:B,isSaving:E.isPending,saveDisabled:!m.harnessSupportKnown,footerStart:e.jsxs("div",{className:"flex flex-wrap gap-2 sm:mr-auto",children:[e.jsx(A,{variant:"ghost",onClick:()=>n("benchmark"),children:"Suggest a new benchmark"}),e.jsx(A,{variant:"ghost",onClick:()=>n("metric"),children:"Suggest a new metric"})]}),children:[h.length>0&&e.jsxs("div",{role:"alert",className:"text-sm text-destructive",children:["Fix the following errors before saving. No changes have been submitted.",e.jsx("ul",{children:h.map(P=>e.jsxs("li",{children:["Row ",H(P.rowIndex),": ",P.message]},`${P.rowIndex}-${P.field}`))})]}),m.datasetListError&&e.jsxs("p",{className:"text-sm text-destructive",children:["Could not load the benchmarks for these tasks: ",m.datasetListError.message]}),e.jsxs("div",{className:"py-4 overflow-y-auto max-h-[600px]",children:[g.some(P=>P.operation!=="delete")?e.jsx(Cr,{rows:g,catalog:m,draftErrors:h,errorId:u,isAdmin:o,showHarnessColumn:v,onFieldChange:L,onOpenSourceChange:(P,N)=>C(P,_=>Qt(_,{is_open:N})),onDelete:R}):e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(Ka,{className:"w-12 h-12 mx-auto mb-3 opacity-30"}),e.jsx("p",{children:"No evaluation results yet"}),e.jsx("p",{className:"text-sm mt-2",children:'Click "Add Row" below to add a new evaluation'})]}),e.jsx("div",{className:"mt-4",children:e.jsxs(A,{variant:"outline",size:"sm",onClick:()=>c([...g,$r]),className:"flex items-center space-x-2",children:[e.jsx(ge,{className:"w-4 h-4"}),e.jsx("span",{children:"Add Row"})]})})]})]}),e.jsx(ms,{open:x!==null,onOpenChange:P=>{P||n(null)},paperId:s,kind:x??"benchmark"})]})}const tt=[{key:"hf_models",label:"Models",placeholder:"https://huggingface.co/org/model"},{key:"hf_datasets",label:"Datasets",placeholder:"https://huggingface.co/datasets/org/data"},{key:"hf_spaces",label:"Spaces",placeholder:"https://huggingface.co/spaces/org/demo"}];function Xt(t){return t.map(s=>s.trim()).filter(Boolean)}function st(t,s){const r=Xt(t).sort(),a=Xt(s).sort();return r.length!==a.length?!1:r.every((i,d)=>i===a[d])}function Ar(t,s){return st(t.hf_models,s.hf_models)&&st(t.hf_datasets,s.hf_datasets)&&st(t.hf_spaces,s.hf_spaces)}function Lr({onOpenChange:t,paperId:s,arxivId:r,initialArtifacts:a,submitMode:i="direct",isAuthor:d=!1}){const[o,l]=b.useState(a),[u,v]=b.useState({hf_models:"",hf_datasets:"",hf_spaces:""}),p=W({editType:"hf_artifacts",paperId:s,arxivId:r,submitMode:i,messages:{proposal:"Hugging Face artifact changes",noun:"Hugging Face artifacts",failure:"Failed to update Hugging Face artifacts."},toPendingPayload:h=>h,applyDirect:h=>U.updateHfArtifacts(s,h),onClose:()=>t(!1)}),c=()=>{const h={hf_models:[...o.hf_models],hf_datasets:[...o.hf_datasets],hf_spaces:[...o.hf_spaces]};for(const{key:x}of tt){const n=u[x].trim();if(n){if(h[x].some(m=>m.trim()===n))return alert(`This ${x.replace("hf_","")} URL is already added`),null;h[x]=[...h[x],n]}}return h},f=h=>{const x=u[h].trim();if(x){if(o[h].some(n=>n.trim()===x)){alert(`This ${h.replace("hf_","")} URL is already added`);return}l(n=>({...n,[h]:[...n[h],x]})),v(n=>({...n,[h]:""}))}},g=(h,x)=>{l(n=>({...n,[h]:n[h].filter(m=>m!==x)}))},y=()=>{const h=c();if(h===null)return;const x=Object.keys(a).some(n=>a[n].some(m=>!h[n].includes(m)));i==="direct"&&x&&!window.confirm("Remove one or more Hugging Face artifact links?")||p.mutate(h)},w=b.useMemo(()=>{const h={hf_models:[...o.hf_models],hf_datasets:[...o.hf_datasets],hf_spaces:[...o.hf_spaces]};for(const{key:x}of tt){const n=u[x].trim();if(n){if(h[x].some(m=>m.trim()===n))return!1;h[x]=[...h[x],n]}}return!Ar(h,a)},[o,u,a]);return e.jsx(V,{title:"Edit Hugging Face Artifacts",description:"Add or remove linked Hugging Face models, datasets, and Spaces for this paper.",className:"max-w-2xl max-h-[700px]",submitMode:i,isAuthor:d,onOpenChange:t,onSave:y,isSaving:p.isPending,saveDisabled:!w,children:e.jsx("div",{className:"space-y-6 py-2 overflow-y-auto max-h-[460px]",children:tt.map(({key:h,label:x,placeholder:n})=>e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium",children:x}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(z,{type:"url",placeholder:n,value:u[h],onChange:m=>v(j=>({...j,[h]:m.target.value})),onKeyPress:m=>{m.key==="Enter"&&(m.preventDefault(),f(h))},className:"flex-1"}),e.jsxs(A,{onClick:()=>f(h),size:"sm",disabled:!u[h].trim(),children:[e.jsx(ge,{className:"w-4 h-4 mr-1"}),"Add"]})]}),o[h].length>0?e.jsx("div",{className:"space-y-2",children:o[h].map(m=>e.jsxs("div",{className:"flex items-center space-x-2 p-3 bg-muted/30 rounded-lg hover:bg-muted/50 transition-colors",children:[e.jsx("span",{className:"text-sm font-medium text-paper-blue truncate flex-1",children:m}),e.jsx(A,{variant:"ghost",size:"sm",onClick:()=>g(h,m),className:"h-8 px-2 text-destructive hover:text-destructive",title:`Remove ${x.toLowerCase()} URL`,children:e.jsx(fe,{className:"w-4 h-4"})})]},m))}):e.jsxs("div",{className:"text-xs text-muted-foreground",children:["No ",x.toLowerCase()," linked yet."]})]},h))})})}const _s=["image/jpeg","image/png","image/webp","image/gif"],Tr=2*1024*1024;function Dr(t){return _s.includes(t.type)?t.size>Tr?Promise.reject(new Error("Logo must be 2 MB or smaller.")):new Promise((s,r)=>{const a=new FileReader;a.onload=()=>s({file_name:t.name,mime_type:t.type,data_url:String(a.result)}),a.onerror=()=>r(new Error("Could not read that logo.")),a.readAsDataURL(t)}):Promise.reject(new Error("Choose a JPEG, PNG, WebP, or GIF logo."))}function Fr({paperId:t,initialName:s,onApplied:r,onUnsentChange:a}){const[i,d]=b.useState(s),[o,l]=b.useState(""),[u,v]=b.useState(""),[p,c]=b.useState(null),[f,g]=b.useState(""),y=ae({mutationFn:()=>hs.submit(ps(Number(t),"new_organization",{name:i.trim(),...o.trim()?{hf_slug:o.trim()}:{},...u.trim()?{website_url:u.trim()}:{},...p?{image:p}:{}})),onSuccess:h=>{h.status==="approved"&&r(i.trim())}}),w=!y.isSuccess&&!!(o.trim()||u.trim()||p);return b.useEffect(()=>a(w),[a,w]),b.useEffect(()=>()=>a(!1),[a]),y.isSuccess?e.jsxs("p",{className:"rounded border p-3 text-sm",children:['Thanks! "',i.trim(),'" was submitted for review. Once an admin approves it, the organization is created and added to this paper.']}):e.jsxs("form",{className:"space-y-2 rounded border p-3",onSubmit:h=>{h.preventDefault(),y.mutate()},children:[e.jsx("p",{className:"text-sm font-medium",children:"Suggest a new organization"}),e.jsx(z,{"aria-label":"Organization name",placeholder:"Name",value:i,maxLength:200,onChange:h=>d(h.target.value)}),e.jsx(z,{"aria-label":"Hugging Face organization",placeholder:"Hugging Face organization (e.g. https://huggingface.co/PrimeIntellect)",value:o,onChange:h=>l(h.target.value)}),e.jsx(z,{"aria-label":"Website",type:"url",placeholder:"Website (e.g. https://www.primeintellect.ai)",value:u,onChange:h=>v(h.target.value)}),e.jsxs("label",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:["Logo (optional)",e.jsx("input",{"aria-label":"Logo",type:"file",accept:_s.join(","),onChange:h=>{var n;const x=(n=h.target.files)==null?void 0:n[0];c(null),g(""),x&&Dr(x).then(c,m=>g(m.message))}})]}),p&&e.jsx("img",{src:p.data_url,alt:"Selected logo",className:"h-12 w-12 rounded border object-contain"}),f&&e.jsx("p",{className:"text-sm text-destructive",children:f}),e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"With a Hugging Face organization it is added right away; otherwise an admin reviews it."}),e.jsx(A,{type:"submit",variant:"outline",disabled:!i.trim()||!o.trim()&&!u.trim()||y.isPending,children:y.isPending?"Submitting...":"Submit organization"})]}),y.error&&e.jsx("p",{className:"text-sm text-destructive",children:xt(y.error,"Could not submit this organization.")})]})}const Ur=({onOpenChange:t,paperId:s,arxivId:r,initialOrganizationIds:a,submitMode:i="direct",isAuthor:d})=>{var n;const[o,l]=b.useState(a),[u,v]=b.useState(""),[p,c]=b.useState(!1),f=Z(),{toast:g}=J(),y=Q({queryKey:[...Lt.organizations,"curation"],queryFn:()=>G.organizations(!1)}),w=b.useMemo(()=>{var S,E;const m=u.trim().toLocaleLowerCase();if(!m)return((S=y.data)==null?void 0:S.results)??[];const j=C=>C===m?0:C.startsWith(m)?1:C.split(/[^\p{L}\p{N}]+/u).some(R=>R.startsWith(m))?2:3;return(((E=y.data)==null?void 0:E.results)??[]).map(C=>({organization:C,name:C.name.toLocaleLowerCase()})).filter(({name:C})=>C.includes(m)).sort((C,R)=>j(C.name)-j(R.name)).map(({organization:C})=>C)},[(n=y.data)==null?void 0:n.results,u]),h=W({editType:"organizations",paperId:s,arxivId:r,submitMode:i,messages:{proposal:"organization changes",noun:"organizations",failure:"Failed to update organizations."},toPendingPayload:m=>({organization_ids:m}),applyDirect:m=>U.updateOrganizations(s,m),onClose:()=>t(!1)}),x=()=>{a.some(m=>!o.includes(m))&&!window.confirm("Remove one or more organizations from this paper? Destructive edits may require a fresh sign-in.")||h.mutate(o)};return e.jsxs(V,{title:"Edit organizations",description:"Associate organizations with this paper. If one is missing, search for it and suggest it for review.",submitMode:i,isAuthor:d,onOpenChange:t,onSave:x,isSaving:h.isPending,saveDisabled:p,children:[e.jsxs("div",{className:"relative",children:[e.jsx(lt,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),e.jsx(z,{type:"search","aria-label":"Search organizations",placeholder:"Search organizations...",value:u,onChange:m=>v(m.target.value),className:"pl-9 pr-9"}),u&&e.jsx("button",{type:"button",onClick:()=>v(""),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 text-muted-foreground hover:text-foreground","aria-label":"Clear organization search",children:e.jsx(ns,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"max-h-80 space-y-2 overflow-auto",children:[w.map(m=>{const j=Number(m.id);return e.jsxs("label",{className:"flex items-center gap-2 rounded border p-2",children:[e.jsx("input",{type:"checkbox",checked:o.includes(j),onChange:S=>l(E=>S.target.checked?[...E,j]:E.filter(C=>C!==j))}),m.name]},m.id)}),!y.isLoading&&w.length===0&&e.jsx("p",{className:"py-8 text-center text-sm text-muted-foreground",children:u.trim()?`No organizations found matching "${u.trim()}"`:"No organizations available"})]}),!y.isLoading&&w.length===0&&u.trim()&&e.jsx(Fr,{paperId:s,initialName:u.trim(),onApplied:m=>{t(!1),g({title:"Organization added",description:`Added "${m}" to this paper.`}),fs(f,[s]),gs(f),f.invalidateQueries({queryKey:Lt.organizations})},onUnsentChange:c},u.trim()),p&&e.jsx("p",{className:"text-sm text-muted-foreground",children:"Submit the organization above, or clear the search, before saving."})]})};function Br({onOpenChange:t,paperId:s,arxivId:r,initialProjectPages:a,submitMode:i="direct",isAuthor:d=!1}){const[o,l]=b.useState(a),[u,v]=b.useState(""),p=W({editType:"project_pages",paperId:s,arxivId:r,submitMode:i,messages:{proposal:"project page changes",noun:"project pages",failure:"Failed to update project pages."},toPendingPayload:x=>({project_pages:x}),applyDirect:x=>U.updateProjectPages(s,x),onClose:()=>t(!1)}),c=()=>{const x=u.trim();return x?o.some(n=>n.url===x)?(alert("This project page URL is already added"),null):[...o,{url:x,is_official:!1}]:o},f=()=>{const x=c();x!==null&&x.length!==o.length&&(l(x),v(""))},g=x=>{l(o.filter(n=>n.url!==x))},y=x=>{l(o.map(n=>n.url===x?{...n,is_official:!n.is_official}:n))},w=()=>{const x=c();x!==null&&(i==="direct"&&a.some(n=>!x.some(m=>m.url===n.url))&&!window.confirm("Remove one or more project pages from this paper?")||p.mutate(x))},h=b.useMemo(()=>{const x=u.trim(),n=x?[...o,{url:x,is_official:!1}]:o;if(n.length!==a.length)return!0;const m=new Map(a.map(j=>[j.url.trim(),!!j.is_official]));return n.some(j=>{const S=m.get(j.url.trim());return S===void 0||S!==!!j.is_official})},[o,u,a]);return e.jsxs(V,{title:"Edit Paper Project Pages",description:"Add or remove project page URLs (e.g. authors' demo or landing pages) associated with this paper. Mark pages as official if they are created by the paper authors.",className:"max-w-2xl max-h-[600px]",submitMode:i,isAuthor:d,onOpenChange:t,onSave:w,isSaving:p.isPending,saveDisabled:!h,children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium",children:"Add Project Page URL"}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(z,{type:"url",placeholder:"https://example.com/project",value:u,onChange:x=>v(x.target.value),onKeyPress:x=>{x.key==="Enter"&&(x.preventDefault(),f())},className:"flex-1"}),e.jsxs(A,{onClick:f,size:"sm",disabled:!u.trim(),children:[e.jsx(ge,{className:"w-4 h-4 mr-1"}),"Add"]})]})]}),e.jsx("div",{className:"py-4 overflow-y-auto max-h-[350px]",children:o.length>0?e.jsx("div",{className:"space-y-2",children:o.map((x,n)=>e.jsxs("div",{className:"flex items-center space-x-2 p-3 bg-muted/30 rounded-lg hover:bg-muted/50 transition-colors",children:[e.jsx(Mt,{className:"w-4 h-4 text-muted-foreground flex-shrink-0"}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("span",{className:"text-sm font-medium text-paper-blue truncate",children:x.url}),x.is_official&&e.jsx(xs,{variant:"secondary",className:"text-xs",children:"Official"})]})}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsxs(A,{variant:x.is_official?"default":"outline",size:"sm",onClick:()=>y(x.url),className:"h-8 px-2 text-xs",title:x.is_official?"Click to unmark as official (created by paper authors)":"Click to mark as official (created by paper authors)",children:[e.jsx(js,{className:`w-3.5 h-3.5 mr-1 ${x.is_official?"fill-current":""}`}),x.is_official?"Official":"Mark official"]}),e.jsx(A,{variant:"ghost",size:"sm",onClick:()=>g(x.url),className:"h-8 px-2 text-destructive hover:text-destructive",title:"Remove project page",children:e.jsx(fe,{className:"w-4 h-4"})})]})]},n))}):e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(Mt,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),e.jsx("p",{className:"text-sm",children:"No project pages added yet"}),e.jsx("p",{className:"text-xs mt-1",children:"Add a project page URL above to get started"})]})})]})}function zr({onOpenChange:t,paperId:s,arxivId:r,initialRepositories:a,submitMode:i="direct",isAuthor:d=!1}){const[o,l]=b.useState(a),[u,v]=b.useState(""),p=W({editType:"repositories",paperId:s,arxivId:r,submitMode:i,messages:{proposal:"repository changes",noun:"repositories",failure:"Failed to update paper repositories."},toPendingPayload:n=>({repositories:n}),applyDirect:n=>U.updateRepositories(s,n),onClose:()=>t(!1)}),c=n=>{const m=[];for(const j of n){const S=m.find(E=>zt(E.url,j.url));if(S)S.is_official=S.is_official||j.is_official;else{const E=He(j.url);m.push({url:E??j.url.trim(),is_official:j.is_official})}}return m},f=()=>{const n=u.trim(),m=n?[...o,{url:n,is_official:!1}]:o;return n&&o.some(j=>zt(j.url,n))?(alert("This repository URL is already added"),null):c(m)},g=()=>{const n=f();n!==null&&n.length!==o.length&&(l(n),v(""))},y=n=>{l(o.filter(m=>m.url!==n))},w=n=>{l(o.map(m=>m.url===n?{...m,is_official:!m.is_official}:m))},h=()=>{const n=f();n!==null&&(i==="direct"&&a.some(m=>!n.some(j=>j.url===m.url))&&!window.confirm("Remove one or more repositories from this paper?")||p.mutate(n))},x=b.useMemo(()=>{const n=u.trim(),m=n?[...o,{url:n,is_official:!1}]:o;if(m.length!==a.length)return!0;const j=c(a),S=c(m);if(S.length!==j.length)return!0;const E=new Map(j.map(C=>[He(C.url)??C.url.trim(),!!C.is_official]));return S.some(C=>{const R=He(C.url)??C.url.trim(),L=E.get(R);return L===void 0||L!==!!C.is_official})},[o,u,a]);return e.jsxs(V,{title:"Edit Paper Repositories",description:"Add or remove GitHub repository URLs associated with this paper. Mark repositories as official if they are created by the paper authors.",className:"max-w-2xl max-h-[600px]",submitMode:i,isAuthor:d,onOpenChange:t,onSave:h,isSaving:p.isPending,saveDisabled:!x,children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium",children:"Add Repository URL"}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(z,{type:"url",placeholder:"https://github.com/owner/repo",value:u,onChange:n=>v(n.target.value),onKeyPress:n=>{n.key==="Enter"&&(n.preventDefault(),g())},className:"flex-1"}),e.jsxs(A,{onClick:g,size:"sm",disabled:!u.trim(),children:[e.jsx(ge,{className:"w-4 h-4 mr-1"}),"Add"]})]})]}),e.jsx("div",{className:"py-4 overflow-y-auto max-h-[350px]",children:o.length>0?e.jsx("div",{className:"space-y-2",children:o.map((n,m)=>e.jsxs("div",{className:"flex items-center space-x-2 p-3 bg-muted/30 rounded-lg hover:bg-muted/50 transition-colors",children:[e.jsx(Ht,{className:"w-4 h-4 text-muted-foreground flex-shrink-0"}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("span",{className:"text-sm font-medium text-paper-blue truncate",children:n.url}),n.is_official&&e.jsx(xs,{variant:"secondary",className:"text-xs",children:"Official"})]})}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsxs(A,{variant:n.is_official?"default":"outline",size:"sm",onClick:()=>w(n.url),className:"h-8 px-2 text-xs",title:n.is_official?"Click to unmark as official (created by paper authors)":"Click to mark as official (created by paper authors)",children:[e.jsx(js,{className:`w-3.5 h-3.5 mr-1 ${n.is_official?"fill-current":""}`}),n.is_official?"Official":"Mark official"]}),e.jsx(A,{variant:"ghost",size:"sm",onClick:()=>y(n.url),className:"h-8 px-2 text-destructive hover:text-destructive",title:"Remove repository",children:e.jsx(fe,{className:"w-4 h-4"})})]})]},m))}):e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(Ht,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),e.jsx("p",{className:"text-sm",children:"No repositories added yet"}),e.jsx("p",{className:"text-xs mt-1",children:"Add a repository URL above to get started"})]})})]})}function Mr({onOpenChange:t,paperId:s,arxivId:r,initialUrl:a,submitMode:i="direct",isAuthor:d=!1}){const[o,l]=b.useState(a),u=W({editType:"source_url",paperId:s,arxivId:r,submitMode:i,messages:{proposal:"source URL change",noun:"source URL",failure:"Failed to update source URL."},toPendingPayload:g=>({source_url:g}),applyDirect:g=>U.updateSourceUrl(s,g),onClose:()=>t(!1)}),v=o.trim(),p=/^https?:\/\//i.test(v),c=v!==(a||"").trim(),f=()=>{p&&u.mutate(v)};return e.jsx(V,{title:"Edit Source URL",description:'Update the canonical URL for this external paper. This is the page the "Source page" button links to. ArXiv papers cannot edit this field.',className:"max-w-2xl",submitMode:i,isAuthor:d,onOpenChange:t,onSave:f,isSaving:u.isPending,saveDisabled:!p||!c,children:e.jsxs("div",{className:"space-y-2 py-2",children:[e.jsx("label",{className:"text-sm font-medium",children:"Source URL"}),e.jsx(z,{type:"url",placeholder:"https://example.com/paper",value:o,onChange:g=>l(g.target.value),onKeyPress:g=>{g.key==="Enter"&&p&&c&&(g.preventDefault(),f())}}),!p&&v.length>0&&e.jsx("p",{className:"text-xs text-destructive",children:"URL must start with http:// or https://"})]})})}var De="Checkbox",[Hr]=bt(De),[Or,yt]=Hr(De);function qr(t){const{__scopeCheckbox:s,checked:r,children:a,defaultChecked:i,disabled:d,form:o,name:l,onCheckedChange:u,required:v,value:p="on",internal_do_not_use_render:c}=t,[f,g]=os({prop:r,defaultProp:i??!1,onChange:u,caller:De}),[y,w]=b.useState(null),[h,x]=b.useState(null),n=b.useRef(!1),m=y?!!o||!!y.closest("form"):!0,j={checked:f,disabled:d,setChecked:g,control:y,setControl:w,name:l,form:o,value:p,hasConsumerStoppedPropagationRef:n,required:v,defaultChecked:X(i)?!1:i,isFormControl:m,bubbleInput:h,setBubbleInput:x};return e.jsx(Or,{scope:s,...j,children:Kr(c)?c(j):a})}var ks="CheckboxTrigger",Ns=b.forwardRef(({__scopeCheckbox:t,onKeyDown:s,onClick:r,...a},i)=>{const{control:d,value:o,disabled:l,checked:u,required:v,setControl:p,setChecked:c,hasConsumerStoppedPropagationRef:f,isFormControl:g,bubbleInput:y}=yt(ks,t),w=pe(i,p),h=b.useRef(u);return b.useEffect(()=>{const x=d==null?void 0:d.form;if(x){const n=()=>c(h.current);return x.addEventListener("reset",n),()=>x.removeEventListener("reset",n)}},[d,c]),e.jsx(ee.button,{type:"button",role:"checkbox","aria-checked":X(u)?"mixed":u,"aria-required":v,"data-state":Ps(u),"data-disabled":l?"":void 0,disabled:l,value:o,...a,ref:w,onKeyDown:he(s,x=>{x.key==="Enter"&&x.preventDefault()}),onClick:he(r,x=>{c(n=>X(n)?!0:!n),y&&g&&(f.current=x.isPropagationStopped(),f.current||x.stopPropagation())})})});Ns.displayName=ks;var _t=b.forwardRef((t,s)=>{const{__scopeCheckbox:r,name:a,checked:i,defaultChecked:d,required:o,disabled:l,value:u,onCheckedChange:v,form:p,...c}=t;return e.jsx(qr,{__scopeCheckbox:r,checked:i,defaultChecked:d,disabled:l,required:o,onCheckedChange:v,name:a,form:p,value:u,internal_do_not_use_render:({isFormControl:f})=>e.jsxs(e.Fragment,{children:[e.jsx(Ns,{...c,ref:s,__scopeCheckbox:r}),f&&e.jsx(Es,{__scopeCheckbox:r})]})})});_t.displayName=De;var ws="CheckboxIndicator",Cs=b.forwardRef((t,s)=>{const{__scopeCheckbox:r,forceMount:a,...i}=t,d=yt(ws,r);return e.jsx(is,{present:a||X(d.checked)||d.checked===!0,children:e.jsx(ee.span,{"data-state":Ps(d.checked),"data-disabled":d.disabled?"":void 0,...i,ref:s,style:{pointerEvents:"none",...t.style}})})});Cs.displayName=ws;var Ss="CheckboxBubbleInput",Es=b.forwardRef(({__scopeCheckbox:t,...s},r)=>{const{control:a,hasConsumerStoppedPropagationRef:i,checked:d,defaultChecked:o,required:l,disabled:u,name:v,value:p,form:c,bubbleInput:f,setBubbleInput:g}=yt(Ss,t),y=pe(r,g),w=bs(d),h=ls(a);b.useEffect(()=>{const n=f;if(!n)return;const m=window.HTMLInputElement.prototype,S=Object.getOwnPropertyDescriptor(m,"checked").set,E=!i.current;if(w!==d&&S){const C=new Event("click",{bubbles:E});n.indeterminate=X(d),S.call(n,X(d)?!1:d),n.dispatchEvent(C)}},[f,w,d,i]);const x=b.useRef(X(d)?!1:d);return e.jsx(ee.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??x.current,required:l,disabled:u,name:v,value:p,form:c,...s,tabIndex:-1,ref:y,style:{...s.style,...h,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Es.displayName=Ss;function Kr(t){return typeof t=="function"}function X(t){return t==="indeterminate"}function Ps(t){return X(t)?"indeterminate":t?"checked":"unchecked"}const kt=b.forwardRef(({className:t,style:s,...r},a)=>e.jsx(_t,{ref:a,className:Ce("peer h-4 w-4 shrink-0 rounded-sm ring-offset-background data-[state=checked]:!bg-black data-[state=checked]:!text-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),style:{border:"1px solid #000",...s},...r,children:e.jsx(Cs,{className:Ce("flex items-center justify-center text-current"),children:e.jsx(gt,{className:"h-4 w-4"})})}));kt.displayName=_t.displayName;const Gr=250,Qr=100,Xr={editType:"tasks",singular:"task",plural:"tasks",title:"Edit Paper Tasks",description:"Select the tasks that this paper addresses. You can select multiple tasks.",search:t=>G.listTasks(t),toPendingPayload:t=>({task_ids:t}),applyDirect:(t,s)=>U.updateTasks(t,s),patchPaper:(t,s)=>({...t,tasks:[...s].sort((r,a)=>r.name.localeCompare(a.name))})},Vr={editType:"methods",singular:"method",plural:"methods",title:"Edit Paper Methods",description:"Select the methods and techniques used in this paper. You can select multiple methods.",search:t=>G.listMethods(t),toPendingPayload:t=>({method_ids:t}),applyDirect:(t,s)=>U.updateMethods(t,s),subtitle:t=>t.full_name!==t.name?t.full_name:void 0},Wr=t=>t[0].toUpperCase()+t.slice(1),_e=t=>t.map(s=>Number(s.id));function Vt(t){return t.kind==="task"?e.jsx(Wt,{...t,tagKind:Xr}):e.jsx(Wt,{...t,tagKind:Vr})}function Wt({tagKind:t,onOpenChange:s,paperId:r,arxivId:a,initialItems:i,submitMode:d="direct",isAuthor:o=!1}){const{singular:l,plural:u,patchPaper:v}=t,[p,c]=b.useState(i),[f,g]=b.useState(!1),[y,w]=b.useState(""),[h,x]=b.useState(""),n=Z(),{toast:m}=J();b.useEffect(()=>{const N=window.setTimeout(()=>{x(y.trim())},Gr);return()=>window.clearTimeout(N)},[y]);const{data:j,isFetching:S}=Q({queryKey:[`${u}-search`,h],queryFn:()=>t.search({page_size:Qr,...h?{q:h}:{}})}),E=W({editType:t.editType,paperId:r,arxivId:a,submitMode:d,messages:{proposal:`${l} changes`,noun:u,failure:`Failed to update paper ${u}.`},toPendingPayload:N=>t.toPendingPayload(_e(N)),applyDirect:N=>t.applyDirect(r,_e(N)),applyOptimistic:v&&(async N=>{const _=[...new Set([r,a].filter($=>!!$))].flatMap($=>[me.detail($),me.arxiv($)]);await Promise.all(_.map($=>n.cancelQueries({queryKey:$})));const I=_.map($=>({key:$,data:n.getQueryData($)}));return I.forEach(({key:$,data:T})=>{T&&n.setQueryData($,v(T,N))}),()=>I.forEach(({key:$,data:T})=>n.setQueryData($,T))}),onSaved:(N,{direct:_})=>{_&&m({title:`${Wr(u)} updated`,description:`Saved ${N.length} ${N.length===1?l:u} for this paper.`})},onClose:()=>s(!1)}),C=b.useMemo(()=>new Set(_e(p)),[p]),R=b.useMemo(()=>_e(i),[i]),L=b.useMemo(()=>{const N=(j==null?void 0:j.results)??[],_=h?[...N,...p]:[...p,...N];return _.filter((I,$)=>_.findIndex(({id:T})=>T===I.id)===$)},[j,p,h]),B=p.length!==R.length||R.some(N=>!C.has(N)),H=()=>{d==="direct"&&R.some(N=>!C.has(N))&&!window.confirm(`Remove one or more ${l} links from this paper?`)||E.mutate(p)},P=(N,_)=>{c(I=>_?I.some($=>$.id===N.id)?I:[...I,N]:I.filter($=>$.id!==N.id))};return e.jsxs(e.Fragment,{children:[e.jsxs(V,{title:t.title,description:t.description,className:"max-w-2xl max-h-[600px]",submitMode:d,isAuthor:o,onOpenChange:s,onSave:H,isSaving:E.isPending,saveDisabled:!B,footerStart:e.jsxs(A,{variant:"ghost",className:"sm:mr-auto",onClick:()=>g(!0),children:["Suggest a new ",l]}),children:[e.jsxs("div",{className:"relative mb-4",children:[e.jsx(lt,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(z,{type:"text",placeholder:`Search ${u}...`,value:y,onChange:N=>w(N.target.value),className:"pl-9 pr-9"}),y&&e.jsx("button",{type:"button",onClick:()=>w(""),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 text-muted-foreground hover:text-foreground","aria-label":"Clear search",children:e.jsx(ns,{className:"w-4 h-4"})})]}),e.jsx("div",{className:"py-4 overflow-y-auto max-h-[400px]",children:L.length>0?e.jsx("div",{className:"space-y-2",children:L.map(N=>{var I;const _=(I=t.subtitle)==null?void 0:I.call(t,N);return e.jsxs("div",{className:"flex items-center space-x-2 p-2 hover:bg-muted/50 rounded-md",children:[e.jsx(kt,{id:`${l}-${N.id}`,checked:C.has(Number(N.id)),onCheckedChange:$=>P(N,$===!0),className:"!border !border-black data-[state=checked]:!bg-black data-[state=checked]:!text-white"}),e.jsxs("label",{htmlFor:`${l}-${N.id}`,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer flex-1",children:[N.name,_&&e.jsx("span",{className:"block text-xs text-muted-foreground font-normal",children:_}),N.description&&e.jsxs("span",{className:"block text-xs text-muted-foreground font-normal mt-1",children:[N.description.substring(0,100),N.description.length>100?"...":""]})]})]},N.id)})}):S?e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(vt,{className:"w-8 h-8 mx-auto mb-2 animate-spin"}),e.jsxs("p",{children:["Loading ",u,"..."]})]}):e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(lt,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),e.jsx("p",{children:h?`No ${u} found matching "${h}"`:`No ${u} available`})]})})]}),e.jsx(ms,{open:f,onOpenChange:g,paperId:r,kind:l})]})}const Yt=10,Yr=/^https?:\/\/(?:www\.|mobile\.)?(?:x|twitter)\.com\/(?:[A-Za-z0-9_]{1,15}|i\/web|i)\/status(?:es)?\/(\d{1,25})(?:[/?#].*)?$/;function te(t){var s;return((s=Yr.exec(t.trim()))==null?void 0:s[1])??null}function Jr({onOpenChange:t,paperId:s,arxivId:r,initialUrls:a,submitMode:i="direct",isAuthor:d=!1}){const[o,l]=b.useState(a),[u,v]=b.useState(""),[p,c]=b.useState(null),f=W({editType:"x_threads",paperId:s,arxivId:r,submitMode:i,messages:{proposal:"X threads",noun:"X threads",failure:"Failed to update X threads."},toPendingPayload:n=>({x_threads:n}),applyDirect:n=>U.updateXThreads(s,n),onClose:()=>t(!1)}),g=()=>{const n=u.trim();if(!n)return o;const m=te(n);return m?o.some(j=>te(j)===m)?(c("This post is already listed."),null):o.length>=Yt?(c(`A paper can link at most ${Yt} X threads.`),null):[...o,n]:(c("Paste a post URL such as https://x.com/user/status/123…"),null)},y=()=>{const n=g();n!==null&&(l(n),v(""),c(null))},w=(n,m)=>{const j=[...o];[j[n],j[n+m]]=[j[n+m],j[n]],l(j)},h=()=>{const n=g();n!==null&&(i==="direct"&&a.some(m=>!n.some(j=>te(j)===te(m)))&&!window.confirm("Remove one or more X threads from this paper?")||f.mutate(n))},x=b.useMemo(()=>(u.trim()?[...o,u.trim()]:o).map(te).join()!==a.map(te).join(),[o,u,a]);return e.jsxs(V,{title:"Edit X threads",description:"Link posts on X (formerly Twitter) in which the authors introduce this paper. A preview of each post is shown on the paper page.",className:"max-w-2xl max-h-[600px]",submitMode:i,isAuthor:d,onOpenChange:t,onSave:h,isSaving:f.isPending,saveDisabled:!x,children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium",htmlFor:"x-thread-url",children:"Add X post URL"}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(z,{id:"x-thread-url",type:"url",placeholder:"https://x.com/user/status/1234567890",value:u,onChange:n=>{v(n.target.value),c(null)},onKeyDown:n=>{n.key==="Enter"&&(n.preventDefault(),y())},"aria-invalid":!!p,className:"flex-1"}),e.jsxs(A,{onClick:y,size:"sm",disabled:!u.trim(),children:[e.jsx(ge,{className:"w-4 h-4 mr-1"}),"Add"]})]}),p&&e.jsx("p",{className:"text-xs text-destructive",children:p})]}),e.jsx("div",{className:"py-4 overflow-y-auto max-h-[350px]",children:o.length>0?e.jsx("div",{className:"space-y-2",children:o.map((n,m)=>e.jsxs("div",{className:"flex items-center space-x-2 p-3 bg-muted/30 rounded-lg",children:[e.jsx("span",{className:"flex-1 min-w-0 truncate text-sm font-medium",children:n}),e.jsx(A,{variant:"ghost",size:"sm",className:"h-8 px-2",disabled:m===0,onClick:()=>w(m,-1),"aria-label":"Move up",children:e.jsx(er,{className:"w-4 h-4"})}),e.jsx(A,{variant:"ghost",size:"sm",className:"h-8 px-2",disabled:m===o.length-1,onClick:()=>w(m,1),"aria-label":"Move down",children:e.jsx(Za,{className:"w-4 h-4"})}),e.jsx(A,{variant:"ghost",size:"sm",className:"h-8 px-2 text-destructive hover:text-destructive",onClick:()=>l(o.filter(j=>j!==n)),"aria-label":"Remove X thread",children:e.jsx(fe,{className:"w-4 h-4"})})]},n))}):e.jsx("p",{className:"text-center py-8 text-sm text-muted-foreground",children:"No X threads linked yet"})})]})}function Zr({activeEditor:t,arxivId:s,editSubmitMode:r,evaluations:a,isAdmin:i,isLinkedAuthor:d,onOpenChange:o,paper:l}){if(!t)return null;const u={paperId:l.id,arxivId:s,submitMode:r,isAuthor:d,onOpenChange:c=>o(t,c)},v=c=>(c==null?void 0:c.map(({url:f,is_official:g})=>({url:f,is_official:!!g})))??[],p={tasks:()=>e.jsx(Vt,{...u,kind:"task",initialItems:l.tasks??[]}),methods:()=>e.jsx(Vt,{...u,kind:"method",initialItems:l.methods??[]}),repositories:()=>e.jsx(zr,{...u,initialRepositories:v(l.repositories)}),project_pages:()=>e.jsx(Br,{...u,initialProjectPages:v(l.project_pages)}),evaluations:()=>e.jsx(Rr,{...u,initialEvaluations:a,paperTasks:l.tasks??[],isAdmin:i}),source_url:()=>e.jsx(Mr,{...u,initialUrl:l.source_url??l.url_abs??""}),hf_artifacts:()=>e.jsx(Lr,{...u,initialArtifacts:{hf_models:l.hf_models??[],hf_datasets:l.hf_datasets??[],hf_spaces:l.hf_spaces??[]}}),x_threads:()=>{var c;return e.jsx(Jr,{...u,initialUrls:((c=l.x_threads)==null?void 0:c.map(({url:f})=>f))??[]})},organizations:()=>e.jsx(Ur,{...u,initialOrganizationIds:(l.organizations??[]).map(({id:c})=>Number(c))})};return e.jsx(b.Fragment,{children:p[t]()},t)}const en={"add-evals":{trigger:"add evals",running:"adding evals…",complete:"add evals ✓",title:"Add evaluations with Codex",description:t=>e.jsxs(e.Fragment,{children:["Codex will run the repository’s add-evals skill for “",t,"”. It will import only paper-native results onto existing, metric-compatible leaderboards. Accepted rows are written directly to the live database."]}),notice:"Comparator rows, unknown benchmarks, and unconfigured metrics will be skipped. Jobs run one at a time in submission order.",progress:"Codex is researching the paper and validating results against the configured leaderboards.",action:"Run add-evals"},"enrich-paper":{trigger:"enrich paper",running:"enriching…",complete:"enriched ✓",title:"Enrich paper with Codex",description:t=>e.jsxs(e.Fragment,{children:["Codex will run the repository’s enrich-paper skill for “",t,"”. It will validate official code and project links, merge high-confidence taxonomy tags, and check the paper thumbnail. Accepted changes are written directly to the live database."]}),notice:"Uncertain URLs and missing taxonomy concepts will be reported rather than guessed. Jobs run one at a time in submission order.",progress:"Codex is validating artifacts, taxonomy tags, and thumbnail quality for this paper.",action:"Run enrich-paper"}},Jt=new Set(["queued","dispatching","running","awaiting_markdown"]);function tn({report:t}){return e.jsx("div",{className:"min-w-0 max-h-[50vh] overflow-y-auto overflow-x-hidden rounded-md border bg-muted/40 p-4 text-sm leading-relaxed",children:e.jsx(Qa,{remarkPlugins:[Xa],components:{a:({children:s,...r})=>e.jsx("a",{...r,className:"break-all underline underline-offset-2",target:"_blank",rel:"noreferrer",children:s}),p:({children:s})=>e.jsx("p",{className:"mb-3 break-words last:mb-0",children:s}),ul:({children:s})=>e.jsx("ul",{className:"mb-3 list-disc space-y-1 pl-5 last:mb-0",children:s}),ol:({children:s})=>e.jsx("ol",{className:"mb-3 list-decimal space-y-1 pl-5 last:mb-0",children:s}),h1:({children:s})=>e.jsx("h3",{className:"mb-2 font-semibold",children:s}),h2:({children:s})=>e.jsx("h3",{className:"mb-2 font-semibold",children:s}),h3:({children:s})=>e.jsx("h3",{className:"mb-2 font-semibold",children:s}),code:({children:s})=>e.jsx("code",{className:"break-all rounded bg-background/80 px-1 py-0.5 font-mono text-xs",children:s}),pre:({children:s})=>e.jsx("pre",{className:"mb-3 max-w-full overflow-x-auto whitespace-pre-wrap break-words rounded bg-background/80 p-3 font-mono text-xs last:mb-0",children:s})},children:t})})}function $s({kind:t,paperId:s,paperTitle:r,triggerClassName:a,onComplete:i}){var E;const d=en[t],o=Z(),[l,u]=b.useState(!1),[v,p]=b.useState(null),c=b.useRef(null),f=Q({queryKey:Tt.codexPaperJob(t,v),queryFn:()=>Oe.getPaperJob(t,v),enabled:v!==null,refetchInterval:C=>{var L;const R=(L=C.state.data)==null?void 0:L.status;return R==="awaiting_markdown"?6e4:R&&Jt.has(R)?2e3:!1},retry:!1}),g=C=>{o.setQueryData(Tt.codexPaperJob(t,C.id),C),p(C.id)},y=ae({mutationFn:()=>Oe.startPaperJob(t,s),onSuccess:g}),w=ae({mutationFn:C=>Oe.cancelPaperJob(t,C),onSuccess:g}),h=v?f.data:void 0,x=(h==null?void 0:h.status)==="awaiting_markdown",n=h?Jt.has(h.status):!1,m=f.errorUpdatedAt>f.dataUpdatedAt?f.error:null,j=(E=y.error??w.error??m)==null?void 0:E.message;b.useEffect(()=>{(h==null?void 0:h.status)!=="completed"||c.current===h.id||(c.current=h.id,i())},[h,i]);const S=()=>{p(null),y.reset(),w.reset(),c.current=null};return e.jsxs(Ie,{open:l,onOpenChange:u,children:[e.jsx("button",{type:"button",className:a,onClick:()=>u(!0),children:x?"waiting for Markdown…":n?d.running:(h==null?void 0:h.status)==="completed"?d.complete:d.trigger}),e.jsxs(Re,{className:"max-h-[90vh] w-[calc(100vw-2rem)] min-w-0 max-w-2xl overflow-hidden",children:[e.jsxs(Ae,{className:"min-w-0",children:[e.jsx(Le,{children:d.title}),e.jsx(Te,{children:d.description(r)})]}),h?e.jsxs("div",{className:"min-w-0 space-y-3 overflow-hidden",children:[e.jsxs("div",{className:"font-mono text-xs uppercase tracking-wide text-muted-foreground",children:["Status: ",h.status.replace("_"," ")]}),h.hf_job_url&&e.jsx("a",{className:"text-sm underline",href:h.hf_job_url,target:"_blank",rel:"noreferrer",children:"View Hugging Face Job"}),x&&e.jsxs("div",{className:"rounded-md border bg-muted/40 p-3 text-sm",children:[Ga," You can close this window and return."]}),n&&!x&&e.jsxs("div",{className:"rounded-md border bg-muted/40 p-3 text-sm",children:[h.status==="queued"?"This job is queued and will start after the current Codex job finishes.":d.progress," ","This can take several minutes; you can close this window and return."]}),h.report&&e.jsx(tn,{report:h.report}),h.error&&!x&&e.jsx("div",{className:"rounded-md border border-destructive/40 bg-destructive/10 p-3 text-sm text-destructive",children:h.error})]}):e.jsx("div",{className:"rounded-md border bg-muted/40 p-3 text-sm text-muted-foreground",children:d.notice}),j&&e.jsx("div",{className:"rounded-md border border-destructive/40 bg-destructive/10 p-3 text-sm text-destructive",children:j}),e.jsxs(jt,{children:[e.jsx(A,{variant:"outline",onClick:()=>u(!1),children:n?"Close":"Cancel"}),n&&h&&e.jsx(A,{variant:"outline",onClick:()=>w.mutate(h.id),children:"Cancel job"}),!h&&e.jsx(A,{onClick:()=>y.mutate(),disabled:y.isPending,children:y.isPending?"Starting…":d.action}),h&&!n&&e.jsx(A,{variant:"outline",onClick:S,children:"Run again"})]})]})]})}function we({accent:t,id:s,label:r}){return e.jsxs("div",{className:"section-rule paper-section-anchor",id:s,children:[e.jsx("span",{children:e.jsx("a",{href:`#${s}`,className:"section-anchor-link",children:r})}),t]})}function sn({canCopyBadge:t,canEdit:s,evaluationsByTask:r,evaluationsLoading:a,isAdmin:i,onCopyBadge:d,onEdit:o,onRefresh:l,paper:u,visibleEvaluationCount:v}){return e.jsxs(e.Fragment,{children:[e.jsx(we,{id:"results",label:"Results",accent:e.jsxs("span",{className:"accent",children:[v," benchmarks",t&&e.jsxs("button",{type:"button",className:"edit-link results-badge-copy",onClick:d,title:"Copy live leaderboard badges for your repository README",children:[e.jsx(F,{name:"copy",size:10})," Copy PwC badge"]}),i&&sa()&&e.jsx($s,{kind:"add-evals",triggerClassName:"edit-link",paperId:Number(u.id),paperTitle:u.title,onComplete:l}),s&&e.jsx("button",{type:"button",onClick:o,className:"edit-link",children:"edit"})]})}),a?e.jsx(ue,{className:"h-32 w-full"}):r.length>0?r.map(p=>e.jsxs("div",{className:p.taskSlug?"paper-section-anchor":void 0,id:p.taskSlug?vs(p.taskSlug):void 0,children:[e.jsxs("div",{className:"section-rule",children:[e.jsx("span",{children:p.taskSlug?e.jsxs(e.Fragment,{children:[e.jsx(K,{to:`/tasks/${p.taskSlug}`,children:p.taskName}),e.jsx("a",{href:pr(p.taskSlug),className:"section-anchor-link results-task-permalink","aria-label":`Permalink to ${p.taskName} results on this paper`,title:"Link to this task's results",children:"#"})]}):p.taskName}),e.jsxs("span",{className:"accent",children:[p.rows.length," ",p.rows.length===1?"result":"results"]})]}),e.jsxs("table",{className:"results-table",children:[e.jsxs("colgroup",{children:[e.jsx("col",{style:{width:"28%"}}),e.jsx("col",{style:{width:"28%"}}),e.jsx("col",{style:{width:"14%"}}),e.jsx("col",{style:{width:"12%"}}),e.jsx("col",{style:{width:"8%"}}),e.jsx("col",{style:{width:"10%"}})]}),e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Benchmark"}),e.jsx("th",{children:"Model"}),e.jsx("th",{children:"Metric"}),e.jsx("th",{children:"Value"}),e.jsx("th",{children:"Rank"}),e.jsx("th",{children:"Compare"})]})}),e.jsx("tbody",{children:p.rows.map(c=>{var f;return e.jsxs("tr",{children:[e.jsx("td",{className:"benchmark",children:c.dataset_slug?e.jsx(K,{to:`/benchmark/${c.dataset_slug}`,children:c.dataset_name||"—"}):c.dataset_name||"—"}),e.jsxs("td",{className:"model",title:c.model_name||void 0,children:[c.hf_model_url?e.jsx("a",{href:c.hf_model_url,target:"_blank",rel:"noopener noreferrer",className:"model-hf-link",title:`Open ${c.model_name||"model"} on Hugging Face`,children:c.model_name||"—"}):c.model_name||"—",c.is_open===!1&&e.jsx(ka,{}),(c.external??c.is_external)&&e.jsx(Na,{sourceUrl:c.source_url||c.external_source_url||c.result_url})]}),e.jsx("td",{className:"metric",children:c.best_metric}),e.jsx("td",{className:"value",children:aa((f=c.metrics)==null?void 0:f[c.best_metric||""])}),e.jsx("td",{className:"rank",children:c.best_rank!=null?`#${c.best_rank}`:"—"}),e.jsx("td",{className:"compare",children:c.dataset_slug&&e.jsx(K,{to:`/benchmark/${c.dataset_slug}?${[c.task_slug?`task=${encodeURIComponent(c.task_slug)}`:"",`eval=${encodeURIComponent(c.id)}`].filter(Boolean).join("&")}`,children:"Compare →"})})]},c.id)})})]})]},p.taskId)):e.jsx("p",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-faint)"},children:"No benchmark results recorded yet."})]})}var Nt="Radio",[an,Is]=bt(Nt),[rn,nn]=an(Nt),Rs=b.forwardRef((t,s)=>{const{__scopeRadio:r,name:a,checked:i=!1,required:d,disabled:o,value:l="on",onCheck:u,form:v,...p}=t,[c,f]=b.useState(null),g=pe(s,h=>f(h)),y=b.useRef(!1),w=c?v||!!c.closest("form"):!0;return e.jsxs(rn,{scope:r,checked:i,disabled:o,children:[e.jsx(ee.button,{type:"button",role:"radio","aria-checked":i,"data-state":Ds(i),"data-disabled":o?"":void 0,disabled:o,value:l,...p,ref:g,onClick:he(t.onClick,h=>{i||u==null||u(),w&&(y.current=h.isPropagationStopped(),y.current||h.stopPropagation())})}),w&&e.jsx(Ts,{control:c,bubbles:!y.current,name:a,value:l,checked:i,required:d,disabled:o,form:v,style:{transform:"translateX(-100%)"}})]})});Rs.displayName=Nt;var As="RadioIndicator",Ls=b.forwardRef((t,s)=>{const{__scopeRadio:r,forceMount:a,...i}=t,d=nn(As,r);return e.jsx(is,{present:a||d.checked,children:e.jsx(ee.span,{"data-state":Ds(d.checked),"data-disabled":d.disabled?"":void 0,...i,ref:s})})});Ls.displayName=As;var on="RadioBubbleInput",Ts=b.forwardRef(({__scopeRadio:t,control:s,checked:r,bubbles:a=!0,...i},d)=>{const o=b.useRef(null),l=pe(o,d),u=bs(r),v=ls(s);return b.useEffect(()=>{const p=o.current;if(!p)return;const c=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(c,"checked").set;if(u!==r&&g){const y=new Event("click",{bubbles:a});g.call(p,r),p.dispatchEvent(y)}},[u,r,a]),e.jsx(ee.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...i,tabIndex:-1,ref:l,style:{...i.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Ts.displayName=on;function Ds(t){return t?"checked":"unchecked"}var ln=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Fe="RadioGroup",[cn]=bt(Fe,[cs,Is]),Fs=cs(),Us=Is(),[dn,un]=cn(Fe),Bs=b.forwardRef((t,s)=>{const{__scopeRadioGroup:r,name:a,defaultValue:i,value:d,required:o=!1,disabled:l=!1,orientation:u,dir:v,loop:p=!0,onValueChange:c,...f}=t,g=Fs(r),y=ra(v),[w,h]=os({prop:d,defaultProp:i??null,onChange:c,caller:Fe});return e.jsx(dn,{scope:r,name:a,required:o,disabled:l,value:w,onValueChange:h,children:e.jsx(na,{asChild:!0,...g,orientation:u,dir:y,loop:p,children:e.jsx(ee.div,{role:"radiogroup","aria-required":o,"aria-orientation":u,"data-disabled":l?"":void 0,dir:y,...f,ref:s})})})});Bs.displayName=Fe;var zs="RadioGroupItem",Ms=b.forwardRef((t,s)=>{const{__scopeRadioGroup:r,disabled:a,...i}=t,d=un(zs,r),o=d.disabled||a,l=Fs(r),u=Us(r),v=b.useRef(null),p=pe(s,v),c=d.value===i.value,f=b.useRef(!1);return b.useEffect(()=>{const g=w=>{ln.includes(w.key)&&(f.current=!0)},y=()=>f.current=!1;return document.addEventListener("keydown",g),document.addEventListener("keyup",y),()=>{document.removeEventListener("keydown",g),document.removeEventListener("keyup",y)}},[]),e.jsx(ia,{asChild:!0,...l,focusable:!o,active:c,children:e.jsx(Rs,{disabled:o,required:d.required,checked:c,...u,...i,name:d.name,ref:p,onCheck:()=>d.onValueChange(i.value),onKeyDown:he(g=>{g.key==="Enter"&&g.preventDefault()}),onFocus:he(i.onFocus,()=>{var g;f.current&&((g=v.current)==null||g.click())})})})});Ms.displayName=zs;var mn="RadioGroupIndicator",Hs=b.forwardRef((t,s)=>{const{__scopeRadioGroup:r,...a}=t,i=Us(r);return e.jsx(Ls,{...i,...a,ref:s})});Hs.displayName=mn;var Os=Bs,qs=Ms,hn=Hs;const dt=b.forwardRef(({className:t,...s},r)=>e.jsx(Os,{className:Ce("grid gap-2",t),...s,ref:r}));dt.displayName=Os.displayName;const de=b.forwardRef(({className:t,...s},r)=>e.jsx(qs,{ref:r,className:Ce("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),...s,children:e.jsx(hn,{className:"flex items-center justify-center",children:e.jsx(oa,{className:"h-2.5 w-2.5 fill-current text-current"})})}));de.displayName=qs.displayName;const pn={pdf:"PDF",model:"Model",dataset:"Dataset",space:"Space",github:"GitHub"},ut=/^[A-Za-z0-9][A-Za-z0-9._-]*$/,fn=/^[A-Za-z0-9][\w.-]*\/[A-Za-z0-9][\w.-]*$/,gn=20,mt="copy_to_bucket";function xn(t){const s=t.trim();if(!fn.test(s))return null;const[r,a]=s.split("/");return`https://huggingface.co/buckets/${encodeURIComponent(r)}/${encodeURIComponent(a)}`}function ht(t){return`pwc:bucket-copy:${t}`}function bn(t){if(typeof window>"u"||new URL(window.location.href).searchParams.get(mt)!==t)return null;try{const r=window.sessionStorage.getItem(ht(t));if(!r)return null;const a=JSON.parse(r);return a.paperId!==t||typeof a.bucketId!="string"||!["new","existing"].includes(a.destinationMode)||!["public","private"].includes(a.visibility)||!Array.isArray(a.selectedIds)||a.selectedIds.some(i=>typeof i!="string")?null:a}catch{return null}}function jn(t,s=gn){if(s<1)throw new Error("Bucket copy batch size must be positive");const r=[];for(let a=0;a!ut.test(u)))return null;const o=d.join("/"),l=s==="model"?"":`${s}s/`;return{id:`${s}:${o}`,kind:s,label:o,url:`https://huggingface.co/${l}${o}`,source:`hf://${l}${o}/`,destination:`${s}s/${o}/`,repoId:o}}catch{return null}}function vn(t){try{const s=new URL(t);if(s.hostname!=="github.com"&&s.hostname!=="www.github.com")return null;const r=s.pathname.split("/").filter(Boolean);if(r.length<2)return null;const a=r[0],i=r[1].replace(/\.git$/,"");if(!ut.test(a)||!ut.test(i))return null;const d=`${a}/${i}`;return{id:`github:${d}`,kind:"github",label:d,url:`https://github.com/${d}`,source:`https://github.com/${d}.git`,destination:`github/${d}/`}}catch{return null}}function yn({githubUrls:t,hfModelUrls:s,hfDatasetUrls:r,hfSpaceUrls:a,paperId:i,pdfName:d,pdfUrl:o}){const l=[o?{id:"pdf",kind:"pdf",label:"Paper PDF",url:o,source:o,destination:`paper/${d||i}.pdf`}:null,...s.map(v=>at(v,"model")),...r.map(v=>at(v,"dataset")),...a.map(v=>at(v,"space")),...t.map(vn)],u=new Set;return l.filter(v=>!v||u.has(v.id)?!1:(u.add(v.id),!0))}function _n(t,s,r){const a=["# Requires the Hugging Face CLI: https://huggingface.co/docs/huggingface_hub/guides/cli",`HF_BUCKET=${ke(t.trim())}`];r.create&&a.push(`hf buckets create "$HF_BUCKET" --exist-ok${r.isPrivate?" --private":""}`);for(const o of s.filter(l=>l.kind!=="github"&&l.kind!=="pdf"))a.push(`hf cp ${ke(o.source)} "hf://buckets/$HF_BUCKET/${o.destination}"`);const i=s.find(o=>o.kind==="pdf");i&&a.push('PWC_PDF="$(mktemp)"',`trap 'rm -f "$PWC_PDF"' EXIT`,`curl --fail --location ${ke(i.source)} --output "$PWC_PDF"`,`hf cp "$PWC_PDF" "hf://buckets/$HF_BUCKET/${i.destination}"`);const d=s.filter(o=>o.kind==="github");if(d.length){a.push('PWC_COPY_DIR="$(mktemp -d)"',`trap 'rm -rf "$PWC_COPY_DIR"' EXIT`);for(const o of d){const l=`$PWC_COPY_DIR/${o.destination.replace(/\/$/,"")}`;a.push(`git clone --depth 1 -- ${ke(o.source)} "${l}"`,`hf sync "${l}" "hf://buckets/$HF_BUCKET/${o.destination}" --exclude '.git/**'`)}}return a.join(` -`)}function kn(t){return`${(t.split(/[:|–—]/,1)[0]||t).normalize("NFKD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,48).replace(/-+$/g,"")||"paper"}-artifacts`}function Nn(t){const{toast:s}=J(),r=b.useMemo(()=>yn({githubUrls:t.githubUrls,hfDatasetUrls:t.hfDatasetUrls,hfModelUrls:t.hfModelUrls,hfSpaceUrls:t.hfSpaceUrls,paperId:t.paperId,pdfName:t.pdfName,pdfUrl:t.pdfUrl}),[t.githubUrls,t.hfDatasetUrls,t.hfModelUrls,t.hfSpaceUrls,t.paperId,t.pdfName,t.pdfUrl]),a=b.useMemo(()=>bn(t.paperId),[t.paperId]),[i,d]=b.useState(!!a),[o,l]=b.useState((a==null?void 0:a.destinationMode)??"new"),[u,v]=b.useState((a==null?void 0:a.bucketId)??""),[p,c]=b.useState((a==null?void 0:a.visibility)??"public"),[f,g]=b.useState(()=>new Set((a==null?void 0:a.selectedIds)??r.map(_=>_.id))),[y,w]=b.useState(!1),[h,x]=b.useState(null),[n,m]=b.useState(!!a),j=r.filter(_=>f.has(_.id)),S=j.length===r.length,E=xn(u),C=E!==null,R=_n(u,j,{create:o==="new",isPrivate:p==="private"}),L=(_,I)=>{g($=>{const T=new Set($);return I?T.add(_):T.delete(_),T})},B=async()=>{try{await navigator.clipboard.writeText(R),s({title:"Bucket copy commands copied",description:"Run them in a terminal where the Hugging Face CLI is signed in."})}catch{s({title:"Copy failed",description:"Could not access the clipboard. Select and copy the commands manually.",variant:"destructive"})}},H=b.useCallback(()=>{const _=new URL(window.location.href);_.searchParams.set(mt,t.paperId),window.sessionStorage.setItem(ht(t.paperId),JSON.stringify({paperId:t.paperId,bucketId:u.trim(),destinationMode:o,visibility:p,selectedIds:Array.from(f)})),window.location.assign(la(_.toString(),{authorizeBucket:!0,bucketCreate:o==="new"}))},[u,o,t.paperId,f,p]),P=b.useCallback(async()=>{if(!t.isSignedIn){H();return}w(!0);let _=0,I=0;try{const $=j.filter(M=>M.kind!=="pdf"&&M.kind!=="github"&&!!M.repoId).map(M=>({kind:M.kind,repo_id:M.repoId})),T=jn($);T.length||T.push([]);for(const[M,xe]of T.entries()){x({current:M+1,total:T.length});const be=await U.copyToBucket(t.paperId,{bucket_id:u.trim(),create:M===0&&o==="new",private:p==="private",include_pdf:M===0&&j.some(Ue=>Ue.kind==="pdf"),artifacts:xe});_+=be.copied.length,I+=be.errors.length}const ne=j.filter(M=>M.kind==="github").length;s({title:I?"Bucket copy partially completed":"Copied to bucket",description:[`${_} item${_===1?"":"s"} copied.`,I?`${I} item${I===1?"":"s"} failed.`:"",ne?"Use the generated commands below to copy GitHub repositories.":""].filter(Boolean).join(" "),variant:I?"destructive":void 0,action:E?e.jsx(ca,{altText:"Open destination bucket",asChild:!0,children:e.jsx("a",{href:E,target:"_blank",rel:"noopener noreferrer",children:"Open bucket"})}):void 0}),!I&&!ne&&d(!1)}catch($){if($ instanceof Se&&$.code==="bucket_authorization_required"){H();return}s({title:_?"Bucket copy partially completed":"Bucket copy failed",description:_?`${_} item${_===1?"":"s"} copied before the request failed. You can retry or use the CLI commands below.`:$ instanceof Se&&typeof $.detail=="string"?$.detail:"Hugging Face could not complete the copy. You can still use the CLI commands below.",variant:"destructive"})}finally{w(!1),x(null)}},[H,u,E,o,t.isSignedIn,t.paperId,j,s,p]);b.useEffect(()=>{if(!n||!t.isSignedIn)return;m(!1),window.sessionStorage.removeItem(ht(t.paperId));const _=new URL(window.location.href);_.searchParams.delete(mt),window.history.replaceState({},"",`${_.pathname}${_.search}${_.hash}`),P()},[P,t.isSignedIn,t.paperId,n]);const N=()=>{g(new Set(r.map(_=>_.id))),!u&&t.suggestedBucketId&&v(t.suggestedBucketId),d(!0)};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"sidebar-card copy-to-bucket-card",children:[e.jsxs("button",{type:"button",className:"copy-to-bucket-trigger",onClick:N,children:[e.jsx("span",{className:"copy-to-bucket-arrow","aria-hidden":"true",children:"→"}),e.jsx("span",{className:"copy-to-bucket-title",children:"Copy to bucket"}),e.jsx("span",{className:"copy-to-bucket-new",children:"New"})]}),e.jsx("div",{className:"copy-to-bucket-meta",children:r.length?`${r.length} linked artifact${r.length===1?"":"s"}`:"No linked artifacts yet"})]}),e.jsx(Ie,{open:i,onOpenChange:d,children:e.jsxs(Re,{className:"max-h-[90vh] max-w-2xl grid-rows-[auto_minmax(0,1fr)_auto] overflow-hidden",children:[e.jsxs(Ae,{children:[e.jsxs(Le,{className:"flex items-center gap-2",children:[e.jsx("span",{className:"copy-to-bucket-dialog-arrow","aria-hidden":"true",children:"→"}),"Copy to bucket"]}),e.jsx(Te,{children:"Keep your own copy of this paper's PDF, linked code, and Hugging Face artifacts. Hub repositories use Xet's server-side copy; GitHub repositories use the generated CLI fallback."})]}),e.jsx("div",{className:"-mx-6 min-h-0 overflow-y-auto px-6",children:r.length?e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(O,{children:"Choose your destination"}),e.jsxs(dt,{value:o,onValueChange:_=>l(_),className:"grid grid-cols-2 gap-2",children:[e.jsxs(O,{className:"bucket-choice",children:[e.jsx(de,{value:"new"}),"New bucket"]}),e.jsxs(O,{className:"bucket-choice",children:[e.jsx(de,{value:"existing"}),"Existing bucket"]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(O,{htmlFor:"bucket-id",children:"Bucket name"}),e.jsx(z,{id:"bucket-id",value:u,onChange:_=>v(_.target.value),placeholder:t.suggestedBucketId||"username/paper-artifacts","aria-invalid":u.length>0&&!C}),e.jsxs("div",{className:"flex items-center justify-between gap-3 text-xs",children:[e.jsx("p",{className:"text-muted-foreground",children:"Use the full Hugging Face bucket ID: namespace/name."}),E&&e.jsxs("a",{href:E,target:"_blank",rel:"noopener noreferrer",className:"inline-flex shrink-0 items-center gap-1 underline underline-offset-4",children:["View bucket",e.jsx(F,{name:"external",size:10})]})]})]}),o==="new"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(O,{children:"Bucket visibility"}),e.jsxs(dt,{value:p,onValueChange:_=>c(_),className:"flex gap-5",children:[e.jsxs(O,{className:"flex items-center gap-2 font-normal",children:[e.jsx(de,{value:"public"}),"Public"]}),e.jsxs(O,{className:"flex items-center gap-2 font-normal",children:[e.jsx(de,{value:"private"}),"Private"]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx(O,{children:"Artifacts"}),e.jsx(A,{type:"button",variant:"outline",size:"sm",className:"h-7 px-2 text-xs",onClick:()=>g(S?new Set:new Set(r.map(_=>_.id))),children:S?"Deselect all":"Select all"})]}),e.jsx("div",{className:"bucket-artifact-list",children:r.map(_=>e.jsxs("div",{className:"bucket-artifact-row",children:[e.jsx(kt,{id:`bucket-artifact-${_.id}`,checked:f.has(_.id),onCheckedChange:I=>L(_.id,I===!0)}),e.jsxs(O,{htmlFor:`bucket-artifact-${_.id}`,className:"min-w-0 flex-1 cursor-pointer font-normal",children:[e.jsx("span",{className:"bucket-artifact-kind",children:pn[_.kind]}),e.jsx("span",{className:"bucket-artifact-name",children:_.label})]}),e.jsxs("a",{href:Y(_.url)??void 0,target:"_blank",rel:"noopener noreferrer",className:"bucket-artifact-open",children:["Open",e.jsx(F,{name:"external",size:10})]})]},_.id))}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"The PDF and Hugging Face artifacts can be copied directly. GitHub repositories require the CLI workflow below."})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(O,{htmlFor:"bucket-copy-commands",children:"CLI fallback"}),e.jsx("pre",{id:"bucket-copy-commands",className:"bucket-copy-commands h-[190px]",children:C?R:"Enter a bucket name above to prepare the copy commands."})]})]}):e.jsx("p",{className:"py-5 text-sm text-muted-foreground",children:"This paper does not have a linked GitHub repository or Hugging Face artifact to copy yet."})}),e.jsxs(jt,{children:[e.jsx("a",{href:"https://huggingface.co/docs/huggingface_hub/en/guides/buckets",target:"_blank",rel:"noopener noreferrer",className:"mr-auto text-sm text-muted-foreground underline underline-offset-4",children:"About Hugging Face Buckets"}),e.jsxs(A,{type:"button",onClick:B,variant:"outline",disabled:!C||j.length===0,children:[e.jsx(F,{name:"copy",size:12}),"Copy commands"]}),e.jsx(A,{type:"button",onClick:P,disabled:y||t.isSignedIn&&(!C||!j.some(_=>_.kind!=="github")),children:y?h&&h.total>1?`Copying ${h.current}/${h.total}…`:"Copying…":t.isSignedIn?"Copy now":"Sign in & copy"})]})]})})]})}function wn({isLoading:t,papers:s}){return t?e.jsxs("div",{className:"sidebar-card","aria-busy":"true",children:[e.jsx("div",{className:"sidebar-card-title",children:"Related papers"}),e.jsx("div",{className:"related-meta",children:"Finding related work…"})]}):s!=null&&s.length?e.jsxs("div",{className:"sidebar-card",children:[e.jsx("div",{className:"sidebar-card-title",children:"Related papers"}),s.map(r=>e.jsxs(K,{to:`/paper/${r.arxiv_id||r.id}`,target:"_blank",rel:"noopener noreferrer",className:"related-paper",style:{textDecoration:"none",color:"inherit"},children:[e.jsx("div",{className:"related-title",children:e.jsx(Ne,{title:r.title})}),e.jsxs("div",{className:"related-meta",children:[e.jsx("span",{children:r.arxiv_id?`arXiv:${r.arxiv_id}`:"External resource"}),r.citation_count!=null&&e.jsxs("span",{children:[r.citation_count.toLocaleString()," cites"]})]})]},r.id))]}):null}const Cn=/(https?:\/\/[^\s]+)/g;function Sn({size:t=12}){return e.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:e.jsx("path",{fill:"currentColor",d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})})}function Zt(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function En(t){return new Date(t).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}function Pn({text:t}){return e.jsx("p",{className:"x-thread-text",children:t.split(Cn).map((s,r)=>r%2===1?e.jsx("span",{className:"x-thread-link",children:s.replace(/^https?:\/\/(www\.)?/,"").replace(/\/$/,"")},r):e.jsx(b.Fragment,{children:s},r))})}function $n({thread:t}){const[s,r]=b.useState(!1);return!t.author_avatar_url||s?e.jsx("span",{className:"x-thread-avatar x-thread-avatar--fallback","aria-hidden":"true",children:t.author_name.charAt(0).toUpperCase()}):e.jsx("img",{className:"x-thread-avatar",src:t.author_avatar_url,alt:"",loading:"lazy",referrerPolicy:"no-referrer",onError:()=>r(!0)})}function In(){var t;return((t=window.matchMedia)==null?void 0:t.call(window,"(prefers-reduced-motion: reduce)").matches)??!1}function Rn({thread:t}){const[s,r]=b.useState(!1),[a,i]=b.useState(null),[d,o]=b.useState(!1),l=b.useRef(null),{targetRef:u,isIntersecting:v}=Va({rootMargin:"200px"}),p=t.video_url;if(b.useEffect(()=>{if(!p||a||d||!v||In())return;const f=new AbortController;return fetch(p,{referrerPolicy:"no-referrer",signal:f.signal}).then(g=>{if(!g.ok)throw new Error(`HTTP ${g.status}`);return g.blob()}).then(g=>i(URL.createObjectURL(g))).catch(()=>{f.signal.aborted||o(!0)}),()=>f.abort()},[p,a,d,v]),b.useEffect(()=>()=>{a&&URL.revokeObjectURL(a)},[a]),b.useEffect(()=>{const f=l.current;f&&(v?f.play().catch(()=>{}):f.pause())},[v,a]),!t.media_url||s)return null;const c=a&&!d;return e.jsx("div",{className:"x-thread-media",ref:u,children:c?e.jsx("video",{ref:l,src:a,poster:t.media_url,muted:!0,loop:!0,playsInline:!0,autoPlay:!0,"aria-label":"Video",onError:()=>o(!0)}):e.jsxs(e.Fragment,{children:[e.jsx("img",{src:t.media_url,alt:"",loading:"lazy",referrerPolicy:"no-referrer",onError:()=>r(!0)}),t.media_type==="video"&&e.jsx("span",{className:"x-thread-play","aria-label":"Video",children:"▶"})]})})}function An({thread:t}){const s=Y(t.url);return s?e.jsxs("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:"x-thread",children:[e.jsxs("div",{className:"x-thread-header",children:[e.jsx($n,{thread:t}),e.jsxs("span",{className:"x-thread-author",children:[e.jsx("span",{className:"x-thread-name",children:t.author_name}),e.jsxs("span",{className:"x-thread-handle",children:["@",t.author_handle]})]}),e.jsx("span",{className:"x-thread-logo",children:e.jsx(Sn,{})})]}),e.jsx(Pn,{text:t.text}),e.jsx(Rn,{thread:t}),e.jsxs("div",{className:"x-thread-meta",children:[t.posted_at&&e.jsx("time",{dateTime:t.posted_at,children:En(t.posted_at)}),t.like_count!=null&&e.jsxs("span",{children:["♥ ",Zt(t.like_count)]}),t.reply_count!=null&&t.reply_count>0&&e.jsxs("span",{children:[Zt(t.reply_count)," ",t.reply_count===1?"reply":"replies"]}),e.jsx("span",{className:"x-thread-read",children:"Read on X →"})]})]}):null}function Ln({onEdit:t,threads:s}){return e.jsxs("div",{className:"sidebar-card",children:[e.jsxs("div",{className:"sidebar-card-title",children:[e.jsx("span",{children:"X threads"}),e.jsxs("span",{className:"badge",children:[s.length," post",s.length===1?"":"s",e.jsx("button",{type:"button",onClick:t,className:"edit-link",children:"edit"})]})]}),s.length>0?e.jsx("div",{className:"x-thread-list",children:s.map(r=>e.jsx(An,{thread:r},r.tweet_id))}):e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",padding:"6px 0"},children:"No author threads linked yet."})]})}const rt=3,es=3;function Tn(t){return t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function Dn({allHfArtifactUrls:t,citationCopied:s,citationDisplay:r,hfArtifactViewer:a,onCopyCitation:i,onEditHfArtifacts:d,onEditRepositories:o,onEditXThreads:l,paper:u,relatedIsLoading:v,relatedPapers:p,user:c}){var h;const[f,g]=b.useState(!1),y=[...u.repositories??[]].sort((x,n)=>Number(n.is_official)-Number(x.is_official)||(n.num_stars||0)-(x.num_stars||0)),w=(f?y:y.slice(0,rt)).map(x=>({...x,safeHref:Y(x.url)}));return e.jsxs("aside",{className:"detail-sidebar",children:[e.jsxs("div",{className:"sidebar-card",children:[e.jsxs("div",{className:"sidebar-card-title",children:[e.jsx("span",{children:"GitHub"}),e.jsxs("span",{className:"badge",children:[y.length," repo",y.length===1?"":"s",e.jsx("button",{type:"button",onClick:o,className:"edit-link",children:"edit"})]})]}),w.filter(({safeHref:x})=>x).map(x=>e.jsxs("a",{href:x.safeHref??void 0,target:"_blank",rel:"noopener noreferrer",className:"code-line",style:{textDecoration:"none"},children:[e.jsxs("span",{className:"code-line-repo",children:[e.jsx(F,{name:"github",size:12}),e.jsxs("span",{className:"code-line-repo-name",children:[x.owner,"/",x.name]}),x.is_official&&e.jsx("span",{className:"code-line-official",children:"· Official"})]}),e.jsxs("span",{className:"code-line-stars",children:["★ ",Tn(x.num_stars)]})]},x.id)),y.length===0&&e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",padding:"6px 0"},children:"No GitHub repositories linked yet."}),y.length>rt&&e.jsx("button",{type:"button",className:"bench-show-more",onClick:()=>g(x=>!x),children:f?"− show top 3":`+ show ${y.length-rt} more repos`})]}),e.jsx(Fn,{viewer:a,onEdit:d}),e.jsx(Ln,{threads:u.x_threads??[],onEdit:l}),e.jsx(Nn,{githubUrls:y.map(({url:x})=>x),hfModelUrls:t.models,hfDatasetUrls:t.datasets,hfSpaceUrls:t.spaces,paperId:u.id,pdfName:((h=u.arxiv_id)==null?void 0:h.replace("/","-"))||u.id,pdfUrl:u.url_pdf,isSignedIn:!!c,suggestedBucketId:c?`${c.username}/${kn(u.title)}`:void 0}),e.jsx(wn,{isLoading:v,papers:p}),e.jsxs("div",{className:"sidebar-card",children:[e.jsxs("div",{className:"sidebar-card-title",children:[e.jsx("span",{children:"Citation"}),e.jsxs("button",{type:"button",className:"citation-copy-btn",onClick:i,"aria-label":"Copy citation to clipboard",title:"Copy citation to clipboard",children:[e.jsx(F,{name:"copy",size:11}),s?"Copied":"Copy"]})]}),e.jsx("pre",{style:{fontFamily:"var(--mono)",fontSize:10.5,lineHeight:1.5,color:"var(--ink-soft)",whiteSpace:"pre-wrap",wordBreak:"break-word",margin:0},children:r})]})]})}function Fn({onEdit:t,viewer:s}){return e.jsxs("div",{className:"sidebar-card",children:[e.jsxs("div",{className:"sidebar-card-title",children:[s.paperHref?e.jsx("a",{href:s.paperHref,target:"_blank",rel:"noopener noreferrer",style:{color:"inherit",textDecoration:"none"},children:"🤗 Hugging Face"}):e.jsx("span",{children:"🤗 Hugging Face"}),e.jsx("button",{type:"button",onClick:t,className:"edit-link",children:"edit"})]}),s.isLoading?e.jsx(ue,{className:"h-16 w-full"}):e.jsxs(e.Fragment,{children:[s.rows.map(r=>e.jsx(Un,{...r},r.label)),s.footer&&e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:10,color:"var(--ink-faint)",marginTop:12},children:s.footer})]})]})}function Un({count:t,href:s,isLimited:r,label:a,links:i}){const[d,o]=b.useState(!1),l=((i==null?void 0:i.length)??0)>es,u=d?i:i==null?void 0:i.slice(0,es),v=t!=null?`${t}${r?"+":""}`:"—";return e.jsxs("div",{className:"hf-artifact-row",children:[e.jsxs("div",{className:"hf-artifact-row-header",children:[e.jsx("span",{children:a}),t?e.jsx("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:"hf-artifact-count",children:v}):e.jsx("span",{className:"hf-artifact-count hf-artifact-count--empty",children:v})]}),u!=null&&u.length?e.jsxs("div",{className:"hf-artifact-links",children:[u.map(p=>e.jsx("a",{href:p.href,target:"_blank",rel:"noopener noreferrer",children:p.label},p.href)),l&&e.jsx("button",{type:"button",className:"hf-artifact-toggle","aria-expanded":d,onClick:()=>o(p=>!p),children:d?"Show fewer":`View all ${i.length}`})]}):null]})}function Bn({abstract:t,mentions:s}){const r=[];let a=0;for(const i of[...s].sort((d,o)=>d.start-o.start))i.startt.length||t.slice(i.start,i.end)===i.surface&&(r.push(e.jsx(ot,{text:t.slice(a,i.start)},`t${a}`)),r.push(e.jsx(Ha,{entity:{kind:i.entity_type,slug:i.slug},className:"abstract-entity-link",newTab:!1,initialPreview:i.preview?{name:i.preview.name,description:i.preview.description??null,imageUrl:i.preview.image_url??null,count:i.preview.count??null,detail:i.preview.detail??null}:void 0,children:i.surface},`m${i.start}`)),a=i.end);return r.push(e.jsx(ot,{text:t.slice(a)},`t${a}`)),e.jsx(e.Fragment,{children:r})}function zn(t,s){const r=t.arxiv_id?` (arXiv:${re(t.arxiv_id)})`:"";return`About the paper "${t.title}"${r}: ${s}`}function Mn({paper:t,readerChatRoute:s}){const r=da()&&!!(t.id&&t.abstract),a=t.suggested_questions,{data:i}=Q({queryKey:["paper-suggested-questions",t.id],queryFn:()=>U.suggestedQuestions(String(t.id)),enabled:r&&Array.isArray(a)&&a.length===0,staleTime:o=>{var l;return(l=o.state.data)!=null&&l.questions.length?1/0:0},retry:!1}),d=a!=null&&a.length?a:(i==null?void 0:i.questions)??[];return!r||d.length===0?null:e.jsx("ul",{className:"suggested-questions","aria-label":"Ask about this paper",children:d.map(o=>{const l=s?`${s}?q=${encodeURIComponent(o)}`:`/chat?q=${encodeURIComponent(zn(t,o))}`;return e.jsx("li",{children:e.jsxs(K,{className:"suggested-question",to:l,onClick:s?()=>us(s):void 0,children:[e.jsx(F,{name:"chat",size:12}),e.jsx("span",{children:o})]})},o)})})}function Hn({canEdit:t,onEditMethods:s,onEditTasks:r,paper:a,readerChatRoute:i}){var l,u,v;const d=a.abstract||"",[o]=b.useState(()=>window.location.hash==="#tldr");return e.jsxs(e.Fragment,{children:[e.jsx(we,{id:"abstract",label:"Abstract"}),e.jsx("p",{className:"abstract-text",children:(l=a.abstract_mentions)!=null&&l.length?e.jsx(Bn,{abstract:d,mentions:a.abstract_mentions}):e.jsx(ot,{text:d})}),a.tldr&&e.jsxs("details",{className:"tldr-details paper-section-anchor",id:"tldr",open:o,children:[e.jsxs("summary",{children:[e.jsx("span",{className:"tldr-toggle-show",children:"Show TL;DR"}),e.jsx("span",{className:"tldr-toggle-hide",children:"Hide TL;DR"}),e.jsx("span",{className:"tldr-toggle-hint",children:"short summary"})]}),e.jsx("div",{className:"tldr-box",children:a.tldr})]}),e.jsx(Mn,{paper:a,readerChatRoute:i}),e.jsx(we,{id:"tasks",label:"Tasks",accent:e.jsxs("span",{className:"accent",children:[((u=a.tasks)==null?void 0:u.length)||0," tagged",t&&e.jsx("button",{type:"button",onClick:r,className:"edit-link",children:"edit"})]})}),e.jsx("div",{className:"paper-tags",style:{marginBottom:8},children:(a.tasks??[]).map(p=>e.jsx(ja,{slug:p.slug||"",label:p.name},p.id))}),e.jsx(we,{id:"methods",label:"Methods",accent:e.jsxs("span",{className:"accent",children:[((v=a.methods)==null?void 0:v.length)||0," used",t&&e.jsx("button",{type:"button",onClick:s,className:"edit-link",children:"edit"})]})}),e.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6,marginBottom:8},children:(a.methods??[]).map(p=>e.jsx(va,{method:p},p.id))})]})}const pt="pwc:pending-bookmark";function ts(t){window.sessionStorage.setItem(pt,JSON.stringify(t)),window.location.assign(Wa(!0))}function On(){var a,i;const{user:t}=Pe(),s=Q({queryKey:se.bookmarkIds,queryFn:()=>ct.getBookmarkIds(),enabled:!!t,staleTime:60*1e3}),r=Ee.useMemo(()=>{var d;return new Set(((d=s.data)==null?void 0:d.paper_ids)??[])},[(a=s.data)==null?void 0:a.paper_ids]);return{ids:((i=s.data)==null?void 0:i.paper_ids)??[],idSet:r,isLoading:s.isLoading,isError:s.isError}}function qn(){const{user:t}=Pe(),s=Z(),r=ae({mutationFn:async({paperId:i,isBookmarked:d})=>{d?await ct.removeBookmark(i):await ct.addBookmark(i)},onMutate:async({paperId:i,isBookmarked:d})=>{await s.cancelQueries({queryKey:se.bookmarkIds});const o=s.getQueryData(se.bookmarkIds),l=typeof i=="string"?Number(i):i,u=(o==null?void 0:o.paper_ids)??[],v=d?u.filter(p=>p!==l):[l,...u.filter(p=>p!==l)];return s.setQueryData(se.bookmarkIds,{paper_ids:v}),{previous:o}},onError:(i,d,o)=>{o!=null&&o.previous&&s.setQueryData(se.bookmarkIds,o.previous),i instanceof Se&&i.code==="saved_papers_bucket_authorization_required"&&ts(d)},onSettled:()=>{s.invalidateQueries({queryKey:se.bookmarkIds}),s.invalidateQueries({queryKey:[...me.feeds.saved]})}});return Ee.useEffect(()=>{if(!t||r.isPending)return;const i=new URL(window.location.href);if(i.searchParams.get(Ot)!=="1")return;i.searchParams.delete(Ot),window.history.replaceState({},"",`${i.pathname}${i.search}${i.hash}`);const d=window.sessionStorage.getItem(pt);if(d){window.sessionStorage.removeItem(pt);try{const o=JSON.parse(d);(typeof o.paperId=="number"||typeof o.paperId=="string")&&typeof o.isBookmarked=="boolean"&&r.mutate(o)}catch{}}},[r,t]),{toggle:Ee.useCallback((i,d)=>{if(!t){if(ds())return;ts({paperId:i,isBookmarked:d});return}r.mutate({paperId:i,isBookmarked:d})},[r,t]),isPending:r.isPending}}const Kn=({paperId:t})=>{const{user:s}=Pe(),{idSet:r}=On(),{toggle:a,isPending:i}=qn();if(ds())return null;const d=Number(t),o=!!s&&r.has(d),l=()=>{Number.isFinite(d)&&a(d,o)},u=s&&o?"Saved":"Save",v=s?o?"Remove from saved papers":"Save this paper":"Sign in with Hugging Face to save this paper";return e.jsxs("button",{type:"button",className:`action-btn${o?" is-saved":""}`,onClick:l,disabled:i,"aria-pressed":o,"aria-label":v,title:v,children:[e.jsx(F,{name:"bookmark",size:12}),u]})};function nt({children:t,showEdit:s=!1,onEdit:r,editAriaLabel:a}){return s?e.jsxs("span",{className:"action-btn-composite",children:[t,e.jsx("button",{type:"button",className:"action-btn-segment action-btn-edit",onClick:r,"aria-label":a,children:"edit"})]}):t}function ss(t){if(!t)return"—";try{return new Date(t).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch{return"—"}}function as(t,s){try{const r=new URL(t),i=r.pathname.replace(/\/$/,"").split("/").filter(Boolean).at(-1);return i?i.replace(/[-_]+/g," "):r.hostname.replace(/^www\./,"")}catch{return s}}const Hi=()=>{const{arxivId:t}=ua(),s=rs(),{toast:r}=J(),{user:a}=Pe(),i=(a==null?void 0:a.is_admin)??!1,d=!!a,o=tr(a),{arxivId:l,evaluations:u,evaluationsByTask:v,evaluationsLoading:p,paper:c,paperError:f,paperLoading:g,presentation:y,refetchEvaluations:w,refetchPaper:h,relatedQuery:x,versions:n,visibleEvaluations:m}=gr(t,o),[j,S]=b.useState(!1),{activeEditor:E,openEditor:C,setEditorOpen:R}=xr();b.useEffect(()=>{o!=="direct"||!(c!=null&&c.id)||(E&&E!=="evaluations"&&U.primeCurationState(c.id).catch(()=>{}),E==="evaluations"&&$e.primeCurationState(c.id).catch(()=>{}))},[E,o,c==null?void 0:c.id]);const[L,B]=b.useState(null),H=b.useRef(!1);b.useEffect(()=>{if(!a||!c||H.current)return;const k=sessionStorage.getItem(Ut);if(!k)return;if(H.current=!0,!U.freshAuthMutationDraft()){sessionStorage.removeItem(Ut),Ra(k)&&C(k);return}if(!window.confirm("You signed in again. Apply the saved destructive catalog edit now? The server will recheck the current catalog version before changing anything.")){r({title:"Edit kept locally",description:"Nothing was changed. Reload this paper when you are ready to confirm the saved edit."});return}U.resumeFreshAuthMutation().then(()=>{r({title:"Edit applied",description:"The restored catalog edit was applied."}),window.location.reload()}).catch(le=>{r({variant:"destructive",title:"Could not apply the saved edit",description:le instanceof Error?le.message:"Please reload and review the edit again."})})},[C,c,r,a]);const P=b.useMemo(()=>{if(!a||!(c!=null&&c.author_links))return!1;const k=a.username.toLowerCase();return c.author_links.some(D=>!!D.hf_username&&D.hf_username.toLowerCase()===k)},[a,c==null?void 0:c.author_links]),N=k=>{if(!d){B(k);return}C(k)},_=ae({mutationFn:()=>U.indexFromArxiv(l),onSuccess:()=>{r({title:"Indexed",description:"Paper added to database."}),setTimeout(()=>h(),1200)}}),I=_.error?xt(_.error,"Failed to index paper"):null,$=_.error instanceof Se&&[429,503].includes(_.error.status)?"Try again later after arXiv has lifted the temporary limit.":null,T=(y==null?void 0:y.citationCopy)??"",ne=(y==null?void 0:y.copyableRanks)??[],[M,xe]=b.useState(!1),be=async()=>{if(T)try{await navigator.clipboard.writeText(T),xe(!0),r({title:"Citation copied",description:"BibTeX entry copied to clipboard."}),window.setTimeout(()=>xe(!1),1500)}catch{r({title:"Copy failed",description:"Could not access the clipboard. Please copy manually.",variant:"destructive"})}},Ue=async()=>{if(!c)return;const k=c.arxiv_id||c.id,D=ar(k,ne);if(D)try{await navigator.clipboard.writeText(D),r({title:"PwC badges copied",description:"Each badge follows its current leaderboard result."})}catch{r({title:"Copy failed",description:"Could not access the clipboard. Please try again.",variant:"destructive"})}};if(g)return e.jsxs("div",{className:"page",children:[e.jsx(ue,{className:"h-12 w-3/4 mb-4"}),e.jsx(ue,{className:"h-6 w-1/3 mb-8"}),e.jsx(ue,{className:"h-64 w-full"})]});if(f||!c)return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(K,{to:"/papers",children:"Papers"}),e.jsx("span",{className:"sep",children:"/"}),e.jsxs("span",{style:{color:"var(--ink)"},children:["arXiv:",l]})]}),e.jsx("h1",{className:"detail-title",children:"Paper not indexed yet"}),e.jsxs("p",{style:{fontFamily:"var(--serif)",color:"var(--ink-soft)",marginTop:16,maxWidth:640},children:["We don't have ",e.jsxs("span",{style:{fontFamily:"var(--mono)"},children:["arXiv:",l]})," in the database. You can index it from arXiv right now."]}),I&&e.jsx(Ta,{variant:"destructive",className:"mt-4 max-w-xl",children:e.jsxs(Da,{children:[e.jsx("div",{children:I}),$&&e.jsx("div",{className:"mt-2",children:$})]})}),e.jsxs("div",{className:"action-row",children:[i&&e.jsxs("button",{className:"action-btn",onClick:()=>l&&_.mutate(),disabled:_.isPending,children:[e.jsx(F,{name:"sparkle",size:12}),_.isPending?"Indexing…":"Index from arXiv"]}),e.jsx(A,{variant:"outline",onClick:()=>s("/papers"),children:"Browse Papers"})]})]});if(!y)return null;const{allHfArtifactUrls:Ks,authorEntries:Be,citationDisplay:Gs,hasIntroducedItems:Qs,hasLineageItems:Xs,hfArtifactViewer:Vs,introducedBenchmarks:Ws,introducedFrameworks:wt,introducedMethods:Ys,introducedSummary:Js,numPages:Ct,paperSourceLabel:St,predecessorPapers:ze,projectPages:ie,safeAbstractUrl:je,safeConferenceUrl:Et,safePdfUrl:Pt,successorPapers:Me}=y,ve=12,oe=Sa(c,l),Zs=oe&&Dt()&&ma()&&(!Ft()||i)?oe:null,$t=c.organizations||[],It=k=>{const D=Ya(k)??k.name;return e.jsx(K,{to:`/orgs/${k.slug}`,className:`detail-title-org${k.logo_url?" detail-title-org--logo":""}`,title:k.name,"aria-label":k.name,children:k.logo_url?e.jsx("img",{src:k.logo_url,alt:"",onError:le=>{var At;(At=le.currentTarget.parentElement)==null||At.classList.remove("detail-title-org--logo"),le.currentTarget.replaceWith(D)}}):D},k.id)},Rt=j||Be.length<=ve?Be:Be.slice(0,ve);return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(K,{to:"/",children:"Trending"}),e.jsx("span",{className:"sep",children:"/"}),c.arxiv_id&&je?e.jsxs("a",{className:"breadcrumb-external",href:je,target:"_blank",rel:"noopener noreferrer",title:"Open on arXiv",children:[St,e.jsx("span",{"aria-hidden":"true",children:"↗"})]}):e.jsx("span",{children:St})]}),e.jsxs("div",{className:"detail-grid",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"detail-hero",children:[e.jsxs("div",{className:"detail-hero-main",children:[e.jsxs("h1",{className:"detail-title",children:[e.jsx(Ne,{title:c.title}),$t.slice(0,-1).map(It),e.jsxs("span",{className:"detail-title-tail",children:[$t.slice(-1).map(It),e.jsx("button",{type:"button",className:"detail-title-edit",onClick:()=>N("organizations"),title:"Edit organizations","aria-label":"Edit organizations",children:e.jsx(F,{name:"pencil",size:11})})]})]}),e.jsxs("div",{className:"detail-meta",children:[e.jsxs("span",{children:["Submitted ",ss(c.published)]}),Ct&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:[Ct," pages"]})]}),c.citation_count!=null&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:[c.citation_count.toLocaleString()," citations"]})]}),(c.proceeding||c.conference_slug)&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),c.conference_slug?e.jsx("a",{href:`/conferences/${c.conference_slug}`,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent-text)"},children:(c.proceeding||c.conference_name||"").replace(/\s+\d{1,2}$/,"")}):e.jsx("span",{children:c.proceeding.replace(/\s+\d{1,2}$/,"")})]}),n.length>1&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsx("select",{className:"version-select",value:c.version,onChange:k=>{const D=k.target.value;c.arxiv_id&&s(`/paper/${re(c.arxiv_id)}${D?`?version=${D}`:""}`)},children:n.map(k=>e.jsxs("option",{value:k.version,children:[k.version," — ",ss(k.published)]},k.version))})]})]}),e.jsxs("div",{className:"detail-authors",children:[Rt.map((k,D)=>e.jsxs(Ee.Fragment,{children:[k.hf_username&&e.jsx(Ja,{className:"detail-author-avatar",url:k.hf_avatar_url}),k.id?e.jsx(K,{to:`/authors/${k.id}`,children:k.name}):k.hf_username?e.jsx("a",{href:`https://huggingface.co/${k.hf_username}`,target:"_blank",rel:"noopener noreferrer",title:`@${k.hf_username} on Hugging Face`,children:k.name}):e.jsx("a",{children:k.name}),Dve&&e.jsx("button",{className:"show-more-authors",onClick:()=>S(k=>!k),style:{marginLeft:8,background:"none",border:"none",cursor:"pointer",color:"var(--accent-text)",fontFamily:"var(--mono)",fontSize:12},children:j?"show fewer":`+${c.authors.length-ve} more`})]}),e.jsxs("div",{className:"action-row",children:[oe&&Dt()&&(!Ft()||a!=null&&a.is_admin)?e.jsxs(K,{className:"action-btn",to:oe,onClick:()=>us(oe),children:[e.jsx(F,{name:"pdf",size:12})," Read paper",e.jsx("span",{className:"nav-new-badge","aria-hidden":"true",children:"New"})]}):Pt?e.jsxs("a",{className:"action-btn",href:Pt,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(F,{name:"pdf",size:12})," View PDF"]}):null,je&&c.source==="external"&&e.jsx(nt,{showEdit:!0,onEdit:()=>N("source_url"),editAriaLabel:"Edit source URL",children:e.jsxs("a",{className:"action-btn-segment action-btn-main",href:je,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(F,{name:"external",size:12})," Source page"]})}),ie.length===1?e.jsx(nt,{showEdit:!0,onEdit:()=>N("project_pages"),editAriaLabel:"Edit project pages",children:e.jsxs("a",{className:"action-btn-segment action-btn-main",href:ie[0].safeHref??void 0,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(F,{name:"globe",size:12})," Project page"]})}):null,ie.length>1?e.jsx(nt,{showEdit:!0,onEdit:()=>N("project_pages"),editAriaLabel:"Edit project pages",children:e.jsxs(ha,{children:[e.jsx(pa,{asChild:!0,children:e.jsxs("button",{type:"button",className:"action-btn-segment action-btn-main",children:[e.jsx(F,{name:"globe",size:12})," Project page"]})}),e.jsx(fa,{align:"start",className:"project-page-menu",children:ie.map((k,D)=>e.jsx(ga,{asChild:!0,children:k.safeHref?e.jsx("a",{href:k.safeHref,target:"_blank",rel:"noopener noreferrer",children:as(k.url,`Project page ${D+1}`)}):e.jsx("span",{children:as(k.url,`Project page ${D+1}`)})},k.url))})]})}):null,ie.length===0&&d?e.jsxs("button",{type:"button",className:"action-btn",onClick:()=>N("project_pages"),title:"Add project page",children:[e.jsx(F,{name:"globe",size:12})," Add project page"]}):null,Et&&e.jsxs("a",{className:"action-btn",href:Et,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(F,{name:"external",size:12})," Conference"]}),e.jsxs("a",{className:"action-btn",href:La(c.title,c.arxiv_id),target:"_blank",rel:"noopener noreferrer",title:"Ask Hugging Face ML Intern to reproduce this paper",children:[e.jsx("span",{className:"ml-intern-icon",children:e.jsx(F,{name:"robot",size:12})})," Reproduce with ML Intern"]}),e.jsx(br,{paperId:Number(c.id)}),i&&xa()&&e.jsx($s,{kind:"enrich-paper",triggerClassName:"action-btn",paperId:Number(c.id),paperTitle:c.title,onComplete:()=>void h()}),e.jsx(Kn,{paperId:c.id})]}),c.leaderboard_ranks&&c.leaderboard_ranks.length>0&&e.jsx(ya,{wrap:!0,paperHref:`/paper/${c.arxiv_id||c.id}`,ranks:Ca(c.leaderboard_ranks)})]}),e.jsx("div",{className:"detail-hero-thumb detail-thumb-wrap",children:e.jsx(_a,{paperId:c.arxiv_id||c.id,title:c.title,thumbnailUrl:ba(c.thumbnail_url),priority:!0})})]}),Qs&&e.jsxs("div",{className:`introduced-banner${wt.length>0?" introduced-banner--framework":""}`,children:[e.jsx("span",{className:"introduced-label",children:"Introduced"}),e.jsxs("div",{className:"introduced-methods",children:[Ys.map(k=>e.jsxs("button",{type:"button",className:"introduced-pill",onClick:()=>s(`/methods/${k.slug||k.id}`),children:[k.name,e.jsx("span",{className:"introduced-arrow",children:"→"})]},`method-${k.id}`)),Ws.map(k=>e.jsxs("button",{type:"button",className:"introduced-pill",onClick:()=>s(`/benchmark/${k.slug||k.id}`),children:[k.name,e.jsx("span",{className:"introduced-arrow",children:"→"})]},`benchmark-${k.id}`)),wt.map(k=>e.jsxs("button",{type:"button",className:"introduced-pill",onClick:()=>s(`/frameworks#framework-${k.slug}`),children:[k.name,e.jsx("span",{className:"introduced-arrow",children:"→"})]},`framework-${k.slug}`))]}),e.jsxs("span",{className:"introduced-note",children:["This paper is the canonical source for ",Js,"."]})]}),Xs&&e.jsxs("div",{className:"introduced-banner lineage-banner",children:[Me.length>0&&e.jsxs("div",{className:"lineage-row",children:[e.jsx("span",{className:"introduced-label lineage-label",children:Me.length===1?"Follow-up paper":"Follow-up papers"}),e.jsx("div",{className:"introduced-methods",children:Me.map(k=>e.jsxs("button",{type:"button",className:"introduced-pill lineage-pill",onClick:()=>s(`/paper/${k.route_identifier}`),children:[e.jsx(Ne,{title:k.title}),e.jsx("span",{className:"introduced-arrow",children:"→"})]},`successor-${k.id}`))})]}),ze.length>0&&e.jsxs("div",{className:"lineage-row",children:[e.jsx("span",{className:"introduced-label lineage-label",children:ze.length===1?"Predecessor paper":"Predecessor papers"}),e.jsx("div",{className:"introduced-methods",children:ze.map(k=>e.jsxs("button",{type:"button",className:"introduced-pill lineage-pill",onClick:()=>s(`/paper/${k.route_identifier}`),children:[e.jsx("span",{className:"introduced-arrow lineage-arrow-back",children:"←"}),e.jsx(Ne,{title:k.title})]},`predecessor-${k.id}`))})]})]}),e.jsx(Hn,{canEdit:!0,onEditMethods:()=>N("methods"),onEditTasks:()=>N("tasks"),paper:c,readerChatRoute:Zs}),e.jsx(sn,{canCopyBadge:ne.length>0,canEdit:!0,evaluationsByTask:v,evaluationsLoading:p,isAdmin:i,onCopyBadge:Ue,onEdit:()=>N("evaluations"),onRefresh:()=>void w(),paper:c,visibleEvaluationCount:(m==null?void 0:m.length)??0})]}),e.jsx(Dn,{allHfArtifactUrls:Ks,citationCopied:M,citationDisplay:Gs,hfArtifactViewer:Vs,onCopyCitation:be,onEditHfArtifacts:()=>N("hf_artifacts"),onEditRepositories:()=>N("repositories"),onEditXThreads:()=>N("x_threads"),paper:c,relatedIsLoading:x.isLoading,relatedPapers:x.data,user:a})]}),e.jsx(Zr,{activeEditor:E,arxivId:l,editSubmitMode:o,evaluations:u??[],isAdmin:i,isLinkedAuthor:P,onOpenChange:R,paper:c}),e.jsx(Oa,{open:L!==null,onOpenChange:k=>{k||B(null)},sectionLabel:L?Aa[L]:"this paper",returnTo:typeof window<"u"?window.location.pathname:"/"})]})};export{Hi as default}; +}`;return{citationDisplay:c(s,`{{${r}}}`),citationCopy:c(t.title,`{${a}}`)}}function ur(t,s,r){var p,g,n;const a={models:t.hf_models??[],datasets:t.hf_datasets??[],spaces:t.hf_spaces??[]},i=t.linked_hf_artifacts,c=t.hf_artifact_summary,o={models:[...(s==null?void 0:s.modelUrls)??[],...(i==null?void 0:i.models)??[]],datasets:[...(s==null?void 0:s.datasetUrls)??[],...(i==null?void 0:i.datasets)??[]],spaces:[...(s==null?void 0:s.spaceUrls)??[],...(i==null?void 0:i.spaces)??[]]},l={models:Xe(s==null?void 0:s.models,c==null?void 0:c.model_count),datasets:Xe(s==null?void 0:s.datasets,c==null?void 0:c.dataset_count),spaces:Xe(s==null?void 0:s.spaces,c==null?void 0:c.space_count)},d={models:Ge(a.models,o.models,"Model"),datasets:Ge(a.datasets,o.datasets,"Dataset"),spaces:Ge(a.spaces,o.spaces,"Space")},v={models:d.models.map(({href:h})=>h),datasets:d.datasets.map(({href:h})=>h),spaces:d.spaces.map(({href:h})=>h)},b=t.arxiv_id!=null?re(t.arxiv_id):null,u=t.arxiv_id?{isLoading:r,paperHref:`https://huggingface.co/papers/${b}`,rows:[{label:"Models",href:We(`https://huggingface.co/models?other=arxiv:${t.arxiv_id}`,a.models),count:Qe(a.models,o.models,l.models),isLimited:s==null?void 0:s.isLimited,links:d.models},{label:"Datasets",href:We(`https://huggingface.co/datasets?other=arxiv:${t.arxiv_id}`,a.datasets),count:Qe(a.datasets,o.datasets,l.datasets),isLimited:s==null?void 0:s.isLimited,links:d.datasets},{label:"Spaces",href:We(`https://huggingface.co/papers/${b}`,a.spaces),count:Qe(a.spaces,o.spaces,l.spaces),isLimited:s==null?void 0:s.isLimited,links:d.spaces}],footer:`Cite arxiv.org/abs/${b} in a HF README to link it here.`}:{isLoading:!1,paperHref:null,rows:[{label:"Models",href:Ve(a.models),count:a.models.length,links:d.models},{label:"Datasets",href:Ve(a.datasets),count:a.datasets.length,links:d.datasets},{label:"Spaces",href:Ve(a.spaces),count:a.spaces.length,links:d.spaces}],footer:null},m=(t.methods??[]).filter(({source_paper_id:h})=>h===t.id),f=t.introduced_benchmarks??[],y=t.introduced_frameworks??[],w=[m.length&&(m.length===1?"this method":"these methods"),f.length&&(f.length===1?"this benchmark":"these benchmarks"),y.length&&(y.length===1?"this framework":"these frameworks")].filter(h=>!!h);return{...dr(t),allHfArtifactUrls:v,authorEntries:t.authors.map((h,j)=>{var S,E,C,R,L,B;return{name:h,id:((E=(S=t.author_links)==null?void 0:S[j])==null?void 0:E.id)??null,hf_username:((R=(C=t.author_links)==null?void 0:C[j])==null?void 0:R.hf_username)??null,hf_avatar_url:((B=(L=t.author_links)==null?void 0:L[j])==null?void 0:B.hf_avatar_url)??null}}),copyableRanks:sr(t.leaderboard_ranks),hasIntroducedItems:w.length>0,hasLineageItems:!!((p=t.predecessor_papers)!=null&&p.length||(g=t.successor_papers)!=null&&g.length),hfArtifactViewer:u,hfPaperExists:!!(s!=null&&s.paperExists),introducedBenchmarks:f,introducedFrameworks:y,introducedMethods:m,introducedSummary:w.join(" and "),numPages:t.num_pages||null,paperSourceLabel:t.arxiv_id?`arXiv:${t.arxiv_id}`:"External resource",predecessorPapers:t.predecessor_papers??[],projectPages:((n=t.project_pages)==null?void 0:n.filter(({url:h})=>h).map(h=>({...h,safeHref:Y(h.url)})))??[],repoSummary:wa(t.repositories),safeAbstractUrl:Y(t.url_abs),safeConferenceUrl:Y(t.conference_url_abs),safePdfUrl:Y(t.url_pdf),successorPapers:t.successor_papers??[]}}const mr=["tldr","abstract","tasks","methods","results"];function hr(t){if(!t)return{section:null,resultsTaskSlug:null};const[s,r]=t.split("?",2);if(!mr.includes(s))return{section:null,resultsTaskSlug:null};const a=s;return a!=="results"||!r?{section:a,resultsTaskSlug:null}:{section:a,resultsTaskSlug:new URLSearchParams(r).get("task")}}const vs=t=>`results-task-${t}`,pr=t=>`#results?task=${encodeURIComponent(t)}`;function fr({direct:t,paperId:s,refetchEvaluations:r,refetchPaper:a}){a(),r(),!(!t||!s)&&(U.primeCurationState(s,!0).catch(()=>{}),$e.primeCurationState(s,!0).catch(()=>{}))}function gr(t,s){const r=t?ta(t):"",a=rs(),{toast:i}=J(),{preferences:c}=Ia(),o=Ea(r,!!r),l=o.data,[d,v]=x.useState(!1);x.useEffect(()=>{!t||t===r||a(`/paper/${r}${window.location.search}${window.location.hash}`,{replace:!0})},[r,a,t]),Pa((l==null?void 0:l.title)&&(l.page_title||$a(l.title))),x.useEffect(()=>{if(v(!1),!(l!=null&&l.id))return;const h=window.setTimeout(()=>v(!0),0);return()=>window.clearTimeout(h)},[l==null?void 0:l.id]);const b=d&&!!(l!=null&&l.id),u=lr(d?l==null?void 0:l.arxiv_id:void 0),m=rr(l==null?void 0:l.id,b),f=Q({queryKey:[...me.feeds.versions,l==null?void 0:l.arxiv_id],queryFn:()=>U.versions(re(l.arxiv_id)),enabled:b&&!!(l!=null&&l.arxiv_id),staleTime:it}),y=Q({queryKey:[...me.feeds.related,l==null?void 0:l.id],queryFn:()=>U.related(l.arxiv_id||l.id,4),enabled:b,staleTime:it});x.useEffect(()=>{const h=()=>{fr({direct:s==="direct",paperId:l==null?void 0:l.id,refetchEvaluations:m.refetch,refetchPaper:o.refetch}),i({title:"This section changed",description:"The latest state has been reloaded. Review your changes before submitting again.",variant:"destructive"})};return window.addEventListener("pwc:catalog-conflict",h),()=>window.removeEventListener("pwc:catalog-conflict",h)},[s,m.refetch,l==null?void 0:l.id,o.refetch,i]);const w=x.useMemo(()=>{const h=m.data;return!h||!c.hide_closed_source_evals?h:h.filter(j=>j.is_open!==!1)},[m.data,c.hide_closed_source_evals]),p=x.useMemo(()=>{if(!w)return[];const h=new Map;for(const j of w){const S=h.get(j.task_id);S?S.rows.push(j):h.set(j.task_id,{taskId:j.task_id,taskName:j.task_name||"—",taskSlug:j.task_slug,rows:[j]})}return[...h.values()]},[w]),g=x.useMemo(()=>l?ur(l,u.data,u.isLoading):null,[u.data,u.isLoading,l]),n=x.useRef(!1);return x.useEffect(()=>{n.current=!1},[r]),x.useEffect(()=>{let h=0;const j=(E=!1,C=!1)=>{const{section:R,resultsTaskSlug:L}=hr(window.location.hash.slice(1));if(!R||!l||R==="tldr"&&!l.tldr||R==="results"&&(!b||m.isLoading)||!E&&n.current)return;let B=R==="results"&&L?document.getElementById(vs(L)):document.getElementById(R);if(!B&&R==="results"&&L){if(p.some(({taskSlug:H})=>H===L))return;B=document.getElementById("results")}B&&(h=window.requestAnimationFrame(()=>{n.current=!0,B.scrollIntoView({block:"start",behavior:C?"smooth":"auto"})}))};j();const S=()=>{n.current=!1,j(!0,!0)};return window.addEventListener("hashchange",S),()=>{window.removeEventListener("hashchange",S),h&&window.cancelAnimationFrame(h)}},[p,m.isLoading,l,b]),{arxivId:r,evaluations:m.data,evaluationsByTask:p,evaluationsLoading:m.isLoading,paper:l,paperError:o.error,paperLoading:o.isLoading,presentation:g,refetchEvaluations:m.refetch,refetchPaper:o.refetch,relatedQuery:y,versions:f.data??[],visibleEvaluations:w}}function xr(){const[t,s]=x.useState(null),r=x.useCallback(i=>{s(i)},[]),a=x.useCallback((i,c)=>{s(o=>c?i:o===i?null:o)},[]);return{activeEditor:t,openEditor:r,setEditorOpen:a}}function br({paperId:t}){const[s,r]=x.useState(!1),[a,i]=x.useState(!1),[c,o]=x.useState(!1),l=`Help me edit https://paperswithcode.co/paper/${t} using the public pwc CLI from https://github.com/huggingface/pwc-cli. Install or update the CLI following its README, then run pwc skills add to load its instructions. Run pwc auth login --paper ${t}; I will authorize this paper in my browser. Export with pwc paper edit export ${t} --output edits.json, make explicit operations for the corrections I request, and preview before submitting. For organization changes, use an organizations operation with payload {"organization_ids": [existing organization IDs]}; this replaces the paper’s organization links and publishes directly. Use existing organizations, benchmark and metric definitions, preserve unrelated entries, and cite source URLs where available. Never print or copy credentials. Ask me what to change if I have not specified it.`;return e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",className:"action-btn",title:"Edit this paper page with Claude, Codex, Cursor, or OpenCode",onClick:()=>{r(!1),i(!1),o(!0)},children:[e.jsx(Fa,{}),"Edit with your agent"]}),e.jsx(Ie,{open:c,onOpenChange:o,children:e.jsxs(Re,{className:"max-w-2xl",children:[e.jsxs(Ae,{children:[e.jsx(Le,{children:"Edit this paper with your agent"}),e.jsx(Te,{children:"Spotted a missing code link, a wrong task, or a missing benchmark result? Your favorite coding agent can fix it for you."})]}),e.jsx(Ua,{}),e.jsxs("ol",{className:"list-decimal space-y-1 pl-5 text-sm text-muted-foreground",children:[e.jsx("li",{children:"Copy the prompt below."}),e.jsx("li",{children:"Paste it into Claude Code, Codex, Cursor, OpenCode, or another coding agent, and tell it what to change."}),e.jsxs("li",{children:["The agent installs the ",e.jsx("a",{className:"underline",href:"https://github.com/huggingface/pwc-cli",target:"_blank",rel:"noreferrer",children:"pwc CLI"}),", asks you to authorize this paper with your Hugging Face account, and previews the edits before submitting them."]})]}),e.jsx("textarea",{"aria-label":"Paper edit prompt",readOnly:!0,value:l,className:"h-48 w-full resize-none rounded border bg-muted/40 p-3 font-mono text-xs",onFocus:d=>d.currentTarget.select()}),a&&e.jsx("p",{role:"alert",className:"text-sm text-destructive",children:"Could not copy automatically. Select the prompt above and copy it manually."}),e.jsxs(A,{className:"justify-self-end",onClick:async()=>{try{await navigator.clipboard.writeText(l),r(!0),i(!1)}catch{i(!0)}},children:[s?e.jsx(gt,{size:14}):e.jsx(Ba,{size:14}),s?"Prompt copied":"Copy prompt"]})]})})]})}function jr(t){return t.map(s=>{const r=s.best_metric||Object.keys(s.metrics)[0]||"";return{id:s.id,task_id:s.task_id,dataset_id:s.dataset_id,model_name:s.model_name||"",harness:s.harness||"",metric_name:r,metric_value:String(s.metrics[r]??""),original_metrics:{...s.metrics},original_metric_name:r,best_rank:s.best_rank!=null?String(s.best_rank):"",num_parameters:s.num_parameters!=null?String(s.num_parameters):"",hf_model_url:s.hf_model_url||"",is_open:s.is_open!==!1,operation:"unchanged"}})}function vr(t,s){const r={...t.original_metrics},a=r[t.original_metric_name];return t.original_metric_name!==s&&delete r[t.original_metric_name],r[s]=a!=null&&t.metric_value===String(a)?a:t.metric_value,r}function yr(t){const s=t==null?void 0:t.trim();return s?Number(s):void 0}function qt(t){const s=t.trim();return s?Number(s):null}function Ye(t){return t.trim()||null}function Je(t){return!!(t&&/^\d+$/.test(t.trim())&&Number.isSafeInteger(Number(t))&&Number(t)>0)}function ys(t){const s=[];return t.forEach((r,a)=>{var o;if(r.operation==="unchanged")return;const i=(l,d)=>{s.push({rowIndex:a,field:l,message:d})};if(r.operation!=="create"&&!Je(r.id)&&i("id","This result has no valid evaluation ID. Reload the paper before editing it."),r.operation==="delete")return;Je(r.task_id)||i("task_id","Select a valid task."),Je(r.dataset_id)||i("dataset_id","Select a valid dataset.");const c=r.metric_name.trim();c?c!==r.original_metric_name&&Object.prototype.hasOwnProperty.call(r.original_metrics,c)&&i("metric_name",`Cannot rename a metric to "${c}": this evaluation already has that score.`):i("metric_name","Select a metric."),(o=r.best_rank)!=null&&o.trim()&&!Number.isSafeInteger(Number(r.best_rank))&&i("best_rank","Enter a whole-number rank."),r.num_parameters.trim()&&(!Number.isSafeInteger(Number(r.num_parameters))||Number(r.num_parameters)<0)&&i("num_parameters","Enter a non-negative whole-number parameter count."),r.metric_value.trim()||i("metric_value","Enter a metric value.")}),s}function _r(t,s){const r=ys(t);return r.length?{valid:!1,errors:r}:{valid:!0,operations:kr(t,s)}}function kr(t,s){const r=[];for(const a of t){if(a.operation==="delete"){r.push({op:"delete",evaluation_id:Number(a.id)});continue}if(a.operation!=="create"&&a.operation!=="update")continue;const i=a.metric_name.trim(),c=s(a.task_id,a.dataset_id),o={task_id:Number(a.task_id),dataset_id:Number(a.dataset_id),metrics:vr(a,i),best_metric:i,is_open:a.is_open},l=a.model_name.trim(),d=yr(a.best_rank);if(a.operation==="create"){const v=qt(a.num_parameters),b=Ye(a.hf_model_url);r.push({op:"create",data:{...o,...l?{model_name:l}:{},...c&&a.harness.trim()?{harness:a.harness.trim()}:{},...d!==void 0?{best_rank:d}:{},...v!==null?{num_parameters:v}:{},...b!==null?{hf_model_url:b}:{}}});continue}r.push({op:"update",evaluation_id:Number(a.id),data:{...o,...l?{model_name:l}:{},harness:c?Ye(a.harness):null,...d!==void 0?{best_rank:d}:{},num_parameters:qt(a.num_parameters),hf_model_url:Ye(a.hf_model_url)}})}return r}function Nr(t,s){return s.map(r=>{switch(r.op){case"delete":return{operation:"delete",evaluation_id:r.evaluation_id};case"update":return{operation:"update",evaluation_id:r.evaluation_id,payload:r.data};case"create":return{operation:"create",payload:{paper_id:t,...r.data}}}})}function wr(t,s){const r=t.metrics(s.task_id,s.dataset_id).metrics.map(a=>({value:a.metric_name,label:a.metric_name,description:a.metric_direction==="higher_is_better"?"Higher is better":"Lower is better"}));return s.metric_name&&!r.some(a=>a.value===s.metric_name)&&r.unshift({value:s.metric_name,label:`${s.metric_name} (legacy)`}),r}const K="text-left py-2 px-2 font-medium text-sm";function Cr({rows:t,catalog:s,draftErrors:r,errorId:a,isAdmin:i,showHarnessColumn:c,onFieldChange:o,onOpenSourceChange:l,onDelete:d}){const v=(m,f)=>r.some(y=>y.rowIndex===m&&y.field===f),b=(m,f)=>{const y=r.find(w=>w.rowIndex===m&&w.field===f);return y?e.jsx("p",{id:`${a}-${m}-${f}-error`,className:"text-xs text-destructive",children:y.message}):null},u=(m,f)=>({id:`${a}-${m}-${f}`,"aria-invalid":v(m,f),"aria-describedby":`${a}-${m}-${f}-error`});return e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full border-collapse",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-border",children:[e.jsx("th",{className:`${K} min-w-[180px]`,children:"Task"}),e.jsx("th",{className:`${K} min-w-[180px]`,children:"Dataset"}),e.jsx("th",{className:`${K} ${c?"min-w-[140px]":"min-w-[240px]"}`,children:"Model"}),c&&e.jsx("th",{className:`${K} min-w-[140px]`,children:"Harness"}),e.jsx("th",{className:`${K} min-w-[140px]`,children:"Metric"}),e.jsx("th",{className:K,children:"Value"}),e.jsx("th",{className:K,children:"Parameters"}),e.jsx("th",{className:`${K} min-w-[200px]`,children:"HF model URL"}),e.jsx("th",{className:`${K} w-20`,children:"Open source"}),e.jsx("th",{className:`${K} w-16`,children:"Action"})]})}),e.jsx("tbody",{children:t.map((m,f)=>{if(m.operation==="delete")return null;const y=s.task(m.task_id),w=s.dataset(m.dataset_id),p=s.metrics(m.task_id,m.dataset_id),g=wr(s,m);return e.jsxs("tr",{className:"border-b border-border",children:[e.jsx("td",{className:"py-2 px-2",children:e.jsxs("div",{role:"group","aria-label":"Task","aria-describedby":`${a}-${f}-task_id-error`,children:[e.jsx(Bt,{value:m.task_id,onChange:n=>o(f,"task_id",n),placeholder:"Select task",searchPlaceholder:"Search tasks...",emptyMessage:"No tasks found.",selectedOption:y?{value:y.id,label:y.name}:null,queryKey:["eval-edit-task-search"],queryFn:s.searchTasks}),b(f,"task_id")]})}),e.jsx("td",{className:"py-2 px-2",children:e.jsxs("div",{role:"group","aria-label":"Dataset","aria-describedby":`${a}-${f}-dataset_id-error`,children:[e.jsx(Bt,{value:m.dataset_id,onChange:n=>o(f,"dataset_id",n),placeholder:m.task_id?"Select dataset":"Select task first",searchPlaceholder:"Search datasets...",emptyMessage:m.task_id?"No datasets found for this task.":"Select a task first.",disabled:!m.task_id,selectedOption:w?{value:w.id,label:w.name}:null,queryKey:["eval-edit-dataset-search",m.task_id],queryFn:s.searchDatasets(m.task_id),enabled:!!m.task_id}),b(f,"dataset_id")]})}),e.jsx("td",{className:"py-2 px-2",children:e.jsx(z,{type:"text",className:"w-full text-sm",placeholder:"Model name",value:m.model_name,onChange:n=>o(f,"model_name",n.target.value)})}),c&&e.jsx("td",{className:"py-2 px-2",children:s.supportsHarness(m.task_id,m.dataset_id)?e.jsx(z,{type:"text",className:"w-full text-sm",placeholder:"Claude Code, Terminus, ...",value:m.harness,onChange:n=>o(f,"harness",n.target.value)}):e.jsx("span",{className:"text-xs text-muted-foreground",children:"Not supported"})}),e.jsxs("td",{className:"py-2 px-2",children:[!m.task_id||!m.dataset_id?e.jsx("span",{className:"text-xs text-muted-foreground",children:"Select task + dataset"}):p.loading?e.jsxs("span",{className:"inline-flex items-center text-xs text-muted-foreground",children:[e.jsx(vt,{className:"mr-1 h-3 w-3 animate-spin"}),"Loading metrics..."]}):g.length>0?e.jsxs("select",{className:"w-full rounded-md border border-border bg-background px-2 py-1 text-sm",...u(f,"metric_name"),value:m.metric_name,onChange:n=>o(f,"metric_name",n.target.value),children:[e.jsx("option",{value:"",children:"Select metric"}),g.map(n=>e.jsx("option",{value:n.value,children:n.label},n.value))]}):!p.error&&e.jsx("span",{className:"text-xs text-muted-foreground",children:"No configured metrics"}),p.error&&e.jsx("p",{className:"text-xs text-destructive",children:"Could not load metrics"}),b(f,"metric_name")]}),e.jsxs("td",{className:"py-2 px-2",children:[e.jsx(z,{type:"text",className:"w-full text-sm",placeholder:"44.9",...u(f,"metric_value"),value:m.metric_value,onChange:n=>o(f,"metric_value",n.target.value)}),b(f,"metric_value")]}),e.jsxs("td",{className:"py-2 px-2",children:[e.jsx(z,{type:"number",min:0,step:1,className:"w-full text-sm",placeholder:"e.g. 7000000000",...u(f,"num_parameters"),value:m.num_parameters,onChange:n=>o(f,"num_parameters",n.target.value),title:"Raw model parameter count (e.g. 7000000000 for a 7B model). Leave blank if unknown."}),b(f,"num_parameters")]}),e.jsx("td",{className:"py-2 px-2",children:e.jsx(z,{type:"url",className:"w-full text-sm",placeholder:"https://huggingface.co/org/model",value:m.hf_model_url,onChange:n=>o(f,"hf_model_url",n.target.value),title:"Hugging Face model page for this row (must start with https://huggingface.co/). Leave blank if none."})}),e.jsx("td",{className:"py-2 px-2 text-center",children:e.jsx("input",{type:"checkbox",className:"h-4 w-4 align-middle",checked:m.is_open,onChange:n=>l(f,n.target.checked),title:"Whether the evaluated model is open-source. Uncheck for closed-source models."})}),e.jsx("td",{className:"py-2 px-2",children:e.jsx(A,{variant:"ghost",size:"sm",onClick:()=>d(f),className:"h-8 w-8 p-0 text-destructive hover:text-destructive",title:m.id&&!i?"Only administrators can delete published results":"Remove row",disabled:!!m.id&&!i,children:e.jsx(fe,{className:"w-4 h-4"})})})]},f)})})]})})}function Sr(t){const s=typeof window<"u"&&window.location.hostname==="staging.paperswithcode.co";return e.jsxs("div",{className:"rounded-md border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-900 dark:border-amber-900 dark:bg-amber-950/40 dark:text-amber-100",children:[e.jsx("p",{className:"font-medium",children:s?"Test-only: this change stays on staging.":"Your changes go live right away."}),e.jsx("p",{className:"mt-1 leading-snug",children:s?"This exercises staging-local pending behavior and is not queued for production review.":"Edits are applied immediately and reviewed afterwards. A few, such as links to unfamiliar sites, are held for an admin first."})]})}function V({title:t,description:s,className:r,submitMode:a,isAuthor:i=!1,onOpenChange:c,onSave:o,isSaving:l,saveDisabled:d=!1,footerStart:v,children:b}){const u=a==="pending";return e.jsx(Ie,{open:!0,onOpenChange:c,children:e.jsxs(Re,{className:r,children:[e.jsxs(Ae,{children:[e.jsx(Le,{children:t}),e.jsx(Te,{children:s})]}),u&&e.jsx(Sr,{isAuthor:i}),b,e.jsxs(jt,{children:[v,e.jsx(A,{variant:"outline",onClick:()=>c(!1),children:"Cancel"}),e.jsx(A,{onClick:o,disabled:l||d,children:l?e.jsxs(e.Fragment,{children:[e.jsx(vt,{className:"w-4 h-4 mr-2 animate-spin"}),u?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(gt,{className:"w-4 h-4 mr-2"}),u?"Submit for review":"Save Changes"]})})]})]})})}const Ze=100,Kt=t=>["eval-edit","task",t],Gt=t=>["eval-edit","dataset",t];function ce(...t){return new Map(t.flat().flatMap(s=>s?[[s.id,s]]:[]))}function et(t){return[...new Set(t.filter(Boolean))]}function Er(t,s){var g;const r=Z(),a=x.useMemo(()=>et(t.map(n=>n.task_id)),[t]),i=x.useMemo(()=>et(t.map(n=>n.dataset_id)),[t]),c=x.useMemo(()=>et(t.map(n=>n.task_id&&n.dataset_id?`${n.task_id}:${n.dataset_id}`:"")),[t]),o=x.useMemo(()=>ce(s.map(n=>n.task_name?{id:n.task_id,name:n.task_name,slug:n.task_slug,level:0}:void 0)),[s]),l=x.useMemo(()=>ce(s.map(n=>n.dataset_name?{id:n.dataset_id,name:n.dataset_name,slug:n.dataset_slug}:void 0)),[s]),d=ye({queries:a.filter(n=>!o.has(n)).map(n=>({queryKey:Kt(n),queryFn:()=>G.getTask(n),staleTime:1/0})),combine:n=>n.map(h=>h.data)}),v=ye({queries:a.map(n=>({queryKey:["eval-edit","task-datasets",n],queryFn:async()=>(await G.listDatasets({task_id:Number(n),page_size:Ze})).results}))}),b=ce(...v.map(n=>n.data??[])),u=ye({queries:i.filter(n=>!l.has(n)&&!b.has(n)).map(n=>({queryKey:Gt(n),queryFn:()=>G.getDataset(n),staleTime:1/0})),combine:n=>({data:n.map(h=>h.data),loaded:n.every(h=>h.isSuccess)})}),m=ye({queries:c.map(n=>{const[h,j]=n.split(":");return{queryKey:["eval-edit","leaderboard-metrics",h,j],queryFn:()=>G.leaderboardMetrics(j,h)}})}),f=ce([...o.values()],d),y=ce([...l.values()],[...b.values()],u.data),w=((g=v.find(n=>n.error))==null?void 0:g.error)??null,p=v.every(n=>n.isSuccess)&&u.loaded;return{task:n=>f.get(n),dataset:n=>y.get(n),supportsHarness:(n,h)=>{var j;return!!(n&&h&&((j=y.get(h))!=null&&j.supports_harness))},metrics:(n,h)=>{const j=m[c.indexOf(`${n}:${h}`)];return{metrics:(j==null?void 0:j.data)??[],loading:(j==null?void 0:j.isFetching)??!1,error:(j==null?void 0:j.error)??null}},datasetListError:w,harnessSupportKnown:p,searchTasks:async n=>{const h=await G.listTasks({page_size:Ze,...n?{q:n}:{}});return h.results.forEach(j=>r.setQueryData(Kt(j.id),j)),h.results.map(j=>{var S;return{value:j.id,label:j.name,description:(S=j.description)==null?void 0:S.slice(0,100)}})},searchDatasets:n=>async h=>{const j=await G.listDatasets({task_id:Number(n),page_size:Ze,...h?{q:h}:{}});return j.results.forEach(S=>r.setQueryData(Gt(S.id),S)),j.results.map(S=>({value:S.id,label:S.name,description:S.full_name}))}}}function Pr(t,{toast:s,queryClient:r,paperIds:a,queuedDescription:i}){if(t.status==="approved"){fs(r,a),gs(r),s({title:"Edit applied",description:"Your change is now live on this paper."});return}s({title:"Edit submitted for review",description:i})}function W({editType:t,paperId:s,arxivId:r,submitMode:a,messages:i,toPendingPayload:c,applyDirect:o,applyOptimistic:l,onSaved:d,onClose:v}){const b=Z(),{toast:u}=J(),m=a==="pending";return ae({mutationFn:async f=>m?{submitted:await hs.submit(ps(Number(s),t,c(f)))}:{paper:await o(f)},onMutate:async f=>{if(m||!l)return{};const y=await l(f);return v(),{rollback:y}},onSuccess:(f,y)=>{"submitted"in f?(Pr(f.submitted,{toast:u,queryClient:b,paperIds:[s,r],queuedDescription:`Thanks! An admin will review your proposed ${i.proposal} shortly.`}),d==null||d(y,{direct:!1,live:f.submitted.status==="approved"})):(f.paper&&qa(b,f.paper,[s,r]),d==null||d(y,{direct:!0,live:!0})),v()},onError:(f,y,w)=>{var p;(p=w==null?void 0:w.rollback)==null||p.call(w),u({title:m?"Could not submit edit":`Could not save ${i.noun}`,description:xt(f,m?"Failed to submit your edit. Please try again.":i.failure),variant:"destructive"})}})}const $r={task_id:"",dataset_id:"",model_name:"",harness:"",metric_name:"",metric_value:"",original_metrics:{},original_metric_name:"",best_rank:"",num_parameters:"",hf_model_url:"",is_open:!0,operation:"create"};function Ir(t){return(t??[]).some(s=>s.slug==="coding-agents"||s.name.trim().toLowerCase()==="coding agents")}function Qt(t,s){return{...t,...s,operation:t.operation==="unchanged"?"update":t.operation}}function Rr({onOpenChange:t,paperId:s,arxivId:r,initialEvaluations:a,paperTasks:i,submitMode:c="direct",isAdmin:o=!1,isAuthor:l=!1}){const d=x.useId(),v=Ir(i),[b,u]=x.useState(null),m=x.useMemo(()=>jr(a),[a]),f=b??m,[y,w]=x.useState(!1),p=y?ys(f):[],[g,n]=x.useState(null),h=Er(f,a),j=Z(),{toast:S}=J(),E=W({editType:"evaluations",paperId:s,arxivId:r,submitMode:c,messages:{proposal:"evaluation changes",noun:"evaluations",failure:"Failed to update evaluations."},toPendingPayload:P=>({operations:P}),applyDirect:async P=>{if(!o&&P.length>50)throw new Error("Contributor evaluation batches are limited to 50 operations; contact an admin.");const N=Number(s);await $e.batch(N,Nr(N,P))},onSaved:(P,{live:N})=>{N&&za(j,Ma(s,a,P,r))},onClose:()=>t(!1)}),C=(P,N)=>u(f.map((_,I)=>I===P?N(_):_)),R=P=>{if(!f[P].id){u(f.filter((N,_)=>_!==P));return}window.confirm("Delete this evaluation? You will be asked to sign in again if your session is older than 15 minutes.")&&C(P,N=>({...N,operation:"delete"}))},L=(P,N,_)=>{C(P,I=>{if(I[N]===_)return I;const $={[N]:_};return(N==="task_id"||N==="dataset_id")&&Object.assign($,{original_metrics:{},original_metric_name:"",metric_value:"",best_rank:"",metric_name:""}),N==="task_id"&&Object.assign($,{dataset_id:"",harness:""}),N==="dataset_id"&&_&&!h.supportsHarness(I.task_id,_)&&($.harness=""),Qt(I,$)})},B=()=>{w(!0);const P=_r(f,h.supportsHarness);if(P.valid){if(P.operations.length===0){S({title:"No changes to submit",description:"Your evaluation list matches the existing data."});return}E.mutate(P.operations)}},H=P=>f.slice(0,P+1).filter(N=>N.operation!=="delete").length;return e.jsxs(e.Fragment,{children:[e.jsxs(V,{title:"Edit Evaluation Results",description:"Add, edit, or remove evaluation results for this paper. Each row represents a benchmark result.",className:"max-w-6xl max-h-[800px]",submitMode:c,isAuthor:l,onOpenChange:t,onSave:B,isSaving:E.isPending,saveDisabled:!h.harnessSupportKnown,footerStart:e.jsxs("div",{className:"flex flex-wrap gap-2 sm:mr-auto",children:[e.jsx(A,{variant:"ghost",onClick:()=>n("benchmark"),children:"Suggest a new benchmark"}),e.jsx(A,{variant:"ghost",onClick:()=>n("metric"),children:"Suggest a new metric"})]}),children:[p.length>0&&e.jsxs("div",{role:"alert",className:"text-sm text-destructive",children:["Fix the following errors before saving. No changes have been submitted.",e.jsx("ul",{children:p.map(P=>e.jsxs("li",{children:["Row ",H(P.rowIndex),": ",P.message]},`${P.rowIndex}-${P.field}`))})]}),h.datasetListError&&e.jsxs("p",{className:"text-sm text-destructive",children:["Could not load the benchmarks for these tasks: ",h.datasetListError.message]}),e.jsxs("div",{className:"py-4 overflow-y-auto max-h-[600px]",children:[f.some(P=>P.operation!=="delete")?e.jsx(Cr,{rows:f,catalog:h,draftErrors:p,errorId:d,isAdmin:o,showHarnessColumn:v,onFieldChange:L,onOpenSourceChange:(P,N)=>C(P,_=>Qt(_,{is_open:N})),onDelete:R}):e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(Ka,{className:"w-12 h-12 mx-auto mb-3 opacity-30"}),e.jsx("p",{children:"No evaluation results yet"}),e.jsx("p",{className:"text-sm mt-2",children:'Click "Add Row" below to add a new evaluation'})]}),e.jsx("div",{className:"mt-4",children:e.jsxs(A,{variant:"outline",size:"sm",onClick:()=>u([...f,$r]),className:"flex items-center space-x-2",children:[e.jsx(ge,{className:"w-4 h-4"}),e.jsx("span",{children:"Add Row"})]})})]})]}),e.jsx(ms,{open:g!==null,onOpenChange:P=>{P||n(null)},paperId:s,kind:g??"benchmark"})]})}const tt=[{key:"hf_models",label:"Models",placeholder:"https://huggingface.co/org/model"},{key:"hf_datasets",label:"Datasets",placeholder:"https://huggingface.co/datasets/org/data"},{key:"hf_spaces",label:"Spaces",placeholder:"https://huggingface.co/spaces/org/demo"}];function Xt(t){return t.map(s=>s.trim()).filter(Boolean)}function st(t,s){const r=Xt(t).sort(),a=Xt(s).sort();return r.length!==a.length?!1:r.every((i,c)=>i===a[c])}function Ar(t,s){return st(t.hf_models,s.hf_models)&&st(t.hf_datasets,s.hf_datasets)&&st(t.hf_spaces,s.hf_spaces)}function Lr({onOpenChange:t,paperId:s,arxivId:r,initialArtifacts:a,submitMode:i="direct",isAuthor:c=!1}){const[o,l]=x.useState(a),[d,v]=x.useState({hf_models:"",hf_datasets:"",hf_spaces:""}),b=W({editType:"hf_artifacts",paperId:s,arxivId:r,submitMode:i,messages:{proposal:"Hugging Face artifact changes",noun:"Hugging Face artifacts",failure:"Failed to update Hugging Face artifacts."},toPendingPayload:p=>p,applyDirect:p=>U.updateHfArtifacts(s,p),onClose:()=>t(!1)}),u=()=>{const p={hf_models:[...o.hf_models],hf_datasets:[...o.hf_datasets],hf_spaces:[...o.hf_spaces]};for(const{key:g}of tt){const n=d[g].trim();if(n){if(p[g].some(h=>h.trim()===n))return alert(`This ${g.replace("hf_","")} URL is already added`),null;p[g]=[...p[g],n]}}return p},m=p=>{const g=d[p].trim();if(g){if(o[p].some(n=>n.trim()===g)){alert(`This ${p.replace("hf_","")} URL is already added`);return}l(n=>({...n,[p]:[...n[p],g]})),v(n=>({...n,[p]:""}))}},f=(p,g)=>{l(n=>({...n,[p]:n[p].filter(h=>h!==g)}))},y=()=>{const p=u();if(p===null)return;const g=Object.keys(a).some(n=>a[n].some(h=>!p[n].includes(h)));i==="direct"&&g&&!window.confirm("Remove one or more Hugging Face artifact links?")||b.mutate(p)},w=x.useMemo(()=>{const p={hf_models:[...o.hf_models],hf_datasets:[...o.hf_datasets],hf_spaces:[...o.hf_spaces]};for(const{key:g}of tt){const n=d[g].trim();if(n){if(p[g].some(h=>h.trim()===n))return!1;p[g]=[...p[g],n]}}return!Ar(p,a)},[o,d,a]);return e.jsx(V,{title:"Edit Hugging Face Artifacts",description:"Add or remove linked Hugging Face models, datasets, and Spaces for this paper.",className:"max-w-2xl max-h-[700px]",submitMode:i,isAuthor:c,onOpenChange:t,onSave:y,isSaving:b.isPending,saveDisabled:!w,children:e.jsx("div",{className:"space-y-6 py-2 overflow-y-auto max-h-[460px]",children:tt.map(({key:p,label:g,placeholder:n})=>e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium",children:g}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(z,{type:"url",placeholder:n,value:d[p],onChange:h=>v(j=>({...j,[p]:h.target.value})),onKeyPress:h=>{h.key==="Enter"&&(h.preventDefault(),m(p))},className:"flex-1"}),e.jsxs(A,{onClick:()=>m(p),size:"sm",disabled:!d[p].trim(),children:[e.jsx(ge,{className:"w-4 h-4 mr-1"}),"Add"]})]}),o[p].length>0?e.jsx("div",{className:"space-y-2",children:o[p].map(h=>e.jsxs("div",{className:"flex items-center space-x-2 p-3 bg-muted/30 rounded-lg hover:bg-muted/50 transition-colors",children:[e.jsx("span",{className:"text-sm font-medium text-paper-blue truncate flex-1",children:h}),e.jsx(A,{variant:"ghost",size:"sm",onClick:()=>f(p,h),className:"h-8 px-2 text-destructive hover:text-destructive",title:`Remove ${g.toLowerCase()} URL`,children:e.jsx(fe,{className:"w-4 h-4"})})]},h))}):e.jsxs("div",{className:"text-xs text-muted-foreground",children:["No ",g.toLowerCase()," linked yet."]})]},p))})})}const _s=["image/jpeg","image/png","image/webp","image/gif"],Tr=2*1024*1024;function Dr(t){return _s.includes(t.type)?t.size>Tr?Promise.reject(new Error("Logo must be 2 MB or smaller.")):new Promise((s,r)=>{const a=new FileReader;a.onload=()=>s({file_name:t.name,mime_type:t.type,data_url:String(a.result)}),a.onerror=()=>r(new Error("Could not read that logo.")),a.readAsDataURL(t)}):Promise.reject(new Error("Choose a JPEG, PNG, WebP, or GIF logo."))}function Fr({paperId:t,initialName:s,onApplied:r,onUnsentChange:a}){const[i,c]=x.useState(s),[o,l]=x.useState(""),[d,v]=x.useState(""),[b,u]=x.useState(null),[m,f]=x.useState(""),y=ae({mutationFn:()=>hs.submit(ps(Number(t),"new_organization",{name:i.trim(),...o.trim()?{hf_slug:o.trim()}:{},...d.trim()?{website_url:d.trim()}:{},...b?{image:b}:{}})),onSuccess:p=>{p.status==="approved"&&r(i.trim())}}),w=!y.isSuccess&&!!(o.trim()||d.trim()||b);return x.useEffect(()=>a(w),[a,w]),x.useEffect(()=>()=>a(!1),[a]),y.isSuccess?e.jsxs("p",{className:"rounded border p-3 text-sm",children:['Thanks! "',i.trim(),'" was submitted for review. Once an admin approves it, the organization is created and added to this paper.']}):e.jsxs("form",{className:"space-y-2 rounded border p-3",onSubmit:p=>{p.preventDefault(),y.mutate()},children:[e.jsx("p",{className:"text-sm font-medium",children:"Suggest a new organization"}),e.jsx(z,{"aria-label":"Organization name",placeholder:"Name",value:i,maxLength:200,onChange:p=>c(p.target.value)}),e.jsx(z,{"aria-label":"Hugging Face organization",placeholder:"Hugging Face organization (e.g. https://huggingface.co/PrimeIntellect)",value:o,onChange:p=>l(p.target.value)}),e.jsx(z,{"aria-label":"Website",type:"url",placeholder:"Website (e.g. https://www.primeintellect.ai)",value:d,onChange:p=>v(p.target.value)}),e.jsxs("label",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:["Logo (optional)",e.jsx("input",{"aria-label":"Logo",type:"file",accept:_s.join(","),onChange:p=>{var n;const g=(n=p.target.files)==null?void 0:n[0];u(null),f(""),g&&Dr(g).then(u,h=>f(h.message))}})]}),b&&e.jsx("img",{src:b.data_url,alt:"Selected logo",className:"h-12 w-12 rounded border object-contain"}),m&&e.jsx("p",{className:"text-sm text-destructive",children:m}),e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"With a Hugging Face organization it is added right away; otherwise an admin reviews it."}),e.jsx(A,{type:"submit",variant:"outline",disabled:!i.trim()||!o.trim()&&!d.trim()||y.isPending,children:y.isPending?"Submitting...":"Submit organization"})]}),y.error&&e.jsx("p",{className:"text-sm text-destructive",children:xt(y.error,"Could not submit this organization.")})]})}const Ur=({onOpenChange:t,paperId:s,arxivId:r,initialOrganizationIds:a,submitMode:i="direct",isAuthor:c})=>{var n;const[o,l]=x.useState(a),[d,v]=x.useState(""),[b,u]=x.useState(!1),m=Z(),{toast:f}=J(),y=Q({queryKey:[...Lt.organizations,"curation"],queryFn:()=>G.organizations(!1)}),w=x.useMemo(()=>{var S,E;const h=d.trim().toLocaleLowerCase();if(!h)return((S=y.data)==null?void 0:S.results)??[];const j=C=>C===h?0:C.startsWith(h)?1:C.split(/[^\p{L}\p{N}]+/u).some(R=>R.startsWith(h))?2:3;return(((E=y.data)==null?void 0:E.results)??[]).map(C=>({organization:C,name:C.name.toLocaleLowerCase()})).filter(({name:C})=>C.includes(h)).sort((C,R)=>j(C.name)-j(R.name)).map(({organization:C})=>C)},[(n=y.data)==null?void 0:n.results,d]),p=W({editType:"organizations",paperId:s,arxivId:r,submitMode:i,messages:{proposal:"organization changes",noun:"organizations",failure:"Failed to update organizations."},toPendingPayload:h=>({organization_ids:h}),applyDirect:h=>U.updateOrganizations(s,h),onClose:()=>t(!1)}),g=()=>{a.some(h=>!o.includes(h))&&!window.confirm("Remove one or more organizations from this paper? Destructive edits may require a fresh sign-in.")||p.mutate(o)};return e.jsxs(V,{title:"Edit organizations",description:"Associate organizations with this paper. If one is missing, search for it and suggest it for review.",submitMode:i,isAuthor:c,onOpenChange:t,onSave:g,isSaving:p.isPending,saveDisabled:b,children:[e.jsxs("div",{className:"relative",children:[e.jsx(lt,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),e.jsx(z,{type:"search","aria-label":"Search organizations",placeholder:"Search organizations...",value:d,onChange:h=>v(h.target.value),className:"pl-9 pr-9"}),d&&e.jsx("button",{type:"button",onClick:()=>v(""),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 text-muted-foreground hover:text-foreground","aria-label":"Clear organization search",children:e.jsx(ns,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"max-h-80 space-y-2 overflow-auto",children:[w.map(h=>{const j=Number(h.id);return e.jsxs("label",{className:"flex items-center gap-2 rounded border p-2",children:[e.jsx("input",{type:"checkbox",checked:o.includes(j),onChange:S=>l(E=>S.target.checked?[...E,j]:E.filter(C=>C!==j))}),h.name]},h.id)}),!y.isLoading&&w.length===0&&e.jsx("p",{className:"py-8 text-center text-sm text-muted-foreground",children:d.trim()?`No organizations found matching "${d.trim()}"`:"No organizations available"})]}),!y.isLoading&&w.length===0&&d.trim()&&e.jsx(Fr,{paperId:s,initialName:d.trim(),onApplied:h=>{t(!1),f({title:"Organization added",description:`Added "${h}" to this paper.`}),fs(m,[s]),gs(m),m.invalidateQueries({queryKey:Lt.organizations})},onUnsentChange:u},d.trim()),b&&e.jsx("p",{className:"text-sm text-muted-foreground",children:"Submit the organization above, or clear the search, before saving."})]})};function Br({onOpenChange:t,paperId:s,arxivId:r,initialProjectPages:a,submitMode:i="direct",isAuthor:c=!1}){const[o,l]=x.useState(a),[d,v]=x.useState(""),b=W({editType:"project_pages",paperId:s,arxivId:r,submitMode:i,messages:{proposal:"project page changes",noun:"project pages",failure:"Failed to update project pages."},toPendingPayload:g=>({project_pages:g}),applyDirect:g=>U.updateProjectPages(s,g),onClose:()=>t(!1)}),u=()=>{const g=d.trim();return g?o.some(n=>n.url===g)?(alert("This project page URL is already added"),null):[...o,{url:g,is_official:!1}]:o},m=()=>{const g=u();g!==null&&g.length!==o.length&&(l(g),v(""))},f=g=>{l(o.filter(n=>n.url!==g))},y=g=>{l(o.map(n=>n.url===g?{...n,is_official:!n.is_official}:n))},w=()=>{const g=u();g!==null&&(i==="direct"&&a.some(n=>!g.some(h=>h.url===n.url))&&!window.confirm("Remove one or more project pages from this paper?")||b.mutate(g))},p=x.useMemo(()=>{const g=d.trim(),n=g?[...o,{url:g,is_official:!1}]:o;if(n.length!==a.length)return!0;const h=new Map(a.map(j=>[j.url.trim(),!!j.is_official]));return n.some(j=>{const S=h.get(j.url.trim());return S===void 0||S!==!!j.is_official})},[o,d,a]);return e.jsxs(V,{title:"Edit Paper Project Pages",description:"Add or remove project page URLs (e.g. authors' demo or landing pages) associated with this paper. Mark pages as official if they are created by the paper authors.",className:"max-w-2xl max-h-[600px]",submitMode:i,isAuthor:c,onOpenChange:t,onSave:w,isSaving:b.isPending,saveDisabled:!p,children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium",children:"Add Project Page URL"}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(z,{type:"url",placeholder:"https://example.com/project",value:d,onChange:g=>v(g.target.value),onKeyPress:g=>{g.key==="Enter"&&(g.preventDefault(),m())},className:"flex-1"}),e.jsxs(A,{onClick:m,size:"sm",disabled:!d.trim(),children:[e.jsx(ge,{className:"w-4 h-4 mr-1"}),"Add"]})]})]}),e.jsx("div",{className:"py-4 overflow-y-auto max-h-[350px]",children:o.length>0?e.jsx("div",{className:"space-y-2",children:o.map((g,n)=>e.jsxs("div",{className:"flex items-center space-x-2 p-3 bg-muted/30 rounded-lg hover:bg-muted/50 transition-colors",children:[e.jsx(Mt,{className:"w-4 h-4 text-muted-foreground flex-shrink-0"}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("span",{className:"text-sm font-medium text-paper-blue truncate",children:g.url}),g.is_official&&e.jsx(xs,{variant:"secondary",className:"text-xs",children:"Official"})]})}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsxs(A,{variant:g.is_official?"default":"outline",size:"sm",onClick:()=>y(g.url),className:"h-8 px-2 text-xs",title:g.is_official?"Click to unmark as official (created by paper authors)":"Click to mark as official (created by paper authors)",children:[e.jsx(js,{className:`w-3.5 h-3.5 mr-1 ${g.is_official?"fill-current":""}`}),g.is_official?"Official":"Mark official"]}),e.jsx(A,{variant:"ghost",size:"sm",onClick:()=>f(g.url),className:"h-8 px-2 text-destructive hover:text-destructive",title:"Remove project page",children:e.jsx(fe,{className:"w-4 h-4"})})]})]},n))}):e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(Mt,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),e.jsx("p",{className:"text-sm",children:"No project pages added yet"}),e.jsx("p",{className:"text-xs mt-1",children:"Add a project page URL above to get started"})]})})]})}function zr({onOpenChange:t,paperId:s,arxivId:r,initialRepositories:a,submitMode:i="direct",isAuthor:c=!1}){const[o,l]=x.useState(a),[d,v]=x.useState(""),b=W({editType:"repositories",paperId:s,arxivId:r,submitMode:i,messages:{proposal:"repository changes",noun:"repositories",failure:"Failed to update paper repositories."},toPendingPayload:n=>({repositories:n}),applyDirect:n=>U.updateRepositories(s,n),onClose:()=>t(!1)}),u=n=>{const h=[];for(const j of n){const S=h.find(E=>zt(E.url,j.url));if(S)S.is_official=S.is_official||j.is_official;else{const E=He(j.url);h.push({url:E??j.url.trim(),is_official:j.is_official})}}return h},m=()=>{const n=d.trim(),h=n?[...o,{url:n,is_official:!1}]:o;return n&&o.some(j=>zt(j.url,n))?(alert("This repository URL is already added"),null):u(h)},f=()=>{const n=m();n!==null&&n.length!==o.length&&(l(n),v(""))},y=n=>{l(o.filter(h=>h.url!==n))},w=n=>{l(o.map(h=>h.url===n?{...h,is_official:!h.is_official}:h))},p=()=>{const n=m();n!==null&&(i==="direct"&&a.some(h=>!n.some(j=>j.url===h.url))&&!window.confirm("Remove one or more repositories from this paper?")||b.mutate(n))},g=x.useMemo(()=>{const n=d.trim(),h=n?[...o,{url:n,is_official:!1}]:o;if(h.length!==a.length)return!0;const j=u(a),S=u(h);if(S.length!==j.length)return!0;const E=new Map(j.map(C=>[He(C.url)??C.url.trim(),!!C.is_official]));return S.some(C=>{const R=He(C.url)??C.url.trim(),L=E.get(R);return L===void 0||L!==!!C.is_official})},[o,d,a]);return e.jsxs(V,{title:"Edit Paper Repositories",description:"Add or remove GitHub repository URLs associated with this paper. Mark repositories as official if they are created by the paper authors.",className:"max-w-2xl max-h-[600px]",submitMode:i,isAuthor:c,onOpenChange:t,onSave:p,isSaving:b.isPending,saveDisabled:!g,children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium",children:"Add Repository URL"}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(z,{type:"url",placeholder:"https://github.com/owner/repo",value:d,onChange:n=>v(n.target.value),onKeyPress:n=>{n.key==="Enter"&&(n.preventDefault(),f())},className:"flex-1"}),e.jsxs(A,{onClick:f,size:"sm",disabled:!d.trim(),children:[e.jsx(ge,{className:"w-4 h-4 mr-1"}),"Add"]})]})]}),e.jsx("div",{className:"py-4 overflow-y-auto max-h-[350px]",children:o.length>0?e.jsx("div",{className:"space-y-2",children:o.map((n,h)=>e.jsxs("div",{className:"flex items-center space-x-2 p-3 bg-muted/30 rounded-lg hover:bg-muted/50 transition-colors",children:[e.jsx(Ht,{className:"w-4 h-4 text-muted-foreground flex-shrink-0"}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("span",{className:"text-sm font-medium text-paper-blue truncate",children:n.url}),n.is_official&&e.jsx(xs,{variant:"secondary",className:"text-xs",children:"Official"})]})}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsxs(A,{variant:n.is_official?"default":"outline",size:"sm",onClick:()=>w(n.url),className:"h-8 px-2 text-xs",title:n.is_official?"Click to unmark as official (created by paper authors)":"Click to mark as official (created by paper authors)",children:[e.jsx(js,{className:`w-3.5 h-3.5 mr-1 ${n.is_official?"fill-current":""}`}),n.is_official?"Official":"Mark official"]}),e.jsx(A,{variant:"ghost",size:"sm",onClick:()=>y(n.url),className:"h-8 px-2 text-destructive hover:text-destructive",title:"Remove repository",children:e.jsx(fe,{className:"w-4 h-4"})})]})]},h))}):e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(Ht,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),e.jsx("p",{className:"text-sm",children:"No repositories added yet"}),e.jsx("p",{className:"text-xs mt-1",children:"Add a repository URL above to get started"})]})})]})}function Mr({onOpenChange:t,paperId:s,arxivId:r,initialUrl:a,submitMode:i="direct",isAuthor:c=!1}){const[o,l]=x.useState(a),d=W({editType:"source_url",paperId:s,arxivId:r,submitMode:i,messages:{proposal:"source URL change",noun:"source URL",failure:"Failed to update source URL."},toPendingPayload:f=>({source_url:f}),applyDirect:f=>U.updateSourceUrl(s,f),onClose:()=>t(!1)}),v=o.trim(),b=/^https?:\/\//i.test(v),u=v!==(a||"").trim(),m=()=>{b&&d.mutate(v)};return e.jsx(V,{title:"Edit Source URL",description:'Update the canonical URL for this external paper. This is the page the "Source page" button links to. ArXiv papers cannot edit this field.',className:"max-w-2xl",submitMode:i,isAuthor:c,onOpenChange:t,onSave:m,isSaving:d.isPending,saveDisabled:!b||!u,children:e.jsxs("div",{className:"space-y-2 py-2",children:[e.jsx("label",{className:"text-sm font-medium",children:"Source URL"}),e.jsx(z,{type:"url",placeholder:"https://example.com/paper",value:o,onChange:f=>l(f.target.value),onKeyPress:f=>{f.key==="Enter"&&b&&u&&(f.preventDefault(),m())}}),!b&&v.length>0&&e.jsx("p",{className:"text-xs text-destructive",children:"URL must start with http:// or https://"})]})})}var De="Checkbox",[Hr]=bt(De),[Or,yt]=Hr(De);function qr(t){const{__scopeCheckbox:s,checked:r,children:a,defaultChecked:i,disabled:c,form:o,name:l,onCheckedChange:d,required:v,value:b="on",internal_do_not_use_render:u}=t,[m,f]=os({prop:r,defaultProp:i??!1,onChange:d,caller:De}),[y,w]=x.useState(null),[p,g]=x.useState(null),n=x.useRef(!1),h=y?!!o||!!y.closest("form"):!0,j={checked:m,disabled:c,setChecked:f,control:y,setControl:w,name:l,form:o,value:b,hasConsumerStoppedPropagationRef:n,required:v,defaultChecked:X(i)?!1:i,isFormControl:h,bubbleInput:p,setBubbleInput:g};return e.jsx(Or,{scope:s,...j,children:Kr(u)?u(j):a})}var ks="CheckboxTrigger",Ns=x.forwardRef(({__scopeCheckbox:t,onKeyDown:s,onClick:r,...a},i)=>{const{control:c,value:o,disabled:l,checked:d,required:v,setControl:b,setChecked:u,hasConsumerStoppedPropagationRef:m,isFormControl:f,bubbleInput:y}=yt(ks,t),w=pe(i,b),p=x.useRef(d);return x.useEffect(()=>{const g=c==null?void 0:c.form;if(g){const n=()=>u(p.current);return g.addEventListener("reset",n),()=>g.removeEventListener("reset",n)}},[c,u]),e.jsx(ee.button,{type:"button",role:"checkbox","aria-checked":X(d)?"mixed":d,"aria-required":v,"data-state":Ps(d),"data-disabled":l?"":void 0,disabled:l,value:o,...a,ref:w,onKeyDown:he(s,g=>{g.key==="Enter"&&g.preventDefault()}),onClick:he(r,g=>{u(n=>X(n)?!0:!n),y&&f&&(m.current=g.isPropagationStopped(),m.current||g.stopPropagation())})})});Ns.displayName=ks;var _t=x.forwardRef((t,s)=>{const{__scopeCheckbox:r,name:a,checked:i,defaultChecked:c,required:o,disabled:l,value:d,onCheckedChange:v,form:b,...u}=t;return e.jsx(qr,{__scopeCheckbox:r,checked:i,defaultChecked:c,disabled:l,required:o,onCheckedChange:v,name:a,form:b,value:d,internal_do_not_use_render:({isFormControl:m})=>e.jsxs(e.Fragment,{children:[e.jsx(Ns,{...u,ref:s,__scopeCheckbox:r}),m&&e.jsx(Es,{__scopeCheckbox:r})]})})});_t.displayName=De;var ws="CheckboxIndicator",Cs=x.forwardRef((t,s)=>{const{__scopeCheckbox:r,forceMount:a,...i}=t,c=yt(ws,r);return e.jsx(is,{present:a||X(c.checked)||c.checked===!0,children:e.jsx(ee.span,{"data-state":Ps(c.checked),"data-disabled":c.disabled?"":void 0,...i,ref:s,style:{pointerEvents:"none",...t.style}})})});Cs.displayName=ws;var Ss="CheckboxBubbleInput",Es=x.forwardRef(({__scopeCheckbox:t,...s},r)=>{const{control:a,hasConsumerStoppedPropagationRef:i,checked:c,defaultChecked:o,required:l,disabled:d,name:v,value:b,form:u,bubbleInput:m,setBubbleInput:f}=yt(Ss,t),y=pe(r,f),w=bs(c),p=ls(a);x.useEffect(()=>{const n=m;if(!n)return;const h=window.HTMLInputElement.prototype,S=Object.getOwnPropertyDescriptor(h,"checked").set,E=!i.current;if(w!==c&&S){const C=new Event("click",{bubbles:E});n.indeterminate=X(c),S.call(n,X(c)?!1:c),n.dispatchEvent(C)}},[m,w,c,i]);const g=x.useRef(X(c)?!1:c);return e.jsx(ee.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??g.current,required:l,disabled:d,name:v,value:b,form:u,...s,tabIndex:-1,ref:y,style:{...s.style,...p,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Es.displayName=Ss;function Kr(t){return typeof t=="function"}function X(t){return t==="indeterminate"}function Ps(t){return X(t)?"indeterminate":t?"checked":"unchecked"}const kt=x.forwardRef(({className:t,style:s,...r},a)=>e.jsx(_t,{ref:a,className:Ce("peer h-4 w-4 shrink-0 rounded-sm ring-offset-background data-[state=checked]:!bg-black data-[state=checked]:!text-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),style:{border:"1px solid #000",...s},...r,children:e.jsx(Cs,{className:Ce("flex items-center justify-center text-current"),children:e.jsx(gt,{className:"h-4 w-4"})})}));kt.displayName=_t.displayName;const Gr=250,Qr=100,Xr={editType:"tasks",singular:"task",plural:"tasks",title:"Edit Paper Tasks",description:"Select the tasks that this paper addresses. You can select multiple tasks.",search:t=>G.listTasks(t),toPendingPayload:t=>({task_ids:t}),applyDirect:(t,s)=>U.updateTasks(t,s),patchPaper:(t,s)=>({...t,tasks:[...s].sort((r,a)=>r.name.localeCompare(a.name))})},Vr={editType:"methods",singular:"method",plural:"methods",title:"Edit Paper Methods",description:"Select the methods and techniques used in this paper. You can select multiple methods.",search:t=>G.listMethods(t),toPendingPayload:t=>({method_ids:t}),applyDirect:(t,s)=>U.updateMethods(t,s),subtitle:t=>t.full_name!==t.name?t.full_name:void 0},Wr=t=>t[0].toUpperCase()+t.slice(1),_e=t=>t.map(s=>Number(s.id));function Vt(t){return t.kind==="task"?e.jsx(Wt,{...t,tagKind:Xr}):e.jsx(Wt,{...t,tagKind:Vr})}function Wt({tagKind:t,onOpenChange:s,paperId:r,arxivId:a,initialItems:i,submitMode:c="direct",isAuthor:o=!1}){const{singular:l,plural:d,patchPaper:v}=t,[b,u]=x.useState(i),[m,f]=x.useState(!1),[y,w]=x.useState(""),[p,g]=x.useState(""),n=Z(),{toast:h}=J();x.useEffect(()=>{const N=window.setTimeout(()=>{g(y.trim())},Gr);return()=>window.clearTimeout(N)},[y]);const{data:j,isFetching:S}=Q({queryKey:[`${d}-search`,p],queryFn:()=>t.search({page_size:Qr,...p?{q:p}:{}})}),E=W({editType:t.editType,paperId:r,arxivId:a,submitMode:c,messages:{proposal:`${l} changes`,noun:d,failure:`Failed to update paper ${d}.`},toPendingPayload:N=>t.toPendingPayload(_e(N)),applyDirect:N=>t.applyDirect(r,_e(N)),applyOptimistic:v&&(async N=>{const _=[...new Set([r,a].filter($=>!!$))].flatMap($=>[me.detail($),me.arxiv($)]);await Promise.all(_.map($=>n.cancelQueries({queryKey:$})));const I=_.map($=>({key:$,data:n.getQueryData($)}));return I.forEach(({key:$,data:T})=>{T&&n.setQueryData($,v(T,N))}),()=>I.forEach(({key:$,data:T})=>n.setQueryData($,T))}),onSaved:(N,{direct:_})=>{_&&h({title:`${Wr(d)} updated`,description:`Saved ${N.length} ${N.length===1?l:d} for this paper.`})},onClose:()=>s(!1)}),C=x.useMemo(()=>new Set(_e(b)),[b]),R=x.useMemo(()=>_e(i),[i]),L=x.useMemo(()=>{const N=(j==null?void 0:j.results)??[],_=p?[...N,...b]:[...b,...N];return _.filter((I,$)=>_.findIndex(({id:T})=>T===I.id)===$)},[j,b,p]),B=b.length!==R.length||R.some(N=>!C.has(N)),H=()=>{c==="direct"&&R.some(N=>!C.has(N))&&!window.confirm(`Remove one or more ${l} links from this paper?`)||E.mutate(b)},P=(N,_)=>{u(I=>_?I.some($=>$.id===N.id)?I:[...I,N]:I.filter($=>$.id!==N.id))};return e.jsxs(e.Fragment,{children:[e.jsxs(V,{title:t.title,description:t.description,className:"max-w-2xl max-h-[600px]",submitMode:c,isAuthor:o,onOpenChange:s,onSave:H,isSaving:E.isPending,saveDisabled:!B,footerStart:e.jsxs(A,{variant:"ghost",className:"sm:mr-auto",onClick:()=>f(!0),children:["Suggest a new ",l]}),children:[e.jsxs("div",{className:"relative mb-4",children:[e.jsx(lt,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(z,{type:"text",placeholder:`Search ${d}...`,value:y,onChange:N=>w(N.target.value),className:"pl-9 pr-9"}),y&&e.jsx("button",{type:"button",onClick:()=>w(""),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 text-muted-foreground hover:text-foreground","aria-label":"Clear search",children:e.jsx(ns,{className:"w-4 h-4"})})]}),e.jsx("div",{className:"py-4 overflow-y-auto max-h-[400px]",children:L.length>0?e.jsx("div",{className:"space-y-2",children:L.map(N=>{var I;const _=(I=t.subtitle)==null?void 0:I.call(t,N);return e.jsxs("div",{className:"flex items-center space-x-2 p-2 hover:bg-muted/50 rounded-md",children:[e.jsx(kt,{id:`${l}-${N.id}`,checked:C.has(Number(N.id)),onCheckedChange:$=>P(N,$===!0),className:"!border !border-black data-[state=checked]:!bg-black data-[state=checked]:!text-white"}),e.jsxs("label",{htmlFor:`${l}-${N.id}`,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer flex-1",children:[N.name,_&&e.jsx("span",{className:"block text-xs text-muted-foreground font-normal",children:_}),N.description&&e.jsxs("span",{className:"block text-xs text-muted-foreground font-normal mt-1",children:[N.description.substring(0,100),N.description.length>100?"...":""]})]})]},N.id)})}):S?e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(vt,{className:"w-8 h-8 mx-auto mb-2 animate-spin"}),e.jsxs("p",{children:["Loading ",d,"..."]})]}):e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(lt,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),e.jsx("p",{children:p?`No ${d} found matching "${p}"`:`No ${d} available`})]})})]}),e.jsx(ms,{open:m,onOpenChange:f,paperId:r,kind:l})]})}const Yt=10,Yr=/^https?:\/\/(?:www\.|mobile\.)?(?:x|twitter)\.com\/(?:[A-Za-z0-9_]{1,15}|i\/web|i)\/status(?:es)?\/(\d{1,25})(?:[/?#].*)?$/;function te(t){var s;return((s=Yr.exec(t.trim()))==null?void 0:s[1])??null}function Jr({onOpenChange:t,paperId:s,arxivId:r,initialUrls:a,submitMode:i="direct",isAuthor:c=!1}){const[o,l]=x.useState(a),[d,v]=x.useState(""),[b,u]=x.useState(null),m=W({editType:"x_threads",paperId:s,arxivId:r,submitMode:i,messages:{proposal:"X threads",noun:"X threads",failure:"Failed to update X threads."},toPendingPayload:n=>({x_threads:n}),applyDirect:n=>U.updateXThreads(s,n),onClose:()=>t(!1)}),f=()=>{const n=d.trim();if(!n)return o;const h=te(n);return h?o.some(j=>te(j)===h)?(u("This post is already listed."),null):o.length>=Yt?(u(`A paper can link at most ${Yt} X threads.`),null):[...o,n]:(u("Paste a post URL such as https://x.com/user/status/123…"),null)},y=()=>{const n=f();n!==null&&(l(n),v(""),u(null))},w=(n,h)=>{const j=[...o];[j[n],j[n+h]]=[j[n+h],j[n]],l(j)},p=()=>{const n=f();n!==null&&(i==="direct"&&a.some(h=>!n.some(j=>te(j)===te(h)))&&!window.confirm("Remove one or more X threads from this paper?")||m.mutate(n))},g=x.useMemo(()=>(d.trim()?[...o,d.trim()]:o).map(te).join()!==a.map(te).join(),[o,d,a]);return e.jsxs(V,{title:"Edit X threads",description:"Link posts on X (formerly Twitter) in which the authors introduce this paper. A preview of each post is shown on the paper page.",className:"max-w-2xl max-h-[600px]",submitMode:i,isAuthor:c,onOpenChange:t,onSave:p,isSaving:m.isPending,saveDisabled:!g,children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium",htmlFor:"x-thread-url",children:"Add X post URL"}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(z,{id:"x-thread-url",type:"url",placeholder:"https://x.com/user/status/1234567890",value:d,onChange:n=>{v(n.target.value),u(null)},onKeyDown:n=>{n.key==="Enter"&&(n.preventDefault(),y())},"aria-invalid":!!b,className:"flex-1"}),e.jsxs(A,{onClick:y,size:"sm",disabled:!d.trim(),children:[e.jsx(ge,{className:"w-4 h-4 mr-1"}),"Add"]})]}),b&&e.jsx("p",{className:"text-xs text-destructive",children:b})]}),e.jsx("div",{className:"py-4 overflow-y-auto max-h-[350px]",children:o.length>0?e.jsx("div",{className:"space-y-2",children:o.map((n,h)=>e.jsxs("div",{className:"flex items-center space-x-2 p-3 bg-muted/30 rounded-lg",children:[e.jsx("span",{className:"flex-1 min-w-0 truncate text-sm font-medium",children:n}),e.jsx(A,{variant:"ghost",size:"sm",className:"h-8 px-2",disabled:h===0,onClick:()=>w(h,-1),"aria-label":"Move up",children:e.jsx(er,{className:"w-4 h-4"})}),e.jsx(A,{variant:"ghost",size:"sm",className:"h-8 px-2",disabled:h===o.length-1,onClick:()=>w(h,1),"aria-label":"Move down",children:e.jsx(Za,{className:"w-4 h-4"})}),e.jsx(A,{variant:"ghost",size:"sm",className:"h-8 px-2 text-destructive hover:text-destructive",onClick:()=>l(o.filter(j=>j!==n)),"aria-label":"Remove X thread",children:e.jsx(fe,{className:"w-4 h-4"})})]},n))}):e.jsx("p",{className:"text-center py-8 text-sm text-muted-foreground",children:"No X threads linked yet"})})]})}function Zr({activeEditor:t,arxivId:s,editSubmitMode:r,evaluations:a,isAdmin:i,isLinkedAuthor:c,onOpenChange:o,paper:l}){if(!t)return null;const d={paperId:l.id,arxivId:s,submitMode:r,isAuthor:c,onOpenChange:u=>o(t,u)},v=u=>(u==null?void 0:u.map(({url:m,is_official:f})=>({url:m,is_official:!!f})))??[],b={tasks:()=>e.jsx(Vt,{...d,kind:"task",initialItems:l.tasks??[]}),methods:()=>e.jsx(Vt,{...d,kind:"method",initialItems:l.methods??[]}),repositories:()=>e.jsx(zr,{...d,initialRepositories:v(l.repositories)}),project_pages:()=>e.jsx(Br,{...d,initialProjectPages:v(l.project_pages)}),evaluations:()=>e.jsx(Rr,{...d,initialEvaluations:a,paperTasks:l.tasks??[],isAdmin:i}),source_url:()=>e.jsx(Mr,{...d,initialUrl:l.source_url??l.url_abs??""}),hf_artifacts:()=>e.jsx(Lr,{...d,initialArtifacts:{hf_models:l.hf_models??[],hf_datasets:l.hf_datasets??[],hf_spaces:l.hf_spaces??[]}}),x_threads:()=>{var u;return e.jsx(Jr,{...d,initialUrls:((u=l.x_threads)==null?void 0:u.map(({url:m})=>m))??[]})},organizations:()=>e.jsx(Ur,{...d,initialOrganizationIds:(l.organizations??[]).map(({id:u})=>Number(u))})};return e.jsx(x.Fragment,{children:b[t]()},t)}const en={"add-evals":{trigger:"add evals",running:"adding evals…",complete:"add evals ✓",title:"Add evaluations with Codex",description:t=>e.jsxs(e.Fragment,{children:["Codex will run the repository’s add-evals skill for “",t,"”. It will import only paper-native results onto existing, metric-compatible leaderboards. Accepted rows are written directly to the live database."]}),notice:"Comparator rows, unknown benchmarks, and unconfigured metrics will be skipped. Jobs run one at a time in submission order.",progress:"Codex is researching the paper and validating results against the configured leaderboards.",action:"Run add-evals"},"enrich-paper":{trigger:"enrich paper",running:"enriching…",complete:"enriched ✓",title:"Enrich paper with Codex",description:t=>e.jsxs(e.Fragment,{children:["Codex will run the repository’s enrich-paper skill for “",t,"”. It will validate official code and project links, merge high-confidence taxonomy tags, and check the paper thumbnail. Accepted changes are written directly to the live database."]}),notice:"Uncertain URLs and missing taxonomy concepts will be reported rather than guessed. Jobs run one at a time in submission order.",progress:"Codex is validating artifacts, taxonomy tags, and thumbnail quality for this paper.",action:"Run enrich-paper"}},Jt=new Set(["queued","dispatching","running","awaiting_markdown"]);function tn({report:t}){return e.jsx("div",{className:"min-w-0 max-h-[50vh] overflow-y-auto overflow-x-hidden rounded-md border bg-muted/40 p-4 text-sm leading-relaxed",children:e.jsx(Qa,{remarkPlugins:[Xa],components:{a:({children:s,...r})=>e.jsx("a",{...r,className:"break-all underline underline-offset-2",target:"_blank",rel:"noreferrer",children:s}),p:({children:s})=>e.jsx("p",{className:"mb-3 break-words last:mb-0",children:s}),ul:({children:s})=>e.jsx("ul",{className:"mb-3 list-disc space-y-1 pl-5 last:mb-0",children:s}),ol:({children:s})=>e.jsx("ol",{className:"mb-3 list-decimal space-y-1 pl-5 last:mb-0",children:s}),h1:({children:s})=>e.jsx("h3",{className:"mb-2 font-semibold",children:s}),h2:({children:s})=>e.jsx("h3",{className:"mb-2 font-semibold",children:s}),h3:({children:s})=>e.jsx("h3",{className:"mb-2 font-semibold",children:s}),code:({children:s})=>e.jsx("code",{className:"break-all rounded bg-background/80 px-1 py-0.5 font-mono text-xs",children:s}),pre:({children:s})=>e.jsx("pre",{className:"mb-3 max-w-full overflow-x-auto whitespace-pre-wrap break-words rounded bg-background/80 p-3 font-mono text-xs last:mb-0",children:s})},children:t})})}function $s({kind:t,paperId:s,paperTitle:r,triggerClassName:a,onComplete:i}){var E;const c=en[t],o=Z(),[l,d]=x.useState(!1),[v,b]=x.useState(null),u=x.useRef(null),m=Q({queryKey:Tt.codexPaperJob(t,v),queryFn:()=>Oe.getPaperJob(t,v),enabled:v!==null,refetchInterval:C=>{var L;const R=(L=C.state.data)==null?void 0:L.status;return R==="awaiting_markdown"?6e4:R&&Jt.has(R)?2e3:!1},retry:!1}),f=C=>{o.setQueryData(Tt.codexPaperJob(t,C.id),C),b(C.id)},y=ae({mutationFn:()=>Oe.startPaperJob(t,s),onSuccess:f}),w=ae({mutationFn:C=>Oe.cancelPaperJob(t,C),onSuccess:f}),p=v?m.data:void 0,g=(p==null?void 0:p.status)==="awaiting_markdown",n=p?Jt.has(p.status):!1,h=m.errorUpdatedAt>m.dataUpdatedAt?m.error:null,j=(E=y.error??w.error??h)==null?void 0:E.message;x.useEffect(()=>{(p==null?void 0:p.status)!=="completed"||u.current===p.id||(u.current=p.id,i())},[p,i]);const S=()=>{b(null),y.reset(),w.reset(),u.current=null};return e.jsxs(Ie,{open:l,onOpenChange:d,children:[e.jsx("button",{type:"button",className:a,onClick:()=>d(!0),children:g?"waiting for Markdown…":n?c.running:(p==null?void 0:p.status)==="completed"?c.complete:c.trigger}),e.jsxs(Re,{className:"max-h-[90vh] w-[calc(100vw-2rem)] min-w-0 max-w-2xl overflow-hidden",children:[e.jsxs(Ae,{className:"min-w-0",children:[e.jsx(Le,{children:c.title}),e.jsx(Te,{children:c.description(r)})]}),p?e.jsxs("div",{className:"min-w-0 space-y-3 overflow-hidden",children:[e.jsxs("div",{className:"font-mono text-xs uppercase tracking-wide text-muted-foreground",children:["Status: ",p.status.replace("_"," ")]}),p.hf_job_url&&e.jsx("a",{className:"text-sm underline",href:p.hf_job_url,target:"_blank",rel:"noreferrer",children:"View Hugging Face Job"}),g&&e.jsxs("div",{className:"rounded-md border bg-muted/40 p-3 text-sm",children:[Ga," You can close this window and return."]}),n&&!g&&e.jsxs("div",{className:"rounded-md border bg-muted/40 p-3 text-sm",children:[p.status==="queued"?"This job is queued and will start after the current Codex job finishes.":c.progress," ","This can take several minutes; you can close this window and return."]}),p.report&&e.jsx(tn,{report:p.report}),p.error&&!g&&e.jsx("div",{className:"rounded-md border border-destructive/40 bg-destructive/10 p-3 text-sm text-destructive",children:p.error})]}):e.jsx("div",{className:"rounded-md border bg-muted/40 p-3 text-sm text-muted-foreground",children:c.notice}),j&&e.jsx("div",{className:"rounded-md border border-destructive/40 bg-destructive/10 p-3 text-sm text-destructive",children:j}),e.jsxs(jt,{children:[e.jsx(A,{variant:"outline",onClick:()=>d(!1),children:n?"Close":"Cancel"}),n&&p&&e.jsx(A,{variant:"outline",onClick:()=>w.mutate(p.id),children:"Cancel job"}),!p&&e.jsx(A,{onClick:()=>y.mutate(),disabled:y.isPending,children:y.isPending?"Starting…":c.action}),p&&!n&&e.jsx(A,{variant:"outline",onClick:S,children:"Run again"})]})]})]})}function we({accent:t,id:s,label:r}){return e.jsxs("div",{className:"section-rule paper-section-anchor",id:s,children:[e.jsx("span",{children:e.jsx("a",{href:`#${s}`,className:"section-anchor-link",children:r})}),t]})}function sn({canCopyBadge:t,canEdit:s,evaluationsByTask:r,evaluationsLoading:a,hiddenClosedSourceCount:i,isAdmin:c,onCopyBadge:o,onEdit:l,onRefresh:d,paper:v,visibleEvaluationCount:b}){return e.jsxs(e.Fragment,{children:[e.jsx(we,{id:"results",label:"Results",accent:e.jsxs("span",{className:"accent",children:[b," benchmarks",t&&e.jsxs("button",{type:"button",className:"edit-link results-badge-copy",onClick:o,title:"Copy live leaderboard badges for your repository README",children:[e.jsx(F,{name:"copy",size:10})," Copy PwC badge"]}),c&&sa()&&e.jsx($s,{kind:"add-evals",triggerClassName:"edit-link",paperId:Number(v.id),paperTitle:v.title,onComplete:d}),s&&e.jsx("button",{type:"button",onClick:l,className:"edit-link",children:"edit"})]})}),a?e.jsx(ue,{className:"h-32 w-full"}):r.length>0?r.map(u=>e.jsxs("div",{className:u.taskSlug?"paper-section-anchor":void 0,id:u.taskSlug?vs(u.taskSlug):void 0,children:[e.jsxs("div",{className:"section-rule",children:[e.jsx("span",{children:u.taskSlug?e.jsxs(e.Fragment,{children:[e.jsx(O,{to:`/tasks/${u.taskSlug}`,children:u.taskName}),e.jsx("a",{href:pr(u.taskSlug),className:"section-anchor-link results-task-permalink","aria-label":`Permalink to ${u.taskName} results on this paper`,title:"Link to this task's results",children:"#"})]}):u.taskName}),e.jsxs("span",{className:"accent",children:[u.rows.length," ",u.rows.length===1?"result":"results"]})]}),e.jsxs("table",{className:"results-table",children:[e.jsxs("colgroup",{children:[e.jsx("col",{style:{width:"28%"}}),e.jsx("col",{style:{width:"28%"}}),e.jsx("col",{style:{width:"14%"}}),e.jsx("col",{style:{width:"12%"}}),e.jsx("col",{style:{width:"8%"}}),e.jsx("col",{style:{width:"10%"}})]}),e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Benchmark"}),e.jsx("th",{children:"Model"}),e.jsx("th",{children:"Metric"}),e.jsx("th",{children:"Value"}),e.jsx("th",{children:"Rank"}),e.jsx("th",{children:"Compare"})]})}),e.jsx("tbody",{children:u.rows.map(m=>{var f;return e.jsxs("tr",{children:[e.jsx("td",{className:"benchmark",children:m.dataset_slug?e.jsx(O,{to:`/benchmark/${m.dataset_slug}`,children:m.dataset_name||"—"}):m.dataset_name||"—"}),e.jsxs("td",{className:"model",title:m.model_name||void 0,children:[m.hf_model_url?e.jsx("a",{href:m.hf_model_url,target:"_blank",rel:"noopener noreferrer",className:"model-hf-link",title:`Open ${m.model_name||"model"} on Hugging Face`,children:m.model_name||"—"}):m.model_name||"—",m.is_open===!1&&e.jsx(ka,{}),(m.external??m.is_external)&&e.jsx(Na,{sourceUrl:m.source_url||m.external_source_url||m.result_url})]}),e.jsx("td",{className:"metric",children:m.best_metric}),e.jsx("td",{className:"value",children:aa((f=m.metrics)==null?void 0:f[m.best_metric||""])}),e.jsx("td",{className:"rank",children:m.best_rank!=null?`#${m.best_rank}`:"—"}),e.jsx("td",{className:"compare",children:m.dataset_slug&&e.jsx(O,{to:`/benchmark/${m.dataset_slug}?${[m.task_slug?`task=${encodeURIComponent(m.task_slug)}`:"",`eval=${encodeURIComponent(m.id)}`].filter(Boolean).join("&")}`,children:"Compare →"})})]},m.id)})})]})]},u.taskId)):e.jsx("p",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-faint)"},children:i>0?e.jsxs(e.Fragment,{children:['No evals shown for this paper. Turn off "Hide closed-source models" in your'," ",e.jsx(O,{to:"/settings",children:"settings"})," to see them."]}):"No benchmark results recorded yet."})]})}var Nt="Radio",[an,Is]=bt(Nt),[rn,nn]=an(Nt),Rs=x.forwardRef((t,s)=>{const{__scopeRadio:r,name:a,checked:i=!1,required:c,disabled:o,value:l="on",onCheck:d,form:v,...b}=t,[u,m]=x.useState(null),f=pe(s,p=>m(p)),y=x.useRef(!1),w=u?v||!!u.closest("form"):!0;return e.jsxs(rn,{scope:r,checked:i,disabled:o,children:[e.jsx(ee.button,{type:"button",role:"radio","aria-checked":i,"data-state":Ds(i),"data-disabled":o?"":void 0,disabled:o,value:l,...b,ref:f,onClick:he(t.onClick,p=>{i||d==null||d(),w&&(y.current=p.isPropagationStopped(),y.current||p.stopPropagation())})}),w&&e.jsx(Ts,{control:u,bubbles:!y.current,name:a,value:l,checked:i,required:c,disabled:o,form:v,style:{transform:"translateX(-100%)"}})]})});Rs.displayName=Nt;var As="RadioIndicator",Ls=x.forwardRef((t,s)=>{const{__scopeRadio:r,forceMount:a,...i}=t,c=nn(As,r);return e.jsx(is,{present:a||c.checked,children:e.jsx(ee.span,{"data-state":Ds(c.checked),"data-disabled":c.disabled?"":void 0,...i,ref:s})})});Ls.displayName=As;var on="RadioBubbleInput",Ts=x.forwardRef(({__scopeRadio:t,control:s,checked:r,bubbles:a=!0,...i},c)=>{const o=x.useRef(null),l=pe(o,c),d=bs(r),v=ls(s);return x.useEffect(()=>{const b=o.current;if(!b)return;const u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(d!==r&&f){const y=new Event("click",{bubbles:a});f.call(b,r),b.dispatchEvent(y)}},[d,r,a]),e.jsx(ee.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...i,tabIndex:-1,ref:l,style:{...i.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Ts.displayName=on;function Ds(t){return t?"checked":"unchecked"}var ln=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Fe="RadioGroup",[cn]=bt(Fe,[cs,Is]),Fs=cs(),Us=Is(),[dn,un]=cn(Fe),Bs=x.forwardRef((t,s)=>{const{__scopeRadioGroup:r,name:a,defaultValue:i,value:c,required:o=!1,disabled:l=!1,orientation:d,dir:v,loop:b=!0,onValueChange:u,...m}=t,f=Fs(r),y=ra(v),[w,p]=os({prop:c,defaultProp:i??null,onChange:u,caller:Fe});return e.jsx(dn,{scope:r,name:a,required:o,disabled:l,value:w,onValueChange:p,children:e.jsx(na,{asChild:!0,...f,orientation:d,dir:y,loop:b,children:e.jsx(ee.div,{role:"radiogroup","aria-required":o,"aria-orientation":d,"data-disabled":l?"":void 0,dir:y,...m,ref:s})})})});Bs.displayName=Fe;var zs="RadioGroupItem",Ms=x.forwardRef((t,s)=>{const{__scopeRadioGroup:r,disabled:a,...i}=t,c=un(zs,r),o=c.disabled||a,l=Fs(r),d=Us(r),v=x.useRef(null),b=pe(s,v),u=c.value===i.value,m=x.useRef(!1);return x.useEffect(()=>{const f=w=>{ln.includes(w.key)&&(m.current=!0)},y=()=>m.current=!1;return document.addEventListener("keydown",f),document.addEventListener("keyup",y),()=>{document.removeEventListener("keydown",f),document.removeEventListener("keyup",y)}},[]),e.jsx(ia,{asChild:!0,...l,focusable:!o,active:u,children:e.jsx(Rs,{disabled:o,required:c.required,checked:u,...d,...i,name:c.name,ref:b,onCheck:()=>c.onValueChange(i.value),onKeyDown:he(f=>{f.key==="Enter"&&f.preventDefault()}),onFocus:he(i.onFocus,()=>{var f;m.current&&((f=v.current)==null||f.click())})})})});Ms.displayName=zs;var mn="RadioGroupIndicator",Hs=x.forwardRef((t,s)=>{const{__scopeRadioGroup:r,...a}=t,i=Us(r);return e.jsx(Ls,{...i,...a,ref:s})});Hs.displayName=mn;var Os=Bs,qs=Ms,hn=Hs;const dt=x.forwardRef(({className:t,...s},r)=>e.jsx(Os,{className:Ce("grid gap-2",t),...s,ref:r}));dt.displayName=Os.displayName;const de=x.forwardRef(({className:t,...s},r)=>e.jsx(qs,{ref:r,className:Ce("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),...s,children:e.jsx(hn,{className:"flex items-center justify-center",children:e.jsx(oa,{className:"h-2.5 w-2.5 fill-current text-current"})})}));de.displayName=qs.displayName;const pn={pdf:"PDF",model:"Model",dataset:"Dataset",space:"Space",github:"GitHub"},ut=/^[A-Za-z0-9][A-Za-z0-9._-]*$/,fn=/^[A-Za-z0-9][\w.-]*\/[A-Za-z0-9][\w.-]*$/,gn=20,mt="copy_to_bucket";function xn(t){const s=t.trim();if(!fn.test(s))return null;const[r,a]=s.split("/");return`https://huggingface.co/buckets/${encodeURIComponent(r)}/${encodeURIComponent(a)}`}function ht(t){return`pwc:bucket-copy:${t}`}function bn(t){if(typeof window>"u"||new URL(window.location.href).searchParams.get(mt)!==t)return null;try{const r=window.sessionStorage.getItem(ht(t));if(!r)return null;const a=JSON.parse(r);return a.paperId!==t||typeof a.bucketId!="string"||!["new","existing"].includes(a.destinationMode)||!["public","private"].includes(a.visibility)||!Array.isArray(a.selectedIds)||a.selectedIds.some(i=>typeof i!="string")?null:a}catch{return null}}function jn(t,s=gn){if(s<1)throw new Error("Bucket copy batch size must be positive");const r=[];for(let a=0;a!ut.test(d)))return null;const o=c.join("/"),l=s==="model"?"":`${s}s/`;return{id:`${s}:${o}`,kind:s,label:o,url:`https://huggingface.co/${l}${o}`,source:`hf://${l}${o}/`,destination:`${s}s/${o}/`,repoId:o}}catch{return null}}function vn(t){try{const s=new URL(t);if(s.hostname!=="github.com"&&s.hostname!=="www.github.com")return null;const r=s.pathname.split("/").filter(Boolean);if(r.length<2)return null;const a=r[0],i=r[1].replace(/\.git$/,"");if(!ut.test(a)||!ut.test(i))return null;const c=`${a}/${i}`;return{id:`github:${c}`,kind:"github",label:c,url:`https://github.com/${c}`,source:`https://github.com/${c}.git`,destination:`github/${c}/`}}catch{return null}}function yn({githubUrls:t,hfModelUrls:s,hfDatasetUrls:r,hfSpaceUrls:a,paperId:i,pdfName:c,pdfUrl:o}){const l=[o?{id:"pdf",kind:"pdf",label:"Paper PDF",url:o,source:o,destination:`paper/${c||i}.pdf`}:null,...s.map(v=>at(v,"model")),...r.map(v=>at(v,"dataset")),...a.map(v=>at(v,"space")),...t.map(vn)],d=new Set;return l.filter(v=>!v||d.has(v.id)?!1:(d.add(v.id),!0))}function _n(t,s,r){const a=["# Requires the Hugging Face CLI: https://huggingface.co/docs/huggingface_hub/guides/cli",`HF_BUCKET=${ke(t.trim())}`];r.create&&a.push(`hf buckets create "$HF_BUCKET" --exist-ok${r.isPrivate?" --private":""}`);for(const o of s.filter(l=>l.kind!=="github"&&l.kind!=="pdf"))a.push(`hf cp ${ke(o.source)} "hf://buckets/$HF_BUCKET/${o.destination}"`);const i=s.find(o=>o.kind==="pdf");i&&a.push('PWC_PDF="$(mktemp)"',`trap 'rm -f "$PWC_PDF"' EXIT`,`curl --fail --location ${ke(i.source)} --output "$PWC_PDF"`,`hf cp "$PWC_PDF" "hf://buckets/$HF_BUCKET/${i.destination}"`);const c=s.filter(o=>o.kind==="github");if(c.length){a.push('PWC_COPY_DIR="$(mktemp -d)"',`trap 'rm -rf "$PWC_COPY_DIR"' EXIT`);for(const o of c){const l=`$PWC_COPY_DIR/${o.destination.replace(/\/$/,"")}`;a.push(`git clone --depth 1 -- ${ke(o.source)} "${l}"`,`hf sync "${l}" "hf://buckets/$HF_BUCKET/${o.destination}" --exclude '.git/**'`)}}return a.join(` +`)}function kn(t){return`${(t.split(/[:|–—]/,1)[0]||t).normalize("NFKD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,48).replace(/-+$/g,"")||"paper"}-artifacts`}function Nn(t){const{toast:s}=J(),r=x.useMemo(()=>yn({githubUrls:t.githubUrls,hfDatasetUrls:t.hfDatasetUrls,hfModelUrls:t.hfModelUrls,hfSpaceUrls:t.hfSpaceUrls,paperId:t.paperId,pdfName:t.pdfName,pdfUrl:t.pdfUrl}),[t.githubUrls,t.hfDatasetUrls,t.hfModelUrls,t.hfSpaceUrls,t.paperId,t.pdfName,t.pdfUrl]),a=x.useMemo(()=>bn(t.paperId),[t.paperId]),[i,c]=x.useState(!!a),[o,l]=x.useState((a==null?void 0:a.destinationMode)??"new"),[d,v]=x.useState((a==null?void 0:a.bucketId)??""),[b,u]=x.useState((a==null?void 0:a.visibility)??"public"),[m,f]=x.useState(()=>new Set((a==null?void 0:a.selectedIds)??r.map(_=>_.id))),[y,w]=x.useState(!1),[p,g]=x.useState(null),[n,h]=x.useState(!!a),j=r.filter(_=>m.has(_.id)),S=j.length===r.length,E=xn(d),C=E!==null,R=_n(d,j,{create:o==="new",isPrivate:b==="private"}),L=(_,I)=>{f($=>{const T=new Set($);return I?T.add(_):T.delete(_),T})},B=async()=>{try{await navigator.clipboard.writeText(R),s({title:"Bucket copy commands copied",description:"Run them in a terminal where the Hugging Face CLI is signed in."})}catch{s({title:"Copy failed",description:"Could not access the clipboard. Select and copy the commands manually.",variant:"destructive"})}},H=x.useCallback(()=>{const _=new URL(window.location.href);_.searchParams.set(mt,t.paperId),window.sessionStorage.setItem(ht(t.paperId),JSON.stringify({paperId:t.paperId,bucketId:d.trim(),destinationMode:o,visibility:b,selectedIds:Array.from(m)})),window.location.assign(la(_.toString(),{authorizeBucket:!0,bucketCreate:o==="new"}))},[d,o,t.paperId,m,b]),P=x.useCallback(async()=>{if(!t.isSignedIn){H();return}w(!0);let _=0,I=0;try{const $=j.filter(M=>M.kind!=="pdf"&&M.kind!=="github"&&!!M.repoId).map(M=>({kind:M.kind,repo_id:M.repoId})),T=jn($);T.length||T.push([]);for(const[M,xe]of T.entries()){g({current:M+1,total:T.length});const be=await U.copyToBucket(t.paperId,{bucket_id:d.trim(),create:M===0&&o==="new",private:b==="private",include_pdf:M===0&&j.some(Ue=>Ue.kind==="pdf"),artifacts:xe});_+=be.copied.length,I+=be.errors.length}const ne=j.filter(M=>M.kind==="github").length;s({title:I?"Bucket copy partially completed":"Copied to bucket",description:[`${_} item${_===1?"":"s"} copied.`,I?`${I} item${I===1?"":"s"} failed.`:"",ne?"Use the generated commands below to copy GitHub repositories.":""].filter(Boolean).join(" "),variant:I?"destructive":void 0,action:E?e.jsx(ca,{altText:"Open destination bucket",asChild:!0,children:e.jsx("a",{href:E,target:"_blank",rel:"noopener noreferrer",children:"Open bucket"})}):void 0}),!I&&!ne&&c(!1)}catch($){if($ instanceof Se&&$.code==="bucket_authorization_required"){H();return}s({title:_?"Bucket copy partially completed":"Bucket copy failed",description:_?`${_} item${_===1?"":"s"} copied before the request failed. You can retry or use the CLI commands below.`:$ instanceof Se&&typeof $.detail=="string"?$.detail:"Hugging Face could not complete the copy. You can still use the CLI commands below.",variant:"destructive"})}finally{w(!1),g(null)}},[H,d,E,o,t.isSignedIn,t.paperId,j,s,b]);x.useEffect(()=>{if(!n||!t.isSignedIn)return;h(!1),window.sessionStorage.removeItem(ht(t.paperId));const _=new URL(window.location.href);_.searchParams.delete(mt),window.history.replaceState({},"",`${_.pathname}${_.search}${_.hash}`),P()},[P,t.isSignedIn,t.paperId,n]);const N=()=>{f(new Set(r.map(_=>_.id))),!d&&t.suggestedBucketId&&v(t.suggestedBucketId),c(!0)};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"sidebar-card copy-to-bucket-card",children:[e.jsxs("button",{type:"button",className:"copy-to-bucket-trigger",onClick:N,children:[e.jsx("span",{className:"copy-to-bucket-arrow","aria-hidden":"true",children:"→"}),e.jsx("span",{className:"copy-to-bucket-title",children:"Copy to bucket"}),e.jsx("span",{className:"copy-to-bucket-new",children:"New"})]}),e.jsx("div",{className:"copy-to-bucket-meta",children:r.length?`${r.length} linked artifact${r.length===1?"":"s"}`:"No linked artifacts yet"})]}),e.jsx(Ie,{open:i,onOpenChange:c,children:e.jsxs(Re,{className:"max-h-[90vh] max-w-2xl grid-rows-[auto_minmax(0,1fr)_auto] overflow-hidden",children:[e.jsxs(Ae,{children:[e.jsxs(Le,{className:"flex items-center gap-2",children:[e.jsx("span",{className:"copy-to-bucket-dialog-arrow","aria-hidden":"true",children:"→"}),"Copy to bucket"]}),e.jsx(Te,{children:"Keep your own copy of this paper's PDF, linked code, and Hugging Face artifacts. Hub repositories use Xet's server-side copy; GitHub repositories use the generated CLI fallback."})]}),e.jsx("div",{className:"-mx-6 min-h-0 overflow-y-auto px-6",children:r.length?e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(q,{children:"Choose your destination"}),e.jsxs(dt,{value:o,onValueChange:_=>l(_),className:"grid grid-cols-2 gap-2",children:[e.jsxs(q,{className:"bucket-choice",children:[e.jsx(de,{value:"new"}),"New bucket"]}),e.jsxs(q,{className:"bucket-choice",children:[e.jsx(de,{value:"existing"}),"Existing bucket"]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(q,{htmlFor:"bucket-id",children:"Bucket name"}),e.jsx(z,{id:"bucket-id",value:d,onChange:_=>v(_.target.value),placeholder:t.suggestedBucketId||"username/paper-artifacts","aria-invalid":d.length>0&&!C}),e.jsxs("div",{className:"flex items-center justify-between gap-3 text-xs",children:[e.jsx("p",{className:"text-muted-foreground",children:"Use the full Hugging Face bucket ID: namespace/name."}),E&&e.jsxs("a",{href:E,target:"_blank",rel:"noopener noreferrer",className:"inline-flex shrink-0 items-center gap-1 underline underline-offset-4",children:["View bucket",e.jsx(F,{name:"external",size:10})]})]})]}),o==="new"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(q,{children:"Bucket visibility"}),e.jsxs(dt,{value:b,onValueChange:_=>u(_),className:"flex gap-5",children:[e.jsxs(q,{className:"flex items-center gap-2 font-normal",children:[e.jsx(de,{value:"public"}),"Public"]}),e.jsxs(q,{className:"flex items-center gap-2 font-normal",children:[e.jsx(de,{value:"private"}),"Private"]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx(q,{children:"Artifacts"}),e.jsx(A,{type:"button",variant:"outline",size:"sm",className:"h-7 px-2 text-xs",onClick:()=>f(S?new Set:new Set(r.map(_=>_.id))),children:S?"Deselect all":"Select all"})]}),e.jsx("div",{className:"bucket-artifact-list",children:r.map(_=>e.jsxs("div",{className:"bucket-artifact-row",children:[e.jsx(kt,{id:`bucket-artifact-${_.id}`,checked:m.has(_.id),onCheckedChange:I=>L(_.id,I===!0)}),e.jsxs(q,{htmlFor:`bucket-artifact-${_.id}`,className:"min-w-0 flex-1 cursor-pointer font-normal",children:[e.jsx("span",{className:"bucket-artifact-kind",children:pn[_.kind]}),e.jsx("span",{className:"bucket-artifact-name",children:_.label})]}),e.jsxs("a",{href:Y(_.url)??void 0,target:"_blank",rel:"noopener noreferrer",className:"bucket-artifact-open",children:["Open",e.jsx(F,{name:"external",size:10})]})]},_.id))}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"The PDF and Hugging Face artifacts can be copied directly. GitHub repositories require the CLI workflow below."})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(q,{htmlFor:"bucket-copy-commands",children:"CLI fallback"}),e.jsx("pre",{id:"bucket-copy-commands",className:"bucket-copy-commands h-[190px]",children:C?R:"Enter a bucket name above to prepare the copy commands."})]})]}):e.jsx("p",{className:"py-5 text-sm text-muted-foreground",children:"This paper does not have a linked GitHub repository or Hugging Face artifact to copy yet."})}),e.jsxs(jt,{children:[e.jsx("a",{href:"https://huggingface.co/docs/huggingface_hub/en/guides/buckets",target:"_blank",rel:"noopener noreferrer",className:"mr-auto text-sm text-muted-foreground underline underline-offset-4",children:"About Hugging Face Buckets"}),e.jsxs(A,{type:"button",onClick:B,variant:"outline",disabled:!C||j.length===0,children:[e.jsx(F,{name:"copy",size:12}),"Copy commands"]}),e.jsx(A,{type:"button",onClick:P,disabled:y||t.isSignedIn&&(!C||!j.some(_=>_.kind!=="github")),children:y?p&&p.total>1?`Copying ${p.current}/${p.total}…`:"Copying…":t.isSignedIn?"Copy now":"Sign in & copy"})]})]})})]})}function wn({isLoading:t,papers:s}){return t?e.jsxs("div",{className:"sidebar-card","aria-busy":"true",children:[e.jsx("div",{className:"sidebar-card-title",children:"Related papers"}),e.jsx("div",{className:"related-meta",children:"Finding related work…"})]}):s!=null&&s.length?e.jsxs("div",{className:"sidebar-card",children:[e.jsx("div",{className:"sidebar-card-title",children:"Related papers"}),s.map(r=>e.jsxs(O,{to:`/paper/${r.arxiv_id||r.id}`,target:"_blank",rel:"noopener noreferrer",className:"related-paper",style:{textDecoration:"none",color:"inherit"},children:[e.jsx("div",{className:"related-title",children:e.jsx(Ne,{title:r.title})}),e.jsxs("div",{className:"related-meta",children:[e.jsx("span",{children:r.arxiv_id?`arXiv:${r.arxiv_id}`:"External resource"}),r.citation_count!=null&&e.jsxs("span",{children:[r.citation_count.toLocaleString()," cites"]})]})]},r.id))]}):null}const Cn=/(https?:\/\/[^\s]+)/g;function Sn({size:t=12}){return e.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:e.jsx("path",{fill:"currentColor",d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})})}function Zt(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function En(t){return new Date(t).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}function Pn({text:t}){return e.jsx("p",{className:"x-thread-text",children:t.split(Cn).map((s,r)=>r%2===1?e.jsx("span",{className:"x-thread-link",children:s.replace(/^https?:\/\/(www\.)?/,"").replace(/\/$/,"")},r):e.jsx(x.Fragment,{children:s},r))})}function $n({thread:t}){const[s,r]=x.useState(!1);return!t.author_avatar_url||s?e.jsx("span",{className:"x-thread-avatar x-thread-avatar--fallback","aria-hidden":"true",children:t.author_name.charAt(0).toUpperCase()}):e.jsx("img",{className:"x-thread-avatar",src:t.author_avatar_url,alt:"",loading:"lazy",referrerPolicy:"no-referrer",onError:()=>r(!0)})}function In(){var t;return((t=window.matchMedia)==null?void 0:t.call(window,"(prefers-reduced-motion: reduce)").matches)??!1}function Rn({thread:t}){const[s,r]=x.useState(!1),[a,i]=x.useState(null),[c,o]=x.useState(!1),l=x.useRef(null),{targetRef:d,isIntersecting:v}=Va({rootMargin:"200px"}),b=t.video_url;if(x.useEffect(()=>{if(!b||a||c||!v||In())return;const m=new AbortController;return fetch(b,{referrerPolicy:"no-referrer",signal:m.signal}).then(f=>{if(!f.ok)throw new Error(`HTTP ${f.status}`);return f.blob()}).then(f=>i(URL.createObjectURL(f))).catch(()=>{m.signal.aborted||o(!0)}),()=>m.abort()},[b,a,c,v]),x.useEffect(()=>()=>{a&&URL.revokeObjectURL(a)},[a]),x.useEffect(()=>{const m=l.current;m&&(v?m.play().catch(()=>{}):m.pause())},[v,a]),!t.media_url||s)return null;const u=a&&!c;return e.jsx("div",{className:"x-thread-media",ref:d,children:u?e.jsx("video",{ref:l,src:a,poster:t.media_url,muted:!0,loop:!0,playsInline:!0,autoPlay:!0,"aria-label":"Video",onError:()=>o(!0)}):e.jsxs(e.Fragment,{children:[e.jsx("img",{src:t.media_url,alt:"",loading:"lazy",referrerPolicy:"no-referrer",onError:()=>r(!0)}),t.media_type==="video"&&e.jsx("span",{className:"x-thread-play","aria-label":"Video",children:"▶"})]})})}function An({thread:t}){const s=Y(t.url);return s?e.jsxs("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:"x-thread",children:[e.jsxs("div",{className:"x-thread-header",children:[e.jsx($n,{thread:t}),e.jsxs("span",{className:"x-thread-author",children:[e.jsx("span",{className:"x-thread-name",children:t.author_name}),e.jsxs("span",{className:"x-thread-handle",children:["@",t.author_handle]})]}),e.jsx("span",{className:"x-thread-logo",children:e.jsx(Sn,{})})]}),e.jsx(Pn,{text:t.text}),e.jsx(Rn,{thread:t}),e.jsxs("div",{className:"x-thread-meta",children:[t.posted_at&&e.jsx("time",{dateTime:t.posted_at,children:En(t.posted_at)}),t.like_count!=null&&e.jsxs("span",{children:["♥ ",Zt(t.like_count)]}),t.reply_count!=null&&t.reply_count>0&&e.jsxs("span",{children:[Zt(t.reply_count)," ",t.reply_count===1?"reply":"replies"]}),e.jsx("span",{className:"x-thread-read",children:"Read on X →"})]})]}):null}function Ln({onEdit:t,threads:s}){return e.jsxs("div",{className:"sidebar-card",children:[e.jsxs("div",{className:"sidebar-card-title",children:[e.jsx("span",{children:"X threads"}),e.jsxs("span",{className:"badge",children:[s.length," post",s.length===1?"":"s",e.jsx("button",{type:"button",onClick:t,className:"edit-link",children:"edit"})]})]}),s.length>0?e.jsx("div",{className:"x-thread-list",children:s.map(r=>e.jsx(An,{thread:r},r.tweet_id))}):e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",padding:"6px 0"},children:"No author threads linked yet."})]})}const rt=3,es=3;function Tn(t){return t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function Dn({allHfArtifactUrls:t,citationCopied:s,citationDisplay:r,hfArtifactViewer:a,onCopyCitation:i,onEditHfArtifacts:c,onEditRepositories:o,onEditXThreads:l,paper:d,relatedIsLoading:v,relatedPapers:b,user:u}){var p;const[m,f]=x.useState(!1),y=[...d.repositories??[]].sort((g,n)=>Number(n.is_official)-Number(g.is_official)||(n.num_stars||0)-(g.num_stars||0)),w=(m?y:y.slice(0,rt)).map(g=>({...g,safeHref:Y(g.url)}));return e.jsxs("aside",{className:"detail-sidebar",children:[e.jsxs("div",{className:"sidebar-card",children:[e.jsxs("div",{className:"sidebar-card-title",children:[e.jsx("span",{children:"GitHub"}),e.jsxs("span",{className:"badge",children:[y.length," repo",y.length===1?"":"s",e.jsx("button",{type:"button",onClick:o,className:"edit-link",children:"edit"})]})]}),w.filter(({safeHref:g})=>g).map(g=>e.jsxs("a",{href:g.safeHref??void 0,target:"_blank",rel:"noopener noreferrer",className:"code-line",style:{textDecoration:"none"},children:[e.jsxs("span",{className:"code-line-repo",children:[e.jsx(F,{name:"github",size:12}),e.jsxs("span",{className:"code-line-repo-name",children:[g.owner,"/",g.name]}),g.is_official&&e.jsx("span",{className:"code-line-official",children:"· Official"})]}),e.jsxs("span",{className:"code-line-stars",children:["★ ",Tn(g.num_stars)]})]},g.id)),y.length===0&&e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",padding:"6px 0"},children:"No GitHub repositories linked yet."}),y.length>rt&&e.jsx("button",{type:"button",className:"bench-show-more",onClick:()=>f(g=>!g),children:m?"− show top 3":`+ show ${y.length-rt} more repos`})]}),e.jsx(Fn,{viewer:a,onEdit:c}),e.jsx(Ln,{threads:d.x_threads??[],onEdit:l}),e.jsx(Nn,{githubUrls:y.map(({url:g})=>g),hfModelUrls:t.models,hfDatasetUrls:t.datasets,hfSpaceUrls:t.spaces,paperId:d.id,pdfName:((p=d.arxiv_id)==null?void 0:p.replace("/","-"))||d.id,pdfUrl:d.url_pdf,isSignedIn:!!u,suggestedBucketId:u?`${u.username}/${kn(d.title)}`:void 0}),e.jsx(wn,{isLoading:v,papers:b}),e.jsxs("div",{className:"sidebar-card",children:[e.jsxs("div",{className:"sidebar-card-title",children:[e.jsx("span",{children:"Citation"}),e.jsxs("button",{type:"button",className:"citation-copy-btn",onClick:i,"aria-label":"Copy citation to clipboard",title:"Copy citation to clipboard",children:[e.jsx(F,{name:"copy",size:11}),s?"Copied":"Copy"]})]}),e.jsx("pre",{style:{fontFamily:"var(--mono)",fontSize:10.5,lineHeight:1.5,color:"var(--ink-soft)",whiteSpace:"pre-wrap",wordBreak:"break-word",margin:0},children:r})]})]})}function Fn({onEdit:t,viewer:s}){return e.jsxs("div",{className:"sidebar-card",children:[e.jsxs("div",{className:"sidebar-card-title",children:[s.paperHref?e.jsx("a",{href:s.paperHref,target:"_blank",rel:"noopener noreferrer",style:{color:"inherit",textDecoration:"none"},children:"🤗 Hugging Face"}):e.jsx("span",{children:"🤗 Hugging Face"}),e.jsx("button",{type:"button",onClick:t,className:"edit-link",children:"edit"})]}),s.isLoading?e.jsx(ue,{className:"h-16 w-full"}):e.jsxs(e.Fragment,{children:[s.rows.map(r=>e.jsx(Un,{...r},r.label)),s.footer&&e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:10,color:"var(--ink-faint)",marginTop:12},children:s.footer})]})]})}function Un({count:t,href:s,isLimited:r,label:a,links:i}){const[c,o]=x.useState(!1),l=((i==null?void 0:i.length)??0)>es,d=c?i:i==null?void 0:i.slice(0,es),v=t!=null?`${t}${r?"+":""}`:"—";return e.jsxs("div",{className:"hf-artifact-row",children:[e.jsxs("div",{className:"hf-artifact-row-header",children:[e.jsx("span",{children:a}),t?e.jsx("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:"hf-artifact-count",children:v}):e.jsx("span",{className:"hf-artifact-count hf-artifact-count--empty",children:v})]}),d!=null&&d.length?e.jsxs("div",{className:"hf-artifact-links",children:[d.map(b=>e.jsx("a",{href:b.href,target:"_blank",rel:"noopener noreferrer",children:b.label},b.href)),l&&e.jsx("button",{type:"button",className:"hf-artifact-toggle","aria-expanded":c,onClick:()=>o(b=>!b),children:c?"Show fewer":`View all ${i.length}`})]}):null]})}function Bn({abstract:t,mentions:s}){const r=[];let a=0;for(const i of[...s].sort((c,o)=>c.start-o.start))i.startt.length||t.slice(i.start,i.end)===i.surface&&(r.push(e.jsx(ot,{text:t.slice(a,i.start)},`t${a}`)),r.push(e.jsx(Ha,{entity:{kind:i.entity_type,slug:i.slug},className:"abstract-entity-link",newTab:!1,initialPreview:i.preview?{name:i.preview.name,description:i.preview.description??null,imageUrl:i.preview.image_url??null,count:i.preview.count??null,detail:i.preview.detail??null}:void 0,children:i.surface},`m${i.start}`)),a=i.end);return r.push(e.jsx(ot,{text:t.slice(a)},`t${a}`)),e.jsx(e.Fragment,{children:r})}function zn(t,s){const r=t.arxiv_id?` (arXiv:${re(t.arxiv_id)})`:"";return`About the paper "${t.title}"${r}: ${s}`}function Mn({paper:t,readerChatRoute:s}){const r=da()&&!!(t.id&&t.abstract),a=t.suggested_questions,{data:i}=Q({queryKey:["paper-suggested-questions",t.id],queryFn:()=>U.suggestedQuestions(String(t.id)),enabled:r&&Array.isArray(a)&&a.length===0,staleTime:o=>{var l;return(l=o.state.data)!=null&&l.questions.length?1/0:0},retry:!1}),c=a!=null&&a.length?a:(i==null?void 0:i.questions)??[];return!r||c.length===0?null:e.jsx("ul",{className:"suggested-questions","aria-label":"Ask about this paper",children:c.map(o=>{const l=s?`${s}?q=${encodeURIComponent(o)}`:`/chat?q=${encodeURIComponent(zn(t,o))}`;return e.jsx("li",{children:e.jsxs(O,{className:"suggested-question",to:l,onClick:s?()=>us(s):void 0,children:[e.jsx(F,{name:"chat",size:12}),e.jsx("span",{children:o})]})},o)})})}function Hn({canEdit:t,onEditMethods:s,onEditTasks:r,paper:a,readerChatRoute:i}){var l,d,v;const c=a.abstract||"",[o]=x.useState(()=>window.location.hash==="#tldr");return e.jsxs(e.Fragment,{children:[e.jsx(we,{id:"abstract",label:"Abstract"}),e.jsx("p",{className:"abstract-text",children:(l=a.abstract_mentions)!=null&&l.length?e.jsx(Bn,{abstract:c,mentions:a.abstract_mentions}):e.jsx(ot,{text:c})}),a.tldr&&e.jsxs("details",{className:"tldr-details paper-section-anchor",id:"tldr",open:o,children:[e.jsxs("summary",{children:[e.jsx("span",{className:"tldr-toggle-show",children:"Show TL;DR"}),e.jsx("span",{className:"tldr-toggle-hide",children:"Hide TL;DR"}),e.jsx("span",{className:"tldr-toggle-hint",children:"short summary"})]}),e.jsx("div",{className:"tldr-box",children:a.tldr})]}),e.jsx(Mn,{paper:a,readerChatRoute:i}),e.jsx(we,{id:"tasks",label:"Tasks",accent:e.jsxs("span",{className:"accent",children:[((d=a.tasks)==null?void 0:d.length)||0," tagged",t&&e.jsx("button",{type:"button",onClick:r,className:"edit-link",children:"edit"})]})}),e.jsx("div",{className:"paper-tags",style:{marginBottom:8},children:(a.tasks??[]).map(b=>e.jsx(ja,{slug:b.slug||"",label:b.name},b.id))}),e.jsx(we,{id:"methods",label:"Methods",accent:e.jsxs("span",{className:"accent",children:[((v=a.methods)==null?void 0:v.length)||0," used",t&&e.jsx("button",{type:"button",onClick:s,className:"edit-link",children:"edit"})]})}),e.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6,marginBottom:8},children:(a.methods??[]).map(b=>e.jsx(va,{method:b},b.id))})]})}const pt="pwc:pending-bookmark";function ts(t){window.sessionStorage.setItem(pt,JSON.stringify(t)),window.location.assign(Wa(!0))}function On(){var a,i;const{user:t}=Pe(),s=Q({queryKey:se.bookmarkIds,queryFn:()=>ct.getBookmarkIds(),enabled:!!t,staleTime:60*1e3}),r=Ee.useMemo(()=>{var c;return new Set(((c=s.data)==null?void 0:c.paper_ids)??[])},[(a=s.data)==null?void 0:a.paper_ids]);return{ids:((i=s.data)==null?void 0:i.paper_ids)??[],idSet:r,isLoading:s.isLoading,isError:s.isError}}function qn(){const{user:t}=Pe(),s=Z(),r=ae({mutationFn:async({paperId:i,isBookmarked:c})=>{c?await ct.removeBookmark(i):await ct.addBookmark(i)},onMutate:async({paperId:i,isBookmarked:c})=>{await s.cancelQueries({queryKey:se.bookmarkIds});const o=s.getQueryData(se.bookmarkIds),l=typeof i=="string"?Number(i):i,d=(o==null?void 0:o.paper_ids)??[],v=c?d.filter(b=>b!==l):[l,...d.filter(b=>b!==l)];return s.setQueryData(se.bookmarkIds,{paper_ids:v}),{previous:o}},onError:(i,c,o)=>{o!=null&&o.previous&&s.setQueryData(se.bookmarkIds,o.previous),i instanceof Se&&i.code==="saved_papers_bucket_authorization_required"&&ts(c)},onSettled:()=>{s.invalidateQueries({queryKey:se.bookmarkIds}),s.invalidateQueries({queryKey:[...me.feeds.saved]})}});return Ee.useEffect(()=>{if(!t||r.isPending)return;const i=new URL(window.location.href);if(i.searchParams.get(Ot)!=="1")return;i.searchParams.delete(Ot),window.history.replaceState({},"",`${i.pathname}${i.search}${i.hash}`);const c=window.sessionStorage.getItem(pt);if(c){window.sessionStorage.removeItem(pt);try{const o=JSON.parse(c);(typeof o.paperId=="number"||typeof o.paperId=="string")&&typeof o.isBookmarked=="boolean"&&r.mutate(o)}catch{}}},[r,t]),{toggle:Ee.useCallback((i,c)=>{if(!t){if(ds())return;ts({paperId:i,isBookmarked:c});return}r.mutate({paperId:i,isBookmarked:c})},[r,t]),isPending:r.isPending}}const Kn=({paperId:t})=>{const{user:s}=Pe(),{idSet:r}=On(),{toggle:a,isPending:i}=qn();if(ds())return null;const c=Number(t),o=!!s&&r.has(c),l=()=>{Number.isFinite(c)&&a(c,o)},d=s&&o?"Saved":"Save",v=s?o?"Remove from saved papers":"Save this paper":"Sign in with Hugging Face to save this paper";return e.jsxs("button",{type:"button",className:`action-btn${o?" is-saved":""}`,onClick:l,disabled:i,"aria-pressed":o,"aria-label":v,title:v,children:[e.jsx(F,{name:"bookmark",size:12}),d]})};function nt({children:t,showEdit:s=!1,onEdit:r,editAriaLabel:a}){return s?e.jsxs("span",{className:"action-btn-composite",children:[t,e.jsx("button",{type:"button",className:"action-btn-segment action-btn-edit",onClick:r,"aria-label":a,children:"edit"})]}):t}function ss(t){if(!t)return"—";try{return new Date(t).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch{return"—"}}function as(t,s){try{const r=new URL(t),i=r.pathname.replace(/\/$/,"").split("/").filter(Boolean).at(-1);return i?i.replace(/[-_]+/g," "):r.hostname.replace(/^www\./,"")}catch{return s}}const Hi=()=>{const{arxivId:t}=ua(),s=rs(),{toast:r}=J(),{user:a}=Pe(),i=(a==null?void 0:a.is_admin)??!1,c=!!a,o=tr(a),{arxivId:l,evaluations:d,evaluationsByTask:v,evaluationsLoading:b,paper:u,paperError:m,paperLoading:f,presentation:y,refetchEvaluations:w,refetchPaper:p,relatedQuery:g,versions:n,visibleEvaluations:h}=gr(t,o),[j,S]=x.useState(!1),{activeEditor:E,openEditor:C,setEditorOpen:R}=xr();x.useEffect(()=>{o!=="direct"||!(u!=null&&u.id)||(E&&E!=="evaluations"&&U.primeCurationState(u.id).catch(()=>{}),E==="evaluations"&&$e.primeCurationState(u.id).catch(()=>{}))},[E,o,u==null?void 0:u.id]);const[L,B]=x.useState(null),H=x.useRef(!1);x.useEffect(()=>{if(!a||!u||H.current)return;const k=sessionStorage.getItem(Ut);if(!k)return;if(H.current=!0,!U.freshAuthMutationDraft()){sessionStorage.removeItem(Ut),Ra(k)&&C(k);return}if(!window.confirm("You signed in again. Apply the saved destructive catalog edit now? The server will recheck the current catalog version before changing anything.")){r({title:"Edit kept locally",description:"Nothing was changed. Reload this paper when you are ready to confirm the saved edit."});return}U.resumeFreshAuthMutation().then(()=>{r({title:"Edit applied",description:"The restored catalog edit was applied."}),window.location.reload()}).catch(le=>{r({variant:"destructive",title:"Could not apply the saved edit",description:le instanceof Error?le.message:"Please reload and review the edit again."})})},[C,u,r,a]);const P=x.useMemo(()=>{if(!a||!(u!=null&&u.author_links))return!1;const k=a.username.toLowerCase();return u.author_links.some(D=>!!D.hf_username&&D.hf_username.toLowerCase()===k)},[a,u==null?void 0:u.author_links]),N=k=>{if(!c){B(k);return}C(k)},_=ae({mutationFn:()=>U.indexFromArxiv(l),onSuccess:()=>{r({title:"Indexed",description:"Paper added to database."}),setTimeout(()=>p(),1200)}}),I=_.error?xt(_.error,"Failed to index paper"):null,$=_.error instanceof Se&&[429,503].includes(_.error.status)?"Try again later after arXiv has lifted the temporary limit.":null,T=(y==null?void 0:y.citationCopy)??"",ne=(y==null?void 0:y.copyableRanks)??[],[M,xe]=x.useState(!1),be=async()=>{if(T)try{await navigator.clipboard.writeText(T),xe(!0),r({title:"Citation copied",description:"BibTeX entry copied to clipboard."}),window.setTimeout(()=>xe(!1),1500)}catch{r({title:"Copy failed",description:"Could not access the clipboard. Please copy manually.",variant:"destructive"})}},Ue=async()=>{if(!u)return;const k=u.arxiv_id||u.id,D=ar(k,ne);if(D)try{await navigator.clipboard.writeText(D),r({title:"PwC badges copied",description:"Each badge follows its current leaderboard result."})}catch{r({title:"Copy failed",description:"Could not access the clipboard. Please try again.",variant:"destructive"})}};if(f)return e.jsxs("div",{className:"page",children:[e.jsx(ue,{className:"h-12 w-3/4 mb-4"}),e.jsx(ue,{className:"h-6 w-1/3 mb-8"}),e.jsx(ue,{className:"h-64 w-full"})]});if(m||!u)return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(O,{to:"/papers",children:"Papers"}),e.jsx("span",{className:"sep",children:"/"}),e.jsxs("span",{style:{color:"var(--ink)"},children:["arXiv:",l]})]}),e.jsx("h1",{className:"detail-title",children:"Paper not indexed yet"}),e.jsxs("p",{style:{fontFamily:"var(--serif)",color:"var(--ink-soft)",marginTop:16,maxWidth:640},children:["We don't have ",e.jsxs("span",{style:{fontFamily:"var(--mono)"},children:["arXiv:",l]})," in the database. You can index it from arXiv right now."]}),I&&e.jsx(Ta,{variant:"destructive",className:"mt-4 max-w-xl",children:e.jsxs(Da,{children:[e.jsx("div",{children:I}),$&&e.jsx("div",{className:"mt-2",children:$})]})}),e.jsxs("div",{className:"action-row",children:[i&&e.jsxs("button",{className:"action-btn",onClick:()=>l&&_.mutate(),disabled:_.isPending,children:[e.jsx(F,{name:"sparkle",size:12}),_.isPending?"Indexing…":"Index from arXiv"]}),e.jsx(A,{variant:"outline",onClick:()=>s("/papers"),children:"Browse Papers"})]})]});if(!y)return null;const{allHfArtifactUrls:Ks,authorEntries:Be,citationDisplay:Gs,hasIntroducedItems:Qs,hasLineageItems:Xs,hfArtifactViewer:Vs,introducedBenchmarks:Ws,introducedFrameworks:wt,introducedMethods:Ys,introducedSummary:Js,numPages:Ct,paperSourceLabel:St,predecessorPapers:ze,projectPages:ie,safeAbstractUrl:je,safeConferenceUrl:Et,safePdfUrl:Pt,successorPapers:Me}=y,ve=12,oe=Sa(u,l),Zs=oe&&Dt()&&ma()&&(!Ft()||i)?oe:null,$t=u.organizations||[],It=k=>{const D=Ya(k)??k.name;return e.jsx(O,{to:`/orgs/${k.slug}`,className:`detail-title-org${k.logo_url?" detail-title-org--logo":""}`,title:k.name,"aria-label":k.name,children:k.logo_url?e.jsx("img",{src:k.logo_url,alt:"",onError:le=>{var At;(At=le.currentTarget.parentElement)==null||At.classList.remove("detail-title-org--logo"),le.currentTarget.replaceWith(D)}}):D},k.id)},Rt=j||Be.length<=ve?Be:Be.slice(0,ve);return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(O,{to:"/",children:"Trending"}),e.jsx("span",{className:"sep",children:"/"}),u.arxiv_id&&je?e.jsxs("a",{className:"breadcrumb-external",href:je,target:"_blank",rel:"noopener noreferrer",title:"Open on arXiv",children:[St,e.jsx("span",{"aria-hidden":"true",children:"↗"})]}):e.jsx("span",{children:St})]}),e.jsxs("div",{className:"detail-grid",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"detail-hero",children:[e.jsxs("div",{className:"detail-hero-main",children:[e.jsxs("h1",{className:"detail-title",children:[e.jsx(Ne,{title:u.title}),$t.slice(0,-1).map(It),e.jsxs("span",{className:"detail-title-tail",children:[$t.slice(-1).map(It),e.jsx("button",{type:"button",className:"detail-title-edit",onClick:()=>N("organizations"),title:"Edit organizations","aria-label":"Edit organizations",children:e.jsx(F,{name:"pencil",size:11})})]})]}),e.jsxs("div",{className:"detail-meta",children:[e.jsxs("span",{children:["Submitted ",ss(u.published)]}),Ct&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:[Ct," pages"]})]}),u.citation_count!=null&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:[u.citation_count.toLocaleString()," citations"]})]}),(u.proceeding||u.conference_slug)&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),u.conference_slug?e.jsx("a",{href:`/conferences/${u.conference_slug}`,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent-text)"},children:(u.proceeding||u.conference_name||"").replace(/\s+\d{1,2}$/,"")}):e.jsx("span",{children:u.proceeding.replace(/\s+\d{1,2}$/,"")})]}),n.length>1&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsx("select",{className:"version-select",value:u.version,onChange:k=>{const D=k.target.value;u.arxiv_id&&s(`/paper/${re(u.arxiv_id)}${D?`?version=${D}`:""}`)},children:n.map(k=>e.jsxs("option",{value:k.version,children:[k.version," — ",ss(k.published)]},k.version))})]})]}),e.jsxs("div",{className:"detail-authors",children:[Rt.map((k,D)=>e.jsxs(Ee.Fragment,{children:[k.hf_username&&e.jsx(Ja,{className:"detail-author-avatar",url:k.hf_avatar_url}),k.id?e.jsx(O,{to:`/authors/${k.id}`,children:k.name}):k.hf_username?e.jsx("a",{href:`https://huggingface.co/${k.hf_username}`,target:"_blank",rel:"noopener noreferrer",title:`@${k.hf_username} on Hugging Face`,children:k.name}):e.jsx("a",{children:k.name}),Dve&&e.jsx("button",{className:"show-more-authors",onClick:()=>S(k=>!k),style:{marginLeft:8,background:"none",border:"none",cursor:"pointer",color:"var(--accent-text)",fontFamily:"var(--mono)",fontSize:12},children:j?"show fewer":`+${u.authors.length-ve} more`})]}),e.jsxs("div",{className:"action-row",children:[oe&&Dt()&&(!Ft()||a!=null&&a.is_admin)?e.jsxs(O,{className:"action-btn",to:oe,onClick:()=>us(oe),children:[e.jsx(F,{name:"pdf",size:12})," Read paper",e.jsx("span",{className:"nav-new-badge","aria-hidden":"true",children:"New"})]}):Pt?e.jsxs("a",{className:"action-btn",href:Pt,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(F,{name:"pdf",size:12})," View PDF"]}):null,je&&u.source==="external"&&e.jsx(nt,{showEdit:!0,onEdit:()=>N("source_url"),editAriaLabel:"Edit source URL",children:e.jsxs("a",{className:"action-btn-segment action-btn-main",href:je,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(F,{name:"external",size:12})," Source page"]})}),ie.length===1?e.jsx(nt,{showEdit:!0,onEdit:()=>N("project_pages"),editAriaLabel:"Edit project pages",children:e.jsxs("a",{className:"action-btn-segment action-btn-main",href:ie[0].safeHref??void 0,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(F,{name:"globe",size:12})," Project page"]})}):null,ie.length>1?e.jsx(nt,{showEdit:!0,onEdit:()=>N("project_pages"),editAriaLabel:"Edit project pages",children:e.jsxs(ha,{children:[e.jsx(pa,{asChild:!0,children:e.jsxs("button",{type:"button",className:"action-btn-segment action-btn-main",children:[e.jsx(F,{name:"globe",size:12})," Project page"]})}),e.jsx(fa,{align:"start",className:"project-page-menu",children:ie.map((k,D)=>e.jsx(ga,{asChild:!0,children:k.safeHref?e.jsx("a",{href:k.safeHref,target:"_blank",rel:"noopener noreferrer",children:as(k.url,`Project page ${D+1}`)}):e.jsx("span",{children:as(k.url,`Project page ${D+1}`)})},k.url))})]})}):null,ie.length===0&&c?e.jsxs("button",{type:"button",className:"action-btn",onClick:()=>N("project_pages"),title:"Add project page",children:[e.jsx(F,{name:"globe",size:12})," Add project page"]}):null,Et&&e.jsxs("a",{className:"action-btn",href:Et,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(F,{name:"external",size:12})," Conference"]}),e.jsxs("a",{className:"action-btn",href:La(u.title,u.arxiv_id),target:"_blank",rel:"noopener noreferrer",title:"Ask Hugging Face ML Intern to reproduce this paper",children:[e.jsx("span",{className:"ml-intern-icon",children:e.jsx(F,{name:"robot",size:12})})," Reproduce with ML Intern"]}),e.jsx(br,{paperId:Number(u.id)}),i&&xa()&&e.jsx($s,{kind:"enrich-paper",triggerClassName:"action-btn",paperId:Number(u.id),paperTitle:u.title,onComplete:()=>void p()}),e.jsx(Kn,{paperId:u.id})]}),u.leaderboard_ranks&&u.leaderboard_ranks.length>0&&e.jsx(ya,{wrap:!0,paperHref:`/paper/${u.arxiv_id||u.id}`,ranks:Ca(u.leaderboard_ranks)})]}),e.jsx("div",{className:"detail-hero-thumb detail-thumb-wrap",children:e.jsx(_a,{paperId:u.arxiv_id||u.id,title:u.title,thumbnailUrl:ba(u.thumbnail_url),priority:!0})})]}),Qs&&e.jsxs("div",{className:`introduced-banner${wt.length>0?" introduced-banner--framework":""}`,children:[e.jsx("span",{className:"introduced-label",children:"Introduced"}),e.jsxs("div",{className:"introduced-methods",children:[Ys.map(k=>e.jsxs("button",{type:"button",className:"introduced-pill",onClick:()=>s(`/methods/${k.slug||k.id}`),children:[k.name,e.jsx("span",{className:"introduced-arrow",children:"→"})]},`method-${k.id}`)),Ws.map(k=>e.jsxs("button",{type:"button",className:"introduced-pill",onClick:()=>s(`/benchmark/${k.slug||k.id}`),children:[k.name,e.jsx("span",{className:"introduced-arrow",children:"→"})]},`benchmark-${k.id}`)),wt.map(k=>e.jsxs("button",{type:"button",className:"introduced-pill",onClick:()=>s(`/frameworks#framework-${k.slug}`),children:[k.name,e.jsx("span",{className:"introduced-arrow",children:"→"})]},`framework-${k.slug}`))]}),e.jsxs("span",{className:"introduced-note",children:["This paper is the canonical source for ",Js,"."]})]}),Xs&&e.jsxs("div",{className:"introduced-banner lineage-banner",children:[Me.length>0&&e.jsxs("div",{className:"lineage-row",children:[e.jsx("span",{className:"introduced-label lineage-label",children:Me.length===1?"Follow-up paper":"Follow-up papers"}),e.jsx("div",{className:"introduced-methods",children:Me.map(k=>e.jsxs("button",{type:"button",className:"introduced-pill lineage-pill",onClick:()=>s(`/paper/${k.route_identifier}`),children:[e.jsx(Ne,{title:k.title}),e.jsx("span",{className:"introduced-arrow",children:"→"})]},`successor-${k.id}`))})]}),ze.length>0&&e.jsxs("div",{className:"lineage-row",children:[e.jsx("span",{className:"introduced-label lineage-label",children:ze.length===1?"Predecessor paper":"Predecessor papers"}),e.jsx("div",{className:"introduced-methods",children:ze.map(k=>e.jsxs("button",{type:"button",className:"introduced-pill lineage-pill",onClick:()=>s(`/paper/${k.route_identifier}`),children:[e.jsx("span",{className:"introduced-arrow lineage-arrow-back",children:"←"}),e.jsx(Ne,{title:k.title})]},`predecessor-${k.id}`))})]})]}),e.jsx(Hn,{canEdit:!0,onEditMethods:()=>N("methods"),onEditTasks:()=>N("tasks"),paper:u,readerChatRoute:Zs}),e.jsx(sn,{canCopyBadge:ne.length>0,canEdit:!0,evaluationsByTask:v,evaluationsLoading:b,hiddenClosedSourceCount:((d==null?void 0:d.length)??0)-((h==null?void 0:h.length)??0),isAdmin:i,onCopyBadge:Ue,onEdit:()=>N("evaluations"),onRefresh:()=>void w(),paper:u,visibleEvaluationCount:(h==null?void 0:h.length)??0})]}),e.jsx(Dn,{allHfArtifactUrls:Ks,citationCopied:M,citationDisplay:Gs,hfArtifactViewer:Vs,onCopyCitation:be,onEditHfArtifacts:()=>N("hf_artifacts"),onEditRepositories:()=>N("repositories"),onEditXThreads:()=>N("x_threads"),paper:u,relatedIsLoading:g.isLoading,relatedPapers:g.data,user:a})]}),e.jsx(Zr,{activeEditor:E,arxivId:l,editSubmitMode:o,evaluations:d??[],isAdmin:i,isLinkedAuthor:P,onOpenChange:R,paper:u}),e.jsx(Oa,{open:L!==null,onOpenChange:k=>{k||B(null)},sectionLabel:L?Aa[L]:"this paper",returnTo:typeof window<"u"?window.location.pathname:"/"})]})};export{Hi as default}; diff --git a/assets/PaperFeed-BERxHjrg.js b/assets/PaperFeed-Cge1MWHJ.js similarity index 97% rename from assets/PaperFeed-BERxHjrg.js rename to assets/PaperFeed-Cge1MWHJ.js index b3710f55864bac7101f357454cceb4647cbc5218..f27bb65f65b63ca2e4ac26692b2e9b7b391be14a 100644 --- a/assets/PaperFeed-BERxHjrg.js +++ b/assets/PaperFeed-Cge1MWHJ.js @@ -1 +1 @@ -import{f as u,j as t,e as J,V as K}from"./index-D2fBL-s6.js";import{P as X}from"./PaperCard-DhorusY5.js";import{P as ee,a as te,b as ae}from"./popover-DS5Jzsg5.js";import{I as se}from"./Icon-Uhh78KjL.js";import{S as j}from"./skeleton-BDwfco0_.js";import{u as ne}from"./useIntersectionObserver-C0Rq0EXm.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}),re=(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},oe=(e,a)=>{const s=Z(e,a);return!a.startDate&&!a.endDate&&s.set("time","all_time"),s},ie=new Intl.DateTimeFormat("en",{month:"long",year:"numeric",timeZone:"UTC"}),H=new Intl.DateTimeFormat("en",{month:"short",timeZone:"UTC"}),O="(max-width: 640px)",ce=()=>{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`),le=()=>{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)),U=e=>new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),1)),de=(e,a)=>new Date(Date.UTC(a,e.getUTCMonth(),1)),w=(e,a)=>e.startDate===a.startDate&&e.endDate===a.endDate,he=(e,a)=>{const s=b(e),n=b(a),o=H.format(s),i=H.format(n),p=s.getUTCDate(),l=n.getUTCDate(),r=s.getUTCFullYear(),d=n.getUTCFullYear();return e===a?`${o} ${p}, ${r}`:r===d&&s.getUTCMonth()===n.getUTCMonth()?`${o} ${p}–${l}, ${r}`:r===d?`${o} ${p}–${i} ${l}, ${r}`:`${o} ${p}, ${r}–${i} ${l}, ${d}`},pe=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},(p,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:p,onYearChange:l,secondary:r=!1})=>{const d=u.useMemo(()=>pe(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:p,onChange:c=>l(c.target.value)})]}),t.jsx("h3",{children:ie.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:d.map(c=>{const g=c.iso===s||c.iso===n,m=!!(s&&n&&c.iso>s&&c.isoa;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:"→"})]}),ge=({startDate:e,endDate:a,onChange:s,currentDate:n})=>{const o=ce(),i=n?b(n):le(),[p,l]=u.useState(!1),[r,d]=u.useState(),[c,g]=u.useState(),[m,f]=u.useState(()=>U(i)),[_,T]=u.useState(()=>F(U(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=()=>{d(e),g(a);const h=U(e?b(e):i),x=U(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()&&$(v=>de(v,C))},S=(h,x,$,C)=>{const v=F(h,x);$(v),C(String(v.getUTCFullYear()))},A=h=>{!r||c?(d(h),g(void 0)):h{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:p,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?he(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"})]})]})]})]})]})},ue=()=>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:"✓"})]}),me=({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(ue,{}),label:"Has artifacts",onChange:n})]})]});function fe(e,a="200px"){const{targetRef:s,isIntersecting:n}=ne({rootMargin:a}),{data:o,hasNextPage:i,isFetchingNextPage:p,fetchNextPage:l}=e;return u.useEffect(()=>{n&&i&&!p&&l()},[n,i,p,l,o]),s}const xe=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]];function ve({defaultToLastMonth:e=!1}={}){const[a,s]=J(),n=a.get("order_by"),o=n==="date_published"||n==="citation_count"?n:"trending",i=a.get("has_code")==="true",p=a.get("has_hf_artifacts")==="true",l=e?re(a,void 0,"month"):V(a),r=(d,c)=>{const g=new URLSearchParams(a);c?g.set(d,c):g.delete(d),s(g)};return{searchParams:a,setSearchParams:s,orderBy:o,hasCode:i,hasHfArtifacts:p,dateRange:l,setOrderBy:d=>r("order_by",d==="trending"?null:d),setHasCode:d=>r("has_code",d?"true":null),setHasHfArtifacts:d=>r("has_hf_artifacts",d?"true":null),setDateRange:d=>s((e?oe:Z)(a,d)),filters:{order_by:o,order_dir:"desc",latest_only:!0,include_resources:!0,has_code:i,has_hf_artifacts:p,start_date:l.startDate,end_date:l.endDate}}}const Ue=({feed:e,sorts:a=xe,activeSort:s=e.orderBy,showDateFilter:n=!0,showHasCode:o,style:i,leading:p,children:l})=>t.jsxs("div",{className:"sort-bar",style:i,children:[p,t.jsxs("div",{className:"paper-feed-toolbar-controls",children:[a&&t.jsx("div",{className:"sort-options",children:a.map(([r,d])=>t.jsx("button",{type:"button",className:`sort-btn ${s===r?"active":""}`,onClick:()=>e.setOrderBy(r),children:d},r))}),t.jsx(me,{hasCode:e.hasCode,hasHfArtifacts:e.hasHfArtifacts,onHasCodeChange:e.setHasCode,onHasHfArtifactsChange:e.setHasHfArtifacts,showDivider:!!a,showHasCode:o})]}),n&&t.jsx(ge,{startDate:e.dateRange.startDate,endDate:e.dateRange.endDate,onChange:e.setDateRange}),l]}),Ce=()=>t.jsx(j,{className:"h-40 w-full"}),je=()=>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:p,cardHeader:l,rootMargin:r,children:d})=>{const c=fe(e,r);if(a){const g=o==="card"?je:Ce;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:p,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…"}),d]})};export{we as P,ge as a,Ue as b,xe as c,re as r,ve as u,oe as w}; +import{f as u,j as t,e as J,V as K}from"./index-BeSw2DVP.js";import{P as X}from"./PaperCard-Dx07g-aj.js";import{P as ee,a as te,b as ae}from"./popover-CYoFzAud.js";import{I as se}from"./Icon-BWcOShxk.js";import{S as j}from"./skeleton-BBv4iC5Z.js";import{u as ne}from"./useIntersectionObserver-BBx3EHQ9.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}),re=(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},oe=(e,a)=>{const s=Z(e,a);return!a.startDate&&!a.endDate&&s.set("time","all_time"),s},ie=new Intl.DateTimeFormat("en",{month:"long",year:"numeric",timeZone:"UTC"}),H=new Intl.DateTimeFormat("en",{month:"short",timeZone:"UTC"}),O="(max-width: 640px)",ce=()=>{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`),le=()=>{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)),U=e=>new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),1)),de=(e,a)=>new Date(Date.UTC(a,e.getUTCMonth(),1)),w=(e,a)=>e.startDate===a.startDate&&e.endDate===a.endDate,he=(e,a)=>{const s=b(e),n=b(a),o=H.format(s),i=H.format(n),p=s.getUTCDate(),l=n.getUTCDate(),r=s.getUTCFullYear(),d=n.getUTCFullYear();return e===a?`${o} ${p}, ${r}`:r===d&&s.getUTCMonth()===n.getUTCMonth()?`${o} ${p}–${l}, ${r}`:r===d?`${o} ${p}–${i} ${l}, ${r}`:`${o} ${p}, ${r}–${i} ${l}, ${d}`},pe=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},(p,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:p,onYearChange:l,secondary:r=!1})=>{const d=u.useMemo(()=>pe(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:p,onChange:c=>l(c.target.value)})]}),t.jsx("h3",{children:ie.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:d.map(c=>{const g=c.iso===s||c.iso===n,m=!!(s&&n&&c.iso>s&&c.isoa;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:"→"})]}),ge=({startDate:e,endDate:a,onChange:s,currentDate:n})=>{const o=ce(),i=n?b(n):le(),[p,l]=u.useState(!1),[r,d]=u.useState(),[c,g]=u.useState(),[m,f]=u.useState(()=>U(i)),[_,T]=u.useState(()=>F(U(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=()=>{d(e),g(a);const h=U(e?b(e):i),x=U(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()&&$(v=>de(v,C))},S=(h,x,$,C)=>{const v=F(h,x);$(v),C(String(v.getUTCFullYear()))},A=h=>{!r||c?(d(h),g(void 0)):h{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:p,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?he(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"})]})]})]})]})]})},ue=()=>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:"✓"})]}),me=({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(ue,{}),label:"Has artifacts",onChange:n})]})]});function fe(e,a="200px"){const{targetRef:s,isIntersecting:n}=ne({rootMargin:a}),{data:o,hasNextPage:i,isFetchingNextPage:p,fetchNextPage:l}=e;return u.useEffect(()=>{n&&i&&!p&&l()},[n,i,p,l,o]),s}const xe=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]];function ve({defaultToLastMonth:e=!1}={}){const[a,s]=J(),n=a.get("order_by"),o=n==="date_published"||n==="citation_count"?n:"trending",i=a.get("has_code")==="true",p=a.get("has_hf_artifacts")==="true",l=e?re(a,void 0,"month"):V(a),r=(d,c)=>{const g=new URLSearchParams(a);c?g.set(d,c):g.delete(d),s(g)};return{searchParams:a,setSearchParams:s,orderBy:o,hasCode:i,hasHfArtifacts:p,dateRange:l,setOrderBy:d=>r("order_by",d==="trending"?null:d),setHasCode:d=>r("has_code",d?"true":null),setHasHfArtifacts:d=>r("has_hf_artifacts",d?"true":null),setDateRange:d=>s((e?oe:Z)(a,d)),filters:{order_by:o,order_dir:"desc",latest_only:!0,include_resources:!0,has_code:i,has_hf_artifacts:p,start_date:l.startDate,end_date:l.endDate}}}const Ue=({feed:e,sorts:a=xe,activeSort:s=e.orderBy,showDateFilter:n=!0,showHasCode:o,style:i,leading:p,children:l})=>t.jsxs("div",{className:"sort-bar",style:i,children:[p,t.jsxs("div",{className:"paper-feed-toolbar-controls",children:[a&&t.jsx("div",{className:"sort-options",children:a.map(([r,d])=>t.jsx("button",{type:"button",className:`sort-btn ${s===r?"active":""}`,onClick:()=>e.setOrderBy(r),children:d},r))}),t.jsx(me,{hasCode:e.hasCode,hasHfArtifacts:e.hasHfArtifacts,onHasCodeChange:e.setHasCode,onHasHfArtifactsChange:e.setHasHfArtifacts,showDivider:!!a,showHasCode:o})]}),n&&t.jsx(ge,{startDate:e.dateRange.startDate,endDate:e.dateRange.endDate,onChange:e.setDateRange}),l]}),Ce=()=>t.jsx(j,{className:"h-40 w-full"}),je=()=>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:p,cardHeader:l,rootMargin:r,children:d})=>{const c=fe(e,r);if(a){const g=o==="card"?je:Ce;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:p,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…"}),d]})};export{we as P,ge as a,Ue as b,xe as c,re as r,ve as u,oe as w}; diff --git a/assets/PaperPreviewLink-BZuRBR1p.js b/assets/PaperPreviewLink-BughwfUv.js similarity index 98% rename from assets/PaperPreviewLink-BZuRBR1p.js rename to assets/PaperPreviewLink-BughwfUv.js index 47618dd10c736c80ab8d62c23c2311ec09be45d7..04ed26f04c8cabfbe14d7776fd0ab5f4630f22c9 100644 --- a/assets/PaperPreviewLink-BZuRBR1p.js +++ b/assets/PaperPreviewLink-BughwfUv.js @@ -1,4 +1,4 @@ -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-BPshewTi.js";import{l as fe}from"./index-BtZPsygG.js";import R from"./katex-DkKDou_j.js";import{j as p,V as A,a3 as de,p as xe,w as C,d as ge,l as ye,L as T,b as we,A as be}from"./index-D2fBL-s6.js";import{H as Ne,a as ve,b as ke}from"./hover-card-DWpZK4fW.js";import{p as I}from"./papers-khuZaSFb.js";import{u as Fe}from"./useMutation-9dlTbuQj.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:` +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-CbsMwfXw.js";import{l as fe}from"./index-XKdmo9ij.js";import R from"./katex-DkKDou_j.js";import{j as p,V as A,a3 as de,p as xe,w as C,d as ge,l as ye,L as T,b as we,A as be}from"./index-BeSw2DVP.js";import{H as Ne,a as ve,b as ke}from"./hover-card-BbFULETs.js";import{p as I}from"./papers-B58HJw9r.js";import{u as Fe}from"./useMutation-CsS-RfeE.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:` `,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:` `,before:d,encode:["$"],...m.current()})),x()}return d+=m.move(` `),c&&(d+=m.move(c+` diff --git a/assets/PaperReaderView-Bdokcr9P.js b/assets/PaperReaderView-C6y6ZAlb.js similarity index 91% rename from assets/PaperReaderView-Bdokcr9P.js rename to assets/PaperReaderView-C6y6ZAlb.js index afec6ca5ebccd51809ccd300485f75bb6c89bc9c..1174f54211152f9c0540db38b4ec2942780e03b2 100644 --- a/assets/PaperReaderView-Bdokcr9P.js +++ b/assets/PaperReaderView-C6y6ZAlb.js @@ -1 +1 @@ -import{f as s,b as F,j as r,A as ee,u as Fe,w as qe,k as He,a3 as Se,Z as Ke,L as G}from"./index-D2fBL-s6.js";import{u as Oe,R as De,A as Ue,c as Ve,d as Qe,a as Xe,P as Ze,e as Ye}from"./chatLifecycle-nMvmiYGF.js";import{M as Ge}from"./MarkdownText-ludE7yuw.js";import{g as Je,a as et,b as tt}from"./papers-khuZaSFb.js";import{f as at,w as rt,s as st,e as nt,a as J,b as je,c as _e}from"./paperReader-td2aJigh.js";import{a as it}from"./usePapers-CAjdcUuj.js";import{c as ot}from"./chat-BOZIonsX.js";import{s as te}from"./safeExternalHref-CkBrsh84.js";import{ChatExperience as ct}from"./ChatView-DAikess2.js";import"./chatSessions-CoHSP58H.js";/* empty css */import"./hover-card-DWpZK4fW.js";import"./CatalogEntityPreviewLink-xL6TDpUk.js";import"./catalog-5AxvKr4D.js";import"./github-DcIeypA5.js";import"./file-text-CikzkPqz.js";import"./PaperPreviewLink-BZuRBR1p.js";import"./index-BPshewTi.js";import"./index-BtZPsygG.js";import"./katex-DkKDou_j.js";import"./useMutation-9dlTbuQj.js";import"./thumbs-up-BnMguJ3s.js";import"./copy-CcyqVsMW.js";import"./queryOptions-C9woPjwX.js";import"./arrow-left-CzTG6LBL.js";import"./external-link-Ddavpnin.js";import"./plus-BI8-JXK0.js";import"./search-0R_Hc3S2.js";import"./chevron-up-B9KJ5aUJ.js";import"./AuthorAvatar-C8tz_syh.js";import"./curation-BtfabyzA.js";import"./useInfiniteQuery-CjJA-90e.js";import"./McpShowcase-R1ucnqw2.js";import"./AgentLogos-B5etEEwg.js";import"./share-2-SmaUf3DC.js";import"./Icon-Uhh78KjL.js";import"./mlIntern-KBHZ6tOl.js";import"./openrouter-BRMbmxz_.js";function lt(a){return a instanceof ee&&a.status===422?"This page could not be turned into a readable paper.":a instanceof ee&&a.status===503?"Paper content is still being prepared. Please try again later.":"The paper could not be loaded."}function dt({paperId:a,paperKey:i,paperTitle:c,paperHref:b,sourceUrl:t,resources:o,paperVersion:g="",selectionEnabled:v=!1,onReady:P,onPaperSelection:q,onPaperSelectionError:l}){var E;const A=s.useRef(null),x=at(t),C=F({queryKey:["paperWebPage",a],queryFn:()=>Je(a),enabled:!x,staleTime:5*6e4,retry:!1}),w=!x&&C.isPending,S=x||((E=C.data)==null?void 0:E.frameable)===!0,[u,T]=s.useState("original"),p=S&&u==="original",m=F({queryKey:["paperWebMarkdown",a],queryFn:()=>et(a),staleTime:5*6e4,retry:(K,$)=>K<2&&!($ instanceof ee&&$.status<500),retryDelay:3e3}),y=m.isSuccess;s.useEffect(()=>{y&&(P==null||P())},[P,y]),Oe({enabled:v&&!!g&&y&&!p,pagesRoot:A,routeId:i,paperVersion:g,numPages:1,onSelect:q,onError:l});const R=m.data?rt(m.data):"",H=!!(o!=null&&o.projectPage&&st(o.projectPage.href,t));return r.jsxs("div",{className:"pdf-viewer",children:[r.jsx(De,{paperTitle:c,paperHref:b,resources:o,label:"Paper controls",children:r.jsxs("div",{className:"pdf-toolbar-controls",children:[S&&r.jsxs("div",{className:"reader-web-view-toggle",role:"group","aria-label":"Paper view",children:[r.jsx("button",{type:"button","aria-pressed":p,onClick:()=>T("original"),children:"Original"}),r.jsx("button",{type:"button","aria-pressed":!p,title:"Readable text; select a passage to ask the chat about it",onClick:()=>T("text"),children:"Text"})]}),!H&&r.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",children:"Open original"})]})}),r.jsx("div",{className:"pdf-scroll-frame",children:w?r.jsx("div",{className:"pdf-loading",role:"status",children:"Loading the paper…"}):p?r.jsx("iframe",{className:"reader-web-frame",src:t,title:`Original page: ${c}`,sandbox:"allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox",referrerPolicy:"strict-origin-when-cross-origin"}):r.jsx("div",{className:"pdf-scroll",role:"region","aria-label":"Paper web page",children:m.isPending?r.jsx("div",{className:"pdf-loading",role:"status",children:"Preparing a readable version of this page…"}):m.isError?r.jsxs("div",{className:"pdf-error",role:"alert",children:[r.jsx("p",{children:lt(m.error)}),r.jsxs("div",{children:[r.jsx("button",{type:"button",onClick:()=>void m.refetch(),children:"Retry"})," ",r.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",children:"Open original"})]})]}):r.jsxs("article",{ref:A,className:"reader-web-document","data-page":"1",children:[!R.startsWith("# ")&&r.jsx("h1",{children:c}),r.jsx(Ge,{text:R})]})})})]})}const Ce=66,ut=240,ae="pwc:reader:split-ratio";function pt(a){const i=Number(sessionStorage.getItem(_e(a)));return Number.isInteger(i)&&i>0?i:1}function ft(){const a=Number(localStorage.getItem(ae));return Number.isFinite(a)&&a>=45&&a<=75?a:Ce}function mt(a){const i=te(a);if(!i)return null;const c=new URL(i);return(c.hostname==="arxiv.org"||c.hostname==="www.arxiv.org")&&c.pathname.startsWith("/pdf/")&&c.pathname.endsWith(".pdf")&&(c.pathname=c.pathname.slice(0,-4)),c.href}const ht=/^\/pdf\/(\d{4}\.\d{4,5}(?:v\d{1,3})?|[a-z]+(?:-[a-z]+)*(?:\.[A-Z]{2})?\/\d{7}(?:v\d{1,3})?)$/;function gt(a){const i=new URL(a),c=i.pathname.match(ht);return(i.hostname==="arxiv.org"||i.hostname==="www.arxiv.org")&&c&&!i.search?Se(`/paper-assets/arxiv-pdf/${c[1]}`)??a:a}function bt(a){return new URL(a).hostname.replace(/^www\./,"")}function vt(a){if(!a)return{};const i={};for(const t of a.repositories??[]){if(!t.is_official)continue;const o=te(t.url);if(!o)continue;const g=new URL(o),v=g.pathname.split("/").filter(Boolean);if((g.hostname==="github.com"||g.hostname==="www.github.com")&&v.length>=2){i.repository={href:o,stars:t.num_stars||0};break}}const c=[...a.project_pages??[]].sort((t,o)=>Number(o.is_official)-Number(t.is_official));for(const t of c){const o=te(t.url);if(o){i.projectPage={href:o,label:bt(o)};break}}const b=a.hf_artifact_summary?a.hf_artifact_summary.model_count+a.hf_artifact_summary.dataset_count+a.hf_artifact_summary.space_count:new Set([...a.hf_models??[],...a.hf_datasets??[],...a.hf_spaces??[]]).size;return b>0&&a.arxiv_id&&(i.huggingFace={href:`https://huggingface.co/papers/${a.arxiv_id.replace(/v\d+$/i,"")}`,count:b}),i}function xt({routeId:a}){var xe,Pe,we,ye,Re;const i=He(),c=it(a,!!a),b=F({queryKey:["chatAvailability"],queryFn:()=>ot.getAvailability(),refetchInterval:3e4,retry:!1}),t=c.data,o=t?nt(t):null,g=o?null:(t==null?void 0:t.source)==="external"?Se(`/paper-assets/external/${t.id}/paper.pdf`):mt(t==null?void 0:t.url_pdf),v=g&&(t==null?void 0:t.source)!=="external"?gt(g):g,P=vt(t),q=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=((xe=t==null?void 0:t.arxiv_id)==null?void 0:xe.replace(/v\d+$/i,""))||a,A=s.useCallback(()=>i(`/paper/${l}`),[l,i]),[x,C]=s.useState(()=>sessionStorage.getItem(J(a))||void 0),[w,S]=s.useState(ft),[u,T]=s.useState(()=>sessionStorage.getItem(je(a))==="1"),[p,m]=s.useState("paper"),[y,R]=s.useState(),[H,E]=s.useState(),[K,$]=s.useState(!1),ke=s.useCallback(()=>$(!0),[]),[Ne,_]=s.useState(""),[re]=s.useState(()=>pt(a)),[k,Ae]=s.useState(0),[se,ne]=s.useState(!1),[Te,ie]=s.useState(!1),I=s.useRef(null),O=s.useRef(null),W=s.useRef(null),oe=s.useRef(null),ce=s.useRef(null),D=s.useRef(!1),M=s.useRef(!1),U=s.useRef(0),j=s.useRef(0),V=s.useRef(0),N=s.useRef(w),le=s.useRef(re),Q=s.useRef(t==null?void 0:t.version),de=Ve().reset,ue=s.useRef(x),f=k>=840;s.useEffect(()=>{ue.current!==x&&(ue.current=x,de())},[x,de]),s.useEffect(()=>{t!=null&&t.version&&Q.current&&t.version!==Q.current&&(R(void 0),_("")),Q.current=t==null?void 0:t.version},[t==null?void 0:t.version]),s.useEffect(()=>()=>{window.clearTimeout(U.current),cancelAnimationFrame(j.current)},[]),s.useLayoutEffect(()=>{const e=I.current;if(!e)return;const n=()=>Ae(e.clientWidth);n();const d=new ResizeObserver(n);return d.observe(e),()=>d.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 d=e.content;e.content="noindex, nofollow";let h=document.querySelector('link[rel="canonical"]');const Le=!h;h||(h=document.createElement("link"),h.rel="canonical",document.head.appendChild(h));const Be=h.href;return h.href=`${window.location.origin}/paper/${l}`,()=>{document.title="Papers With Code",n?e==null||e.remove():e&&(e.content=d),Le?h==null||h.remove():h&&(h.href=Be)}},[l,t]);const z=s.useCallback(e=>{if(!k)return Math.max(45,Math.min(75,e));const n=480/k*100,d=100-360/k*100;return Math.max(n,Math.min(d,e))},[k]);s.useEffect(()=>S(e=>{const n=z(e);return N.current=n,n}),[z]);const L=e=>{const n=z(e);N.current=n,S(n),localStorage.setItem(ae,String(n))},pe=e=>{var d;const n=z(e);N.current=n,O.current&&(O.current.style.width=`${n}%`),W.current&&(W.current.style.width=`${100-n}%`),(d=oe.current)==null||d.setAttribute("aria-valuenow",String(Math.round(n)))},fe=e=>{V.current=e,!j.current&&(j.current=requestAnimationFrame(()=>{var d;j.current=0;const n=(d=I.current)==null?void 0:d.getBoundingClientRect();n!=null&&n.width&&pe((V.current-n.left)/n.width*100)}))},Ee=e=>{M.current=!0,ne(!0),e.currentTarget.setPointerCapture(e.pointerId),fe(e.clientX)},X=()=>{var e;if(M.current){if(j.current){cancelAnimationFrame(j.current),j.current=0;const n=(e=I.current)==null?void 0:e.getBoundingClientRect();n!=null&&n.width&&pe((V.current-n.left)/n.width*100)}M.current=!1,S(N.current),localStorage.setItem(ae,String(N.current)),ne(!1)}},me=e=>{window.clearTimeout(U.current),ie(!0),T(e),sessionStorage.setItem(je(a),e?"1":"0"),U.current=window.setTimeout(()=>ie(!1),ut+40)},he=e=>{D.current=!0,me(e)};s.useEffect(()=>{var e;D.current&&(D.current=!1,(e=u?ce.current:W.current)==null||e.focus())},[u]);const $e=e=>{C(e),sessionStorage.setItem(J(a),e)},Ie=()=>{C(void 0),sessionStorage.removeItem(J(a)),R(void 0),_("")},ge=((Pe=b.data)==null?void 0:Pe.paper_reader_selection_enabled)===!0,be=e=>{R(e),_(`Selection from page ${e.page} added to chat`),f&&u&&me(!1)},We=s.useCallback(e=>{R(e),e||_("")},[]),Z=((we=b.data)==null?void 0:we.paper_reader_citations_enabled)===!0&&!!v,B=F({queryKey:["paper-layout",l],queryFn:()=>tt(l),enabled:Z&&!!l,staleTime:5*6e4}).data,Me=s.useMemo(()=>Z?{layout:B,open:e=>{const n=B?Qe(B,e):[];n.length&&(E(d=>({boxes:n,nonce:((d==null?void 0:d.nonce)??0)+1})),m("paper"))}}:null,[Z,B]),ve=Ke()&&((ye=b.data)==null?void 0:ye.paper_reader_chat_enabled)!==!1,Y=!!(t&&ve&&!(o&&!K)),ze=t&&ve&&!Y?r.jsx("div",{className:"reader-chat-unavailable",role:"status",children:"Chat opens once the paper is ready."}):t&&Y?r.jsx(ct,{mode:"paper",routeSessionId:x,primaryPaper:{id:t.id,routeId:l,title:t.title,arxivId:t.arxiv_id},currentPage:()=>le.current,paperSelection:y,onPaperSelectionChange:We,onSessionId:$e,onReaderSubmit:()=>m("assistant"),onReaderNewChat:Ie,onReaderClose:f?()=>he(!0):void 0}):r.jsx("div",{className:"reader-chat-unavailable",children:"Chat is not enabled for this preview."});return c.isLoading?r.jsx("div",{className:"reader-status",role:"status",children:"Loading paper…"}):c.error||!t?r.jsxs("div",{className:"reader-status",role:"alert",children:[r.jsx("p",{children:"Paper not found."}),r.jsx(G,{to:"/papers",children:"Browse papers"})]}):((Re=b.data)==null?void 0:Re.native_pdf_reader_enabled)===!1?r.jsxs("div",{className:"reader-status",role:"alert",children:[r.jsx("p",{children:"The native reader is currently unavailable."}),r.jsx(G,{to:`/paper/${l}`,children:"Back to paper"})]}):!v&&!o?r.jsxs("div",{className:"reader-status",role:"alert",children:[r.jsx("p",{children:"Native reading is unavailable for this resource."}),r.jsx(G,{to:`/paper/${l}`,children:"Back to paper"})]}):r.jsxs("div",{className:"paper-reader-shell",children:[!f&&r.jsxs("div",{className:"reader-tabs",role:"tablist","aria-label":"Reader panels",children:[r.jsx("button",{type:"button",role:"tab","aria-selected":p==="paper",onClick:()=>m("paper"),children:"Paper"}),r.jsxs("button",{type:"button",role:"tab","aria-selected":p==="assistant","aria-label":y&&p!=="assistant"?"Chat, selection attached":"Chat",onClick:()=>m("assistant"),children:["Chat",y&&p!=="assistant"&&r.jsx("span",{className:"reader-tab-pending","aria-hidden":"true"})]})]}),r.jsx(Xe,{variant:"reader",children:r.jsxs("div",{ref:I,className:`reader-workspace${f?" is-desktop":" is-tabs"}${u?" is-assistant-collapsed":""}${se?" is-resizing":""}`,"data-testid":"paper-chat-workspace",children:[r.jsx("section",{ref:O,className:`reader-paper-pane${!f&&p!=="paper"?" is-hidden":""}`,style:f?{width:u?"100%":`${w}%`}:void 0,role:"tabpanel","aria-label":"Paper","aria-hidden":!f&&p!=="paper",children:o?r.jsx(dt,{paperId:t.id,paperKey:l,paperTitle:t.title,paperHref:`/paper/${l}`,sourceUrl:o,resources:P,paperVersion:t.version,selectionEnabled:ge,onReady:ke,onPaperSelection:be,onPaperSelectionError:_}):v&&r.jsx(Ze,{url:v,downloadUrl:g??v,paperKey:l,paperTitle:t.title,paperHref:`/paper/${l}`,onClose:A,resources:P,initialPage:re,resizeActive:se||Te,selectionEnabled:ge,paperVersion:t.version,authors:q,loadErrorMessage:t.source==="external"?"Paper content is still being prepared. Please try again later.":void 0,onPaperSelection:be,onPaperSelectionError:_,highlight:H,onPageChange:e=>{le.current=e,sessionStorage.setItem(_e(a),String(e))}})}),f&&!u&&r.jsx("div",{ref:oe,className:"reader-resize-handle",role:"separator","aria-label":"Resize paper and Chat panels","aria-orientation":"vertical","aria-valuemin":45,"aria-valuemax":75,"aria-valuenow":Math.round(w),tabIndex:0,onPointerDown:Ee,onPointerMove:e=>{M.current&&fe(e.clientX)},onPointerUp:X,onPointerCancel:X,onLostPointerCapture:X,onDoubleClick:()=>L(Ce),onKeyDown:e=>{(e.key==="ArrowLeft"||e.key==="ArrowRight")&&(e.preventDefault(),L(w+(e.key==="ArrowRight"?2:-2))),e.key==="Home"&&L(45),e.key==="End"&&L(75)}}),r.jsx("aside",{ref:W,id:"reader-chat-panel",className:`reader-assistant-pane${!f&&p!=="assistant"?" is-hidden":""}${f&&u?" is-collapsed":""}`,style:f?{width:u?0:`${100-w}%`}:void 0,role:"tabpanel","aria-label":"Chat","aria-hidden":!f&&p!=="assistant"||u,tabIndex:-1,children:r.jsx(Ye.Provider,{value:Me,children:ze})}),r.jsx("div",{className:"sr-only","aria-live":"polite",children:Ne}),f&&(u||!Y)&&r.jsx("button",{ref:ce,type:"button",className:"reader-collapse-assistant","aria-controls":"reader-chat-panel","aria-expanded":!u,onClick:()=>he(!u),children:u?"Open chat":"Hide chat"})]})})]})}function ia(){const{paperId:a=""}=Fe(),i=qe(a).replace(/v\d+$/i,"");return r.jsx(Ue,{workspaceKey:`reader:${a}`,children:r.jsx(xt,{routeId:i},i)})}export{ia as default,vt as readerToolbarResources}; +import{f as s,b as F,j as r,A as ee,u as Fe,w as qe,k as He,a3 as Se,Z as Ke,L as G}from"./index-BeSw2DVP.js";import{u as Oe,R as De,A as Ue,c as Ve,d as Qe,a as Xe,P as Ze,e as Ye}from"./chatLifecycle-ByiWkgE5.js";import{M as Ge}from"./MarkdownText-BdL6XBXC.js";import{g as Je,a as et,b as tt}from"./papers-B58HJw9r.js";import{f as at,w as rt,s as st,e as nt,a as J,b as je,c as _e}from"./paperReader-td2aJigh.js";import{a as it}from"./usePapers-Cj1tt_u6.js";import{c as ot}from"./chat-Bvpu56kX.js";import{s as te}from"./safeExternalHref-CkBrsh84.js";import{ChatExperience as ct}from"./ChatView-2NhnPPPO.js";import"./chatSessions-v3d2DQH8.js";/* empty css */import"./hover-card-BbFULETs.js";import"./CatalogEntityPreviewLink-BPnp82vP.js";import"./catalog-D3XT9SmX.js";import"./github-CTNIgqBO.js";import"./file-text-BHvaEohD.js";import"./PaperPreviewLink-BughwfUv.js";import"./index-CbsMwfXw.js";import"./index-XKdmo9ij.js";import"./katex-DkKDou_j.js";import"./useMutation-CsS-RfeE.js";import"./thumbs-up-DGIteJ7Z.js";import"./copy-3DjQpd64.js";import"./queryOptions-C9woPjwX.js";import"./arrow-left-C-qXYpsS.js";import"./external-link-BAPjX9Up.js";import"./plus-imZJbVTM.js";import"./search-B4RgSU4h.js";import"./chevron-up-CSi6wXAh.js";import"./AuthorAvatar-Dpan5W1F.js";import"./curation-CCIsdsjV.js";import"./useInfiniteQuery-C8JHYWz5.js";import"./McpShowcase-CMNatnnu.js";import"./AgentLogos-BC7uX8n_.js";import"./share-2-CGSfn6ux.js";import"./Icon-BWcOShxk.js";import"./mlIntern-C-RSIXvd.js";import"./openrouter-C8otLyGB.js";function lt(a){return a instanceof ee&&a.status===422?"This page could not be turned into a readable paper.":a instanceof ee&&a.status===503?"Paper content is still being prepared. Please try again later.":"The paper could not be loaded."}function dt({paperId:a,paperKey:i,paperTitle:c,paperHref:b,sourceUrl:t,resources:o,paperVersion:g="",selectionEnabled:v=!1,onReady:P,onPaperSelection:q,onPaperSelectionError:l}){var E;const A=s.useRef(null),x=at(t),C=F({queryKey:["paperWebPage",a],queryFn:()=>Je(a),enabled:!x,staleTime:5*6e4,retry:!1}),w=!x&&C.isPending,S=x||((E=C.data)==null?void 0:E.frameable)===!0,[u,T]=s.useState("original"),p=S&&u==="original",m=F({queryKey:["paperWebMarkdown",a],queryFn:()=>et(a),staleTime:5*6e4,retry:(K,$)=>K<2&&!($ instanceof ee&&$.status<500),retryDelay:3e3}),y=m.isSuccess;s.useEffect(()=>{y&&(P==null||P())},[P,y]),Oe({enabled:v&&!!g&&y&&!p,pagesRoot:A,routeId:i,paperVersion:g,numPages:1,onSelect:q,onError:l});const R=m.data?rt(m.data):"",H=!!(o!=null&&o.projectPage&&st(o.projectPage.href,t));return r.jsxs("div",{className:"pdf-viewer",children:[r.jsx(De,{paperTitle:c,paperHref:b,resources:o,label:"Paper controls",children:r.jsxs("div",{className:"pdf-toolbar-controls",children:[S&&r.jsxs("div",{className:"reader-web-view-toggle",role:"group","aria-label":"Paper view",children:[r.jsx("button",{type:"button","aria-pressed":p,onClick:()=>T("original"),children:"Original"}),r.jsx("button",{type:"button","aria-pressed":!p,title:"Readable text; select a passage to ask the chat about it",onClick:()=>T("text"),children:"Text"})]}),!H&&r.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",children:"Open original"})]})}),r.jsx("div",{className:"pdf-scroll-frame",children:w?r.jsx("div",{className:"pdf-loading",role:"status",children:"Loading the paper…"}):p?r.jsx("iframe",{className:"reader-web-frame",src:t,title:`Original page: ${c}`,sandbox:"allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox",referrerPolicy:"strict-origin-when-cross-origin"}):r.jsx("div",{className:"pdf-scroll",role:"region","aria-label":"Paper web page",children:m.isPending?r.jsx("div",{className:"pdf-loading",role:"status",children:"Preparing a readable version of this page…"}):m.isError?r.jsxs("div",{className:"pdf-error",role:"alert",children:[r.jsx("p",{children:lt(m.error)}),r.jsxs("div",{children:[r.jsx("button",{type:"button",onClick:()=>void m.refetch(),children:"Retry"})," ",r.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",children:"Open original"})]})]}):r.jsxs("article",{ref:A,className:"reader-web-document","data-page":"1",children:[!R.startsWith("# ")&&r.jsx("h1",{children:c}),r.jsx(Ge,{text:R})]})})})]})}const Ce=66,ut=240,ae="pwc:reader:split-ratio";function pt(a){const i=Number(sessionStorage.getItem(_e(a)));return Number.isInteger(i)&&i>0?i:1}function ft(){const a=Number(localStorage.getItem(ae));return Number.isFinite(a)&&a>=45&&a<=75?a:Ce}function mt(a){const i=te(a);if(!i)return null;const c=new URL(i);return(c.hostname==="arxiv.org"||c.hostname==="www.arxiv.org")&&c.pathname.startsWith("/pdf/")&&c.pathname.endsWith(".pdf")&&(c.pathname=c.pathname.slice(0,-4)),c.href}const ht=/^\/pdf\/(\d{4}\.\d{4,5}(?:v\d{1,3})?|[a-z]+(?:-[a-z]+)*(?:\.[A-Z]{2})?\/\d{7}(?:v\d{1,3})?)$/;function gt(a){const i=new URL(a),c=i.pathname.match(ht);return(i.hostname==="arxiv.org"||i.hostname==="www.arxiv.org")&&c&&!i.search?Se(`/paper-assets/arxiv-pdf/${c[1]}`)??a:a}function bt(a){return new URL(a).hostname.replace(/^www\./,"")}function vt(a){if(!a)return{};const i={};for(const t of a.repositories??[]){if(!t.is_official)continue;const o=te(t.url);if(!o)continue;const g=new URL(o),v=g.pathname.split("/").filter(Boolean);if((g.hostname==="github.com"||g.hostname==="www.github.com")&&v.length>=2){i.repository={href:o,stars:t.num_stars||0};break}}const c=[...a.project_pages??[]].sort((t,o)=>Number(o.is_official)-Number(t.is_official));for(const t of c){const o=te(t.url);if(o){i.projectPage={href:o,label:bt(o)};break}}const b=a.hf_artifact_summary?a.hf_artifact_summary.model_count+a.hf_artifact_summary.dataset_count+a.hf_artifact_summary.space_count:new Set([...a.hf_models??[],...a.hf_datasets??[],...a.hf_spaces??[]]).size;return b>0&&a.arxiv_id&&(i.huggingFace={href:`https://huggingface.co/papers/${a.arxiv_id.replace(/v\d+$/i,"")}`,count:b}),i}function xt({routeId:a}){var xe,Pe,we,ye,Re;const i=He(),c=it(a,!!a),b=F({queryKey:["chatAvailability"],queryFn:()=>ot.getAvailability(),refetchInterval:3e4,retry:!1}),t=c.data,o=t?nt(t):null,g=o?null:(t==null?void 0:t.source)==="external"?Se(`/paper-assets/external/${t.id}/paper.pdf`):mt(t==null?void 0:t.url_pdf),v=g&&(t==null?void 0:t.source)!=="external"?gt(g):g,P=vt(t),q=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=((xe=t==null?void 0:t.arxiv_id)==null?void 0:xe.replace(/v\d+$/i,""))||a,A=s.useCallback(()=>i(`/paper/${l}`),[l,i]),[x,C]=s.useState(()=>sessionStorage.getItem(J(a))||void 0),[w,S]=s.useState(ft),[u,T]=s.useState(()=>sessionStorage.getItem(je(a))==="1"),[p,m]=s.useState("paper"),[y,R]=s.useState(),[H,E]=s.useState(),[K,$]=s.useState(!1),ke=s.useCallback(()=>$(!0),[]),[Ne,_]=s.useState(""),[re]=s.useState(()=>pt(a)),[k,Ae]=s.useState(0),[se,ne]=s.useState(!1),[Te,ie]=s.useState(!1),I=s.useRef(null),O=s.useRef(null),W=s.useRef(null),oe=s.useRef(null),ce=s.useRef(null),D=s.useRef(!1),M=s.useRef(!1),U=s.useRef(0),j=s.useRef(0),V=s.useRef(0),N=s.useRef(w),le=s.useRef(re),Q=s.useRef(t==null?void 0:t.version),de=Ve().reset,ue=s.useRef(x),f=k>=840;s.useEffect(()=>{ue.current!==x&&(ue.current=x,de())},[x,de]),s.useEffect(()=>{t!=null&&t.version&&Q.current&&t.version!==Q.current&&(R(void 0),_("")),Q.current=t==null?void 0:t.version},[t==null?void 0:t.version]),s.useEffect(()=>()=>{window.clearTimeout(U.current),cancelAnimationFrame(j.current)},[]),s.useLayoutEffect(()=>{const e=I.current;if(!e)return;const n=()=>Ae(e.clientWidth);n();const d=new ResizeObserver(n);return d.observe(e),()=>d.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 d=e.content;e.content="noindex, nofollow";let h=document.querySelector('link[rel="canonical"]');const Le=!h;h||(h=document.createElement("link"),h.rel="canonical",document.head.appendChild(h));const Be=h.href;return h.href=`${window.location.origin}/paper/${l}`,()=>{document.title="Papers With Code",n?e==null||e.remove():e&&(e.content=d),Le?h==null||h.remove():h&&(h.href=Be)}},[l,t]);const z=s.useCallback(e=>{if(!k)return Math.max(45,Math.min(75,e));const n=480/k*100,d=100-360/k*100;return Math.max(n,Math.min(d,e))},[k]);s.useEffect(()=>S(e=>{const n=z(e);return N.current=n,n}),[z]);const L=e=>{const n=z(e);N.current=n,S(n),localStorage.setItem(ae,String(n))},pe=e=>{var d;const n=z(e);N.current=n,O.current&&(O.current.style.width=`${n}%`),W.current&&(W.current.style.width=`${100-n}%`),(d=oe.current)==null||d.setAttribute("aria-valuenow",String(Math.round(n)))},fe=e=>{V.current=e,!j.current&&(j.current=requestAnimationFrame(()=>{var d;j.current=0;const n=(d=I.current)==null?void 0:d.getBoundingClientRect();n!=null&&n.width&&pe((V.current-n.left)/n.width*100)}))},Ee=e=>{M.current=!0,ne(!0),e.currentTarget.setPointerCapture(e.pointerId),fe(e.clientX)},X=()=>{var e;if(M.current){if(j.current){cancelAnimationFrame(j.current),j.current=0;const n=(e=I.current)==null?void 0:e.getBoundingClientRect();n!=null&&n.width&&pe((V.current-n.left)/n.width*100)}M.current=!1,S(N.current),localStorage.setItem(ae,String(N.current)),ne(!1)}},me=e=>{window.clearTimeout(U.current),ie(!0),T(e),sessionStorage.setItem(je(a),e?"1":"0"),U.current=window.setTimeout(()=>ie(!1),ut+40)},he=e=>{D.current=!0,me(e)};s.useEffect(()=>{var e;D.current&&(D.current=!1,(e=u?ce.current:W.current)==null||e.focus())},[u]);const $e=e=>{C(e),sessionStorage.setItem(J(a),e)},Ie=()=>{C(void 0),sessionStorage.removeItem(J(a)),R(void 0),_("")},ge=((Pe=b.data)==null?void 0:Pe.paper_reader_selection_enabled)===!0,be=e=>{R(e),_(`Selection from page ${e.page} added to chat`),f&&u&&me(!1)},We=s.useCallback(e=>{R(e),e||_("")},[]),Z=((we=b.data)==null?void 0:we.paper_reader_citations_enabled)===!0&&!!v,B=F({queryKey:["paper-layout",l],queryFn:()=>tt(l),enabled:Z&&!!l,staleTime:5*6e4}).data,Me=s.useMemo(()=>Z?{layout:B,open:e=>{const n=B?Qe(B,e):[];n.length&&(E(d=>({boxes:n,nonce:((d==null?void 0:d.nonce)??0)+1})),m("paper"))}}:null,[Z,B]),ve=Ke()&&((ye=b.data)==null?void 0:ye.paper_reader_chat_enabled)!==!1,Y=!!(t&&ve&&!(o&&!K)),ze=t&&ve&&!Y?r.jsx("div",{className:"reader-chat-unavailable",role:"status",children:"Chat opens once the paper is ready."}):t&&Y?r.jsx(ct,{mode:"paper",routeSessionId:x,primaryPaper:{id:t.id,routeId:l,title:t.title,arxivId:t.arxiv_id},currentPage:()=>le.current,paperSelection:y,onPaperSelectionChange:We,onSessionId:$e,onReaderSubmit:()=>m("assistant"),onReaderNewChat:Ie,onReaderClose:f?()=>he(!0):void 0}):r.jsx("div",{className:"reader-chat-unavailable",children:"Chat is not enabled for this preview."});return c.isLoading?r.jsx("div",{className:"reader-status",role:"status",children:"Loading paper…"}):c.error||!t?r.jsxs("div",{className:"reader-status",role:"alert",children:[r.jsx("p",{children:"Paper not found."}),r.jsx(G,{to:"/papers",children:"Browse papers"})]}):((Re=b.data)==null?void 0:Re.native_pdf_reader_enabled)===!1?r.jsxs("div",{className:"reader-status",role:"alert",children:[r.jsx("p",{children:"The native reader is currently unavailable."}),r.jsx(G,{to:`/paper/${l}`,children:"Back to paper"})]}):!v&&!o?r.jsxs("div",{className:"reader-status",role:"alert",children:[r.jsx("p",{children:"Native reading is unavailable for this resource."}),r.jsx(G,{to:`/paper/${l}`,children:"Back to paper"})]}):r.jsxs("div",{className:"paper-reader-shell",children:[!f&&r.jsxs("div",{className:"reader-tabs",role:"tablist","aria-label":"Reader panels",children:[r.jsx("button",{type:"button",role:"tab","aria-selected":p==="paper",onClick:()=>m("paper"),children:"Paper"}),r.jsxs("button",{type:"button",role:"tab","aria-selected":p==="assistant","aria-label":y&&p!=="assistant"?"Chat, selection attached":"Chat",onClick:()=>m("assistant"),children:["Chat",y&&p!=="assistant"&&r.jsx("span",{className:"reader-tab-pending","aria-hidden":"true"})]})]}),r.jsx(Xe,{variant:"reader",children:r.jsxs("div",{ref:I,className:`reader-workspace${f?" is-desktop":" is-tabs"}${u?" is-assistant-collapsed":""}${se?" is-resizing":""}`,"data-testid":"paper-chat-workspace",children:[r.jsx("section",{ref:O,className:`reader-paper-pane${!f&&p!=="paper"?" is-hidden":""}`,style:f?{width:u?"100%":`${w}%`}:void 0,role:"tabpanel","aria-label":"Paper","aria-hidden":!f&&p!=="paper",children:o?r.jsx(dt,{paperId:t.id,paperKey:l,paperTitle:t.title,paperHref:`/paper/${l}`,sourceUrl:o,resources:P,paperVersion:t.version,selectionEnabled:ge,onReady:ke,onPaperSelection:be,onPaperSelectionError:_}):v&&r.jsx(Ze,{url:v,downloadUrl:g??v,paperKey:l,paperTitle:t.title,paperHref:`/paper/${l}`,onClose:A,resources:P,initialPage:re,resizeActive:se||Te,selectionEnabled:ge,paperVersion:t.version,authors:q,loadErrorMessage:t.source==="external"?"Paper content is still being prepared. Please try again later.":void 0,onPaperSelection:be,onPaperSelectionError:_,highlight:H,onPageChange:e=>{le.current=e,sessionStorage.setItem(_e(a),String(e))}})}),f&&!u&&r.jsx("div",{ref:oe,className:"reader-resize-handle",role:"separator","aria-label":"Resize paper and Chat panels","aria-orientation":"vertical","aria-valuemin":45,"aria-valuemax":75,"aria-valuenow":Math.round(w),tabIndex:0,onPointerDown:Ee,onPointerMove:e=>{M.current&&fe(e.clientX)},onPointerUp:X,onPointerCancel:X,onLostPointerCapture:X,onDoubleClick:()=>L(Ce),onKeyDown:e=>{(e.key==="ArrowLeft"||e.key==="ArrowRight")&&(e.preventDefault(),L(w+(e.key==="ArrowRight"?2:-2))),e.key==="Home"&&L(45),e.key==="End"&&L(75)}}),r.jsx("aside",{ref:W,id:"reader-chat-panel",className:`reader-assistant-pane${!f&&p!=="assistant"?" is-hidden":""}${f&&u?" is-collapsed":""}`,style:f?{width:u?0:`${100-w}%`}:void 0,role:"tabpanel","aria-label":"Chat","aria-hidden":!f&&p!=="assistant"||u,tabIndex:-1,children:r.jsx(Ye.Provider,{value:Me,children:ze})}),r.jsx("div",{className:"sr-only","aria-live":"polite",children:Ne}),f&&(u||!Y)&&r.jsx("button",{ref:ce,type:"button",className:"reader-collapse-assistant","aria-controls":"reader-chat-panel","aria-expanded":!u,onClick:()=>he(!u),children:u?"Open chat":"Hide chat"})]})})]})}function ia(){const{paperId:a=""}=Fe(),i=qe(a).replace(/v\d+$/i,"");return r.jsx(Ue,{workspaceKey:`reader:${a}`,children:r.jsx(xt,{routeId:i},i)})}export{ia as default,vt as readerToolbarResources}; diff --git a/assets/PapersListView-tKeAfHNj.js b/assets/PapersListView-CBCcd07A.js similarity index 88% rename from assets/PapersListView-tKeAfHNj.js rename to assets/PapersListView-CBCcd07A.js index 215c5b54ac01065cbaaa3c679f70f1347434837d..3a58a5e63690215b4fcc488ff9fceddf5cb795d3 100644 --- a/assets/PapersListView-tKeAfHNj.js +++ b/assets/PapersListView-CBCcd07A.js @@ -1 +1 @@ -import{e as K,f as u,p as M,b as V,j as e,L as f,m as X,q as J,T as W}from"./index-D2fBL-s6.js";import{T as Y}from"./SotaBadges-r6iGzLRW.js";import{I as H}from"./Icon-Uhh78KjL.js";import{u as Z,a as ee,b as se,c as re,P as ae}from"./PaperFeed-BERxHjrg.js";import{c as te}from"./catalog-5AxvKr4D.js";import{p as O}from"./papers-khuZaSFb.js";import{t as ne,d as ie}from"./transform-B_GaHMvk.js";import{u as Q}from"./usePapers-CAjdcUuj.js";import{u as oe}from"./useDebounce-BLmmIPYP.js";import{S as le}from"./skeleton-BDwfco0_.js";import{A as de,a as ce}from"./alert-PnePcfgX.js";import{i as me}from"./apiErrors-DV2aaDjL.js";import{f as pe}from"./frameworks-DDA0P4Tf.js";import"./colors-BkWRhvFI.js";import"./PaperCard-DhorusY5.js";import"./AuthorAvatar-C8tz_syh.js";import"./LatexTitle-WIQJ1ke0.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-DS5Jzsg5.js";import"./useIntersectionObserver-C0Rq0EXm.js";import"./curation-BtfabyzA.js";import"./useInfiniteQuery-CjJA-90e.js";const x=360;function he(a,o){const d=a.toLocaleLowerCase();return o.trim().split(/\s+/).filter(Boolean).reduce((n,i)=>{const t=d.indexOf(i.toLocaleLowerCase());return t>=0&&(n<0||t=0?i+1:o}function ue(a,o){if(a.length<=x)return a;const d=he(a,o);if(d<0||d0?"…":""}${a.slice(n,i).trim()}${i{var L,T,C,D,$,A,I,q,B;const[a]=K(),o=a.get("framework")||void 0,d=a.get("repository")||void 0,n=!!(o||d),i=a.get("search")||"",t=!n&&i.trim().length>0,l=Z({defaultToLastMonth:!t}),{setSearchParams:g}=l,[b,F]=u.useState(i),p=oe(b,300);u.useEffect(()=>F(i),[i]),u.useEffect(()=>{if(p===i)return;const r=new URLSearchParams(a);p?r.set("search",p):r.delete("search"),g(r,{replace:!0})},[p]),u.useEffect(()=>{const r=a.get("order_by"),c=new URLSearchParams(a);t&&!["relevance","date_published","citation_count"].includes(r||"")?(c.set("order_by","relevance"),g(c,{replace:!0})):!t&&r==="relevance"&&(c.delete("order_by"),g(c,{replace:!0}))},[t,a,g]);const j=t&&l.orderBy==="trending"?"relevance":l.orderBy,S=!n&&l.hasCode,P={...l.filters,has_code:S,search:n&&p||void 0,conference:a.get("conference")||void 0,latest_only:a.get("latest_only")!=="false",framework:o,repository:d},k=Q([...M.feeds.infinite,P],r=>O.list({...P,page:r,page_size:20}),{enabled:!t}),_={q:p.trim(),order_by:j==="trending"?"relevance":j,start_date:l.dateRange.startDate,end_date:l.dateRange.endDate,has_code:S,has_hf_artifacts:l.hasHfArtifacts},E=Q([...M.feeds.search,_],r=>O.searchFeed({..._,page:r,page_size:20,mode:"hybrid"}),{enabled:t&&_.q.length>0}),m=t?E:k,R=V({queryKey:J.topTasksSidebar,queryFn:()=>te.topTasks(8),enabled:!n&&!t,staleTime:W}),v=u.useMemo(()=>{var c;return(((c=m.data)==null?void 0:c.pages.flatMap(N=>N.results))||[]).map(N=>{const w=ne(N);return t?{...w,abstract:ue(w.abstract,i)}:w})},[m.data,t,i]),h=((C=(T=(L=k.data)==null?void 0:L.pages)==null?void 0:T[0])==null?void 0:C.count)??0,s=(A=($=(D=k.data)==null?void 0:D.pages)==null?void 0:$[0])==null?void 0:A.scope,y=(q=(I=E.data)==null?void 0:I.pages)==null?void 0:q.at(-1),G=o&&me(m.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(f,{to:"/",children:"Papers"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx(f,{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:n?e.jsxs(e.Fragment,{children:["Papers implemented by ",e.jsx("em",{children:U||o||d})]}):t?e.jsxs(e.Fragment,{children:["Search results for ",e.jsxs("em",{children:["“",i,"”"]})]}):e.jsxs(e.Fragment,{children:["All ",e.jsx("em",{children:"Papers"})]})}),e.jsx("div",{className:"feed-subtitle",children:n?(s==null?void 0:s.kind)==="framework"?h>0&&`${h.toLocaleString()} papers.`:s!=null&&s.repository?e.jsxs(e.Fragment,{children:["GitHub repository ",e.jsx("strong",{children:s.repository}),". ",h>0&&`${h.toLocaleString()} papers.`]}):"Repository-scoped paper feed.":t?`${v.length} loaded from the most relevant results.`:e.jsxs(e.Fragment,{children:["Search the full corpus. ",h>0&&`${h.toLocaleString()} ${l.dateRange.startDate||l.dateRange.endDate?"papers in this date range":"papers indexed"}.`]})}),n&&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:["★ ",pe(s.num_stars)]})]}):"GitHub"]}),s.kind==="framework"&&s.introducing_paper_arxiv_id&&e.jsx(f,{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(r=>r.slug?e.jsx(Y,{slug:r.slug,label:r.name},r.id):null)})]})]}),e.jsx(ee,{startDate:l.dateRange.startDate,endDate:l.dateRange.endDate,onChange:l.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:r=>F(r.target.value)})]})}),e.jsxs("div",{className:n||t?"papers-feed-layout-scoped":"layout-with-sidebar",children:[!n&&!t&&e.jsx("aside",{className:"sidebar",children:e.jsxs("div",{className:"sidebar-section",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),R.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((r,c)=>e.jsx(le,{className:"h-5 w-full"},c))}),e.jsx("div",{className:"sidebar-links",children:(B=R.data)==null?void 0:B.map(r=>e.jsxs(f,{to:`/tasks/${r.slug}`,className:"sidebar-link",children:[ie(r.name,r.slug),r.paper_count!=null&&e.jsx("span",{className:"count",children:r.paper_count})]},r.id))})]})}),e.jsxs("div",{children:[e.jsx(se,{feed:l,sorts:t?fe:re,activeSort:j,showDateFilter:!1,showHasCode:!n,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:[m.error&&e.jsx(de,{variant:"destructive",className:"mb-4",children:e.jsx(ce,{children:"Failed to load papers. Please try again."})}),e.jsx(ae,{query:m,cards:v,skeleton:"card",highlightQuery:t?i:void 0,empty:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:"No matching papers."}),t&&X()&&e.jsx(f,{to:`/chat?q=${encodeURIComponent(i.trim())}`,children:"Ask the assistant instead"})]}),children:!m.hasNextPage&&!m.isFetchingNextPage&&t&&e.jsx("div",{className:"search-results-end",children:y!=null&&y.cap_reached?"End of the top 100 results":"End of results"})})]})]})]})]})};export{qe as default}; +import{e as K,f as u,p as M,b as V,j as e,L as f,m as X,q as J,T as W}from"./index-BeSw2DVP.js";import{T as Y}from"./SotaBadges-FMpqi2HS.js";import{I as H}from"./Icon-BWcOShxk.js";import{u as Z,a as ee,b as se,c as re,P as ae}from"./PaperFeed-Cge1MWHJ.js";import{c as te}from"./catalog-D3XT9SmX.js";import{p as O}from"./papers-B58HJw9r.js";import{t as ne,d as ie}from"./transform-BadO0Aba.js";import{u as Q}from"./usePapers-Cj1tt_u6.js";import{u as oe}from"./useDebounce-B-RrGVzu.js";import{S as le}from"./skeleton-BBv4iC5Z.js";import{A as de,a as ce}from"./alert-uwP129N7.js";import{i as me}from"./apiErrors-CXiv7lxc.js";import{f as pe}from"./frameworks-DDA0P4Tf.js";import"./colors-BkWRhvFI.js";import"./PaperCard-Dx07g-aj.js";import"./AuthorAvatar-Dpan5W1F.js";import"./LatexTitle-C5yrYbA-.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-CYoFzAud.js";import"./useIntersectionObserver-BBx3EHQ9.js";import"./curation-CCIsdsjV.js";import"./useInfiniteQuery-C8JHYWz5.js";const x=360;function he(a,o){const d=a.toLocaleLowerCase();return o.trim().split(/\s+/).filter(Boolean).reduce((n,i)=>{const t=d.indexOf(i.toLocaleLowerCase());return t>=0&&(n<0||t=0?i+1:o}function ue(a,o){if(a.length<=x)return a;const d=he(a,o);if(d<0||d0?"…":""}${a.slice(n,i).trim()}${i{var L,T,C,D,$,A,I,q,B;const[a]=K(),o=a.get("framework")||void 0,d=a.get("repository")||void 0,n=!!(o||d),i=a.get("search")||"",t=!n&&i.trim().length>0,l=Z({defaultToLastMonth:!t}),{setSearchParams:g}=l,[b,F]=u.useState(i),p=oe(b,300);u.useEffect(()=>F(i),[i]),u.useEffect(()=>{if(p===i)return;const r=new URLSearchParams(a);p?r.set("search",p):r.delete("search"),g(r,{replace:!0})},[p]),u.useEffect(()=>{const r=a.get("order_by"),c=new URLSearchParams(a);t&&!["relevance","date_published","citation_count"].includes(r||"")?(c.set("order_by","relevance"),g(c,{replace:!0})):!t&&r==="relevance"&&(c.delete("order_by"),g(c,{replace:!0}))},[t,a,g]);const j=t&&l.orderBy==="trending"?"relevance":l.orderBy,S=!n&&l.hasCode,P={...l.filters,has_code:S,search:n&&p||void 0,conference:a.get("conference")||void 0,latest_only:a.get("latest_only")!=="false",framework:o,repository:d},k=Q([...M.feeds.infinite,P],r=>O.list({...P,page:r,page_size:20}),{enabled:!t}),_={q:p.trim(),order_by:j==="trending"?"relevance":j,start_date:l.dateRange.startDate,end_date:l.dateRange.endDate,has_code:S,has_hf_artifacts:l.hasHfArtifacts},E=Q([...M.feeds.search,_],r=>O.searchFeed({..._,page:r,page_size:20,mode:"hybrid"}),{enabled:t&&_.q.length>0}),m=t?E:k,R=V({queryKey:J.topTasksSidebar,queryFn:()=>te.topTasks(8),enabled:!n&&!t,staleTime:W}),v=u.useMemo(()=>{var c;return(((c=m.data)==null?void 0:c.pages.flatMap(N=>N.results))||[]).map(N=>{const w=ne(N);return t?{...w,abstract:ue(w.abstract,i)}:w})},[m.data,t,i]),h=((C=(T=(L=k.data)==null?void 0:L.pages)==null?void 0:T[0])==null?void 0:C.count)??0,s=(A=($=(D=k.data)==null?void 0:D.pages)==null?void 0:$[0])==null?void 0:A.scope,y=(q=(I=E.data)==null?void 0:I.pages)==null?void 0:q.at(-1),G=o&&me(m.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(f,{to:"/",children:"Papers"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx(f,{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:n?e.jsxs(e.Fragment,{children:["Papers implemented by ",e.jsx("em",{children:U||o||d})]}):t?e.jsxs(e.Fragment,{children:["Search results for ",e.jsxs("em",{children:["“",i,"”"]})]}):e.jsxs(e.Fragment,{children:["All ",e.jsx("em",{children:"Papers"})]})}),e.jsx("div",{className:"feed-subtitle",children:n?(s==null?void 0:s.kind)==="framework"?h>0&&`${h.toLocaleString()} papers.`:s!=null&&s.repository?e.jsxs(e.Fragment,{children:["GitHub repository ",e.jsx("strong",{children:s.repository}),". ",h>0&&`${h.toLocaleString()} papers.`]}):"Repository-scoped paper feed.":t?`${v.length} loaded from the most relevant results.`:e.jsxs(e.Fragment,{children:["Search the full corpus. ",h>0&&`${h.toLocaleString()} ${l.dateRange.startDate||l.dateRange.endDate?"papers in this date range":"papers indexed"}.`]})}),n&&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:["★ ",pe(s.num_stars)]})]}):"GitHub"]}),s.kind==="framework"&&s.introducing_paper_arxiv_id&&e.jsx(f,{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(r=>r.slug?e.jsx(Y,{slug:r.slug,label:r.name},r.id):null)})]})]}),e.jsx(ee,{startDate:l.dateRange.startDate,endDate:l.dateRange.endDate,onChange:l.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:r=>F(r.target.value)})]})}),e.jsxs("div",{className:n||t?"papers-feed-layout-scoped":"layout-with-sidebar",children:[!n&&!t&&e.jsx("aside",{className:"sidebar",children:e.jsxs("div",{className:"sidebar-section",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),R.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((r,c)=>e.jsx(le,{className:"h-5 w-full"},c))}),e.jsx("div",{className:"sidebar-links",children:(B=R.data)==null?void 0:B.map(r=>e.jsxs(f,{to:`/tasks/${r.slug}`,className:"sidebar-link",children:[ie(r.name,r.slug),r.paper_count!=null&&e.jsx("span",{className:"count",children:r.paper_count})]},r.id))})]})}),e.jsxs("div",{children:[e.jsx(se,{feed:l,sorts:t?fe:re,activeSort:j,showDateFilter:!1,showHasCode:!n,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:[m.error&&e.jsx(de,{variant:"destructive",className:"mb-4",children:e.jsx(ce,{children:"Failed to load papers. Please try again."})}),e.jsx(ae,{query:m,cards:v,skeleton:"card",highlightQuery:t?i:void 0,empty:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:"No matching papers."}),t&&X()&&e.jsx(f,{to:`/chat?q=${encodeURIComponent(i.trim())}`,children:"Ask the assistant instead"})]}),children:!m.hasNextPage&&!m.isFetchingNextPage&&t&&e.jsx("div",{className:"search-results-end",children:y!=null&&y.cap_reached?"End of the top 100 results":"End of results"})})]})]})]})]})};export{qe as default}; diff --git a/assets/PrivacyView-D9qn84RB.js b/assets/PrivacyView-DpQagkBi.js similarity index 98% rename from assets/PrivacyView-D9qn84RB.js rename to assets/PrivacyView-DpQagkBi.js index 71b7dcff868c4efdf7b9daaff98c093dd69607aa..8f92e892e513fbf0c10adaead80584478b450778 100644 --- a/assets/PrivacyView-D9qn84RB.js +++ b/assets/PrivacyView-DpQagkBi.js @@ -1 +1 @@ -import{j as e}from"./index-D2fBL-s6.js";import{u as s,f as i}from"./useDocumentTitle-ibepJVy2.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}; +import{j as e}from"./index-BeSw2DVP.js";import{u as s,f as i}from"./useDocumentTitle-BD_JtGPy.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}; diff --git a/assets/RateLimitsView-BdVhhRn6.js b/assets/RateLimitsView-BaJDbrzN.js similarity index 87% rename from assets/RateLimitsView-BdVhhRn6.js rename to assets/RateLimitsView-BaJDbrzN.js index a0d2c49a0f62f5588ff2bca02f52d4a5ecc96e86..6bf308ea961568c92ab10f3e07f0e88ca45a8a79 100644 --- a/assets/RateLimitsView-BdVhhRn6.js +++ b/assets/RateLimitsView-BaJDbrzN.js @@ -1 +1 @@ -import{b as t,j as e}from"./index-D2fBL-s6.js";import{a as s}from"./account-BHlQBDNT.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}; +import{b as t,j as e}from"./index-BeSw2DVP.js";import{a as s}from"./account-B-4MwKsq.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}; diff --git a/assets/ResearchFollowButton-Bwb5EiPm.js b/assets/ResearchFollowButton-lzWAD6Jv.js similarity index 93% rename from assets/ResearchFollowButton-Bwb5EiPm.js rename to assets/ResearchFollowButton-lzWAD6Jv.js index 7d11f81411d2f5a2aa58860772f0328a3487ded0..ce6c7dca7638891e6172541fdf02d110b652c074 100644 --- a/assets/ResearchFollowButton-Bwb5EiPm.js +++ b/assets/ResearchFollowButton-lzWAD6Jv.js @@ -1 +1 @@ -import{d as x,g as j,f as b,i as F,j as e,h as N,C as S,L as i}from"./index-D2fBL-s6.js";import{e as y,q as C}from"./researchTopic-jOpECA0z.js";import{P as w}from"./plus-BI8-JXK0.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 k({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{k as R}; +import{d as x,g as j,f as b,i as F,j as e,h as N,C as S,L as i}from"./index-BeSw2DVP.js";import{e as y,q as C}from"./researchTopic-Cb4NrTKj.js";import{P as w}from"./plus-imZJbVTM.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 k({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{k as R}; diff --git a/assets/SavedPapersView-CWCS7z3x.js b/assets/SavedPapersView-fg5rGNas.js similarity index 89% rename from assets/SavedPapersView-CWCS7z3x.js rename to assets/SavedPapersView-fg5rGNas.js index dbec809e17ca7eb3f485cbea55d6ba008d600b7a..18424f71049856e3d23429f184ae1292ab76ef23 100644 --- a/assets/SavedPapersView-CWCS7z3x.js +++ b/assets/SavedPapersView-fg5rGNas.js @@ -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-D2fBL-s6.js";import{P as f}from"./PaperCard-DhorusY5.js";import{T as k}from"./SotaBadges-r6iGzLRW.js";import{S as r}from"./skeleton-BDwfco0_.js";import{A as y,a as w}from"./alert-PnePcfgX.js";import{a as A}from"./account-BHlQBDNT.js";import{t as B}from"./transform-B_GaHMvk.js";import{s as F}from"./savedPapersAuth-0s9GFyfF.js";import"./AuthorAvatar-C8tz_syh.js";import"./Icon-Uhh78KjL.js";import"./LatexTitle-WIQJ1ke0.js";import"./papers-khuZaSFb.js";import"./curation-BtfabyzA.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}; +import{a as g,b as v,A as x,j as e,H as j,L as b,p as N}from"./index-BeSw2DVP.js";import{P as f}from"./PaperCard-Dx07g-aj.js";import{T as k}from"./SotaBadges-FMpqi2HS.js";import{S as r}from"./skeleton-BBv4iC5Z.js";import{A as y,a as w}from"./alert-uwP129N7.js";import{a as A}from"./account-B-4MwKsq.js";import{t as B}from"./transform-BadO0Aba.js";import{s as F}from"./savedPapersAuth-CcDg6HlA.js";import"./AuthorAvatar-Dpan5W1F.js";import"./Icon-BWcOShxk.js";import"./LatexTitle-C5yrYbA-.js";import"./papers-B58HJw9r.js";import"./curation-CCIsdsjV.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}; diff --git a/assets/SearchOverlay-BWsLpwx1.js b/assets/SearchOverlay-Dj2wmUrg.js similarity index 95% rename from assets/SearchOverlay-BWsLpwx1.js rename to assets/SearchOverlay-Dj2wmUrg.js index bfaaa9cca3caf7ecab89ac4015836ee4f4d7f56b..8c21f1416b9850319a341712eb67082b95274501 100644 --- a/assets/SearchOverlay-BWsLpwx1.js +++ b/assets/SearchOverlay-Dj2wmUrg.js @@ -1 +1 @@ -import{f as K,k as O,V as M,m as B,b as i,j as e,p as H}from"./index-D2fBL-s6.js";import{L as U}from"./LatexTitle-WIQJ1ke0.js";import{c as x}from"./catalog-5AxvKr4D.js";import{p as R}from"./papers-khuZaSFb.js";import{u as Y}from"./useDebounce-BLmmIPYP.js";import{c as G,h as V}from"./colors-BkWRhvFI.js";import{d as X}from"./transform-B_GaHMvk.js";import"./curation-BtfabyzA.js";const Z=10,S=6,W=350,f=3,ls=({open:t,onClose:h})=>{var A,C,w,P,Q,z;const v=K.useRef(null),$=O(),[c,D]=M.useState(""),a=Y(c,W),j=c.trim(),r=a.trim().length>=f,y=B();K.useEffect(()=>{var l;if(!t)return;(l=v.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)||[],m=((w=E.data)==null?void 0:w.results)||[],u=((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||m.length||u.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:v,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 ",f," 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))]}),m.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Benchmarks · ",m.length]}),m.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))]}),u.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Authors · ",u.length]}),u.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>=f&&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}; +import{f as K,k as O,V as M,m as B,b as i,j as e,p as H}from"./index-BeSw2DVP.js";import{L as U}from"./LatexTitle-C5yrYbA-.js";import{c as x}from"./catalog-D3XT9SmX.js";import{p as R}from"./papers-B58HJw9r.js";import{u as Y}from"./useDebounce-B-RrGVzu.js";import{c as G,h as V}from"./colors-BkWRhvFI.js";import{d as X}from"./transform-BadO0Aba.js";import"./curation-CCIsdsjV.js";const Z=10,S=6,W=350,f=3,ls=({open:t,onClose:h})=>{var A,C,w,P,Q,z;const v=K.useRef(null),$=O(),[c,D]=M.useState(""),a=Y(c,W),j=c.trim(),r=a.trim().length>=f,y=B();K.useEffect(()=>{var l;if(!t)return;(l=v.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)||[],m=((w=E.data)==null?void 0:w.results)||[],u=((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||m.length||u.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:v,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 ",f," 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))]}),m.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Benchmarks · ",m.length]}),m.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))]}),u.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Authors · ",u.length]}),u.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>=f&&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}; diff --git a/assets/SettingsView-BrTjKeDA.js b/assets/SettingsView-CqvK81AI.js similarity index 97% rename from assets/SettingsView-BrTjKeDA.js rename to assets/SettingsView-CqvK81AI.js index 3391d7e5e11c366cf7202e0d8e1c8b047cd1105a..1bfd201ec0bea036b5acb952958b1bd41ba4a945 100644 --- a/assets/SettingsView-BrTjKeDA.js +++ b/assets/SettingsView-CqvK81AI.js @@ -1,4 +1,4 @@ -import{c as v,a as T,g as he,f as O,j as e,L as F,l as z,r as te,b as B,H as k,h as ue,aw as ge,m as me,V as L,A as ie}from"./index-D2fBL-s6.js";import{u as N}from"./useMutation-9dlTbuQj.js";import{d as pe,l as xe,h as ee,t as ye,f as fe,b as je,i as se,v as be,w as ve,a as we,e as ke,r as U,q as Ne}from"./researchTopic-jOpECA0z.js";import{S as C}from"./switch-B4eVY4fu.js";import{S as Ce}from"./SortableList-BzRDhhmi.js";import{S as Fe}from"./sparkles-4rJdywIs.js";import{A as Re}from"./arrow-right-COzkrAUH.js";import{T as Se}from"./trophy-DbAb1jY1.js";import{c as w}from"./chat-BOZIonsX.js";import{u as _e,f as Ee}from"./useDocumentTitle-ibepJVy2.js";import{a as Pe,u as Me,r as Le,O as Y}from"./openrouter-BRMbmxz_.js";import{u as Oe}from"./preferences-BHmRHfHN.js";import{E as ae}from"./external-link-Ddavpnin.js";import{M as Te}from"./moon-vNTgqlOp.js";import"./index-C_9KPu-E.js";import"./account-BHlQBDNT.js";/** +import{c as v,a as T,g as he,f as O,j as e,L as F,l as z,r as te,b as B,H as k,h as ue,aw as ge,m as me,V as L,A as ie}from"./index-BeSw2DVP.js";import{u as N}from"./useMutation-CsS-RfeE.js";import{d as pe,l as xe,h as ee,t as ye,f as fe,b as je,i as se,v as be,w as ve,a as we,e as ke,r as U,q as Ne}from"./researchTopic-Cb4NrTKj.js";import{S as C}from"./switch-4sA3DCrD.js";import{S as Ce}from"./SortableList-B8qe5lIn.js";import{S as Fe}from"./sparkles-BjZnVOru.js";import{A as Re}from"./arrow-right-3wBGidD3.js";import{T as Se}from"./trophy-D44BVGMf.js";import{c as w}from"./chat-Bvpu56kX.js";import{u as _e,f as Ee}from"./useDocumentTitle-BD_JtGPy.js";import{a as Pe,u as Me,r as Le,O as Y}from"./openrouter-C8otLyGB.js";import{u as Oe}from"./preferences-BcztmdfT.js";import{E as ae}from"./external-link-BAPjX9Up.js";import{M as Te}from"./moon-DNdxOMOb.js";import"./index-b5_7myf0.js";import"./account-B-4MwKsq.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/SharedChatView-4eHoic3i.js b/assets/SharedChatView-C7yziquD.js similarity index 78% rename from assets/SharedChatView-4eHoic3i.js rename to assets/SharedChatView-C7yziquD.js index 2079851c20a001eee77493589256d93a456ad80d..eb5535b30c1d36204e36925b30fadad87615cdb0 100644 --- a/assets/SharedChatView-4eHoic3i.js +++ b/assets/SharedChatView-C7yziquD.js @@ -1 +1 @@ -import{u as x,k as g,f as o,b as v,j as e,A as f,s as j}from"./index-D2fBL-s6.js";import{A as b,a as y,C as S,U as w,b as N,t as k}from"./chatLifecycle-nMvmiYGF.js";import{e as C,p as q,f as A,q as P}from"./chatSessions-CoHSP58H.js";import{c as _}from"./chat-BOZIonsX.js";/* empty css */import"./hover-card-DWpZK4fW.js";import"./CatalogEntityPreviewLink-xL6TDpUk.js";import"./catalog-5AxvKr4D.js";import"./github-DcIeypA5.js";import"./file-text-CikzkPqz.js";import"./PaperPreviewLink-BZuRBR1p.js";import"./index-BPshewTi.js";import"./index-BtZPsygG.js";import"./katex-DkKDou_j.js";import"./papers-khuZaSFb.js";import"./curation-BtfabyzA.js";import"./useMutation-9dlTbuQj.js";import"./thumbs-up-BnMguJ3s.js";import"./copy-CcyqVsMW.js";import"./queryOptions-C9woPjwX.js";import"./arrow-left-CzTG6LBL.js";import"./external-link-Ddavpnin.js";import"./plus-BI8-JXK0.js";import"./search-0R_Hc3S2.js";import"./chevron-up-B9KJ5aUJ.js";import"./AuthorAvatar-C8tz_syh.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}; +import{u as x,k as g,f as o,b as v,j as e,A as f,s as j}from"./index-BeSw2DVP.js";import{A as b,a as y,C as S,U as w,b as N,t as k}from"./chatLifecycle-ByiWkgE5.js";import{e as C,p as q,f as A,q as P}from"./chatSessions-v3d2DQH8.js";import{c as _}from"./chat-Bvpu56kX.js";/* empty css */import"./hover-card-BbFULETs.js";import"./CatalogEntityPreviewLink-BPnp82vP.js";import"./catalog-D3XT9SmX.js";import"./github-CTNIgqBO.js";import"./file-text-BHvaEohD.js";import"./PaperPreviewLink-BughwfUv.js";import"./index-CbsMwfXw.js";import"./index-XKdmo9ij.js";import"./katex-DkKDou_j.js";import"./papers-B58HJw9r.js";import"./curation-CCIsdsjV.js";import"./useMutation-CsS-RfeE.js";import"./thumbs-up-DGIteJ7Z.js";import"./copy-3DjQpd64.js";import"./queryOptions-C9woPjwX.js";import"./arrow-left-C-qXYpsS.js";import"./external-link-BAPjX9Up.js";import"./plus-imZJbVTM.js";import"./search-B4RgSU4h.js";import"./chevron-up-CSi6wXAh.js";import"./AuthorAvatar-Dpan5W1F.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}; diff --git a/assets/SignInToEditDialog-BBAwjxYj.js b/assets/SignInToEditDialog-DDBzf9N6.js similarity index 95% rename from assets/SignInToEditDialog-BBAwjxYj.js rename to assets/SignInToEditDialog-DDBzf9N6.js index 7917b4061e07dc21ad6a834eb7b01c0ba0bca1c0..60f770d856d1ce75d76881bca3b0ea383f778425 100644 --- a/assets/SignInToEditDialog-BBAwjxYj.js +++ b/assets/SignInToEditDialog-DDBzf9N6.js @@ -1,4 +1,4 @@ -import{c as be,f 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-D2fBL-s6.js";import{B as P}from"./button-D0XfbdrX.js";import{I as u}from"./input-DdobyT4w.js";import{T as Ce}from"./textarea-B8b7WxcV.js";import{S as se}from"./searchable-select-CsXzzP_V.js";import{D as ie,a as oe,c as le,b as ce,d as de,e as De}from"./dialog-DgUROq2j.js";import{u as Ie}from"./useMutation-9dlTbuQj.js";import{s as b,p as j}from"./submissions-LRopJJKL.js";import{c as te}from"./catalog-5AxvKr4D.js";import{L as Ee}from"./loader-circle-CoLo2trx.js";/** +import{c as be,f 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-BeSw2DVP.js";import{B as P}from"./button-CO2XYoBd.js";import{I as u}from"./input-B5SDgz8U.js";import{T as Ce}from"./textarea-VtGLPxu8.js";import{S as se}from"./searchable-select-C_dIHH-q.js";import{D as ie,a as oe,c as le,b as ce,d as de,e as De}from"./dialog-EpDnY6a5.js";import{u as Ie}from"./useMutation-CsS-RfeE.js";import{s as b,p as j}from"./submissions-D_EEKc6c.js";import{c as te}from"./catalog-D3XT9SmX.js";import{L as Ee}from"./loader-circle-C4luyo5I.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/SortableList-BzRDhhmi.js b/assets/SortableList-B8qe5lIn.js similarity index 98% rename from assets/SortableList-BzRDhhmi.js rename to assets/SortableList-B8qe5lIn.js index 3f4a007c2edd9a36856fe08dfbd54b493f51d670..e29499ec4a48b27c248894b65489ae3ea313a59e 100644 --- a/assets/SortableList-BzRDhhmi.js +++ b/assets/SortableList-B8qe5lIn.js @@ -1,4 +1,4 @@ -import{c as P,f as d,j as w}from"./index-D2fBL-s6.js";/** +import{c as P,f as d,j as w}from"./index-BeSw2DVP.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/SotaBadges-r6iGzLRW.js b/assets/SotaBadges-FMpqi2HS.js similarity index 97% rename from assets/SotaBadges-r6iGzLRW.js rename to assets/SotaBadges-FMpqi2HS.js index c885323d77aaf451760a2626b263b71e7c55432d..c6428e8b5fe17ce674d76051f72493e819a7d951 100644 --- a/assets/SotaBadges-r6iGzLRW.js +++ b/assets/SotaBadges-FMpqi2HS.js @@ -1 +1 @@ -import{k as M,j as e,V as x,L as C}from"./index-D2fBL-s6.js";import{h as F,c as E}from"./colors-BkWRhvFI.js";import{d as A,h as P}from"./transform-B_GaHMvk.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(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.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,b=i,f=i+h+2;let v=i+2;const R=v;v+=6;const T=v+1;v+=5;const L=v;v+=3;const g=v+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,k)=>e.jsx("rect",{x:i+(r-i*2)*(1-y)/2,y:R+k*2.4,width:(r-i*2)*y,height:1.4,fill:u,rx:.3},`t${k}`)),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,k)=>{const w=g+k*2.1;return w>a-i-1?null:e.jsx("rect",{x:b,y:w,width:h*y,height:.8,fill:d,opacity:.55,rx:.2},`l${k}`)}),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,k)=>{const w=g+(n?16:0)+k*2.1;return w>a-i-1?null:e.jsx("rect",{x:f,y:w,width:h*y,height:.8,fill:d,opacity:.55,rx:.2},`r${k}`)})]})})},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 b of t){const f=m(b.measureText);if(i+f<=u)i+=f,h+=1;else break}if(h0&&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}; +import{k as M,j as e,V as x,L as C}from"./index-BeSw2DVP.js";import{h as F,c as E}from"./colors-BkWRhvFI.js";import{d as A,h as P}from"./transform-BadO0Aba.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(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.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,b=i,f=i+h+2;let v=i+2;const R=v;v+=6;const T=v+1;v+=5;const L=v;v+=3;const g=v+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,k)=>e.jsx("rect",{x:i+(r-i*2)*(1-y)/2,y:R+k*2.4,width:(r-i*2)*y,height:1.4,fill:u,rx:.3},`t${k}`)),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,k)=>{const w=g+k*2.1;return w>a-i-1?null:e.jsx("rect",{x:b,y:w,width:h*y,height:.8,fill:d,opacity:.55,rx:.2},`l${k}`)}),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,k)=>{const w=g+(n?16:0)+k*2.1;return w>a-i-1?null:e.jsx("rect",{x:f,y:w,width:h*y,height:.8,fill:d,opacity:.55,rx:.2},`r${k}`)})]})})},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 b of t){const f=m(b.measureText);if(i+f<=u)i+=f,h+=1;else break}if(h0&&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}; diff --git a/assets/StagingAccessRequestView-KKG5yc76.js b/assets/StagingAccessRequestView-CeS3fa4F.js similarity index 95% rename from assets/StagingAccessRequestView-KKG5yc76.js rename to assets/StagingAccessRequestView-CeS3fa4F.js index a1a60a69c8f0f0655634b5e97624ba7be365a172..4d8eea749c1689e141d8ef1df186d4b70517546b 100644 --- a/assets/StagingAccessRequestView-KKG5yc76.js +++ b/assets/StagingAccessRequestView-CeS3fa4F.js @@ -1 +1 @@ -import{a as m,V as a,j as e,H as g,b3 as p}from"./index-D2fBL-s6.js";import{C as j}from"./circle-check-1e3iPSaF.js";const f=()=>{const{user:s,isLoading:u}=m(),[l,d]=a.useState(!1),[r,t]=a.useState(!1),[c,i]=a.useState(null),o=async h=>{h.preventDefault(),t(!0),i(null);try{await p.requestStagingAccess(),d(!0)}catch(n){i(n instanceof Error?n.message:"Could not submit your request.")}finally{t(!1)}};return e.jsx("main",{className:"access-request-page",children:e.jsxs("section",{className:"access-request-card","aria-labelledby":"access-request-title",children:[e.jsxs("a",{className:"access-request-brand",href:"https://paperswithcode.co",children:[e.jsx("span",{className:"brand-mark","aria-hidden":"true"}),e.jsxs("span",{className:"brand-name",children:["Papers ",e.jsx("em",{children:"with"})," Code"]})]}),l?e.jsxs("div",{className:"access-request-success",role:"status",children:[e.jsx(j,{size:34,strokeWidth:1.6,"aria-hidden":"true"}),e.jsx("h1",{id:"access-request-title",children:"Request received"}),e.jsxs("p",{children:["Thanks, @",s==null?void 0:s.username,". We’ll review your contributor access request."]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"access-request-heading",children:[e.jsx("p",{className:"access-request-eyebrow",children:"Staging preview"}),e.jsx("h1",{id:"access-request-title",children:"Request access"}),e.jsx("p",{children:"This preview is limited to project contributors. Send us your verified Hugging Face username and email address to request access."})]}),u?e.jsx("p",{className:"access-request-status",role:"status",children:"Checking your Hugging Face account…"}):s?e.jsxs("form",{className:"access-request-form",onSubmit:o,children:[e.jsx("label",{htmlFor:"hf-username",children:"Hugging Face username"}),e.jsxs("div",{className:"access-request-input-wrap",children:[e.jsx("span",{"aria-hidden":"true",children:"@"}),e.jsx("input",{id:"hf-username",name:"hf_username",value:s.username,readOnly:!0,autoComplete:"username"})]}),e.jsxs("p",{className:"access-request-verified",children:["Username and email verified through Hugging Face sign-in. See our"," ",e.jsx("a",{href:"https://paperswithcode.co/privacy",children:"Privacy Policy"}),"."]}),c&&e.jsx("p",{className:"access-request-error",role:"alert",children:c}),e.jsx("button",{className:"access-request-submit",type:"submit",disabled:r,children:r?"Sending…":"Request access"})]}):e.jsxs("div",{className:"access-request-signin",children:[e.jsx("p",{children:"Sign in first so we can verify the account you’re requesting access for."}),e.jsx(g,{returnTo:"/request-access",label:"Sign in with Hugging Face",collectEmail:!0})]})]})]})})};export{f as default}; +import{a as m,V as a,j as e,H as g,b3 as p}from"./index-BeSw2DVP.js";import{C as j}from"./circle-check-fwAHrwbg.js";const f=()=>{const{user:s,isLoading:u}=m(),[l,d]=a.useState(!1),[r,t]=a.useState(!1),[c,i]=a.useState(null),o=async h=>{h.preventDefault(),t(!0),i(null);try{await p.requestStagingAccess(),d(!0)}catch(n){i(n instanceof Error?n.message:"Could not submit your request.")}finally{t(!1)}};return e.jsx("main",{className:"access-request-page",children:e.jsxs("section",{className:"access-request-card","aria-labelledby":"access-request-title",children:[e.jsxs("a",{className:"access-request-brand",href:"https://paperswithcode.co",children:[e.jsx("span",{className:"brand-mark","aria-hidden":"true"}),e.jsxs("span",{className:"brand-name",children:["Papers ",e.jsx("em",{children:"with"})," Code"]})]}),l?e.jsxs("div",{className:"access-request-success",role:"status",children:[e.jsx(j,{size:34,strokeWidth:1.6,"aria-hidden":"true"}),e.jsx("h1",{id:"access-request-title",children:"Request received"}),e.jsxs("p",{children:["Thanks, @",s==null?void 0:s.username,". We’ll review your contributor access request."]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"access-request-heading",children:[e.jsx("p",{className:"access-request-eyebrow",children:"Staging preview"}),e.jsx("h1",{id:"access-request-title",children:"Request access"}),e.jsx("p",{children:"This preview is limited to project contributors. Send us your verified Hugging Face username and email address to request access."})]}),u?e.jsx("p",{className:"access-request-status",role:"status",children:"Checking your Hugging Face account…"}):s?e.jsxs("form",{className:"access-request-form",onSubmit:o,children:[e.jsx("label",{htmlFor:"hf-username",children:"Hugging Face username"}),e.jsxs("div",{className:"access-request-input-wrap",children:[e.jsx("span",{"aria-hidden":"true",children:"@"}),e.jsx("input",{id:"hf-username",name:"hf_username",value:s.username,readOnly:!0,autoComplete:"username"})]}),e.jsxs("p",{className:"access-request-verified",children:["Username and email verified through Hugging Face sign-in. See our"," ",e.jsx("a",{href:"https://paperswithcode.co/privacy",children:"Privacy Policy"}),"."]}),c&&e.jsx("p",{className:"access-request-error",role:"alert",children:c}),e.jsx("button",{className:"access-request-submit",type:"submit",disabled:r,children:r?"Sending…":"Request access"})]}):e.jsxs("div",{className:"access-request-signin",children:[e.jsx("p",{children:"Sign in first so we can verify the account you’re requesting access for."}),e.jsx(g,{returnTo:"/request-access",label:"Sign in with Hugging Face",collectEmail:!0})]})]})]})})};export{f as default}; diff --git a/assets/SubmissionsDashboard-BlDtgY38.js b/assets/SubmissionsDashboard-C7elnzzl.js similarity index 97% rename from assets/SubmissionsDashboard-BlDtgY38.js rename to assets/SubmissionsDashboard-C7elnzzl.js index 27d44d2d24f974b7d4896cf5970e58b8b46b5c93..7f6fe7ee0f5b7cd22fdea9df676a8430c8609c0f 100644 --- a/assets/SubmissionsDashboard-BlDtgY38.js +++ b/assets/SubmissionsDashboard-C7elnzzl.js @@ -1,4 +1,4 @@ -import{c as ae,V as v,j as e,I as y,b as ne,q as H,a3 as re,x as oe,p as le,y as E,l as de,a$ as T,b0 as ce,b1 as ue,b2 as pe}from"./index-D2fBL-s6.js";import{u as W,r as me,e as he}from"./evaluationQueryInvalidation-Cs0hE-wT.js";import{i as X,a as K}from"./queryInvalidation-BVOtRFkG.js";import{u as D}from"./useMutation-9dlTbuQj.js";import{u as fe}from"./useInfiniteQuery-CjJA-90e.js";import{c as C}from"./catalog-5AxvKr4D.js";import{s as xe}from"./safeExternalHref-CkBrsh84.js";import{E as O,s as I}from"./submissions-LRopJJKL.js";import{p as je}from"./papers-khuZaSFb.js";import{R as ge,C as ve}from"./refresh-cw-fOkD1TSw.js";import{L as $}from"./loader-circle-CoLo2trx.js";import{C as be}from"./circle-check-1e3iPSaF.js";import"./curation-BtfabyzA.js";/** +import{c as ae,V as v,j as e,I as y,b as ne,q as H,a3 as re,x as oe,p as le,y as E,l as de,a$ as T,b0 as ce,b1 as ue,b2 as pe}from"./index-BeSw2DVP.js";import{u as W,r as me,e as he}from"./evaluationQueryInvalidation-Fkke0ERS.js";import{i as X,a as K}from"./queryInvalidation-DU8xd9pK.js";import{u as D}from"./useMutation-CsS-RfeE.js";import{u as fe}from"./useInfiniteQuery-C8JHYWz5.js";import{c as C}from"./catalog-D3XT9SmX.js";import{s as xe}from"./safeExternalHref-CkBrsh84.js";import{E as O,s as I}from"./submissions-D_EEKc6c.js";import{p as je}from"./papers-B58HJw9r.js";import{R as ge,C as ve}from"./refresh-cw-_ZzKdPgT.js";import{L as $}from"./loader-circle-C4luyo5I.js";import{C as be}from"./circle-check-fwAHrwbg.js";import"./curation-CCIsdsjV.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/SubmitView-DGwEiuGz.js b/assets/SubmitView-DjhEFLk3.js similarity index 93% rename from assets/SubmitView-DGwEiuGz.js rename to assets/SubmitView-DjhEFLk3.js index 659773c7c70b3d5badd021d3e93732ef486a3fe6..d8e13c27b0697a5decc4aa36202708c99c847932 100644 --- a/assets/SubmitView-DGwEiuGz.js +++ b/assets/SubmitView-DjhEFLk3.js @@ -1 +1 @@ -import{k as D,l as E,x as C,a as F,e as N,V as o,y as X,j as e,h as z}from"./index-D2fBL-s6.js";import{u as U}from"./useMutation-9dlTbuQj.js";import{A as O,a as V}from"./alert-PnePcfgX.js";import{B as P}from"./button-D0XfbdrX.js";import{I as h}from"./input-DdobyT4w.js";import{T as q}from"./textarea-B8b7WxcV.js";import{p as B}from"./papers-khuZaSFb.js";import{a as H}from"./queryInvalidation-BVOtRFkG.js";import"./curation-BtfabyzA.js";const S="pwc:paper-submit-draft",k={color:"var(--accent-text)",fontWeight:600,textDecoration:"underline",textUnderlineOffset:2},M=/^\d{4}\.\d{4,5}(v\d+)?$/i,J=/^[a-z-]+(\.[A-Z]{2})?\/\d{7}$/,W=/^https?:\/\/(?:www\.)?arxiv\.org\//i;function R(l){const i=l.trim();return i?M.test(i)||J.test(i)||W.test(i)?"arxiv":/^https?:\/\//i.test(i)?"external":"arxiv":"empty"}function $(l,i){const r=l.trim();if(R(r)==="arxiv")return/^https?:\/\//i.test(r)?{source_url:r}:{arxiv_id:r};const s={source_url:r},p=i.title.trim();p&&(s.title=p);const d=i.abstract.trim();d&&(s.abstract=d);const n=i.authors.split(/[,\n]/).map(c=>c.trim()).filter(Boolean);return n.length>0&&(s.authors=n),i.datePublished&&(s.date_published=i.datePublished),s}const re=()=>{const l=D(),i=E(),{toast:r}=C(),{user:g,isLoading:s}=F(),[p]=N(),d=p.get("arxiv_id")??"",[n,c]=o.useState(d),[f,j]=o.useState(""),[x,w]=o.useState(""),[b,I]=o.useState(""),[v,_]=o.useState(""),[A,y]=o.useState(null);o.useEffect(()=>{if(d)return;const t=sessionStorage.getItem(S);if(t){sessionStorage.removeItem(S);try{const a=JSON.parse(t);c(a.input??""),j(a.title??""),w(a.abstract??""),I(a.authors??""),_(a.datePublished??"")}catch{}}},[d]);const m=R(n),L=m==="external",u=U({mutationFn:t=>B.submit(t),onSuccess:t=>{if(t.pending_review){r({title:"Submission queued for review",description:"No source page was fetched and no catalog row was changed."}),u.reset();return}H(i);const a=t.refreshed&&t.created&&t.latest_version;r({title:a?`Paper updated to ${t.latest_version}`:t.created?"Paper submitted":"Paper already indexed",description:a?"Opening the updated paper page…":t.created?"Opening the paper page…":"Opening the existing paper page…"}),t.route_identifier&&l(`/paper/${t.route_identifier}`)},onError:t=>{y(X(t,"Submission failed"))}}),T=t=>{if(t.preventDefault(),y(null),m==="empty"){y("Enter an arXiv ID or a paper URL to submit.");return}if(!g){sessionStorage.setItem(S,JSON.stringify({input:n,title:f,abstract:x,authors:b,datePublished:v})),window.location.assign(z(window.location.href));return}const a=$(n,{title:f,abstract:x,authors:b,datePublished:v});u.mutate(a)};return e.jsxs("div",{className:"page",style:{maxWidth:720},children:[e.jsx("h1",{className:"detail-title",children:"Submit a paper"}),e.jsxs("p",{style:{fontFamily:"var(--serif)",color:"var(--ink-soft)",marginTop:12,lineHeight:1.55},children:["If your paper is on arXiv, submit it on"," ",e.jsx("a",{href:"https://huggingface.co/papers/submit",target:"_blank",rel:"noopener noreferrer",style:k,children:"Hugging Face"}),", which will automatically index it on Papers with Code."]}),e.jsxs("p",{style:{fontFamily:"var(--serif)",color:"var(--ink-soft)",marginTop:12,lineHeight:1.55},children:["If your paper is not on arXiv, submit it here. Non-arXiv papers (blog posts, technical reports, model release pages) enter the submission queue and appear only after review."," ",e.jsx("a",{href:"/rate-limits",style:k,children:"Read the submission and rate-limit policy."})]}),e.jsxs("form",{onSubmit:T,style:{marginTop:28,display:"grid",gap:20},children:[e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-input",style:{fontWeight:600,fontSize:14},children:"arXiv ID or paper URL"}),e.jsx(h,{id:"submit-input",value:n,onChange:t=>c(t.target.value),placeholder:"2501.12345 · https://arxiv.org/abs/2501.12345 · https://blog.example.com/release",autoFocus:!0,required:!0}),e.jsx("div",{style:{fontSize:12,color:"var(--ink-soft)",minHeight:18},children:m==="arxiv"?"Detected: arXiv paper — metadata will be fetched automatically.":m==="external"?"Detected: external URL — we'll extract metadata and you can override below.":"Paste an arXiv ID like 2501.12345 or any paper/blog URL."})]}),L&&e.jsxs("fieldset",{style:{border:"1px solid var(--rule)",borderRadius:8,padding:"16px 20px 20px",display:"grid",gap:16},children:[e.jsx("legend",{style:{padding:"0 8px",fontSize:12,color:"var(--ink-soft)",textTransform:"uppercase",letterSpacing:.5},children:"External paper details (optional)"}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-title",style:{fontSize:13},children:"Title"}),e.jsx(h,{id:"submit-title",value:f,onChange:t=>j(t.target.value),placeholder:"Leave blank to extract automatically"})]}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-abstract",style:{fontSize:13},children:"Abstract or summary"}),e.jsx(q,{id:"submit-abstract",value:x,onChange:t=>w(t.target.value),rows:4,placeholder:"Leave blank to extract automatically"})]}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-authors",style:{fontSize:13},children:"Authors (comma-separated)"}),e.jsx(h,{id:"submit-authors",value:b,onChange:t=>I(t.target.value),placeholder:"Jane Smith, John Doe"})]}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-date",style:{fontSize:13},children:"Publication date"}),e.jsx(h,{id:"submit-date",type:"date",value:v,onChange:t=>_(t.target.value),style:{maxWidth:220}}),e.jsx("div",{style:{fontSize:12,color:"var(--ink-soft)"},children:"Required only if we cannot infer a date from the page."})]})]}),A&&e.jsx(O,{variant:"destructive",children:e.jsx(V,{children:A})}),e.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[e.jsx(P,{type:"submit",disabled:u.isPending||s,children:s?"Checking sign-in…":u.isPending?"Submitting…":g?"Submit paper":"Sign in to submit"}),e.jsx(P,{type:"button",variant:"outline",onClick:()=>l(-1),disabled:u.isPending,children:"Cancel"})]})]})]})};export{re as default}; +import{k as D,l as E,x as C,a as F,e as N,V as o,y as X,j as e,h as z}from"./index-BeSw2DVP.js";import{u as U}from"./useMutation-CsS-RfeE.js";import{A as O,a as V}from"./alert-uwP129N7.js";import{B as P}from"./button-CO2XYoBd.js";import{I as h}from"./input-B5SDgz8U.js";import{T as q}from"./textarea-VtGLPxu8.js";import{p as B}from"./papers-B58HJw9r.js";import{a as H}from"./queryInvalidation-DU8xd9pK.js";import"./curation-CCIsdsjV.js";const S="pwc:paper-submit-draft",k={color:"var(--accent-text)",fontWeight:600,textDecoration:"underline",textUnderlineOffset:2},M=/^\d{4}\.\d{4,5}(v\d+)?$/i,J=/^[a-z-]+(\.[A-Z]{2})?\/\d{7}$/,W=/^https?:\/\/(?:www\.)?arxiv\.org\//i;function R(l){const i=l.trim();return i?M.test(i)||J.test(i)||W.test(i)?"arxiv":/^https?:\/\//i.test(i)?"external":"arxiv":"empty"}function $(l,i){const r=l.trim();if(R(r)==="arxiv")return/^https?:\/\//i.test(r)?{source_url:r}:{arxiv_id:r};const s={source_url:r},p=i.title.trim();p&&(s.title=p);const d=i.abstract.trim();d&&(s.abstract=d);const n=i.authors.split(/[,\n]/).map(c=>c.trim()).filter(Boolean);return n.length>0&&(s.authors=n),i.datePublished&&(s.date_published=i.datePublished),s}const re=()=>{const l=D(),i=E(),{toast:r}=C(),{user:g,isLoading:s}=F(),[p]=N(),d=p.get("arxiv_id")??"",[n,c]=o.useState(d),[f,j]=o.useState(""),[x,w]=o.useState(""),[b,I]=o.useState(""),[v,_]=o.useState(""),[A,y]=o.useState(null);o.useEffect(()=>{if(d)return;const t=sessionStorage.getItem(S);if(t){sessionStorage.removeItem(S);try{const a=JSON.parse(t);c(a.input??""),j(a.title??""),w(a.abstract??""),I(a.authors??""),_(a.datePublished??"")}catch{}}},[d]);const m=R(n),L=m==="external",u=U({mutationFn:t=>B.submit(t),onSuccess:t=>{if(t.pending_review){r({title:"Submission queued for review",description:"No source page was fetched and no catalog row was changed."}),u.reset();return}H(i);const a=t.refreshed&&t.created&&t.latest_version;r({title:a?`Paper updated to ${t.latest_version}`:t.created?"Paper submitted":"Paper already indexed",description:a?"Opening the updated paper page…":t.created?"Opening the paper page…":"Opening the existing paper page…"}),t.route_identifier&&l(`/paper/${t.route_identifier}`)},onError:t=>{y(X(t,"Submission failed"))}}),T=t=>{if(t.preventDefault(),y(null),m==="empty"){y("Enter an arXiv ID or a paper URL to submit.");return}if(!g){sessionStorage.setItem(S,JSON.stringify({input:n,title:f,abstract:x,authors:b,datePublished:v})),window.location.assign(z(window.location.href));return}const a=$(n,{title:f,abstract:x,authors:b,datePublished:v});u.mutate(a)};return e.jsxs("div",{className:"page",style:{maxWidth:720},children:[e.jsx("h1",{className:"detail-title",children:"Submit a paper"}),e.jsxs("p",{style:{fontFamily:"var(--serif)",color:"var(--ink-soft)",marginTop:12,lineHeight:1.55},children:["If your paper is on arXiv, submit it on"," ",e.jsx("a",{href:"https://huggingface.co/papers/submit",target:"_blank",rel:"noopener noreferrer",style:k,children:"Hugging Face"}),", which will automatically index it on Papers with Code."]}),e.jsxs("p",{style:{fontFamily:"var(--serif)",color:"var(--ink-soft)",marginTop:12,lineHeight:1.55},children:["If your paper is not on arXiv, submit it here. Non-arXiv papers (blog posts, technical reports, model release pages) enter the submission queue and appear only after review."," ",e.jsx("a",{href:"/rate-limits",style:k,children:"Read the submission and rate-limit policy."})]}),e.jsxs("form",{onSubmit:T,style:{marginTop:28,display:"grid",gap:20},children:[e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-input",style:{fontWeight:600,fontSize:14},children:"arXiv ID or paper URL"}),e.jsx(h,{id:"submit-input",value:n,onChange:t=>c(t.target.value),placeholder:"2501.12345 · https://arxiv.org/abs/2501.12345 · https://blog.example.com/release",autoFocus:!0,required:!0}),e.jsx("div",{style:{fontSize:12,color:"var(--ink-soft)",minHeight:18},children:m==="arxiv"?"Detected: arXiv paper — metadata will be fetched automatically.":m==="external"?"Detected: external URL — we'll extract metadata and you can override below.":"Paste an arXiv ID like 2501.12345 or any paper/blog URL."})]}),L&&e.jsxs("fieldset",{style:{border:"1px solid var(--rule)",borderRadius:8,padding:"16px 20px 20px",display:"grid",gap:16},children:[e.jsx("legend",{style:{padding:"0 8px",fontSize:12,color:"var(--ink-soft)",textTransform:"uppercase",letterSpacing:.5},children:"External paper details (optional)"}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-title",style:{fontSize:13},children:"Title"}),e.jsx(h,{id:"submit-title",value:f,onChange:t=>j(t.target.value),placeholder:"Leave blank to extract automatically"})]}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-abstract",style:{fontSize:13},children:"Abstract or summary"}),e.jsx(q,{id:"submit-abstract",value:x,onChange:t=>w(t.target.value),rows:4,placeholder:"Leave blank to extract automatically"})]}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-authors",style:{fontSize:13},children:"Authors (comma-separated)"}),e.jsx(h,{id:"submit-authors",value:b,onChange:t=>I(t.target.value),placeholder:"Jane Smith, John Doe"})]}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-date",style:{fontSize:13},children:"Publication date"}),e.jsx(h,{id:"submit-date",type:"date",value:v,onChange:t=>_(t.target.value),style:{maxWidth:220}}),e.jsx("div",{style:{fontSize:12,color:"var(--ink-soft)"},children:"Required only if we cannot infer a date from the page."})]})]}),A&&e.jsx(O,{variant:"destructive",children:e.jsx(V,{children:A})}),e.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[e.jsx(P,{type:"submit",disabled:u.isPending||s,children:s?"Checking sign-in…":u.isPending?"Submitting…":g?"Submit paper":"Sign in to submit"}),e.jsx(P,{type:"button",variant:"outline",onClick:()=>l(-1),disabled:u.isPending,children:"Cancel"})]})]})]})};export{re as default}; diff --git a/assets/TagBrowseView-zzh9zkuk.js b/assets/TagBrowseView-Cve79Quf.js similarity index 91% rename from assets/TagBrowseView-zzh9zkuk.js rename to assets/TagBrowseView-Cve79Quf.js index 25e912a0ee5ba50aefe33c292440b0f79cf197c1..ba4dae7b72076afd0c0b630d063a01fdf6807316 100644 --- a/assets/TagBrowseView-zzh9zkuk.js +++ b/assets/TagBrowseView-Cve79Quf.js @@ -1 +1 @@ -import{j as e,L as g,V as oe,u as de,k as me,f as j,b as G,p as he,a3 as pe,q as K,T as O}from"./index-D2fBL-s6.js";import{R as ue}from"./ResearchFollowButton-Bwb5EiPm.js";import{M as ge}from"./SotaBadges-r6iGzLRW.js";import{u as be,b as xe,P as je}from"./PaperFeed-BERxHjrg.js";import{A as L}from"./arrow-right-COzkrAUH.js";import{B as ke}from"./BenchmarkTrendSparkline-BV1XDSWE.js";import{M as W}from"./MarkdownText-ludE7yuw.js";import{c as J}from"./catalog-5AxvKr4D.js";import{p as _e}from"./papers-khuZaSFb.js";import{i as fe}from"./apiErrors-DV2aaDjL.js";import{f as Ne}from"./frameworks-DDA0P4Tf.js";import{u as we}from"./preferences-BHmRHfHN.js";import{s as ve}from"./slug-BpH-Nkvz.js";import{d as N,t as ye}from"./transform-B_GaHMvk.js";import{u as Se}from"./usePapers-CAjdcUuj.js";import{S as P}from"./skeleton-BDwfco0_.js";import{A as Te,a as Ee}from"./alert-PnePcfgX.js";import Be from"./NotFound-L0ldWZg9.js";import{T as $e}from"./trophy-DbAb1jY1.js";import{G as Me}from"./github-DcIeypA5.js";import"./researchTopic-jOpECA0z.js";import"./useMutation-9dlTbuQj.js";import"./plus-BI8-JXK0.js";import"./colors-BkWRhvFI.js";import"./PaperCard-DhorusY5.js";import"./AuthorAvatar-C8tz_syh.js";import"./Icon-Uhh78KjL.js";import"./LatexTitle-WIQJ1ke0.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-DS5Jzsg5.js";import"./useIntersectionObserver-C0Rq0EXm.js";/* empty css */import"./PaperPreviewLink-BZuRBR1p.js";import"./index-BPshewTi.js";import"./index-BtZPsygG.js";import"./katex-DkKDou_j.js";import"./hover-card-DWpZK4fW.js";import"./curation-BtfabyzA.js";import"./account-BHlQBDNT.js";import"./useInfiniteQuery-CjJA-90e.js";const Ce=()=>e.jsxs(g,{to:"/astra-for-robotics",className:"task-featured-collection","aria-label":"Featured collection: GPT-6 Astra for Robotics",children:[e.jsx("span",{className:"task-featured-collection-eyebrow",children:"Featured collection"}),e.jsx("strong",{children:"GPT-6 Astra for Robotics"}),e.jsx("span",{className:"task-featured-collection-description",children:"Papers and demos that put GPT-6 Astra in control of real and simulated robots, as the policy itself or as an agent orchestrating the stack."}),e.jsxs("span",{className:"task-featured-collection-meta",children:["Explore the collection",e.jsx(L,{size:14,"aria-hidden":"true"})]})]}),X=n=>{const c=n.match(/\(([^()]*)\)\s*$/);return c?c[1].split(",").map(d=>d.trim()).filter(Boolean):[]};function Fe(n,c){const d=X(n);if(c===void 0)return"standard";const i=new Set(X(c).map(l=>l.toLowerCase())),m=d.filter(l=>!i.has(l.toLowerCase()));return m.length?m.join(", "):n}function Ae(n,c){const d=new Map(n.map(l=>[l.id,l])),i=l=>{const x=new Set([l.id]);let k=l;for(;;){const w=c(k),_=w?d.get(w):void 0;if(!_)return k.id;if(x.has(_.id))return l.id;x.add(_.id),k=_}},m=new Map;return n.forEach(l=>{const x=i(l);m.set(x,[...m.get(x)||[],l])}),[...m].map(([l,x])=>({key:l,members:[d.get(l),...x.filter(k=>k.id!==l)]}))}const R=3,Pe=[{slug:"healthcare",eyebrow:"Clinical systems",title:"Clinical AI & Healthcare",description:"Agents, clinical workflows, medical calculators, safety, and decision support.",href:"#benchmarks"},{slug:"medical-question-answering",eyebrow:"Language & reasoning",title:"Medical Question Answering",description:"Medical exams, biomedical evidence, clinical comprehension, and explanations.",href:"/tasks/medical-question-answering"},{slug:"medical-imaging",eyebrow:"Vision",title:"Medical Imaging",description:"Radiology, pathology, ophthalmology, ultrasound, and diagnostic imaging.",href:"/tasks/medical-imaging"},{slug:"medical-visual-question-answering",eyebrow:"Multimodal",title:"Medical Visual Question Answering",description:"Questions grounded in radiology, pathology, and other biomedical images.",href:"/tasks/medical-visual-question-answering"}],Re=({frameworks:n})=>n.length===0?null:e.jsxs("div",{className:"task-framework-links",children:[e.jsx("span",{className:"task-framework-links-label",children:"Recommended frameworks"}),n.map(c=>e.jsxs(g,{to:`/papers?framework=${encodeURIComponent(c.framework_slug)}`,className:"task-framework-link",children:[e.jsx("span",{children:c.framework_name}),e.jsxs("span",{className:"task-framework-link-stars",children:["★ ",Ne(c.num_stars)]})]},c.framework_id))]}),Le=({task:n,area:c,parents:d})=>e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(g,{to:"/tasks",children:"Tasks"}),c&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(g,{to:`/tasks#area-${ve(c.name)}`,children:c.name})]}),[...d].reverse().map(i=>e.jsxs(oe.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(g,{to:`/tasks/${i.slug||i.id}`,children:N(i.name,i.slug)})]},i.id)),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--accent-text)"},children:N(n.name,n.slug)})]}),Ie=({task:n,relatedTasks:c})=>{const d=new Map([n,...c].map(i=>[i.slug,i]));return e.jsxs("section",{className:"medical-ai-hub","aria-labelledby":"medical-ai-hub-title",children:[e.jsxs("div",{className:"medical-ai-hub-heading",children:[e.jsx("span",{children:"Medical AI directory"}),e.jsx("h2",{id:"medical-ai-hub-title",children:"Explore Healthcare & Medical AI"}),e.jsx("p",{children:"Browse the field by clinical application, language, vision, or multimodal reasoning."})]}),e.jsx("div",{className:"medical-ai-hub-grid",children:Pe.map(i=>{const m=d.get(i.slug),l=e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"medical-ai-hub-card-eyebrow",children:i.eyebrow}),e.jsx("strong",{children:i.title}),e.jsx("span",{className:"medical-ai-hub-card-description",children:i.description}),e.jsxs("span",{className:"medical-ai-hub-card-meta",children:[(m==null?void 0:m.paper_count)!=null?`${m.paper_count.toLocaleString()} papers`:"Explore task",e.jsx(L,{size:14,"aria-hidden":"true"})]})]});return i.slug==="healthcare"?e.jsx("a",{href:i.href,className:"medical-ai-hub-card",children:l},i.slug):e.jsx(g,{to:i.href,className:"medical-ai-hub-card",children:l},i.slug)})})]})},qe=n=>[...n].sort((c,d)=>{const i=c.slug==="classic-language-modeling",m=d.slug==="classic-language-modeling";return i!==m?i?1:-1:0}),Ss=()=>{var V,z,U;const{taskSlug:n}=de(),c=me(),d=be({defaultToLastMonth:!0}),{searchParams:i}=d,[m,l]=j.useState(!1),[x,k]=j.useState({}),[w,_]=j.useState(()=>new Set),{preferences:Y}=we(),E=(s,a)=>{const t=s||"";return a?`/benchmark/${t}?task=${encodeURIComponent(a)}`:`/benchmark/${t}`},v=Y.hide_closed_source_evals?!0:void 0,h=G({queryKey:[...K.taskPage,n,v],queryFn:()=>J.taskPage(n,{is_open:v}),enabled:!!n,staleTime:O});j.useEffect(()=>{var t;const s=(t=h.data)==null?void 0:t.task.slug;if(!n||!s||s===n)return;const a=i.toString();c(`/tasks/${s}${a?`?${a}`:""}`,{replace:!0})},[c,(V=h.data)==null?void 0:V.task.slug,i,n]);const I=G({queryKey:[...K.taskBenchmarkTrends,n,v],queryFn:()=>J.trendingBenchmarks(n,{limit:100,min_recent_papers:0,is_open:v}),enabled:!!n,staleTime:O}),y=j.useMemo(()=>{var s;return qe(((s=h.data)==null?void 0:s.children)||[])},[h.data]),B=j.useMemo(()=>{var a;const s=new Map;return(((a=h.data)==null?void 0:a.subtask_benchmarks)||[]).forEach(t=>{s.set(t.subtask_id,t.benchmarks||[])}),s},[h.data]),f=Se([...he.feeds.task,n,d.filters],s=>_e.forTask(n,{...d.filters,page:s,page_size:20,repository_limit:1}),{enabled:!!n}),Z=j.useMemo(()=>{var s;return((s=f.data)==null?void 0:s.pages.flatMap(a=>a.results.map(ye)))??[]},[f.data]),$=j.useMemo(()=>{var a;const s={};return(a=f.data)==null||a.pages.forEach(t=>t.results.forEach(b=>(b.methods||[]).forEach(u=>{const r=u.slug||u.id;s[r]||(s[r]={id:u.id,name:u.name,slug:u.slug||"",count:0}),s[r].count++}))),Object.values(s).sort((t,b)=>b.count-t.count).slice(0,8)},[f.data]);if(h.isLoading)return e.jsxs("div",{className:"page",children:[e.jsx(P,{className:"h-12 w-1/2 mb-4"}),e.jsx(P,{className:"h-6 w-1/3 mb-8"}),e.jsx(P,{className:"h-64 w-full"})]});if(fe(h.error))return e.jsx(Be,{});if(h.error||!h.data)return e.jsx("div",{className:"page",children:e.jsx(Te,{variant:"destructive",children:e.jsx(Ee,{children:"Task not found."})})});const o=h.data.task,ee=h.data.parents||[],M=N(o.name,o.slug),C=(h.data.sisters||[]).filter(s=>s.id!==o.id),se=h.data.recommended_frameworks||[],S=h.data.benchmarks||[],q=new Map(S.map(s=>[s.id,s])),ae=new Set(S.map(s=>s.id)),D=(((z=I.data)==null?void 0:z.results)||[]).filter(s=>ae.has(s.id)).map(s=>{const a=q.get(s.id);return{...s,best_model_name:(a==null?void 0:a.best_model_name)??s.best_model_name,best_paper_route:a==null?void 0:a.best_paper_route,best_paper_title:a==null?void 0:a.best_paper_title,best_code_url:a==null?void 0:a.best_code_url}}),F=D.length?D:S.map(s=>({id:s.id,name:s.name,slug:s.slug,full_name:s.full_name,recent_paper_count:0,baseline_paper_count:0,all_time_paper_count:s.paper_count||0,trend_score:0,support_weighted_score:0,rate_change:null,latest_reported_on:null,best_model_name:s.best_model_name,best_paper_route:s.best_paper_route,best_paper_title:s.best_paper_title,best_code_url:s.best_code_url,history:[]})),T=Ae(F,s=>{var a;return(a=q.get(s.id))==null?void 0:a.parent_dataset_id}),re=m?T:T.slice(0,5),ne=T.slice(5).reduce((s,a)=>s+a.members.length,0),H=((U=I.data)==null?void 0:U.recent_days)||90,te=y.some(s=>(B.get(s.id)||[]).length>0),ie=y.length>0,Q=F.length>0,ce=(()=>{const s=new Set;return S.forEach(a=>s.add(a.id)),B.forEach(a=>a.forEach(t=>s.add(t.id))),s.size})(),le=s=>{_(a=>{const t=new Set(a);return t.has(s)?t.delete(s):t.add(s),t})};return e.jsxs("div",{className:"page",children:[e.jsx(Le,{task:o,area:h.data.area,parents:ee}),e.jsxs("div",{className:o.image_url?`task-hero-grid${o.slug==="auto-research"?" task-hero-grid--wide":""}`: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:"TASK"}),e.jsx("h1",{className:"domain-mega-title",children:M}),e.jsx(ue,{kind:"task",entityId:o.id}),o.description&&e.jsx(W,{className:"task-explainer",text:o.description}),e.jsxs("div",{className:"task-quickstats",children:[e.jsxs("span",{children:[e.jsx("span",{className:"num",children:(o.paper_count??0).toLocaleString()}),"PAPERS"]}),e.jsxs("span",{children:[e.jsx("span",{className:"num",children:ce}),"BENCHMARKS"]}),e.jsxs("span",{children:[e.jsxs("span",{className:"num",children:[$.length,"+"]}),"METHODS USED"]})]}),e.jsx(Re,{frameworks:se})]}),o.image_url&&e.jsxs("figure",{className:`task-figure-card${o.slug==="omni-models"?" task-figure-card--compact":""}`,children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:pe(o.image_url)??void 0,alt:`${M} schematic`,onError:s=>{var a,t;(t=(a=s.currentTarget.parentElement)==null?void 0:a.parentElement)==null||t.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",M,o.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(W,{className:"task-image-credit",text:o.image_credit})]})]})]})]}),o.slug==="healthcare"&&e.jsx(Ie,{task:o,relatedTasks:C}),o.slug==="robotics"&&e.jsx(Ce,{}),e.jsxs("div",{className:"task-page-grid",style:{marginTop:28},children:[e.jsxs("div",{children:[Q&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"task-section-head",id:"benchmarks",children:[e.jsxs("div",{className:"task-section-eyebrow",children:[H,"-day reporting activity · select a benchmark"]}),e.jsxs("div",{className:"task-section-title",children:["Benchmarks ",e.jsxs("span",{className:"meta",children:["[",F.length,"]"]})]})]}),e.jsxs("div",{className:"benchmark-trend-table",role:"table","aria-label":"Trending benchmarks",children:[e.jsxs("div",{className:"benchmark-trend-head",role:"row",children:[e.jsx("span",{role:"columnheader",children:"Trend"}),e.jsx("span",{role:"columnheader",children:"Benchmark"}),e.jsx("span",{role:"columnheader",children:"Best model"}),e.jsx("span",{role:"columnheader",children:"Paper title"}),e.jsx("span",{role:"columnheader",children:"Code"}),e.jsx("span",{role:"columnheader",children:"Compare"})]}),re.map(({key:s,members:a})=>{const t=a[0],b=p=>p===t?"standard":Fe(p.name,t.name),u=[t,...a.slice(1).sort((p,A)=>b(p).localeCompare(b(A),void 0,{sensitivity:"base"}))],r=u.find(p=>p.id===x[s])??t;return e.jsxs("div",{className:"benchmark-trend-row",role:"row",children:[e.jsxs("div",{className:"benchmark-trend-cell",role:"cell",children:[e.jsx(ke,{history:r.history,benchmarkName:r.name}),e.jsxs("div",{className:"benchmark-trend-meta",children:[e.jsxs("span",{children:[e.jsx("strong",{children:r.recent_paper_count})," ",r.recent_paper_count===1?"paper":"papers"," /"," ",H,"d"]}),r.rate_change==null?r.recent_paper_count>0&&e.jsx("span",{className:"benchmark-trend-change is-new",children:"new"}):e.jsxs("span",{className:`benchmark-trend-change ${r.rate_change>=1?"is-up":"is-down"}`,children:[r.rate_change>=1?"↑":"↓"," ",r.rate_change.toFixed(1),"×"]})]})]}),e.jsxs("div",{className:"benchmark-trend-benchmark",role:"cell",children:[e.jsx(g,{className:"bench-row-name",to:E(r.slug||r.id,n),children:r.name}),u.length>1&&e.jsx("div",{className:"bench-row-variants",role:"group","aria-label":`Evaluation protocols for ${t.name}`,children:u.map(p=>e.jsx("button",{type:"button",className:"bench-row-variant","aria-pressed":p.id===r.id,title:p.name,onClick:()=>k(A=>({...A,[s]:p.id})),children:b(p)},p.id))}),e.jsx("div",{className:"bench-row-sub",children:e.jsxs("span",{children:[e.jsx("strong",{children:r.all_time_paper_count})," reporting papers"]})})]}),e.jsx("div",{className:"bench-row-best",role:"cell",children:r.best_model_name?e.jsxs(e.Fragment,{children:[e.jsx($e,{size:13,className:"bench-row-best-icon"}),e.jsx("span",{className:"bench-row-best-name",children:r.best_model_name})]}):e.jsx("span",{className:"bench-row-best-empty",children:"—"})}),e.jsx("div",{className:"bench-row-paper",role:"cell",children:r.best_paper_route&&r.best_paper_title?e.jsx(g,{to:`/paper/${encodeURIComponent(r.best_paper_route)}`,children:r.best_paper_title}):e.jsx("span",{className:"bench-row-best-empty",children:"—"})}),e.jsx("div",{className:"bench-row-code",role:"cell",children:r.best_code_url?e.jsx("a",{href:r.best_code_url,target:"_blank",rel:"noopener noreferrer","aria-label":`Code for ${r.best_paper_title||r.best_model_name}`,children:e.jsx(Me,{size:18,strokeWidth:1.8,"aria-hidden":"true"})}):e.jsx("span",{className:"bench-row-best-empty",children:"—"})}),e.jsx("div",{className:"bench-row-compare",role:"cell",children:e.jsxs(g,{to:E(r.slug||r.id,n),"aria-label":`Compare ${r.best_model_name||"the best model"} with all results on ${r.name}`,children:[e.jsx("span",{children:"See all"}),e.jsx(L,{size:11,strokeWidth:2,"aria-hidden":"true"})]})})]},s)})]}),T.length>5&&e.jsx("button",{type:"button",className:"bench-show-more",onClick:()=>l(s=>!s),children:m?"− show top 5":`+ show ${ne} more benchmarks`})]}),ie&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"task-section-head",style:Q?{marginTop:36}:void 0,children:[e.jsx("div",{className:"task-section-eyebrow",children:te?"Benchmarks by capability":"Task hierarchy"}),e.jsxs("div",{className:"task-section-title",children:["Subtasks ",e.jsxs("span",{className:"meta",children:["[",y.length,"]"]})]})]}),e.jsx("div",{className:"subtask-grid",children:y.map(s=>{const a=B.get(s.id)||[],t=w.has(s.id),b=t?a:a.slice(0,R),u=a.length-R;return e.jsxs("div",{className:"subtask-section",children:[e.jsxs("div",{className:"subtask-head",children:[e.jsx(g,{to:`/tasks/${s.slug||s.id}`,className:"subtask-head-name",children:N(s.name,s.slug)}),e.jsx("span",{className:"subtask-head-meta",children:a.length>0?`[${a.length} benchmark${a.length===1?"":"s"}]`:`[${(s.paper_count??0).toLocaleString()} papers]`})]}),b.length>0?b.map((r,p)=>e.jsxs("div",{className:"bench-row",onClick:()=>c(E(r.slug||r.id,s.slug||s.id)),children:[e.jsx("div",{className:"bench-row-num",children:String(p+1).padStart(2,"0")}),e.jsxs("div",{className:"bench-row-main",children:[e.jsx("div",{className:"bench-row-name",children:r.name}),e.jsx("div",{className:"bench-row-sub",children:r.paper_count!=null&&e.jsxs("span",{children:[e.jsx("strong",{children:r.paper_count})," ENTRIES"]})})]}),e.jsx("div",{className:"bench-row-arrow",children:"→"})]},r.id)):e.jsxs(g,{to:`/tasks/${s.slug||s.id}`,className:"subtask-summary",children:[e.jsxs("span",{children:[(s.paper_count??0).toLocaleString()," papers"]}),s.description&&e.jsx("span",{className:"subtask-summary-desc",children:s.description})]}),u>0&&e.jsx("button",{type:"button",className:"bench-show-more",onClick:()=>le(s.id),children:t?`− show top ${R}`:`+ show ${u} more benchmark${u===1?"":"s"}`})]},s.id)})})]}),e.jsxs("div",{className:"task-section-head",style:{marginTop:36},children:[e.jsx("div",{className:"task-section-eyebrow",children:"Top trending · sort below"}),e.jsxs("div",{className:"task-section-title",children:["Papers ",e.jsxs("span",{className:"meta",children:["[",(o.paper_count??0).toLocaleString(),"]"]})]})]}),e.jsx(xe,{feed:d}),e.jsx(je,{query:f,cards:Z,empty:d.dateRange.startDate||d.dateRange.endDate?"No papers in this task in this date range.":"No papers in this task yet."})]}),e.jsxs("aside",{className:"task-side",children:[C.length>0&&o.slug!=="healthcare"&&e.jsxs("div",{className:"side-block",children:[e.jsx("div",{className:"side-block-num",children:"01/"}),e.jsx("div",{className:"side-block-label",children:"Sister Tasks"}),C.slice(0,8).map(s=>e.jsxs(g,{to:`/tasks/${s.slug||s.id}`,className:"side-link-row",children:[e.jsx("span",{children:N(s.name,s.slug)}),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count.toLocaleString()})]},s.id))]}),$.length>0&&e.jsxs("div",{className:"side-block",children:[e.jsx("div",{className:"side-block-num",children:"02/"}),e.jsx("div",{className:"side-block-label",children:"Common Methods"}),$.map(s=>e.jsxs("div",{className:"side-method-row",children:[e.jsx(ge,{method:{slug:s.slug,name:s.name}}),e.jsxs("span",{className:"num",children:["·",s.count]})]},s.id))]})]})]})]})};export{Ie as HealthcareMedicalAiHub,Re as RecommendedFrameworkLinks,Le as TaskBreadcrumb,Ss as default}; +import{j as e,L as g,V as oe,u as de,k as me,f as j,b as G,p as he,a3 as pe,q as K,T as O}from"./index-BeSw2DVP.js";import{R as ue}from"./ResearchFollowButton-lzWAD6Jv.js";import{M as ge}from"./SotaBadges-FMpqi2HS.js";import{u as be,b as xe,P as je}from"./PaperFeed-Cge1MWHJ.js";import{A as L}from"./arrow-right-3wBGidD3.js";import{B as ke}from"./BenchmarkTrendSparkline-BwPQcLi3.js";import{M as W}from"./MarkdownText-BdL6XBXC.js";import{c as J}from"./catalog-D3XT9SmX.js";import{p as _e}from"./papers-B58HJw9r.js";import{i as fe}from"./apiErrors-CXiv7lxc.js";import{f as Ne}from"./frameworks-DDA0P4Tf.js";import{u as we}from"./preferences-BcztmdfT.js";import{s as ve}from"./slug-BpH-Nkvz.js";import{d as N,t as ye}from"./transform-BadO0Aba.js";import{u as Se}from"./usePapers-Cj1tt_u6.js";import{S as P}from"./skeleton-BBv4iC5Z.js";import{A as Te,a as Ee}from"./alert-uwP129N7.js";import Be from"./NotFound-BkVU3ijx.js";import{T as $e}from"./trophy-D44BVGMf.js";import{G as Me}from"./github-CTNIgqBO.js";import"./researchTopic-Cb4NrTKj.js";import"./useMutation-CsS-RfeE.js";import"./plus-imZJbVTM.js";import"./colors-BkWRhvFI.js";import"./PaperCard-Dx07g-aj.js";import"./AuthorAvatar-Dpan5W1F.js";import"./Icon-BWcOShxk.js";import"./LatexTitle-C5yrYbA-.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-CYoFzAud.js";import"./useIntersectionObserver-BBx3EHQ9.js";/* empty css */import"./PaperPreviewLink-BughwfUv.js";import"./index-CbsMwfXw.js";import"./index-XKdmo9ij.js";import"./katex-DkKDou_j.js";import"./hover-card-BbFULETs.js";import"./curation-CCIsdsjV.js";import"./account-B-4MwKsq.js";import"./useInfiniteQuery-C8JHYWz5.js";const Ce=()=>e.jsxs(g,{to:"/astra-for-robotics",className:"task-featured-collection","aria-label":"Featured collection: GPT-6 Astra for Robotics",children:[e.jsx("span",{className:"task-featured-collection-eyebrow",children:"Featured collection"}),e.jsx("strong",{children:"GPT-6 Astra for Robotics"}),e.jsx("span",{className:"task-featured-collection-description",children:"Papers and demos that put GPT-6 Astra in control of real and simulated robots, as the policy itself or as an agent orchestrating the stack."}),e.jsxs("span",{className:"task-featured-collection-meta",children:["Explore the collection",e.jsx(L,{size:14,"aria-hidden":"true"})]})]}),X=n=>{const c=n.match(/\(([^()]*)\)\s*$/);return c?c[1].split(",").map(d=>d.trim()).filter(Boolean):[]};function Fe(n,c){const d=X(n);if(c===void 0)return"standard";const i=new Set(X(c).map(l=>l.toLowerCase())),m=d.filter(l=>!i.has(l.toLowerCase()));return m.length?m.join(", "):n}function Ae(n,c){const d=new Map(n.map(l=>[l.id,l])),i=l=>{const x=new Set([l.id]);let k=l;for(;;){const w=c(k),_=w?d.get(w):void 0;if(!_)return k.id;if(x.has(_.id))return l.id;x.add(_.id),k=_}},m=new Map;return n.forEach(l=>{const x=i(l);m.set(x,[...m.get(x)||[],l])}),[...m].map(([l,x])=>({key:l,members:[d.get(l),...x.filter(k=>k.id!==l)]}))}const R=3,Pe=[{slug:"healthcare",eyebrow:"Clinical systems",title:"Clinical AI & Healthcare",description:"Agents, clinical workflows, medical calculators, safety, and decision support.",href:"#benchmarks"},{slug:"medical-question-answering",eyebrow:"Language & reasoning",title:"Medical Question Answering",description:"Medical exams, biomedical evidence, clinical comprehension, and explanations.",href:"/tasks/medical-question-answering"},{slug:"medical-imaging",eyebrow:"Vision",title:"Medical Imaging",description:"Radiology, pathology, ophthalmology, ultrasound, and diagnostic imaging.",href:"/tasks/medical-imaging"},{slug:"medical-visual-question-answering",eyebrow:"Multimodal",title:"Medical Visual Question Answering",description:"Questions grounded in radiology, pathology, and other biomedical images.",href:"/tasks/medical-visual-question-answering"}],Re=({frameworks:n})=>n.length===0?null:e.jsxs("div",{className:"task-framework-links",children:[e.jsx("span",{className:"task-framework-links-label",children:"Recommended frameworks"}),n.map(c=>e.jsxs(g,{to:`/papers?framework=${encodeURIComponent(c.framework_slug)}`,className:"task-framework-link",children:[e.jsx("span",{children:c.framework_name}),e.jsxs("span",{className:"task-framework-link-stars",children:["★ ",Ne(c.num_stars)]})]},c.framework_id))]}),Le=({task:n,area:c,parents:d})=>e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(g,{to:"/tasks",children:"Tasks"}),c&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(g,{to:`/tasks#area-${ve(c.name)}`,children:c.name})]}),[...d].reverse().map(i=>e.jsxs(oe.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(g,{to:`/tasks/${i.slug||i.id}`,children:N(i.name,i.slug)})]},i.id)),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--accent-text)"},children:N(n.name,n.slug)})]}),Ie=({task:n,relatedTasks:c})=>{const d=new Map([n,...c].map(i=>[i.slug,i]));return e.jsxs("section",{className:"medical-ai-hub","aria-labelledby":"medical-ai-hub-title",children:[e.jsxs("div",{className:"medical-ai-hub-heading",children:[e.jsx("span",{children:"Medical AI directory"}),e.jsx("h2",{id:"medical-ai-hub-title",children:"Explore Healthcare & Medical AI"}),e.jsx("p",{children:"Browse the field by clinical application, language, vision, or multimodal reasoning."})]}),e.jsx("div",{className:"medical-ai-hub-grid",children:Pe.map(i=>{const m=d.get(i.slug),l=e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"medical-ai-hub-card-eyebrow",children:i.eyebrow}),e.jsx("strong",{children:i.title}),e.jsx("span",{className:"medical-ai-hub-card-description",children:i.description}),e.jsxs("span",{className:"medical-ai-hub-card-meta",children:[(m==null?void 0:m.paper_count)!=null?`${m.paper_count.toLocaleString()} papers`:"Explore task",e.jsx(L,{size:14,"aria-hidden":"true"})]})]});return i.slug==="healthcare"?e.jsx("a",{href:i.href,className:"medical-ai-hub-card",children:l},i.slug):e.jsx(g,{to:i.href,className:"medical-ai-hub-card",children:l},i.slug)})})]})},qe=n=>[...n].sort((c,d)=>{const i=c.slug==="classic-language-modeling",m=d.slug==="classic-language-modeling";return i!==m?i?1:-1:0}),Ss=()=>{var V,z,U;const{taskSlug:n}=de(),c=me(),d=be({defaultToLastMonth:!0}),{searchParams:i}=d,[m,l]=j.useState(!1),[x,k]=j.useState({}),[w,_]=j.useState(()=>new Set),{preferences:Y}=we(),E=(s,a)=>{const t=s||"";return a?`/benchmark/${t}?task=${encodeURIComponent(a)}`:`/benchmark/${t}`},v=Y.hide_closed_source_evals?!0:void 0,h=G({queryKey:[...K.taskPage,n,v],queryFn:()=>J.taskPage(n,{is_open:v}),enabled:!!n,staleTime:O});j.useEffect(()=>{var t;const s=(t=h.data)==null?void 0:t.task.slug;if(!n||!s||s===n)return;const a=i.toString();c(`/tasks/${s}${a?`?${a}`:""}`,{replace:!0})},[c,(V=h.data)==null?void 0:V.task.slug,i,n]);const I=G({queryKey:[...K.taskBenchmarkTrends,n,v],queryFn:()=>J.trendingBenchmarks(n,{limit:100,min_recent_papers:0,is_open:v}),enabled:!!n,staleTime:O}),y=j.useMemo(()=>{var s;return qe(((s=h.data)==null?void 0:s.children)||[])},[h.data]),B=j.useMemo(()=>{var a;const s=new Map;return(((a=h.data)==null?void 0:a.subtask_benchmarks)||[]).forEach(t=>{s.set(t.subtask_id,t.benchmarks||[])}),s},[h.data]),f=Se([...he.feeds.task,n,d.filters],s=>_e.forTask(n,{...d.filters,page:s,page_size:20,repository_limit:1}),{enabled:!!n}),Z=j.useMemo(()=>{var s;return((s=f.data)==null?void 0:s.pages.flatMap(a=>a.results.map(ye)))??[]},[f.data]),$=j.useMemo(()=>{var a;const s={};return(a=f.data)==null||a.pages.forEach(t=>t.results.forEach(b=>(b.methods||[]).forEach(u=>{const r=u.slug||u.id;s[r]||(s[r]={id:u.id,name:u.name,slug:u.slug||"",count:0}),s[r].count++}))),Object.values(s).sort((t,b)=>b.count-t.count).slice(0,8)},[f.data]);if(h.isLoading)return e.jsxs("div",{className:"page",children:[e.jsx(P,{className:"h-12 w-1/2 mb-4"}),e.jsx(P,{className:"h-6 w-1/3 mb-8"}),e.jsx(P,{className:"h-64 w-full"})]});if(fe(h.error))return e.jsx(Be,{});if(h.error||!h.data)return e.jsx("div",{className:"page",children:e.jsx(Te,{variant:"destructive",children:e.jsx(Ee,{children:"Task not found."})})});const o=h.data.task,ee=h.data.parents||[],M=N(o.name,o.slug),C=(h.data.sisters||[]).filter(s=>s.id!==o.id),se=h.data.recommended_frameworks||[],S=h.data.benchmarks||[],q=new Map(S.map(s=>[s.id,s])),ae=new Set(S.map(s=>s.id)),D=(((z=I.data)==null?void 0:z.results)||[]).filter(s=>ae.has(s.id)).map(s=>{const a=q.get(s.id);return{...s,best_model_name:(a==null?void 0:a.best_model_name)??s.best_model_name,best_paper_route:a==null?void 0:a.best_paper_route,best_paper_title:a==null?void 0:a.best_paper_title,best_code_url:a==null?void 0:a.best_code_url}}),F=D.length?D:S.map(s=>({id:s.id,name:s.name,slug:s.slug,full_name:s.full_name,recent_paper_count:0,baseline_paper_count:0,all_time_paper_count:s.paper_count||0,trend_score:0,support_weighted_score:0,rate_change:null,latest_reported_on:null,best_model_name:s.best_model_name,best_paper_route:s.best_paper_route,best_paper_title:s.best_paper_title,best_code_url:s.best_code_url,history:[]})),T=Ae(F,s=>{var a;return(a=q.get(s.id))==null?void 0:a.parent_dataset_id}),re=m?T:T.slice(0,5),ne=T.slice(5).reduce((s,a)=>s+a.members.length,0),H=((U=I.data)==null?void 0:U.recent_days)||90,te=y.some(s=>(B.get(s.id)||[]).length>0),ie=y.length>0,Q=F.length>0,ce=(()=>{const s=new Set;return S.forEach(a=>s.add(a.id)),B.forEach(a=>a.forEach(t=>s.add(t.id))),s.size})(),le=s=>{_(a=>{const t=new Set(a);return t.has(s)?t.delete(s):t.add(s),t})};return e.jsxs("div",{className:"page",children:[e.jsx(Le,{task:o,area:h.data.area,parents:ee}),e.jsxs("div",{className:o.image_url?`task-hero-grid${o.slug==="auto-research"?" task-hero-grid--wide":""}`: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:"TASK"}),e.jsx("h1",{className:"domain-mega-title",children:M}),e.jsx(ue,{kind:"task",entityId:o.id}),o.description&&e.jsx(W,{className:"task-explainer",text:o.description}),e.jsxs("div",{className:"task-quickstats",children:[e.jsxs("span",{children:[e.jsx("span",{className:"num",children:(o.paper_count??0).toLocaleString()}),"PAPERS"]}),e.jsxs("span",{children:[e.jsx("span",{className:"num",children:ce}),"BENCHMARKS"]}),e.jsxs("span",{children:[e.jsxs("span",{className:"num",children:[$.length,"+"]}),"METHODS USED"]})]}),e.jsx(Re,{frameworks:se})]}),o.image_url&&e.jsxs("figure",{className:`task-figure-card${o.slug==="omni-models"?" task-figure-card--compact":""}`,children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:pe(o.image_url)??void 0,alt:`${M} schematic`,onError:s=>{var a,t;(t=(a=s.currentTarget.parentElement)==null?void 0:a.parentElement)==null||t.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",M,o.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(W,{className:"task-image-credit",text:o.image_credit})]})]})]})]}),o.slug==="healthcare"&&e.jsx(Ie,{task:o,relatedTasks:C}),o.slug==="robotics"&&e.jsx(Ce,{}),e.jsxs("div",{className:"task-page-grid",style:{marginTop:28},children:[e.jsxs("div",{children:[Q&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"task-section-head",id:"benchmarks",children:[e.jsxs("div",{className:"task-section-eyebrow",children:[H,"-day reporting activity · select a benchmark"]}),e.jsxs("div",{className:"task-section-title",children:["Benchmarks ",e.jsxs("span",{className:"meta",children:["[",F.length,"]"]})]})]}),e.jsxs("div",{className:"benchmark-trend-table",role:"table","aria-label":"Trending benchmarks",children:[e.jsxs("div",{className:"benchmark-trend-head",role:"row",children:[e.jsx("span",{role:"columnheader",children:"Trend"}),e.jsx("span",{role:"columnheader",children:"Benchmark"}),e.jsx("span",{role:"columnheader",children:"Best model"}),e.jsx("span",{role:"columnheader",children:"Paper title"}),e.jsx("span",{role:"columnheader",children:"Code"}),e.jsx("span",{role:"columnheader",children:"Compare"})]}),re.map(({key:s,members:a})=>{const t=a[0],b=p=>p===t?"standard":Fe(p.name,t.name),u=[t,...a.slice(1).sort((p,A)=>b(p).localeCompare(b(A),void 0,{sensitivity:"base"}))],r=u.find(p=>p.id===x[s])??t;return e.jsxs("div",{className:"benchmark-trend-row",role:"row",children:[e.jsxs("div",{className:"benchmark-trend-cell",role:"cell",children:[e.jsx(ke,{history:r.history,benchmarkName:r.name}),e.jsxs("div",{className:"benchmark-trend-meta",children:[e.jsxs("span",{children:[e.jsx("strong",{children:r.recent_paper_count})," ",r.recent_paper_count===1?"paper":"papers"," /"," ",H,"d"]}),r.rate_change==null?r.recent_paper_count>0&&e.jsx("span",{className:"benchmark-trend-change is-new",children:"new"}):e.jsxs("span",{className:`benchmark-trend-change ${r.rate_change>=1?"is-up":"is-down"}`,children:[r.rate_change>=1?"↑":"↓"," ",r.rate_change.toFixed(1),"×"]})]})]}),e.jsxs("div",{className:"benchmark-trend-benchmark",role:"cell",children:[e.jsx(g,{className:"bench-row-name",to:E(r.slug||r.id,n),children:r.name}),u.length>1&&e.jsx("div",{className:"bench-row-variants",role:"group","aria-label":`Evaluation protocols for ${t.name}`,children:u.map(p=>e.jsx("button",{type:"button",className:"bench-row-variant","aria-pressed":p.id===r.id,title:p.name,onClick:()=>k(A=>({...A,[s]:p.id})),children:b(p)},p.id))}),e.jsx("div",{className:"bench-row-sub",children:e.jsxs("span",{children:[e.jsx("strong",{children:r.all_time_paper_count})," reporting papers"]})})]}),e.jsx("div",{className:"bench-row-best",role:"cell",children:r.best_model_name?e.jsxs(e.Fragment,{children:[e.jsx($e,{size:13,className:"bench-row-best-icon"}),e.jsx("span",{className:"bench-row-best-name",children:r.best_model_name})]}):e.jsx("span",{className:"bench-row-best-empty",children:"—"})}),e.jsx("div",{className:"bench-row-paper",role:"cell",children:r.best_paper_route&&r.best_paper_title?e.jsx(g,{to:`/paper/${encodeURIComponent(r.best_paper_route)}`,children:r.best_paper_title}):e.jsx("span",{className:"bench-row-best-empty",children:"—"})}),e.jsx("div",{className:"bench-row-code",role:"cell",children:r.best_code_url?e.jsx("a",{href:r.best_code_url,target:"_blank",rel:"noopener noreferrer","aria-label":`Code for ${r.best_paper_title||r.best_model_name}`,children:e.jsx(Me,{size:18,strokeWidth:1.8,"aria-hidden":"true"})}):e.jsx("span",{className:"bench-row-best-empty",children:"—"})}),e.jsx("div",{className:"bench-row-compare",role:"cell",children:e.jsxs(g,{to:E(r.slug||r.id,n),"aria-label":`Compare ${r.best_model_name||"the best model"} with all results on ${r.name}`,children:[e.jsx("span",{children:"See all"}),e.jsx(L,{size:11,strokeWidth:2,"aria-hidden":"true"})]})})]},s)})]}),T.length>5&&e.jsx("button",{type:"button",className:"bench-show-more",onClick:()=>l(s=>!s),children:m?"− show top 5":`+ show ${ne} more benchmarks`})]}),ie&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"task-section-head",style:Q?{marginTop:36}:void 0,children:[e.jsx("div",{className:"task-section-eyebrow",children:te?"Benchmarks by capability":"Task hierarchy"}),e.jsxs("div",{className:"task-section-title",children:["Subtasks ",e.jsxs("span",{className:"meta",children:["[",y.length,"]"]})]})]}),e.jsx("div",{className:"subtask-grid",children:y.map(s=>{const a=B.get(s.id)||[],t=w.has(s.id),b=t?a:a.slice(0,R),u=a.length-R;return e.jsxs("div",{className:"subtask-section",children:[e.jsxs("div",{className:"subtask-head",children:[e.jsx(g,{to:`/tasks/${s.slug||s.id}`,className:"subtask-head-name",children:N(s.name,s.slug)}),e.jsx("span",{className:"subtask-head-meta",children:a.length>0?`[${a.length} benchmark${a.length===1?"":"s"}]`:`[${(s.paper_count??0).toLocaleString()} papers]`})]}),b.length>0?b.map((r,p)=>e.jsxs("div",{className:"bench-row",onClick:()=>c(E(r.slug||r.id,s.slug||s.id)),children:[e.jsx("div",{className:"bench-row-num",children:String(p+1).padStart(2,"0")}),e.jsxs("div",{className:"bench-row-main",children:[e.jsx("div",{className:"bench-row-name",children:r.name}),e.jsx("div",{className:"bench-row-sub",children:r.paper_count!=null&&e.jsxs("span",{children:[e.jsx("strong",{children:r.paper_count})," ENTRIES"]})})]}),e.jsx("div",{className:"bench-row-arrow",children:"→"})]},r.id)):e.jsxs(g,{to:`/tasks/${s.slug||s.id}`,className:"subtask-summary",children:[e.jsxs("span",{children:[(s.paper_count??0).toLocaleString()," papers"]}),s.description&&e.jsx("span",{className:"subtask-summary-desc",children:s.description})]}),u>0&&e.jsx("button",{type:"button",className:"bench-show-more",onClick:()=>le(s.id),children:t?`− show top ${R}`:`+ show ${u} more benchmark${u===1?"":"s"}`})]},s.id)})})]}),e.jsxs("div",{className:"task-section-head",style:{marginTop:36},children:[e.jsx("div",{className:"task-section-eyebrow",children:"Top trending · sort below"}),e.jsxs("div",{className:"task-section-title",children:["Papers ",e.jsxs("span",{className:"meta",children:["[",(o.paper_count??0).toLocaleString(),"]"]})]})]}),e.jsx(xe,{feed:d}),e.jsx(je,{query:f,cards:Z,empty:d.dateRange.startDate||d.dateRange.endDate?"No papers in this task in this date range.":"No papers in this task yet."})]}),e.jsxs("aside",{className:"task-side",children:[C.length>0&&o.slug!=="healthcare"&&e.jsxs("div",{className:"side-block",children:[e.jsx("div",{className:"side-block-num",children:"01/"}),e.jsx("div",{className:"side-block-label",children:"Sister Tasks"}),C.slice(0,8).map(s=>e.jsxs(g,{to:`/tasks/${s.slug||s.id}`,className:"side-link-row",children:[e.jsx("span",{children:N(s.name,s.slug)}),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count.toLocaleString()})]},s.id))]}),$.length>0&&e.jsxs("div",{className:"side-block",children:[e.jsx("div",{className:"side-block-num",children:"02/"}),e.jsx("div",{className:"side-block-label",children:"Common Methods"}),$.map(s=>e.jsxs("div",{className:"side-method-row",children:[e.jsx(ge,{method:{slug:s.slug,name:s.name}}),e.jsxs("span",{className:"num",children:["·",s.count]})]},s.id))]})]})]})]})};export{Ie as HealthcareMedicalAiHub,Re as RecommendedFrameworkLinks,Le as TaskBreadcrumb,Ss as default}; diff --git a/assets/TagsIndexView-B8PyY2yF.js b/assets/TagsIndexView-CCfD3bxP.js similarity index 97% rename from assets/TagsIndexView-B8PyY2yF.js rename to assets/TagsIndexView-CCfD3bxP.js index b751e38730319578976748acbcb91d97f9bc013c..1de96e0f7555a54661192e7c6312c284aebda7ed 100644 --- a/assets/TagsIndexView-B8PyY2yF.js +++ b/assets/TagsIndexView-CCfD3bxP.js @@ -1,4 +1,4 @@ -import{c as e,b as s,f as g,j as a,L as z,q as j,T as p}from"./index-D2fBL-s6.js";import{c as k}from"./catalog-5AxvKr4D.js";import{c as v,h as u}from"./colors-BkWRhvFI.js";import{d as f}from"./transform-B_GaHMvk.js";import{s as S}from"./slug-BpH-Nkvz.js";import{S as L}from"./search-0R_Hc3S2.js";import{I as C,T as V}from"./triangle-alert-VQM9i8wl.js";import{S as A}from"./share-2-SmaUf3DC.js";import{T as H}from"./trending-up-DFLWFJuY.js";import{M as T}from"./moon-vNTgqlOp.js";import{T as F}from"./thumbs-up-BnMguJ3s.js";import{D as Z}from"./database-Ci0ufNyG.js";import{L as B}from"./link-2-DK2lGD4M.js";import{T as P}from"./trophy-DbAb1jY1.js";import{F as N}from"./file-text-CikzkPqz.js";import{A as D}from"./activity-DWWgzth6.js";import{G as E}from"./globe-BPKDvPgp.js";import{S as _}from"./sparkles-4rJdywIs.js";import{A as G,a as I}from"./alert-PnePcfgX.js";import{A as U,a as W,b as Q}from"./AreaSection-COKqvfmt.js";import{T as R}from"./TaxonomySuggestionTile-UxnpnHcy.js";import{u as $,T as K}from"./useHashScrollOnReady-C36cVkc9.js";import{s as O}from"./areas-Dvi8w2dp.js";import"./skeleton-BDwfco0_.js";import"./SignInToEditDialog-BBAwjxYj.js";import"./button-D0XfbdrX.js";import"./input-DdobyT4w.js";import"./textarea-B8b7WxcV.js";import"./searchable-select-CsXzzP_V.js";import"./popover-DS5Jzsg5.js";import"./dialog-DgUROq2j.js";import"./loader-circle-CoLo2trx.js";import"./useMutation-9dlTbuQj.js";import"./submissions-LRopJJKL.js";import"./plus-BI8-JXK0.js";/** +import{c as e,b as s,f as g,j as a,L as z,q as j,T as p}from"./index-BeSw2DVP.js";import{c as k}from"./catalog-D3XT9SmX.js";import{c as v,h as u}from"./colors-BkWRhvFI.js";import{d as f}from"./transform-BadO0Aba.js";import{s as S}from"./slug-BpH-Nkvz.js";import{S as L}from"./search-B4RgSU4h.js";import{I as C,T as V}from"./triangle-alert-1tg5iDLg.js";import{S as A}from"./share-2-CGSfn6ux.js";import{T as H}from"./trending-up-Bx9WuS-7.js";import{M as T}from"./moon-DNdxOMOb.js";import{T as F}from"./thumbs-up-DGIteJ7Z.js";import{D as Z}from"./database-stY-9KZX.js";import{L as B}from"./link-2-CGWO-evG.js";import{T as P}from"./trophy-D44BVGMf.js";import{F as N}from"./file-text-BHvaEohD.js";import{A as D}from"./activity-DCd4sApj.js";import{G as E}from"./globe-B-CTr8Vu.js";import{S as _}from"./sparkles-BjZnVOru.js";import{A as G,a as I}from"./alert-uwP129N7.js";import{A as U,a as W,b as Q}from"./AreaSection-DhnFgZsX.js";import{T as R}from"./TaxonomySuggestionTile-CEhbbEDc.js";import{u as $,T as K}from"./useHashScrollOnReady-BpiOpyLB.js";import{s as O}from"./areas-Dvi8w2dp.js";import"./skeleton-BBv4iC5Z.js";import"./SignInToEditDialog-DDBzf9N6.js";import"./button-CO2XYoBd.js";import"./input-B5SDgz8U.js";import"./textarea-VtGLPxu8.js";import"./searchable-select-C_dIHH-q.js";import"./popover-CYoFzAud.js";import"./dialog-EpDnY6a5.js";import"./loader-circle-C4luyo5I.js";import"./useMutation-CsS-RfeE.js";import"./submissions-D_EEKc6c.js";import"./plus-imZJbVTM.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/TaxonomySuggestionTile-UxnpnHcy.js b/assets/TaxonomySuggestionTile-CEhbbEDc.js similarity index 76% rename from assets/TaxonomySuggestionTile-UxnpnHcy.js rename to assets/TaxonomySuggestionTile-CEhbbEDc.js index 5bc3c8d292713f4cf4e649042af9c3b7414c3dcb..0547765f15e183df344eac9e632b18d33b855310 100644 --- a/assets/TaxonomySuggestionTile-UxnpnHcy.js +++ b/assets/TaxonomySuggestionTile-CEhbbEDc.js @@ -1 +1 @@ -import{a as u,f as t,j as e}from"./index-D2fBL-s6.js";import{S as c,a as m}from"./SignInToEditDialog-BBAwjxYj.js";import{P as p}from"./plus-BI8-JXK0.js";function f({kind:s}){const{user:a}=u(),[i,n]=t.useState(!1),[l,o]=t.useState(!1),r=`Suggest a new ${s}...`,g=()=>{a?n(!0):o(!0)};return e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",className:"tag-cell taxonomy-suggestion-cell",onClick:g,children:[e.jsxs("div",{className:"name",children:[e.jsx(p,{className:"taxonomy-suggestion-icon","aria-hidden":"true"}),r]}),e.jsx("div",{className:"meta",children:e.jsx("span",{children:"Propose an addition"})})]}),e.jsx(c,{open:i,onOpenChange:n,kind:s}),e.jsx(m,{open:l,onOpenChange:o,sectionLabel:`${s}s`,returnTo:typeof window<"u"?window.location.pathname:`/${s}s`,taxonomySuggestion:!0})]})}export{f as T}; +import{a as u,f as t,j as e}from"./index-BeSw2DVP.js";import{S as c,a as m}from"./SignInToEditDialog-DDBzf9N6.js";import{P as p}from"./plus-imZJbVTM.js";function f({kind:s}){const{user:a}=u(),[i,n]=t.useState(!1),[l,o]=t.useState(!1),r=`Suggest a new ${s}...`,g=()=>{a?n(!0):o(!0)};return e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",className:"tag-cell taxonomy-suggestion-cell",onClick:g,children:[e.jsxs("div",{className:"name",children:[e.jsx(p,{className:"taxonomy-suggestion-icon","aria-hidden":"true"}),r]}),e.jsx("div",{className:"meta",children:e.jsx("span",{children:"Propose an addition"})})]}),e.jsx(c,{open:i,onOpenChange:n,kind:s}),e.jsx(m,{open:l,onOpenChange:o,sectionLabel:`${s}s`,returnTo:typeof window<"u"?window.location.pathname:`/${s}s`,taxonomySuggestion:!0})]})}export{f as T}; diff --git a/assets/TopicView-Dcpv-HZh.js b/assets/TopicView-B1L4_v00.js similarity index 88% rename from assets/TopicView-Dcpv-HZh.js rename to assets/TopicView-B1L4_v00.js index d00be156653215e77674c3b13e588e5a56099e4a..89e733bc2284475674224eb5d4b1e004c482922b 100644 --- a/assets/TopicView-Dcpv-HZh.js +++ b/assets/TopicView-B1L4_v00.js @@ -1,4 +1,4 @@ -import{c as S,u as _,d as y,e as D,b as R,r as j,f as u,j as e,L as $,i as A,h as E,C as I,A as P}from"./index-D2fBL-s6.js";import{r as q,P as g,a as M,w as z}from"./PaperFeed-BERxHjrg.js";import{S as f}from"./skeleton-BDwfco0_.js";import{u as B}from"./usePapers-CAjdcUuj.js";import{r as b,T as N,t as k,a as F,u as H,b as O,c as Q,s as U}from"./researchTopic-jOpECA0z.js";import{t as G}from"./transform-B_GaHMvk.js";import{P as v}from"./plus-BI8-JXK0.js";import{L as K}from"./link-2-DK2lGD4M.js";import"./PaperCard-DhorusY5.js";import"./AuthorAvatar-C8tz_syh.js";import"./SotaBadges-r6iGzLRW.js";import"./colors-BkWRhvFI.js";import"./Icon-Uhh78KjL.js";import"./LatexTitle-WIQJ1ke0.js";import"./papers-khuZaSFb.js";import"./curation-BtfabyzA.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-DS5Jzsg5.js";import"./useIntersectionObserver-C0Rq0EXm.js";import"./useInfiniteQuery-CjJA-90e.js";import"./useMutation-9dlTbuQj.js";/** +import{c as S,u as _,d as y,e as D,b as R,r as j,f as u,j as e,L as $,i as A,h as E,C as I,A as P}from"./index-BeSw2DVP.js";import{r as q,P as g,a as M,w as z}from"./PaperFeed-Cge1MWHJ.js";import{S as f}from"./skeleton-BBv4iC5Z.js";import{u as B}from"./usePapers-Cj1tt_u6.js";import{r as b,T as N,t as k,a as F,u as H,b as O,c as Q,s as U}from"./researchTopic-Cb4NrTKj.js";import{t as G}from"./transform-BadO0Aba.js";import{P as v}from"./plus-imZJbVTM.js";import{L as K}from"./link-2-CGWO-evG.js";import"./PaperCard-Dx07g-aj.js";import"./AuthorAvatar-Dpan5W1F.js";import"./SotaBadges-FMpqi2HS.js";import"./colors-BkWRhvFI.js";import"./Icon-BWcOShxk.js";import"./LatexTitle-C5yrYbA-.js";import"./papers-B58HJw9r.js";import"./curation-CCIsdsjV.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-CYoFzAud.js";import"./useIntersectionObserver-BBx3EHQ9.js";import"./useInfiniteQuery-C8JHYWz5.js";import"./useMutation-CsS-RfeE.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/TrendsView-BuSUElxo.js b/assets/TrendsView-Dh0c9hMm.js similarity index 97% rename from assets/TrendsView-BuSUElxo.js rename to assets/TrendsView-Dh0c9hMm.js index ae74e44ffeb2398879bdf2d24ba751077e1510b9..85776f47644660271e4bf2b4f168b885acf1cf01 100644 --- a/assets/TrendsView-BuSUElxo.js +++ b/assets/TrendsView-Dh0c9hMm.js @@ -1 +1 @@ -import{V as I,j as e,ac as X,b as G}from"./index-D2fBL-s6.js";import{A as J,a as V}from"./alert-PnePcfgX.js";import{S as P}from"./skeleton-BDwfco0_.js";const m=t=>{const r=/^(\d{4})-(0[1-9]|1[0-2])$/.exec(t);if(!r)return t;const[,s,l]=r;return`${["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][Number(l)-1]} '${s.slice(2)}`},g=980,j=400,x=62,B=26,f=30,E=58,u=g-x-B,A=j-f-E,v=f+A,Q=t=>{if(t.length<3)return t.map((s,l)=>`${l?"L":"M"}${s[0]} ${s[1]}`).join(" ");let r=`M${t[0][0]} ${t[0][1]}`;for(let s=0;s{const[a,y]=I.useState(null),i=r.length,b=l[l.length-1],d=n=>x+u*(i===1?0:n/(i-1)),p=n=>f+A*(1-n/b);if(i===0)return null;const R=r.map((n,h)=>[d(h),p(n.percent)]),F=Q(R),_=`${F} L ${d(i-1)} ${v} L ${x} ${v} Z`,w=i<=12?1:Math.ceil(i/8),O=n=>{const h=n.currentTarget.getBoundingClientRect(),S=(n.clientX-h.left)/h.width*g,k=i>1?u/(i-1):u,q=Math.max(0,Math.min(i-1,Math.round((S-x)/k)));y(q)},H=`trend-gradient-${t}`;return e.jsxs("figure",{className:"trend-chart",children:[e.jsxs("div",{className:"trend-chart-visual",children:[e.jsxs("svg",{viewBox:`0 0 ${g} ${j}`,width:"100%",role:"img","aria-label":`${c} by ${o.toLowerCase()}, from ${m(r[0].month)} (${r[0].percent}%) to ${m(r[i-1].month)} (${r[i-1].percent}%)`,style:{display:"block",overflow:"visible",cursor:"crosshair"},onPointerMove:O,onPointerLeave:()=>y(null),children:[e.jsx("defs",{children:e.jsxs("linearGradient",{id:H,x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",style:{stopColor:s,stopOpacity:.26}}),e.jsx("stop",{offset:"100%",style:{stopColor:s,stopOpacity:.02}})]})}),l.map(n=>e.jsxs("g",{children:[e.jsx("line",{x1:x,x2:g-B,y1:p(n),y2:p(n),stroke:"var(--hairline)",strokeWidth:1}),e.jsxs("text",{x:x-14,y:p(n)+4,textAnchor:"end",style:W,children:[n,"%"]})]},n)),e.jsx("path",{d:_,fill:`url(#${H})`}),e.jsx("path",{d:F,fill:"none",stroke:s,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round"}),r.map((n,h)=>{const S=h===i-1,k=h%w===0&&i-1-h>=w/2;return!S&&!k?null:e.jsx("text",{x:d(h),y:v+24,textAnchor:"middle",style:W,children:m(n.month)},n.month)}),e.jsx("text",{x:x+u/2,y:j-4,textAnchor:"middle",style:z,children:o}),e.jsx("text",{transform:`translate(16 ${f+A/2}) rotate(-90)`,textAnchor:"middle",style:z,children:c}),a!=null&&e.jsxs(e.Fragment,{children:[e.jsx("line",{x1:d(a),x2:d(a),y1:f,y2:v,stroke:s,strokeWidth:1,strokeDasharray:"3 4",opacity:.5}),e.jsx("circle",{cx:d(a),cy:p(r[a].percent),r:5,fill:"var(--bg)",stroke:s,strokeWidth:2})]})]}),a!=null&&e.jsxs("div",{style:{position:"absolute",left:`${d(a)/g*100}%`,top:`${p(r[a].percent)/j*100}%`,transform:"translate(-50%, calc(-100% - 14px))",background:"var(--bg-elevated)",border:"1px solid var(--hairline)",borderRadius:6,boxShadow:"0 8px 26px rgba(0,0,0,.13)",padding:"7px 12px",pointerEvents:"none",whiteSpace:"nowrap",zIndex:3},children:[e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",color:"var(--ink-faint)",fontSize:13,marginBottom:2},children:m(r[a].month)}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:7,fontFamily:"var(--mono)",fontWeight:600,fontSize:15,color:"var(--ink)"},children:[e.jsx("span",{style:{width:8,height:8,borderRadius:2,background:s,display:"inline-block"}}),r[a].percent,"%"]})]})]}),e.jsxs("details",{className:"trend-chart-table",children:[e.jsx("summary",{style:{fontFamily:"var(--mono)",fontSize:11,letterSpacing:"0.04em",color:"var(--ink-faint)",cursor:"pointer"},children:"View data table"}),e.jsxs("table",{style:{marginTop:8,borderCollapse:"collapse",fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{style:{textAlign:"left",padding:"3px 18px 3px 0"},children:o}),e.jsx("th",{style:{textAlign:"right",padding:"3px 0"},children:c})]})}),e.jsx("tbody",{children:r.map(n=>e.jsxs("tr",{children:[e.jsx("td",{style:{padding:"2px 18px 2px 0"},children:m(n.month)}),e.jsxs("td",{style:{textAlign:"right",padding:"2px 0"},children:[n.percent,"%"]})]},n.month))})]})]})]})};class Y{constructor(r){this.request=r}trends(){return this.request("/stats/trends")}}const K=new Y(X),$={maxWidth:960,padding:"48px 0 8px",borderTop:"1px solid var(--hairline)",marginTop:48},T={fontFamily:"var(--serif)",fontSize:34,fontWeight:500,letterSpacing:"-0.02em",margin:"0 0 10px",color:"var(--ink)"},M={fontFamily:"var(--serif)",fontSize:18,lineHeight:1.55,color:"var(--ink-soft)",maxWidth:620,margin:"0 0 8px"},C={fontFamily:"var(--mono)",fontSize:12,fontWeight:600,letterSpacing:"0.14em",textTransform:"uppercase",color:"var(--ink-faint)",marginBottom:8},N={fontFamily:"var(--serif)",fontSize:17,lineHeight:1.6,color:"var(--ink-soft)",margin:0},D={height:320,marginTop:26},te=()=>{const t=G({queryKey:["research-trends"],queryFn:()=>K.trends(),staleTime:36e5});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:["Research ",e.jsx("em",{children:"Trends"})]}),e.jsx("div",{className:"feed-subtitle",children:"How open science is changing across machine learning — tracked over time from arXiv and the Hugging Face Hub."})]})}),t.error&&e.jsx(J,{variant:"destructive",children:e.jsx(V,{children:"Failed to load research trends. Please try again."})}),e.jsxs("section",{style:$,children:[e.jsx("h2",{style:T,children:"Code Availability"}),e.jsx("p",{style:M,children:"The percentage of published papers that have at least one official code implementation on GitHub."}),e.jsx("div",{style:{marginTop:26},children:t.data?e.jsx(L,{id:"code",data:t.data.code_availability,color:"var(--trend-code)",yTicks:[0,20,40,60,80],yLabel:"Code Availability",xLabel:"Paper Publication Date"}):!t.error&&e.jsx(P,{style:D})})]}),e.jsxs("section",{style:$,children:[e.jsx("h2",{style:T,children:"Papers with Hugging Face artifacts"}),e.jsx("p",{style:M,children:"The percentage of published papers linked to at least one Hugging Face artifact — a model, dataset or Space — making the work directly runnable and reusable."}),e.jsx("div",{style:{marginTop:26},children:t.data?e.jsx(L,{id:"hf",data:t.data.hf_artifacts,color:"var(--trend-hf)",yTicks:[0,10,20,30,40,50],yLabel:"HF Artifact Coverage",xLabel:"Paper Publication Date"}):!t.error&&e.jsx(P,{style:D})})]}),e.jsxs("section",{style:{...$,paddingBottom:72},children:[e.jsx("h2",{style:{...T,fontSize:27},children:"How the data is collected"}),e.jsxs("div",{style:{display:"grid",gap:24,maxWidth:680},children:[e.jsxs("div",{children:[e.jsx("div",{style:C,children:"Code Availability"}),e.jsx("p",{style:N,children:"For every open-access machine learning paper, we check whether an official code implementation is linked on GitHub. The date axis is the paper's publication date."})]}),e.jsxs("div",{children:[e.jsx("div",{style:C,children:"Hugging Face artifacts"}),e.jsx("p",{style:N,children:"We resolve links between papers and the Hugging Face Hub, counting a paper as covered when it references at least one model, dataset or Space. The date axis is the paper's publication date."})]}),e.jsx("p",{style:{fontFamily:"var(--mono)",fontSize:12,lineHeight:1.6,color:"var(--ink-faint)",margin:"8px 0 0",letterSpacing:"0.02em"},children:"Figures use complete publication months. Historical Hugging Face coverage reflects artifacts currently linked in the catalog."})]})]})]})};export{te as default}; +import{V as I,j as e,ac as X,b as G}from"./index-BeSw2DVP.js";import{A as J,a as V}from"./alert-uwP129N7.js";import{S as P}from"./skeleton-BBv4iC5Z.js";const m=t=>{const r=/^(\d{4})-(0[1-9]|1[0-2])$/.exec(t);if(!r)return t;const[,s,l]=r;return`${["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][Number(l)-1]} '${s.slice(2)}`},g=980,j=400,x=62,B=26,f=30,E=58,u=g-x-B,A=j-f-E,v=f+A,Q=t=>{if(t.length<3)return t.map((s,l)=>`${l?"L":"M"}${s[0]} ${s[1]}`).join(" ");let r=`M${t[0][0]} ${t[0][1]}`;for(let s=0;s{const[a,y]=I.useState(null),i=r.length,b=l[l.length-1],d=n=>x+u*(i===1?0:n/(i-1)),p=n=>f+A*(1-n/b);if(i===0)return null;const R=r.map((n,h)=>[d(h),p(n.percent)]),F=Q(R),_=`${F} L ${d(i-1)} ${v} L ${x} ${v} Z`,w=i<=12?1:Math.ceil(i/8),O=n=>{const h=n.currentTarget.getBoundingClientRect(),S=(n.clientX-h.left)/h.width*g,k=i>1?u/(i-1):u,q=Math.max(0,Math.min(i-1,Math.round((S-x)/k)));y(q)},H=`trend-gradient-${t}`;return e.jsxs("figure",{className:"trend-chart",children:[e.jsxs("div",{className:"trend-chart-visual",children:[e.jsxs("svg",{viewBox:`0 0 ${g} ${j}`,width:"100%",role:"img","aria-label":`${c} by ${o.toLowerCase()}, from ${m(r[0].month)} (${r[0].percent}%) to ${m(r[i-1].month)} (${r[i-1].percent}%)`,style:{display:"block",overflow:"visible",cursor:"crosshair"},onPointerMove:O,onPointerLeave:()=>y(null),children:[e.jsx("defs",{children:e.jsxs("linearGradient",{id:H,x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",style:{stopColor:s,stopOpacity:.26}}),e.jsx("stop",{offset:"100%",style:{stopColor:s,stopOpacity:.02}})]})}),l.map(n=>e.jsxs("g",{children:[e.jsx("line",{x1:x,x2:g-B,y1:p(n),y2:p(n),stroke:"var(--hairline)",strokeWidth:1}),e.jsxs("text",{x:x-14,y:p(n)+4,textAnchor:"end",style:W,children:[n,"%"]})]},n)),e.jsx("path",{d:_,fill:`url(#${H})`}),e.jsx("path",{d:F,fill:"none",stroke:s,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round"}),r.map((n,h)=>{const S=h===i-1,k=h%w===0&&i-1-h>=w/2;return!S&&!k?null:e.jsx("text",{x:d(h),y:v+24,textAnchor:"middle",style:W,children:m(n.month)},n.month)}),e.jsx("text",{x:x+u/2,y:j-4,textAnchor:"middle",style:z,children:o}),e.jsx("text",{transform:`translate(16 ${f+A/2}) rotate(-90)`,textAnchor:"middle",style:z,children:c}),a!=null&&e.jsxs(e.Fragment,{children:[e.jsx("line",{x1:d(a),x2:d(a),y1:f,y2:v,stroke:s,strokeWidth:1,strokeDasharray:"3 4",opacity:.5}),e.jsx("circle",{cx:d(a),cy:p(r[a].percent),r:5,fill:"var(--bg)",stroke:s,strokeWidth:2})]})]}),a!=null&&e.jsxs("div",{style:{position:"absolute",left:`${d(a)/g*100}%`,top:`${p(r[a].percent)/j*100}%`,transform:"translate(-50%, calc(-100% - 14px))",background:"var(--bg-elevated)",border:"1px solid var(--hairline)",borderRadius:6,boxShadow:"0 8px 26px rgba(0,0,0,.13)",padding:"7px 12px",pointerEvents:"none",whiteSpace:"nowrap",zIndex:3},children:[e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",color:"var(--ink-faint)",fontSize:13,marginBottom:2},children:m(r[a].month)}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:7,fontFamily:"var(--mono)",fontWeight:600,fontSize:15,color:"var(--ink)"},children:[e.jsx("span",{style:{width:8,height:8,borderRadius:2,background:s,display:"inline-block"}}),r[a].percent,"%"]})]})]}),e.jsxs("details",{className:"trend-chart-table",children:[e.jsx("summary",{style:{fontFamily:"var(--mono)",fontSize:11,letterSpacing:"0.04em",color:"var(--ink-faint)",cursor:"pointer"},children:"View data table"}),e.jsxs("table",{style:{marginTop:8,borderCollapse:"collapse",fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{style:{textAlign:"left",padding:"3px 18px 3px 0"},children:o}),e.jsx("th",{style:{textAlign:"right",padding:"3px 0"},children:c})]})}),e.jsx("tbody",{children:r.map(n=>e.jsxs("tr",{children:[e.jsx("td",{style:{padding:"2px 18px 2px 0"},children:m(n.month)}),e.jsxs("td",{style:{textAlign:"right",padding:"2px 0"},children:[n.percent,"%"]})]},n.month))})]})]})]})};class Y{constructor(r){this.request=r}trends(){return this.request("/stats/trends")}}const K=new Y(X),$={maxWidth:960,padding:"48px 0 8px",borderTop:"1px solid var(--hairline)",marginTop:48},T={fontFamily:"var(--serif)",fontSize:34,fontWeight:500,letterSpacing:"-0.02em",margin:"0 0 10px",color:"var(--ink)"},M={fontFamily:"var(--serif)",fontSize:18,lineHeight:1.55,color:"var(--ink-soft)",maxWidth:620,margin:"0 0 8px"},C={fontFamily:"var(--mono)",fontSize:12,fontWeight:600,letterSpacing:"0.14em",textTransform:"uppercase",color:"var(--ink-faint)",marginBottom:8},N={fontFamily:"var(--serif)",fontSize:17,lineHeight:1.6,color:"var(--ink-soft)",margin:0},D={height:320,marginTop:26},te=()=>{const t=G({queryKey:["research-trends"],queryFn:()=>K.trends(),staleTime:36e5});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:["Research ",e.jsx("em",{children:"Trends"})]}),e.jsx("div",{className:"feed-subtitle",children:"How open science is changing across machine learning — tracked over time from arXiv and the Hugging Face Hub."})]})}),t.error&&e.jsx(J,{variant:"destructive",children:e.jsx(V,{children:"Failed to load research trends. Please try again."})}),e.jsxs("section",{style:$,children:[e.jsx("h2",{style:T,children:"Code Availability"}),e.jsx("p",{style:M,children:"The percentage of published papers that have at least one official code implementation on GitHub."}),e.jsx("div",{style:{marginTop:26},children:t.data?e.jsx(L,{id:"code",data:t.data.code_availability,color:"var(--trend-code)",yTicks:[0,20,40,60,80],yLabel:"Code Availability",xLabel:"Paper Publication Date"}):!t.error&&e.jsx(P,{style:D})})]}),e.jsxs("section",{style:$,children:[e.jsx("h2",{style:T,children:"Papers with Hugging Face artifacts"}),e.jsx("p",{style:M,children:"The percentage of published papers linked to at least one Hugging Face artifact — a model, dataset or Space — making the work directly runnable and reusable."}),e.jsx("div",{style:{marginTop:26},children:t.data?e.jsx(L,{id:"hf",data:t.data.hf_artifacts,color:"var(--trend-hf)",yTicks:[0,10,20,30,40,50],yLabel:"HF Artifact Coverage",xLabel:"Paper Publication Date"}):!t.error&&e.jsx(P,{style:D})})]}),e.jsxs("section",{style:{...$,paddingBottom:72},children:[e.jsx("h2",{style:{...T,fontSize:27},children:"How the data is collected"}),e.jsxs("div",{style:{display:"grid",gap:24,maxWidth:680},children:[e.jsxs("div",{children:[e.jsx("div",{style:C,children:"Code Availability"}),e.jsx("p",{style:N,children:"For every open-access machine learning paper, we check whether an official code implementation is linked on GitHub. The date axis is the paper's publication date."})]}),e.jsxs("div",{children:[e.jsx("div",{style:C,children:"Hugging Face artifacts"}),e.jsx("p",{style:N,children:"We resolve links between papers and the Hugging Face Hub, counting a paper as covered when it references at least one model, dataset or Space. The date axis is the paper's publication date."})]}),e.jsx("p",{style:{fontFamily:"var(--mono)",fontSize:12,lineHeight:1.6,color:"var(--ink-faint)",margin:"8px 0 0",letterSpacing:"0.02em"},children:"Figures use complete publication months. Historical Hugging Face coverage reflects artifacts currently linked in the catalog."})]})]})]})};export{te as default}; diff --git a/assets/UserProfileView-y4tNT8rK.js b/assets/UserProfileView-D_mh3ZLC.js similarity index 89% rename from assets/UserProfileView-y4tNT8rK.js rename to assets/UserProfileView-D_mh3ZLC.js index 2ae80e976cea70b0d2dbf3c52758779e1d826b17..ff08d77b1dd528adc564cb44e576c74bef59b953 100644 --- a/assets/UserProfileView-y4tNT8rK.js +++ b/assets/UserProfileView-D_mh3ZLC.js @@ -1 +1 @@ -import{az as n,u as i,b as o,j as e,ao as d}from"./index-D2fBL-s6.js";import{C as l}from"./OrganizationContributionGraph-BFOi-mI4.js";import"./skeleton-BDwfco0_.js";import"./catalog-5AxvKr4D.js";const c={async get(s){const a=await n(`/profiles/${encodeURIComponent(s)}`),r=await a.json();if(!a.redirected)return r;const t=decodeURIComponent(new URL(a.url).pathname.split("/").pop()||r.username);return{...r,username:t,redirected_from_alias:!0}}},x=()=>{const{username:s=""}=i(),a=o({queryKey:["user-profile",s.toLowerCase()],queryFn:()=>c.get(s)});return a.isLoading?e.jsx("div",{className:"page",children:"Loading profile…"}):a.data?a.data.redirected_from_alias?e.jsx(d,{to:`/${a.data.username}`,replace:!0}):e.jsxs("div",{className:"page",style:{maxWidth:960},children:[e.jsxs("h1",{children:["@",a.data.username]}),e.jsx("p",{children:"Canonical Papers with Code contributions"}),e.jsx(l,{data:a.data.calendar,organizationName:`@${a.data.username}`,title:"Canonical contributions",noun:"contribution"}),a.data.is_owner&&e.jsxs("section",{className:"mt-10",children:[e.jsx("h2",{children:"Your submissions"}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Limits and duplicate behavior are documented on ",e.jsx("a",{href:"/rate-limits",children:"the policy page"}),"."]}),e.jsx("div",{className:"mt-4 space-y-3",children:a.data.submissions.map(r=>e.jsxs("article",{className:"rounded-md border p-4",children:[e.jsx("strong",{children:r.edit_type})," · ",r.status,e.jsxs("details",{className:"mt-2 text-xs",children:[e.jsx("summary",{children:"Original and applied payload"}),e.jsx("pre",{children:JSON.stringify({proposed:r.proposed_payload,applied:r.applied_payload},null,2)})]}),r.review_reason&&e.jsx("p",{children:r.review_reason})]},r.id))})]})]}):e.jsx("div",{className:"page",children:e.jsx("h1",{children:"Profile not found"})})};export{x as default}; +import{az as n,u as i,b as o,j as e,ao as d}from"./index-BeSw2DVP.js";import{C as l}from"./OrganizationContributionGraph-D-wuKwmH.js";import"./skeleton-BBv4iC5Z.js";import"./catalog-D3XT9SmX.js";const c={async get(s){const a=await n(`/profiles/${encodeURIComponent(s)}`),r=await a.json();if(!a.redirected)return r;const t=decodeURIComponent(new URL(a.url).pathname.split("/").pop()||r.username);return{...r,username:t,redirected_from_alias:!0}}},x=()=>{const{username:s=""}=i(),a=o({queryKey:["user-profile",s.toLowerCase()],queryFn:()=>c.get(s)});return a.isLoading?e.jsx("div",{className:"page",children:"Loading profile…"}):a.data?a.data.redirected_from_alias?e.jsx(d,{to:`/${a.data.username}`,replace:!0}):e.jsxs("div",{className:"page",style:{maxWidth:960},children:[e.jsxs("h1",{children:["@",a.data.username]}),e.jsx("p",{children:"Canonical Papers with Code contributions"}),e.jsx(l,{data:a.data.calendar,organizationName:`@${a.data.username}`,title:"Canonical contributions",noun:"contribution"}),a.data.is_owner&&e.jsxs("section",{className:"mt-10",children:[e.jsx("h2",{children:"Your submissions"}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Limits and duplicate behavior are documented on ",e.jsx("a",{href:"/rate-limits",children:"the policy page"}),"."]}),e.jsx("div",{className:"mt-4 space-y-3",children:a.data.submissions.map(r=>e.jsxs("article",{className:"rounded-md border p-4",children:[e.jsx("strong",{children:r.edit_type})," · ",r.status,e.jsxs("details",{className:"mt-2 text-xs",children:[e.jsx("summary",{children:"Original and applied payload"}),e.jsx("pre",{children:JSON.stringify({proposed:r.proposed_payload,applied:r.applied_payload},null,2)})]}),r.review_reason&&e.jsx("p",{children:r.review_reason})]},r.id))})]})]}):e.jsx("div",{className:"page",children:e.jsx("h1",{children:"Profile not found"})})};export{x as default}; diff --git a/assets/account-BHlQBDNT.js b/assets/account-B-4MwKsq.js similarity index 89% rename from assets/account-BHlQBDNT.js rename to assets/account-B-4MwKsq.js index 5a539052bbc35bf17f169643ac6fcfd0e85e3d1b..3e02e6b6a8c1be82172146cf31922e3c4072fda5 100644 --- a/assets/account-BHlQBDNT.js +++ b/assets/account-B-4MwKsq.js @@ -1 +1 @@ -import{ac as r}from"./index-D2fBL-s6.js";class t{constructor(e){this.request=e}getPreferences(){return this.request("/me/preferences")}updatePreferences(e){return this.request("/me/preferences",{method:"PUT",body:JSON.stringify(e)})}getRateLimitPolicy(){return this.request("/rate-limits",{credentials:"omit"})}getBookmarkIds(){return this.request("/me/bookmarks/ids")}getBookmarks(){return this.request("/me/bookmarks")}addBookmark(e){return this.request(`/me/bookmarks/${e}`,{method:"POST"})}removeBookmark(e){return this.request(`/me/bookmarks/${e}`,{method:"DELETE"})}}const m=new t(r);export{m as a}; +import{ac as r}from"./index-BeSw2DVP.js";class t{constructor(e){this.request=e}getPreferences(){return this.request("/me/preferences")}updatePreferences(e){return this.request("/me/preferences",{method:"PUT",body:JSON.stringify(e)})}getRateLimitPolicy(){return this.request("/rate-limits",{credentials:"omit"})}getBookmarkIds(){return this.request("/me/bookmarks/ids")}getBookmarks(){return this.request("/me/bookmarks")}addBookmark(e){return this.request(`/me/bookmarks/${e}`,{method:"POST"})}removeBookmark(e){return this.request(`/me/bookmarks/${e}`,{method:"DELETE"})}}const m=new t(r);export{m as a}; diff --git a/assets/activity-DWWgzth6.js b/assets/activity-DCd4sApj.js similarity index 89% rename from assets/activity-DWWgzth6.js rename to assets/activity-DCd4sApj.js index 4f269976fbdf207e7ee268b4d4fab805e1b7c999..b3dd595adbc7711d8b5d5e8fe3d3040554ac2f82 100644 --- a/assets/activity-DWWgzth6.js +++ b/assets/activity-DCd4sApj.js @@ -1,4 +1,4 @@ -import{c as t}from"./index-D2fBL-s6.js";/** +import{c as t}from"./index-BeSw2DVP.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/alert-PnePcfgX.js b/assets/alert-uwP129N7.js similarity index 92% rename from assets/alert-PnePcfgX.js rename to assets/alert-uwP129N7.js index fed4fce6cdd766343e6de06f8f19a3fb6a2bf2c2..45c85b725a5feb87a251239da798498206d43742 100644 --- a/assets/alert-PnePcfgX.js +++ b/assets/alert-uwP129N7.js @@ -1 +1 @@ -import{f as r,j as s,I as l,ae as i}from"./index-D2fBL-s6.js";const o=i("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),n=r.forwardRef(({className:e,variant:t,...a},d)=>s.jsx("div",{ref:d,role:"alert",className:l(o({variant:t}),e),...a}));n.displayName="Alert";const v=r.forwardRef(({className:e,...t},a)=>s.jsx("h5",{ref:a,className:l("mb-1 font-medium leading-none tracking-tight",e),...t}));v.displayName="AlertTitle";const c=r.forwardRef(({className:e,...t},a)=>s.jsx("div",{ref:a,className:l("text-sm [&_p]:leading-relaxed",e),...t}));c.displayName="AlertDescription";export{n as A,c as a}; +import{f as r,j as s,I as l,ae as i}from"./index-BeSw2DVP.js";const o=i("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),n=r.forwardRef(({className:e,variant:t,...a},d)=>s.jsx("div",{ref:d,role:"alert",className:l(o({variant:t}),e),...a}));n.displayName="Alert";const v=r.forwardRef(({className:e,...t},a)=>s.jsx("h5",{ref:a,className:l("mb-1 font-medium leading-none tracking-tight",e),...t}));v.displayName="AlertTitle";const c=r.forwardRef(({className:e,...t},a)=>s.jsx("div",{ref:a,className:l("text-sm [&_p]:leading-relaxed",e),...t}));c.displayName="AlertDescription";export{n as A,c as a}; diff --git a/assets/apiErrors-CXiv7lxc.js b/assets/apiErrors-CXiv7lxc.js new file mode 100644 index 0000000000000000000000000000000000000000..b0a9034aac9599d7d78bf2ebbce3f28813855ae3 --- /dev/null +++ b/assets/apiErrors-CXiv7lxc.js @@ -0,0 +1 @@ +import{A as s}from"./index-BeSw2DVP.js";const i=o=>o instanceof s&&o.status===404;export{i}; diff --git a/assets/apiErrors-DV2aaDjL.js b/assets/apiErrors-DV2aaDjL.js deleted file mode 100644 index 49bbf124e02a99d5e694a1e853e7caefddac4c2e..0000000000000000000000000000000000000000 --- a/assets/apiErrors-DV2aaDjL.js +++ /dev/null @@ -1 +0,0 @@ -import{A as s}from"./index-D2fBL-s6.js";const i=o=>o instanceof s&&o.status===404;export{i}; diff --git a/assets/arrow-left-CzTG6LBL.js b/assets/arrow-left-C-qXYpsS.js similarity index 86% rename from assets/arrow-left-CzTG6LBL.js rename to assets/arrow-left-C-qXYpsS.js index 125e05879f9e08548ee3c626e6610a0baf9933f3..fc35d7e9f77e03ff61ae321122b408e96a1ec581 100644 --- a/assets/arrow-left-CzTG6LBL.js +++ b/assets/arrow-left-C-qXYpsS.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-D2fBL-s6.js";/** +import{c as e}from"./index-BeSw2DVP.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/arrow-right-COzkrAUH.js b/assets/arrow-right-3wBGidD3.js similarity index 86% rename from assets/arrow-right-COzkrAUH.js rename to assets/arrow-right-3wBGidD3.js index 083f2f93be4377dfa98dcbcea883ffbad964b18d..ec1e5ab59a6ba4ebfccce2861d6442dc8fdf3263 100644 --- a/assets/arrow-right-COzkrAUH.js +++ b/assets/arrow-right-3wBGidD3.js @@ -1,4 +1,4 @@ -import{c as r}from"./index-D2fBL-s6.js";/** +import{c as r}from"./index-BeSw2DVP.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/badge-Pw584nS3.js b/assets/badge-PwLfXWCy.js similarity index 90% rename from assets/badge-Pw584nS3.js rename to assets/badge-PwLfXWCy.js index e6171bda55b67c8c2da89ce147293526aa83da2e..e45a4e15dfb6b4e535c9e926ab768b60e8ace62d 100644 --- a/assets/badge-Pw584nS3.js +++ b/assets/badge-PwLfXWCy.js @@ -1 +1 @@ -import{j as n,I as o,ae as a}from"./index-D2fBL-s6.js";const s=a("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function d({className:r,variant:e,...t}){return n.jsx("div",{className:o(s({variant:e}),r),...t})}export{d as B}; +import{j as n,I as o,ae as a}from"./index-BeSw2DVP.js";const s=a("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function d({className:r,variant:e,...t}){return n.jsx("div",{className:o(s({variant:e}),r),...t})}export{d as B}; diff --git a/assets/button-D0XfbdrX.js b/assets/button-CO2XYoBd.js similarity index 89% rename from assets/button-D0XfbdrX.js rename to assets/button-CO2XYoBd.js index 7651b6f492fd362294c6b8c061609e3799924037..bac255381a445c5977e91f6199618b5f95b7d67f 100644 --- a/assets/button-D0XfbdrX.js +++ b/assets/button-CO2XYoBd.js @@ -1 +1 @@ -import{f as a,j as d,aA as u,I as c,ae as f}from"./index-D2fBL-s6.js";const g=f("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),v=a.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},s)=>{const i=n?u:"button";return d.jsx(i,{className:c(g({variant:t,size:r,className:e})),ref:s,...o})});v.displayName="Button";export{v as B}; +import{f as a,j as d,aA as u,I as c,ae as f}from"./index-BeSw2DVP.js";const g=f("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),v=a.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},s)=>{const i=n?u:"button";return d.jsx(i,{className:c(g({variant:t,size:r,className:e})),ref:s,...o})});v.displayName="Button";export{v as B}; diff --git a/assets/catalog-5AxvKr4D.js b/assets/catalog-D3XT9SmX.js similarity index 97% rename from assets/catalog-5AxvKr4D.js rename to assets/catalog-D3XT9SmX.js index df3d72e66e6fab5c6da9af79fcb691e4de5a274f..445490764a3574dc76837a35b884fb932858e405 100644 --- a/assets/catalog-5AxvKr4D.js +++ b/assets/catalog-D3XT9SmX.js @@ -1 +1 @@ -import{ac as o}from"./index-D2fBL-s6.js";function s(a,e){const t=new URLSearchParams;for(const[i,n]of Object.entries(e??{}))n!==void 0&&n!==""&&t.set(i,String(n));const r=t.toString();return`${a}${r?`?${r}`:""}`}class u{constructor(e){this.request=e}listAreas(e){return this.request(s("/areas/",e))}getArea(e){return this.request(`/areas/${e}`)}areasWithTasks(){return this.request("/areas/with-tasks/")}listTasks(e){return this.request(s("/tasks/",e))}getTask(e){return this.request(`/tasks/${e}`)}topTasks(e){return this.request(s("/tasks/top",{limit:e}))}trendingTasks(e){return this.request(s("/tasks/trending",e))}taskChildren(e,t){return this.request(s(`/tasks/${e}/children`,t))}taskParents(e){return this.request(`/tasks/${e}/parents`)}taskPage(e,t){return this.request(s(`/tasks/${e}/page`,t))}trendingBenchmarks(e,t){return this.request(s(`/tasks/${encodeURIComponent(e)}/trending-benchmarks`,t))}frameworkCatalog(){return this.request("/frameworks/")}listMethods(e){return this.request(s("/methods/",e))}methodIndex(){return this.request("/methods/index/cards")}trendingMethods(e){return this.request(s("/methods/trending",e))}getMethod(e){return this.request(`/methods/${encodeURIComponent(e)}`)}relatedMethods(e){return this.request(`/methods/${encodeURIComponent(e)}/related`)}methodTrend(e,t){return this.request(s(`/methods/${encodeURIComponent(e)}/trend`,t))}listDatasets(e){const{task_id:t,...r}=e??{};return this.request(s("/datasets/",{...r,task:r.task??t}))}getDataset(e){return this.request(`/datasets/${e}`)}getDatasetBySlug(e,t){return this.request(s(`/datasets/${e}`,t))}async datasetTasks(e){return(await this.request(`/datasets/${e}/tasks/`)).results}async leaderboardMetrics(e,t){return(await this.request(`/datasets/${e}/tasks/${t}/metrics`)).metrics}metricDirections(){return this.request("/metrics/directions")}conferences(){return this.request("/conferences/")}conferenceDeadlines(){return this.request("/conferences/deadlines")}getConference(e){return this.request(`/conferences/${e}`)}conferenceAreasWithTasks(e){return this.request(`/conferences/${e}/areas-with-tasks`)}organizations(e=!1){return this.request(`/organizations/${e?"?featured_only=true":""}`)}searchOrganizations(e,t){return this.request(s("/organizations/",{q:e,limit:t}))}organizationIndex(){return this.request("/organizations/index/cards")}getOrganization(e){return this.request(`/organizations/${e}`)}organizationContributions(e){return this.request(`/organizations/${e}/contributions`)}organizationAreasWithTasks(e){return this.request(`/organizations/${e}/areas-with-tasks`)}audit(e){return this.request(s("/admin/catalog-audit",{cursor:e}))}acknowledgeAudit(){return this.request("/admin/catalog-audit/acknowledge",{method:"POST"})}rollbackEvent(e){return this.request(`/admin/catalog-audit/${e}/rollback`,{method:"POST"})}}const d=new u(o);export{d as c}; +import{ac as o}from"./index-BeSw2DVP.js";function s(a,e){const t=new URLSearchParams;for(const[i,n]of Object.entries(e??{}))n!==void 0&&n!==""&&t.set(i,String(n));const r=t.toString();return`${a}${r?`?${r}`:""}`}class u{constructor(e){this.request=e}listAreas(e){return this.request(s("/areas/",e))}getArea(e){return this.request(`/areas/${e}`)}areasWithTasks(){return this.request("/areas/with-tasks/")}listTasks(e){return this.request(s("/tasks/",e))}getTask(e){return this.request(`/tasks/${e}`)}topTasks(e){return this.request(s("/tasks/top",{limit:e}))}trendingTasks(e){return this.request(s("/tasks/trending",e))}taskChildren(e,t){return this.request(s(`/tasks/${e}/children`,t))}taskParents(e){return this.request(`/tasks/${e}/parents`)}taskPage(e,t){return this.request(s(`/tasks/${e}/page`,t))}trendingBenchmarks(e,t){return this.request(s(`/tasks/${encodeURIComponent(e)}/trending-benchmarks`,t))}frameworkCatalog(){return this.request("/frameworks/")}listMethods(e){return this.request(s("/methods/",e))}methodIndex(){return this.request("/methods/index/cards")}trendingMethods(e){return this.request(s("/methods/trending",e))}getMethod(e){return this.request(`/methods/${encodeURIComponent(e)}`)}relatedMethods(e){return this.request(`/methods/${encodeURIComponent(e)}/related`)}methodTrend(e,t){return this.request(s(`/methods/${encodeURIComponent(e)}/trend`,t))}listDatasets(e){const{task_id:t,...r}=e??{};return this.request(s("/datasets/",{...r,task:r.task??t}))}getDataset(e){return this.request(`/datasets/${e}`)}getDatasetBySlug(e,t){return this.request(s(`/datasets/${e}`,t))}async datasetTasks(e){return(await this.request(`/datasets/${e}/tasks/`)).results}async leaderboardMetrics(e,t){return(await this.request(`/datasets/${e}/tasks/${t}/metrics`)).metrics}metricDirections(){return this.request("/metrics/directions")}conferences(){return this.request("/conferences/")}conferenceDeadlines(){return this.request("/conferences/deadlines")}getConference(e){return this.request(`/conferences/${e}`)}conferenceAreasWithTasks(e){return this.request(`/conferences/${e}/areas-with-tasks`)}organizations(e=!1){return this.request(`/organizations/${e?"?featured_only=true":""}`)}searchOrganizations(e,t){return this.request(s("/organizations/",{q:e,limit:t}))}organizationIndex(){return this.request("/organizations/index/cards")}getOrganization(e){return this.request(`/organizations/${e}`)}organizationContributions(e){return this.request(`/organizations/${e}/contributions`)}organizationAreasWithTasks(e){return this.request(`/organizations/${e}/areas-with-tasks`)}audit(e){return this.request(s("/admin/catalog-audit",{cursor:e}))}acknowledgeAudit(){return this.request("/admin/catalog-audit/acknowledge",{method:"POST"})}rollbackEvent(e){return this.request(`/admin/catalog-audit/${e}/rollback`,{method:"POST"})}}const d=new u(o);export{d as c}; diff --git a/assets/chat-BOZIonsX.js b/assets/chat-Bvpu56kX.js similarity index 98% rename from assets/chat-BOZIonsX.js rename to assets/chat-Bvpu56kX.js index 6c0181737e514caf0f9d352ceedc050c55e42aea..dce236cc9a1191487ea688a2677e996aeccaae70 100644 --- a/assets/chat-BOZIonsX.js +++ b/assets/chat-Bvpu56kX.js @@ -1 +1 @@ -import{a5 as i,ac as p,ay as h,az as m}from"./index-D2fBL-s6.js";const c=encodeURIComponent,n=s=>`/chat/artifacts/${c(s)}`,a=(s,e)=>`${n(s)}/versions/${c(e)}`,u=s=>s.split("/").map(encodeURIComponent).join("/"),S={preview:(s,e)=>i(`/api/v1${a(s,e)}/preview`),file:(s,e,t,r)=>i(`/api/v1${a(s,e)}/${t}/${u(r)}`),pdfExport:s=>i(`/api/v1${n(s)}/export/pdf`),sourceZip:(s,e)=>i(`/api/v1${a(s,e)}/export/source.zip`),sharedRoot:(s,e)=>i(`/api/v1/chat/shares/${c(s)}/artifacts/${c(e)}`)};class l{constructor(e){this.request=e}listSessions(e){const t=new URLSearchParams({limit:"50"});return e&&t.set("cursor",e),this.request(`/chat/sessions?${t.toString()}`)}createSession(e,t="low"){return this.request("/chat/sessions",{method:"POST",body:JSON.stringify({selected_model:e||null,reasoning_effort:t})})}getSession(e){return this.request(`/chat/sessions/${e}`)}updateSession(e,t){return this.request(`/chat/sessions/${e}`,{method:"PATCH",body:JSON.stringify(t)})}removeSession(e){return this.request(`/chat/sessions/${e}`,{method:"DELETE"})}archiveOldChats(){return this.request("/chat/sessions/archive-old",{method:"POST"})}archiveOldestChats(){return this.request("/chat/sessions/archive-oldest",{method:"POST"})}cancelSession(e){return this.request(`/chat/sessions/${e}/cancel`,{method:"POST"})}createOrRefreshShare(e){return this.request(`/chat/sessions/${e}/share`,{method:"POST"})}getSessionPublicShare(e){return this.request(`/chat/sessions/${encodeURIComponent(e)}/public-share`,{credentials:"omit"})}getSharedChat(e){return this.request(`/chat/shares/${encodeURIComponent(e)}`,{credentials:"omit"})}getModels(){return this.request("/chat/models")}getUsage(){return this.request("/chat/usage",{cache:"no-store"})}getOpenAIUsage(){return this.request("/chat/openai-usage",{cache:"no-store"})}getAvailability(){return this.request("/chat/availability",{cache:"no-store"})}getAutocompleteVocabulary(){return this.request("/chat/autocomplete-vocabulary")}getInferenceBilling(){return this.request("/me/inference-billing",{cache:"no-store"})}selectInferenceBillingAccount(e){return this.request("/me/inference-billing",{method:"PATCH",body:JSON.stringify({bill_to:e})})}prewarmPaperContext(e){return this.request("/chat/paper-context/prewarm",{method:"POST",body:JSON.stringify({route_id:e}),credentials:"omit",cache:"no-store"})}getSandboxSpend(e){const t=e?`?environment=${encodeURIComponent(e)}`:"";return this.request(`/chat/admin/sandbox-spend${t}`,{cache:"no-store"})}getWebSearchBudget(){return this.request("/chat/admin/web-search-budget",{cache:"no-store"})}getOpenRouterCredential(){return this.request("/chat/openrouter-key",{cache:"no-store"})}connectOpenRouterCredential(e){return this.request("/chat/openrouter-key",{method:"PUT",body:JSON.stringify({api_key:e})})}setOpenRouterFallback(e){return this.request("/chat/openrouter-key",{method:"PATCH",body:JSON.stringify({enabled:e})})}disconnectOpenRouterCredential(){return this.request("/chat/openrouter-key",{method:"DELETE"})}reportLatency(e,t){return h(`/chat/latency/${encodeURIComponent(e)}`,{method:"POST",keepalive:!0,body:JSON.stringify(t)})}reportFeedback(e,t,r){return this.request(`/chat/messages/${encodeURIComponent(e)}/feedback`,{method:"POST",body:JSON.stringify({value:t,...r?{comment:r}:{}})})}getPosterVersions(e){return this.request(n(e),{cache:"no-store"}).then(t=>t.versions)}getPosterManifest(e,t){return this.request(`${a(e,t)}/manifest`,{cache:"no-store"})}getLatexPaper(e){return this.request(n(e),{cache:"no-store"})}getLatexPaperHistory(e,t){const r=new URLSearchParams({limit:"20"});return t&&r.set("cursor",t),this.request(`${n(e)}/versions?${r}`,{cache:"no-store"})}getLatexPaperManifest(e,t){return this.request(`${a(e,t)}/manifest`,{cache:"no-store"})}getArtifactSource(e,t,r){return m(`${a(e,t)}/source/${u(r)}`,{cache:"no-store"}).then(o=>o.text())}saveLatexPaper(e,t,r){return this.request(`${n(e)}/save-compile`,{method:"POST",body:JSON.stringify({expected_parent_version_id:t,files:Object.entries(r).map(([o,d])=>({path:o,content:d}))})})}restoreLatexPaperVersion(e,t,r){return this.request(`${n(e)}/versions/restore`,{method:"POST",body:JSON.stringify({source_version_id:t,expected_parent_version_id:r})})}uploadLatexPaperFigure(e,t,r){const o=new FormData;return o.set("expected_parent_version_id",t),o.set("path",`figures/${r.name}`),o.set("figure",r),this.request(`${n(e)}/figures`,{method:"POST",body:o})}refreshLatexPaperCompile(e){return this.request(`${n(e)}/refresh-compile`,{method:"POST"})}stream(e,t){return h("/chat/stream",{method:"POST",headers:{Accept:"text/event-stream"},body:JSON.stringify(e),signal:t})}resumeStream(e,t,r){return h(`/chat/sessions/${encodeURIComponent(e)}/stream`,{method:"GET",headers:{Accept:"text/event-stream",...r&&r>0?{"Last-Event-ID":String(r)}:{}},signal:t})}}const f=new l(p);export{S as a,f as c}; +import{a5 as i,ac as p,ay as h,az as m}from"./index-BeSw2DVP.js";const c=encodeURIComponent,n=s=>`/chat/artifacts/${c(s)}`,a=(s,e)=>`${n(s)}/versions/${c(e)}`,u=s=>s.split("/").map(encodeURIComponent).join("/"),S={preview:(s,e)=>i(`/api/v1${a(s,e)}/preview`),file:(s,e,t,r)=>i(`/api/v1${a(s,e)}/${t}/${u(r)}`),pdfExport:s=>i(`/api/v1${n(s)}/export/pdf`),sourceZip:(s,e)=>i(`/api/v1${a(s,e)}/export/source.zip`),sharedRoot:(s,e)=>i(`/api/v1/chat/shares/${c(s)}/artifacts/${c(e)}`)};class l{constructor(e){this.request=e}listSessions(e){const t=new URLSearchParams({limit:"50"});return e&&t.set("cursor",e),this.request(`/chat/sessions?${t.toString()}`)}createSession(e,t="low"){return this.request("/chat/sessions",{method:"POST",body:JSON.stringify({selected_model:e||null,reasoning_effort:t})})}getSession(e){return this.request(`/chat/sessions/${e}`)}updateSession(e,t){return this.request(`/chat/sessions/${e}`,{method:"PATCH",body:JSON.stringify(t)})}removeSession(e){return this.request(`/chat/sessions/${e}`,{method:"DELETE"})}archiveOldChats(){return this.request("/chat/sessions/archive-old",{method:"POST"})}archiveOldestChats(){return this.request("/chat/sessions/archive-oldest",{method:"POST"})}cancelSession(e){return this.request(`/chat/sessions/${e}/cancel`,{method:"POST"})}createOrRefreshShare(e){return this.request(`/chat/sessions/${e}/share`,{method:"POST"})}getSessionPublicShare(e){return this.request(`/chat/sessions/${encodeURIComponent(e)}/public-share`,{credentials:"omit"})}getSharedChat(e){return this.request(`/chat/shares/${encodeURIComponent(e)}`,{credentials:"omit"})}getModels(){return this.request("/chat/models")}getUsage(){return this.request("/chat/usage",{cache:"no-store"})}getOpenAIUsage(){return this.request("/chat/openai-usage",{cache:"no-store"})}getAvailability(){return this.request("/chat/availability",{cache:"no-store"})}getAutocompleteVocabulary(){return this.request("/chat/autocomplete-vocabulary")}getInferenceBilling(){return this.request("/me/inference-billing",{cache:"no-store"})}selectInferenceBillingAccount(e){return this.request("/me/inference-billing",{method:"PATCH",body:JSON.stringify({bill_to:e})})}prewarmPaperContext(e){return this.request("/chat/paper-context/prewarm",{method:"POST",body:JSON.stringify({route_id:e}),credentials:"omit",cache:"no-store"})}getSandboxSpend(e){const t=e?`?environment=${encodeURIComponent(e)}`:"";return this.request(`/chat/admin/sandbox-spend${t}`,{cache:"no-store"})}getWebSearchBudget(){return this.request("/chat/admin/web-search-budget",{cache:"no-store"})}getOpenRouterCredential(){return this.request("/chat/openrouter-key",{cache:"no-store"})}connectOpenRouterCredential(e){return this.request("/chat/openrouter-key",{method:"PUT",body:JSON.stringify({api_key:e})})}setOpenRouterFallback(e){return this.request("/chat/openrouter-key",{method:"PATCH",body:JSON.stringify({enabled:e})})}disconnectOpenRouterCredential(){return this.request("/chat/openrouter-key",{method:"DELETE"})}reportLatency(e,t){return h(`/chat/latency/${encodeURIComponent(e)}`,{method:"POST",keepalive:!0,body:JSON.stringify(t)})}reportFeedback(e,t,r){return this.request(`/chat/messages/${encodeURIComponent(e)}/feedback`,{method:"POST",body:JSON.stringify({value:t,...r?{comment:r}:{}})})}getPosterVersions(e){return this.request(n(e),{cache:"no-store"}).then(t=>t.versions)}getPosterManifest(e,t){return this.request(`${a(e,t)}/manifest`,{cache:"no-store"})}getLatexPaper(e){return this.request(n(e),{cache:"no-store"})}getLatexPaperHistory(e,t){const r=new URLSearchParams({limit:"20"});return t&&r.set("cursor",t),this.request(`${n(e)}/versions?${r}`,{cache:"no-store"})}getLatexPaperManifest(e,t){return this.request(`${a(e,t)}/manifest`,{cache:"no-store"})}getArtifactSource(e,t,r){return m(`${a(e,t)}/source/${u(r)}`,{cache:"no-store"}).then(o=>o.text())}saveLatexPaper(e,t,r){return this.request(`${n(e)}/save-compile`,{method:"POST",body:JSON.stringify({expected_parent_version_id:t,files:Object.entries(r).map(([o,d])=>({path:o,content:d}))})})}restoreLatexPaperVersion(e,t,r){return this.request(`${n(e)}/versions/restore`,{method:"POST",body:JSON.stringify({source_version_id:t,expected_parent_version_id:r})})}uploadLatexPaperFigure(e,t,r){const o=new FormData;return o.set("expected_parent_version_id",t),o.set("path",`figures/${r.name}`),o.set("figure",r),this.request(`${n(e)}/figures`,{method:"POST",body:o})}refreshLatexPaperCompile(e){return this.request(`${n(e)}/refresh-compile`,{method:"POST"})}stream(e,t){return h("/chat/stream",{method:"POST",headers:{Accept:"text/event-stream"},body:JSON.stringify(e),signal:t})}resumeStream(e,t,r){return h(`/chat/sessions/${encodeURIComponent(e)}/stream`,{method:"GET",headers:{Accept:"text/event-stream",...r&&r>0?{"Last-Event-ID":String(r)}:{}},signal:t})}}const f=new l(p);export{S as a,f as c}; diff --git a/assets/chatLifecycle-nMvmiYGF.js b/assets/chatLifecycle-ByiWkgE5.js similarity index 99% rename from assets/chatLifecycle-nMvmiYGF.js rename to assets/chatLifecycle-ByiWkgE5.js index b06ede621445642b62bc26f8e4efd11726b14182..735bd8169eb5b4a684e0626ffd135c762df1c079 100644 --- a/assets/chatLifecycle-nMvmiYGF.js +++ b/assets/chatLifecycle-ByiWkgE5.js @@ -1,4 +1,4 @@ -var wL=Object.defineProperty;var ck=n=>{throw TypeError(n)};var _L=(n,e,t)=>e in n?wL(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var ae=(n,e,t)=>_L(n,typeof e!="symbol"?e+"":e,t),J0=(n,e,t)=>e.has(n)||ck("Cannot "+t);var f=(n,e,t)=>(J0(n,e,"read from private field"),t?t.call(n):e.get(n)),M=(n,e,t)=>e.has(n)?ck("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),$=(n,e,t,s)=>(J0(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),P=(n,e,t)=>(J0(n,e,"access private method"),t);var os=(n,e,t,s)=>({set _(i){$(n,e,i,t)},get _(){return f(n,e,s)}});import{c as To,f as V,j as S,V as ee,b as yo,a4 as G_,a5 as SL,L as Md,a6 as xL,X as n0,a7 as um,a8 as s0,a9 as kL,l as FC,aa as Id,A as AL,C as EL}from"./index-D2fBL-s6.js";import{u as zC,a as CL,c as $L,P as HC,i as TL,b as BC,e as K_,A as PL,o as RL,U as ML,V as IL,W as OL,X as NL,Y as LL,Z as DL,_ as qC,$ as jL}from"./chatSessions-CoHSP58H.js";/* empty css */import{H as Ip,a as Op,b as Np}from"./hover-card-DWpZK4fW.js";import{f as FL,i as VC,p as zL,C as HL,a as BL,T as qL}from"./CatalogEntityPreviewLink-xL6TDpUk.js";import{G as i0}from"./github-DcIeypA5.js";import{F as UC}from"./file-text-CikzkPqz.js";import{r as VL,a as UL,P as r0,c as WL}from"./PaperPreviewLink-BZuRBR1p.js";import{M as GL,d as KL}from"./index-BPshewTi.js";import{r as ZL}from"./index-BtZPsygG.js";import{u as ad}from"./useMutation-9dlTbuQj.js";import{c as ts,a as zo}from"./chat-BOZIonsX.js";import{T as XL}from"./thumbs-up-BnMguJ3s.js";import{C as YL}from"./copy-CcyqVsMW.js";import{q as o0}from"./queryOptions-C9woPjwX.js";import{A as JL}from"./arrow-left-CzTG6LBL.js";import{E as WC}from"./external-link-Ddavpnin.js";import{P as QL}from"./plus-BI8-JXK0.js";import{S as eD}from"./search-0R_Hc3S2.js";import{C as GC,a as KC}from"./chevron-up-B9KJ5aUJ.js";import{A as tD}from"./AuthorAvatar-C8tz_syh.js";import{p as nD}from"./papers-khuZaSFb.js";/** +var wL=Object.defineProperty;var ck=n=>{throw TypeError(n)};var _L=(n,e,t)=>e in n?wL(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var ae=(n,e,t)=>_L(n,typeof e!="symbol"?e+"":e,t),J0=(n,e,t)=>e.has(n)||ck("Cannot "+t);var f=(n,e,t)=>(J0(n,e,"read from private field"),t?t.call(n):e.get(n)),M=(n,e,t)=>e.has(n)?ck("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),$=(n,e,t,s)=>(J0(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),P=(n,e,t)=>(J0(n,e,"access private method"),t);var os=(n,e,t,s)=>({set _(i){$(n,e,i,t)},get _(){return f(n,e,s)}});import{c as To,f as V,j as S,V as ee,b as yo,a4 as G_,a5 as SL,L as Md,a6 as xL,X as n0,a7 as um,a8 as s0,a9 as kL,l as FC,aa as Id,A as AL,C as EL}from"./index-BeSw2DVP.js";import{u as zC,a as CL,c as $L,P as HC,i as TL,b as BC,e as K_,A as PL,o as RL,U as ML,V as IL,W as OL,X as NL,Y as LL,Z as DL,_ as qC,$ as jL}from"./chatSessions-v3d2DQH8.js";/* empty css */import{H as Ip,a as Op,b as Np}from"./hover-card-BbFULETs.js";import{f as FL,i as VC,p as zL,C as HL,a as BL,T as qL}from"./CatalogEntityPreviewLink-BPnp82vP.js";import{G as i0}from"./github-CTNIgqBO.js";import{F as UC}from"./file-text-BHvaEohD.js";import{r as VL,a as UL,P as r0,c as WL}from"./PaperPreviewLink-BughwfUv.js";import{M as GL,d as KL}from"./index-CbsMwfXw.js";import{r as ZL}from"./index-XKdmo9ij.js";import{u as ad}from"./useMutation-CsS-RfeE.js";import{c as ts,a as zo}from"./chat-Bvpu56kX.js";import{T as XL}from"./thumbs-up-DGIteJ7Z.js";import{C as YL}from"./copy-3DjQpd64.js";import{q as o0}from"./queryOptions-C9woPjwX.js";import{A as JL}from"./arrow-left-C-qXYpsS.js";import{E as WC}from"./external-link-BAPjX9Up.js";import{P as QL}from"./plus-imZJbVTM.js";import{S as eD}from"./search-B4RgSU4h.js";import{C as GC,a as KC}from"./chevron-up-CSi6wXAh.js";import{A as tD}from"./AuthorAvatar-Dpan5W1F.js";import{p as nD}from"./papers-B58HJw9r.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/chatSessions-CoHSP58H.js b/assets/chatSessions-v3d2DQH8.js similarity index 99% rename from assets/chatSessions-CoHSP58H.js rename to assets/chatSessions-v3d2DQH8.js index f20eb7f301ff80791e305b3f256f26688101c3af..3f7ca2aca732da48895e8717299379a4635eb6d2 100644 --- a/assets/chatSessions-CoHSP58H.js +++ b/assets/chatSessions-v3d2DQH8.js @@ -1,4 +1,4 @@ -import{j as p,V as f,b as oe,A as Ce,ab as xe}from"./index-D2fBL-s6.js";import{c as k}from"./chat-BOZIonsX.js";import{p as Re}from"./papers-khuZaSFb.js";const et=({light:e})=>p.jsx("span",{className:`chat-spinner${e?" chat-spinner-light":""}`}),tt=({open:e})=>p.jsx("svg",{className:`chat-chev${e?" chat-chev-open":""}`,width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:p.jsx("path",{d:"m6 9 6 6 6-6"})}),rt=()=>p.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[p.jsx("circle",{cx:"12",cy:"12",r:"9"}),p.jsx("path",{d:"m9 12 2 2 4-4"})]}),nt=({size:e=14})=>p.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[p.jsx("circle",{cx:"11",cy:"11",r:"7"}),p.jsx("path",{d:"m21 21-4.3-4.3"})]}),ot=()=>p.jsx("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",children:p.jsx("path",{d:"M12 19V5M5 12l7-7 7 7"})}),at=()=>p.jsx("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:p.jsx("path",{d:"M12 5v14M5 12h14"})}),st=()=>p.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:[p.jsx("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),p.jsx("path",{d:"M9 4v16"})]}),it=()=>p.jsx("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:p.jsx("path",{d:"M3 6h18M8 6V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2M6 6l1 14a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2l1-14"})}),ct=({text:e,mentions:t,scrollTop:r=0,variant:n="composer",completion:o=""})=>{const s=[];let i=0;for(const a of[...t].sort((u,d)=>u.start-d.start)){const u=e.slice(a.start,a.end),d=u===a.title||u===`@${a.title}`;a.starte.length||!d||(s.push(e.slice(i,a.start)),s.push(p.jsx("span",{className:`chat-paper-inline-highlight${a.unavailable?" is-unavailable":""}`,"data-paper-route-id":a.route_id,children:u},a.key)),i=a.end)}return s.push(e.slice(i)),o&&s.push(p.jsx("span",{className:"chat-prompt-completion",children:o},"completion")),e.endsWith(` +import{j as p,V as f,b as oe,A as Ce,ab as xe}from"./index-BeSw2DVP.js";import{c as k}from"./chat-Bvpu56kX.js";import{p as Re}from"./papers-B58HJw9r.js";const et=({light:e})=>p.jsx("span",{className:`chat-spinner${e?" chat-spinner-light":""}`}),tt=({open:e})=>p.jsx("svg",{className:`chat-chev${e?" chat-chev-open":""}`,width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:p.jsx("path",{d:"m6 9 6 6 6-6"})}),rt=()=>p.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[p.jsx("circle",{cx:"12",cy:"12",r:"9"}),p.jsx("path",{d:"m9 12 2 2 4-4"})]}),nt=({size:e=14})=>p.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[p.jsx("circle",{cx:"11",cy:"11",r:"7"}),p.jsx("path",{d:"m21 21-4.3-4.3"})]}),ot=()=>p.jsx("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",children:p.jsx("path",{d:"M12 19V5M5 12l7-7 7 7"})}),at=()=>p.jsx("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:p.jsx("path",{d:"M12 5v14M5 12h14"})}),st=()=>p.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:[p.jsx("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),p.jsx("path",{d:"M9 4v16"})]}),it=()=>p.jsx("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:p.jsx("path",{d:"M3 6h18M8 6V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2M6 6l1 14a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2l1-14"})}),ct=({text:e,mentions:t,scrollTop:r=0,variant:n="composer",completion:o=""})=>{const s=[];let i=0;for(const a of[...t].sort((u,d)=>u.start-d.start)){const u=e.slice(a.start,a.end),d=u===a.title||u===`@${a.title}`;a.starte.length||!d||(s.push(e.slice(i,a.start)),s.push(p.jsx("span",{className:`chat-paper-inline-highlight${a.unavailable?" is-unavailable":""}`,"data-paper-route-id":a.route_id,children:u},a.key)),i=a.end)}return s.push(e.slice(i)),o&&s.push(p.jsx("span",{className:"chat-prompt-completion",children:o},"completion")),e.endsWith(` `)&&s.push("​"),p.jsx("div",{"aria-hidden":"true",className:`chat-paper-highlight-layer chat-paper-highlight-layer-${n}`,children:p.jsx("div",{style:{transform:`translateY(-${r}px)`},children:s})})},lt=({open:e,query:t,results:r,activeIndex:n,loading:o,error:s,onSelect:i,id:a="chat-paper-picker",optionIdPrefix:u="chat-paper-option"})=>{if(!e)return null;const d=t.trim()?o?"Searching papers…":s?"Paper search is unavailable":r.length?`${r.length} paper${r.length===1?"":"s"} found`:"No papers found":"Type to search papers";return p.jsxs("div",{className:"chat-paper-picker",id:a,role:"listbox","aria-label":"Paper results",children:[p.jsx("div",{className:"chat-paper-picker-status",role:"status","aria-live":"polite",children:d}),r.map((h,l)=>{const O=h.arxiv_id||h.id,L=h.arxiv_id||(()=>{try{return h.source_url?new URL(h.source_url).hostname:"External resource"}catch{return"External resource"}})();return p.jsxs("button",{type:"button",id:`${u}-${l}`,role:"option","aria-selected":l===n,className:`chat-paper-option${l===n?" is-active":""}`,onMouseDown:Y=>{Y.preventDefault(),i(h)},children:[p.jsx("span",{className:"chat-paper-option-title",children:h.title}),p.jsx("span",{className:"chat-paper-option-meta",children:L})]},O)})]})},ke=["What are decision models?","Find relevant papers on RLVR","What's the state-of-the-art for real-time object detection?"],ut=["Summarize the main contributions","Explain in simple terms","Identify the main limitations"],Ae=[...ke,"What are the latest papers on ","Which benchmarks are used for ","Which methods work best for ","How does ","Explain how ","Compare ","Summarize the key contributions of "],De=3,Ie=4,Le=new Set(["about","all","and","are","best","can","compare","does","explain","find","for","from","give","how","into","latest","list","method","methods","model","models","new","paper","papers","recent","show","state","summarize","task","tasks","the","this","use","what","when","where","which","who","why","with","work"]),Me=new RegExp(`(?:^|(?<=[\\s("'“‘]))(?=\\S)`,"g"),Pe=e=>{const t=e.toLowerCase(),r=Ae.find(n=>n.length>e.length&&n.toLowerCase().startsWith(t));return r?r.slice(e.length):""},Ne=(e,t)=>{const r=[...e.matchAll(Me)].map(n=>n.index??0);for(const n of r.slice(-4)){const o=e.slice(n),s=o.toLowerCase(),i=/\s/.test(o);if(o.length<(i?De:Ie)||!i&&Le.has(s))continue;const a=t.find(u=>u.length>o.length&&u.toLowerCase().startsWith(s));if(a)return a.slice(o.length)}return""},Ye=(e,t)=>!e.trim()||/\s$/.test(e)?"":Pe(e)||Ne(e,t);function dt(e,t=!1){var h;const r=e.text,[n,o]=f.useState(null),s=oe({queryKey:["chatAutocompleteVocabulary"],queryFn:()=>k.getAutocompleteVocabulary(),enabled:r.length>0,staleTime:1/0,gcTime:1/0,retry:!1}),i=(n==null?void 0:n.text)===r?n.atEnd:!0,a=e.paperMentions.some(l=>l.end===r.length);return{completion:!t&&i&&!a?Ye(r,((h=s.data)==null?void 0:h.names)??[]):"",trackCaret:l=>o({text:l.value,atEnd:l.selectionStart===l.selectionEnd&&l.selectionEnd===l.value.length})}}const pt=e=>e.key==="Tab"&&!e.shiftKey&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&!e.nativeEvent.isComposing,ht=e=>{var r;const t=(r=e.parentElement)==null?void 0:r.querySelector(".chat-paper-highlight-layer");return Math.max(e.scrollHeight,(t==null?void 0:t.scrollHeight)??0)},ae=8e3,se=16384,ie=1e4,C={crossPage:"Select text within one PDF page.",outside:"Select text from the paper, not the surrounding interface.",tooLarge:"Select a shorter passage (maximum 8,000 characters)."};function ce(e){return new TextEncoder().encode(e).length}function le(e){return e.replace(/\r\n/g,` `).replace(/\r/g,` `).replace(/\u00a0/g," ").replace(/[^\S\n]+/g," ").trim()}function ft(e){return`${e.routeId}\0${e.paperVersion}\0${e.page}\0${e.text}`}function mt(e){return{route_id:e.routeId,paper_version:e.paperVersion,page:e.page,text:e.text}}function N(e="",t){return t?{text:e,paperMentions:[],paperSelection:t}:{text:e,paperMentions:[]}}function K(e,t,r){return e.paperSelection?{text:t,paperMentions:r,paperSelection:e.paperSelection}:{text:t,paperMentions:r}}function Fe(e){if(!e||typeof e!="object")return;const t=e;if(typeof t.routeId!="string"||!t.routeId.trim()||typeof t.paperVersion!="string"||!t.paperVersion.trim())return;const r=t.page;if(typeof r!="number"||!Number.isInteger(r)||r<1||r>ie||typeof t.text!="string")return;const n=le(t.text);if(n&&!(n.length>ae)&&!(ce(n)>se))return{routeId:t.routeId.trim(),paperVersion:t.paperVersion.trim(),page:r,text:n}}function je(e,t){if(typeof e=="string")return N(e);if(!e||typeof e!="object")return t===void 0?null:N(t);const r=e;if(typeof r.text!="string"||!Array.isArray(r.paperMentions))return t===void 0?null:N(t);const n=Fe(r.paperSelection);return n?{text:r.text,paperMentions:r.paperMentions,paperSelection:n}:{text:r.text,paperMentions:r.paperMentions}}function ue(e){return e?e instanceof Element?e:e.parentElement:null}function G(e,t){const r=ue(e);if(!r||!t.contains(r)||!r.closest(".textLayer, .reader-web-document"))return null;const n=r.closest(".pdf-page[data-page], .reader-web-document[data-page]");if(!n||!t.contains(n))return null;const o=Number(n.dataset.page);return!Number.isInteger(o)||o<1||o>ie?null:o}function gt(e){const{selection:t,pagesRoot:r,routeId:n,paperVersion:o,numPages:s}=e;if(!r||!t||t.rangeCount!==1)return t&&t.rangeCount>1?{ok:!1,error:C.crossPage}:{ok:!1,error:null};const i=t.getRangeAt(0);if(i.collapsed)return{ok:!1,error:null};const a=G(i.startContainer,r),u=G(i.endContainer,r),d=ue(i.commonAncestorContainer);if(!d||!r.contains(d))return{ok:!1,error:C.outside};if(a===null||u===null)return{ok:!1,error:C.outside};if(a!==u)return{ok:!1,error:C.crossPage};if(s&&(a<1||a>s))return{ok:!1,error:C.crossPage};const h=t.toString(),l=le(h);return l?l.length>ae||ce(l)>se?{ok:!1,error:C.tooLarge}:{ok:!0,selection:{routeId:n,paperVersion:o,page:a,text:l}}:{ok:!1,error:C.crossPage}}const qe=10,We=3;function z(e,t){const n=e.slice(0,t).lastIndexOf("@");if(n<0)return null;const o=n>0?e[n-1]:"";if(o&&/[\p{L}\p{M}\p{N}_@]/u.test(o))return null;const s=e.slice(n+1,t);return/[\n\r@]/.test(s)?null:{start:n,end:t,query:s}}function X(e,t,r){let n=0;for(;na.end<=n?[a]:a.start>=s?[{...a,start:a.start+i,end:a.end+i}]:[])}function yt({draft:e,onChange:t,enabled:r,textareaRef:n}){var V;const o=`chat-paper-picker-${f.useId().replace(/:/g,"")}`,s=`${o}-option`,[i,a]=f.useState(null),[u,d]=f.useState(""),[h,l]=f.useState(0),[O,L]=f.useState(""),Y=f.useRef(new Set);f.useEffect(()=>{r||a(null)},[r]),f.useEffect(()=>{const c=window.setTimeout(()=>d((i==null?void 0:i.query.trim())??""),150);return()=>window.clearTimeout(c)},[i==null?void 0:i.query]);const D=oe({queryKey:["chat-paper-mention-search",u.toLowerCase()],queryFn:({signal:c})=>Re.search(u,1,10,"hybrid",c),enabled:r&&!!i&&u.length>=1,staleTime:3e4,refetchOnWindowFocus:!1,retry:!1}),y=f.useMemo(()=>{var c;return((c=D.data)==null?void 0:c.results)??[]},[(V=D.data)==null?void 0:V.results]);f.useEffect(()=>l(0),[u]),f.useEffect(()=>{var c;(c=document.getElementById(`${s}-${h}`))==null||c.scrollIntoView({block:"nearest"})},[h,s]);const be=f.useCallback(c=>{var v;if(!r){a(null);return}const m=c??((v=n.current)==null?void 0:v.selectionStart)??e.text.length;if(e.paperMentions.some(T=>m>T.start&&m<=T.end)){a(null);return}a(z(e.text,m))},[e.paperMentions,e.text,r,n]),Oe=f.useCallback((c,m)=>{var M;const v=X(e.text,c,e.paperMentions),T=K(e,c,v);t(T);const E=m??((M=n.current)==null?void 0:M.selectionStart)??c.length;r&&!v.some(P=>E>P.start&&E<=P.end)?a(z(c,E)):a(null)},[e,r,t,n]),W=f.useCallback(c=>{if(!i)return!1;const m=c.arxiv_id||c.id,v=new Set(e.paperMentions.map(I=>I.route_id));if(e.paperMentions.length>=qe)return L("A message can contain at most 10 paper mentions."),!1;if(!v.has(m)&&v.size>=We)return L("A message can attach at most 3 distinct papers."),!1;const T=c.title,E=e.text.slice(i.end),M=E.length===0,P=e.text.slice(0,i.start)+T+(M?" ":"")+E,Ee=X(e.text,P,e.paperMentions),$={key:crypto.randomUUID(),route_id:m,title:c.title,source:c.source==="external"?"external":"arxiv",start:i.start,end:i.start+T.length};return t(K(e,P,[...Ee,$].sort((I,F)=>I.start-F.start))),a(null),L(""),window.requestAnimationFrame(()=>{var F,B;const I=$.end+(M||E.startsWith(" ")?1:0);(F=n.current)==null||F.focus(),(B=n.current)==null||B.setSelectionRange(I,I)}),Y.current.has(m)||(Y.current.add(m),k.prewarmPaperContext(m).catch(()=>{})),!0},[i,e,t,n]),Te=f.useCallback(c=>!i||c.nativeEvent.isComposing?!1:c.key==="Tab"?(a(null),!1):c.key==="Escape"?(c.preventDefault(),a(null),!0):c.key==="ArrowDown"||c.key==="ArrowUp"?(c.preventDefault(),y.length&&l(m=>c.key==="ArrowDown"?(m+1)%y.length:(m-1+y.length)%y.length),!0):c.key==="Home"&&y.length?(c.preventDefault(),l(0),!0):c.key==="End"&&y.length?(c.preventDefault(),l(y.length-1),!0):c.key==="Enter"&&!c.shiftKey?(c.preventDefault(),y[h]?W(y[h]):D.isFetching||a(null),!0):!1,[i,h,y,D.isFetching,W]);return{open:!!i,query:(i==null?void 0:i.query)??"",results:y,activeIndex:h,loading:D.isFetching,error:D.isError,message:O,pickerId:o,optionIdPrefix:s,updateText:Oe,refresh:be,select:W,keyDown:Te,close:()=>a(null)}}const g=(e,t)=>new Promise(r=>{const n=setTimeout(o,e);function o(){t==null||t.removeEventListener("abort",o),clearTimeout(n),r()}t==null||t.addEventListener("abort",o)}),S=e=>({arxiv_id:null,source:"arxiv",source_url:null,thumbnail_url:null,authors:[],published:null,conference:null,citation_count:null,tasks:[],methods:[],repositories:[],project_pages:[],...e}),w={name:"Object Detection",slug:"object-detection"},x={name:"Real-Time Object Detection",slug:"real-time-object-detection"},He={"2502.12524":{route_id:"2502.12524",title:"YOLOv12: Attention-Centric Real-Time Object Detectors",content:"Enhancing the network architecture of the YOLO framework has been crucial for a long time. This work introduces an attention-centric YOLO framework, namely YOLOv12, built around area attention and residual efficient layer aggregation networks (R-ELAN). YOLOv12-N reaches 40.6 mAP at 1.64 ms on a T4 GPU, closing the gap to attention-based detectors without the usual latency penalty and surpassing YOLOv10/YOLOv11 by +1.2–1.6 mAP at matched latency.",content_truncated:!1,metadata:S({arxiv_id:"2502.12524",authors:[{name:"Y. Tian"},{name:"Q. Ye"},{name:"D. Doermann"}],published:"2025-02-18",citation_count:412,tasks:[w,x],methods:[{name:"Area Attention",slug:"area-attention"}],repositories:[{url:"https://github.com/sunsmarterjie/yolov12",stars:18700}]})},"2407.17140":{route_id:"2407.17140",title:"RT-DETRv2: Improved Baseline with Bag-of-Freebies for Real-Time Detection",content:"RT-DETRv2 improves the real-time DETR baseline with selective multi-scale feature extraction, a discrete sampling operator to ease deployment, and training-only 'bag-of-freebies' that add no inference cost. RT-DETRv2-R18/R50/R101 reach 47.9 / 53.4 / 54.3 mAP on COCO at 217 / 108 / 74 FPS on T4 TensorRT FP16, remaining NMS-free end to end.",content_truncated:!1,metadata:S({arxiv_id:"2407.17140",authors:[{name:"W. Lv"},{name:"Y. Zhao"},{name:"J. Chang"}],published:"2024-07-24",citation_count:268,tasks:[w,x],methods:[{name:"DETR",slug:"detr"}],repositories:[{url:"https://github.com/lyuwenyu/RT-DETR",stars:9400}]})},"2410.13842":{route_id:"2410.13842",title:"D-FINE: Redefining Regression as Fine-grained Distribution Refinement",content:"D-FINE reformulates bounding-box regression in DETR-style detectors as iterative refinement of probability distributions (FDR) and adds a localization self-distillation scheme (GO-LSD). D-FINE-L reaches 54.0 mAP at ~9 ms and D-FINE-X 55.8 mAP on COCO while staying real-time on modern GPUs, dominating RT-DETRv2 and YOLOv10 on the accuracy–latency Pareto front.",content_truncated:!1,metadata:S({arxiv_id:"2410.13842",authors:[{name:"Y. Peng"},{name:"H. Li"},{name:"P. Wu"}],published:"2024-10-17",conference:"ICLR 2025",citation_count:187,tasks:[w,x],methods:[{name:"Knowledge Distillation",slug:"knowledge-distillation"}],repositories:[{url:"https://github.com/Peterande/D-FINE",stars:12100}]})},"2406.03459":{route_id:"2406.03459",title:"LW-DETR: A Transformer Replacement to YOLO for Real-Time Detection",content:"LW-DETR pairs a plain ViT encoder with a lightweight DETR decoder and shows the combination outperforms YOLOv8 and YOLO-NAS at comparable latency, arguing transformer detectors are viable even at the fast end of the accuracy–latency curve. Uses multi-level feature aggregation, window-attention interleaving, and IoU-aware classification.",content_truncated:!1,metadata:S({arxiv_id:"2406.03459",authors:[{name:"Q. Chen"},{name:"X. Su"},{name:"X. Zhang"}],published:"2024-06-05",citation_count:94,tasks:[w,x],methods:[{name:"Vision Transformer",slug:"vision-transformer"}],repositories:[{url:"https://github.com/Atten4Vis/LW-DETR",stars:5200}]})},"2304.08069":{route_id:"2304.08069",title:"DETRs Beat YOLOs on Real-time Object Detection",content:"RT-DETR is the first real-time end-to-end object detector, built on an efficient hybrid encoder that decouples intra-scale interaction and cross-scale fusion, plus IoU-aware query selection. RT-DETR-R50 achieves 53.1 mAP at 108 FPS on COCO, beating comparably sized YOLO detectors in both speed and accuracy while eliminating NMS entirely; its Figure 1 accuracy–latency plot became the reference for later real-time detectors.",content_truncated:!1,metadata:S({arxiv_id:"2304.08069",authors:[{name:"Y. Zhao"},{name:"W. Lv"},{name:"S. Xu"}],published:"2023-04-17",conference:"CVPR 2024",citation_count:2310,tasks:[w,x],methods:[{name:"DETR",slug:"detr"}],repositories:[{url:"https://github.com/lyuwenyu/RT-DETR",stars:9400}]})},"2405.14458":{route_id:"2405.14458",title:"YOLOv10: Real-Time End-to-End Object Detection",content:"YOLOv10 removes NMS from the YOLO pipeline via consistent dual assignments during training and applies a holistic efficiency–accuracy driven design across the architecture. YOLOv10-S is 1.8x faster than RT-DETR-R18 at similar COCO accuracy; the family spans 46.3–54.4 mAP with substantially lower end-to-end latency than prior YOLOs because post-processing disappears.",content_truncated:!1,metadata:S({arxiv_id:"2405.14458",authors:[{name:"A. Wang"},{name:"H. Chen"},{name:"L. Liu"}],published:"2024-05-23",conference:"NeurIPS 2024",citation_count:1650,tasks:[w,x],methods:[{name:"NMS-free Training",slug:"nms-free-training"}],repositories:[{url:"https://github.com/THU-MIG/yolov10",stars:44200}]})},"2401.17270":{route_id:"2401.17270",title:"YOLO-World: Real-Time Open-Vocabulary Object Detection",content:"YOLO-World extends the YOLO paradigm to open-vocabulary detection through vision-language modeling with a re-parameterizable vision-language path aggregation network (RepVL-PAN) and region-text contrastive pretraining. It detects categories never seen at training time while running at 35+ FPS, and its prompt-then-detect deployment re-parameterizes text embeddings for zero runtime text-encoder cost.",content_truncated:!1,metadata:S({arxiv_id:"2401.17270",authors:[{name:"T. Cheng"},{name:"L. Song"},{name:"Y. Ge"}],published:"2024-01-30",conference:"CVPR 2024",citation_count:890,tasks:[{name:"Open-Vocabulary Object Detection",slug:"open-vocabulary-object-detection"},w],methods:[{name:"Contrastive Learning",slug:"contrastive-learning"}],repositories:[{url:"https://github.com/AILab-CVC/YOLO-World",stars:16800}]})},158342:{route_id:"158342",title:"Ultralytics YOLO: real-time detection framework and model zoo",content:"Official Ultralytics framework release covering YOLO11 and YOLOv12 deployment: pretrained COCO checkpoints from nano to x-large, TensorRT/ONNX/CoreML export paths, and reproducible latency benchmarks on T4, Jetson Orin, and CPU targets. Widely used as the practical baseline for real-time detection deployments.",content_truncated:!1,metadata:S({source:"external",source_url:"https://docs.ultralytics.com/models/",authors:[{name:"Ultralytics"}],published:"2025-01-02",tasks:[w,x],repositories:[{url:"https://github.com/ultralytics/ultralytics",stars:46e3}],project_pages:[{url:"https://docs.ultralytics.com"}]})}},de=e=>e.map(t=>He[t]),J=de(["2502.12524","2407.17140","2410.13842","2406.03459","2304.08069","2405.14458","2401.17270","158342"]),Q=de(["2410.13842","2502.12524","2407.17140","2405.14458","2304.08069"]),Z="The user wants the current state-of-the-art for real-time object detection. That's a moving target split across two lineages — the YOLO family (fast CNN one-stage detectors) and the DETR family (transformer, end-to-end, NMS-free). I should ground the answer in recent papers benchmarked on COCO with reported latency or FPS, not just accuracy. Let me start with a broad hybrid search, see which papers surface, then run a second, narrower query to pin down the head-to-head COCO mAP vs latency trade-offs before I write anything.",ee="Good — both lineages are well represented. YOLOv12, YOLOv10 and RT-DETRv2 / D-FINE keep coming up. To actually rank them I need the accuracy-vs-latency numbers side by side on the same COCO val2017 protocol, so let me narrow the query to the benchmark comparison specifically.",te=`There isn't a single winner — real-time object detection in 2026 is a two-horse race between the [YOLO family](paper:2502.12524) (fast one-stage CNNs) and the end-to-end [DETR family](paper:2304.08069) (NMS-free transformers). Which one is “SOTA” depends entirely on where you sit on the accuracy-vs-latency curve. diff --git a/assets/chevron-up-B9KJ5aUJ.js b/assets/chevron-up-CSi6wXAh.js similarity index 91% rename from assets/chevron-up-B9KJ5aUJ.js rename to assets/chevron-up-CSi6wXAh.js index da23f80dd48ef86632f1a6cadd23893f214237d2..37af7b98684d34ee618ad86eb23258bee02516c4 100644 --- a/assets/chevron-up-B9KJ5aUJ.js +++ b/assets/chevron-up-CSi6wXAh.js @@ -1,4 +1,4 @@ -import{c as o}from"./index-D2fBL-s6.js";/** +import{c as o}from"./index-BeSw2DVP.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/circle-check-1e3iPSaF.js b/assets/circle-check-fwAHrwbg.js similarity index 88% rename from assets/circle-check-1e3iPSaF.js rename to assets/circle-check-fwAHrwbg.js index 0a9305448fe02e8690eb250a03bd9b3a6fe66074..8d589510378a9fa15867d29df9cea6f5def8bd81 100644 --- a/assets/circle-check-1e3iPSaF.js +++ b/assets/circle-check-fwAHrwbg.js @@ -1,4 +1,4 @@ -import{c}from"./index-D2fBL-s6.js";/** +import{c}from"./index-BeSw2DVP.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/codex-BUTI-2RM.js b/assets/codex-JTzG52Zs.js similarity index 95% rename from assets/codex-BUTI-2RM.js rename to assets/codex-JTzG52Zs.js index aa4688faadeed014c477afb2a0d3f8d39c3a9866..a7cab12344c1897791331425f19591fa6e3266c2 100644 --- a/assets/codex-BUTI-2RM.js +++ b/assets/codex-JTzG52Zs.js @@ -1 +1 @@ -import{ac as i,a5 as c}from"./index-D2fBL-s6.js";const u="No paper text was available yet. This job starts again automatically within an hour of the paper's Markdown being extracted.",r="/admin/codex-curation/jobs";class n{constructor(e){this.request=e}startPaperJob(e,t){return this.request(`/admin/codex-${e}/jobs`,{method:"POST",body:JSON.stringify({paper_id:t})})}getPaperJob(e,t){return this.request(`/admin/codex-${e}/jobs/${t}`)}cancelPaperJob(e,t){return this.request(`/admin/codex-${e}/jobs/${t}`,{method:"DELETE"})}listJobs(e=100,t={}){const a=new URLSearchParams({limit:String(e)});return Object.entries(t).forEach(([o,s])=>{s&&a.set(o,s)}),this.request(`${r}?${a}`,{cache:"no-store"})}retryJob(e){return this.request(`${r}/${e}/retry`,{method:"POST"})}cancelJob(e){return this.request(`${r}/${e}`,{method:"DELETE"})}async retryTrace(e){await this.request(`${r}/${e}/retry-trace`,{method:"POST"})}async setScheduler(e){await this.request(`${r}/scheduler/${e}`,{method:"POST"})}async promoteBenchmarkCandidate(e,t){await this.request(`${r}/benchmark-candidates/${e}/promote`,{method:"POST",body:JSON.stringify(t)})}async rollbackBenchmarkCandidate(e){await this.request(`${r}/benchmark-candidates/${e}/rollback`,{method:"POST"})}traceUrl(e){return c(`/api/v1${r}/${e}/trace`)}}const m=new n(i);export{u as A,m as c}; +import{ac as i,a5 as c}from"./index-BeSw2DVP.js";const u="No paper text was available yet. This job starts again automatically within an hour of the paper's Markdown being extracted.",r="/admin/codex-curation/jobs";class n{constructor(e){this.request=e}startPaperJob(e,t){return this.request(`/admin/codex-${e}/jobs`,{method:"POST",body:JSON.stringify({paper_id:t})})}getPaperJob(e,t){return this.request(`/admin/codex-${e}/jobs/${t}`)}cancelPaperJob(e,t){return this.request(`/admin/codex-${e}/jobs/${t}`,{method:"DELETE"})}listJobs(e=100,t={}){const a=new URLSearchParams({limit:String(e)});return Object.entries(t).forEach(([o,s])=>{s&&a.set(o,s)}),this.request(`${r}?${a}`,{cache:"no-store"})}retryJob(e){return this.request(`${r}/${e}/retry`,{method:"POST"})}cancelJob(e){return this.request(`${r}/${e}`,{method:"DELETE"})}async retryTrace(e){await this.request(`${r}/${e}/retry-trace`,{method:"POST"})}async setScheduler(e){await this.request(`${r}/scheduler/${e}`,{method:"POST"})}async promoteBenchmarkCandidate(e,t){await this.request(`${r}/benchmark-candidates/${e}/promote`,{method:"POST",body:JSON.stringify(t)})}async rollbackBenchmarkCandidate(e){await this.request(`${r}/benchmark-candidates/${e}/rollback`,{method:"POST"})}traceUrl(e){return c(`/api/v1${r}/${e}/trace`)}}const m=new n(i);export{u as A,m as c}; diff --git a/assets/copy-CcyqVsMW.js b/assets/copy-3DjQpd64.js similarity index 90% rename from assets/copy-CcyqVsMW.js rename to assets/copy-3DjQpd64.js index dd06a612569b0435687f414d2864ea37bf2801e4..e48cef5891d5d1f66863eb84930455701dee3802 100644 --- a/assets/copy-CcyqVsMW.js +++ b/assets/copy-3DjQpd64.js @@ -1,4 +1,4 @@ -import{c}from"./index-D2fBL-s6.js";/** +import{c}from"./index-BeSw2DVP.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/curation-BtfabyzA.js b/assets/curation-CCIsdsjV.js similarity index 98% rename from assets/curation-BtfabyzA.js rename to assets/curation-CCIsdsjV.js index 563ea70bc639b42a33ffcfdee7c96de8a72aa0d2..cdd040eabcea3343dfb5ac8ec516ddbdc7ff5150 100644 --- a/assets/curation-BtfabyzA.js +++ b/assets/curation-CCIsdsjV.js @@ -1 +1 @@ -var f=Object.defineProperty;var w=(i,e,t)=>e in i?f(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var d=(i,e,t)=>w(i,typeof e!="symbol"?e+"":e,t);import{A as l,aR as g,ac as v}from"./index-D2fBL-s6.js";const y={tasks:"tasks",methods:"methods",organizations:"organizations",repositories:"GitHub repositories",project_pages:"project pages",hf_artifacts:"Hugging Face artifacts",source_url:"source URL",x_threads:"X threads",evaluations:"evaluation results"};function _(i){return Object.prototype.hasOwnProperty.call(y,i)}const p="pwc:fresh-auth-edit",c="pwc:fresh-auth-mutation";function E(i){if(typeof window>"u")return;sessionStorage.setItem(p,i);const e=g("/api/v1/auth/hf/login");window.location.assign(`${e}?return_to=${encodeURIComponent(window.location.href)}`)}class S{constructor(e,t=E){d(this,"paperLoads",new Map);d(this,"evaluationLoads",new Map);this.request=e,this.recoverFreshAuth=t}primePaper(e,t=!1){t&&this.paperLoads.delete(e);let s=this.paperLoads.get(e);return s||(s=this.request(`/papers/${e}/curation-state`).catch(o=>{throw this.paperLoads.delete(e),o}),this.paperLoads.set(e,s)),s}primeEvaluations(e,t=!1){t&&this.evaluationLoads.delete(e);let s=this.evaluationLoads.get(e);return s||(s=this.request(`/evaluations/curation-state?paper_id=${e}`).catch(o=>{throw this.evaluationLoads.delete(e),o}),this.evaluationLoads.set(e,s)),s}async mutatePaper(e,t,s,o,a){const r=this.paperLoads.get(e);if(!r)throw new Error("The catalog version was not loaded when this editor opened. Close and reopen the editor.");const h=(await r).sections[t];if(!h)throw new Error(`Missing curation version for ${t}`);return this.mutate(t,o,s,h,a,`paper:${e}:${t}`)}async mutateEvaluations(e,t,s,o){const a=this.evaluationLoads.get(String(e));if(!a)throw new Error("The evaluation version was not loaded when this editor opened. Close and reopen the editor.");const r=(await a).version;return this.mutate("evaluations",s,t,r,o,`paper:${e}:evaluations`)}async mutate(e,t,s,o,a,r){const h=new Headers(a.headers);Object.entries(this.idempotencyHeaders(r,s,o)).forEach(([n,m])=>h.set(n,m));const u={...a,headers:h};try{const n=await this.request(t,u);return this.clearAttempt(u),n}catch(n){throw n instanceof l&&n.status===401&&n.code==="fresh_auth_required"?(this.saveFreshAuthMutation(e,t,s,u),this.recoverFreshAuth(e)):n instanceof l&&n.status===409&&(this.clearAttempt(u),typeof window<"u"&&window.dispatchEvent(new CustomEvent("pwc:catalog-conflict",{detail:{endpoint:t}}))),n}}freshAuthMutationDraft(){const e=sessionStorage.getItem(c);if(!e)return null;try{const t=JSON.parse(e);if(!t.endpoint.startsWith("/")||t.endpoint.startsWith("//")||!["POST","PUT","PATCH","DELETE"].includes(t.options.method))throw new Error("Invalid saved mutation draft");return t}catch{return sessionStorage.removeItem(c),null}}async resumeFreshAuthMutation(){const e=this.freshAuthMutationDraft();if(!e)throw new Error("No saved catalog edit is available.");const t=await this.request(e.endpoint,{method:e.options.method,body:e.options.body,headers:e.options.headers});return this.clearAttempt({headers:e.options.headers}),sessionStorage.removeItem(c),sessionStorage.removeItem(p),t}saveFreshAuthMutation(e,t,s,o){const a=Object.fromEntries(new Headers(o.headers).entries()),r=typeof o.body=="string"?o.body:void 0;sessionStorage.setItem(c,JSON.stringify({section:e,endpoint:t,payload:s,options:{method:(o.method??"POST").toUpperCase(),body:r,headers:a}}))}idempotencyHeaders(e,t,s){const o=`pwc:mutation:${e}:${JSON.stringify(t)}`,a=sessionStorage.getItem(o);if(a){const h=JSON.parse(a);return{"Idempotency-Key":h.key,"If-Match":h.version}}const r=crypto.randomUUID();return sessionStorage.setItem(o,JSON.stringify({key:r,version:s})),sessionStorage.setItem(`pwc:mutation-key:${r}`,o),{"Idempotency-Key":r,"If-Match":s}}clearAttempt(e){const t=new Headers(e.headers).get("Idempotency-Key");if(!t)return;const s=sessionStorage.getItem(`pwc:mutation-key:${t}`);s&&sessionStorage.removeItem(s),sessionStorage.removeItem(`pwc:mutation-key:${t}`),this.paperLoads.clear(),this.evaluationLoads.clear()}}const T=new S(v);export{p as F,y as P,_ as i,T as p}; +var f=Object.defineProperty;var w=(i,e,t)=>e in i?f(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var d=(i,e,t)=>w(i,typeof e!="symbol"?e+"":e,t);import{A as l,aR as g,ac as v}from"./index-BeSw2DVP.js";const y={tasks:"tasks",methods:"methods",organizations:"organizations",repositories:"GitHub repositories",project_pages:"project pages",hf_artifacts:"Hugging Face artifacts",source_url:"source URL",x_threads:"X threads",evaluations:"evaluation results"};function _(i){return Object.prototype.hasOwnProperty.call(y,i)}const p="pwc:fresh-auth-edit",c="pwc:fresh-auth-mutation";function E(i){if(typeof window>"u")return;sessionStorage.setItem(p,i);const e=g("/api/v1/auth/hf/login");window.location.assign(`${e}?return_to=${encodeURIComponent(window.location.href)}`)}class S{constructor(e,t=E){d(this,"paperLoads",new Map);d(this,"evaluationLoads",new Map);this.request=e,this.recoverFreshAuth=t}primePaper(e,t=!1){t&&this.paperLoads.delete(e);let s=this.paperLoads.get(e);return s||(s=this.request(`/papers/${e}/curation-state`).catch(o=>{throw this.paperLoads.delete(e),o}),this.paperLoads.set(e,s)),s}primeEvaluations(e,t=!1){t&&this.evaluationLoads.delete(e);let s=this.evaluationLoads.get(e);return s||(s=this.request(`/evaluations/curation-state?paper_id=${e}`).catch(o=>{throw this.evaluationLoads.delete(e),o}),this.evaluationLoads.set(e,s)),s}async mutatePaper(e,t,s,o,a){const r=this.paperLoads.get(e);if(!r)throw new Error("The catalog version was not loaded when this editor opened. Close and reopen the editor.");const h=(await r).sections[t];if(!h)throw new Error(`Missing curation version for ${t}`);return this.mutate(t,o,s,h,a,`paper:${e}:${t}`)}async mutateEvaluations(e,t,s,o){const a=this.evaluationLoads.get(String(e));if(!a)throw new Error("The evaluation version was not loaded when this editor opened. Close and reopen the editor.");const r=(await a).version;return this.mutate("evaluations",s,t,r,o,`paper:${e}:evaluations`)}async mutate(e,t,s,o,a,r){const h=new Headers(a.headers);Object.entries(this.idempotencyHeaders(r,s,o)).forEach(([n,m])=>h.set(n,m));const u={...a,headers:h};try{const n=await this.request(t,u);return this.clearAttempt(u),n}catch(n){throw n instanceof l&&n.status===401&&n.code==="fresh_auth_required"?(this.saveFreshAuthMutation(e,t,s,u),this.recoverFreshAuth(e)):n instanceof l&&n.status===409&&(this.clearAttempt(u),typeof window<"u"&&window.dispatchEvent(new CustomEvent("pwc:catalog-conflict",{detail:{endpoint:t}}))),n}}freshAuthMutationDraft(){const e=sessionStorage.getItem(c);if(!e)return null;try{const t=JSON.parse(e);if(!t.endpoint.startsWith("/")||t.endpoint.startsWith("//")||!["POST","PUT","PATCH","DELETE"].includes(t.options.method))throw new Error("Invalid saved mutation draft");return t}catch{return sessionStorage.removeItem(c),null}}async resumeFreshAuthMutation(){const e=this.freshAuthMutationDraft();if(!e)throw new Error("No saved catalog edit is available.");const t=await this.request(e.endpoint,{method:e.options.method,body:e.options.body,headers:e.options.headers});return this.clearAttempt({headers:e.options.headers}),sessionStorage.removeItem(c),sessionStorage.removeItem(p),t}saveFreshAuthMutation(e,t,s,o){const a=Object.fromEntries(new Headers(o.headers).entries()),r=typeof o.body=="string"?o.body:void 0;sessionStorage.setItem(c,JSON.stringify({section:e,endpoint:t,payload:s,options:{method:(o.method??"POST").toUpperCase(),body:r,headers:a}}))}idempotencyHeaders(e,t,s){const o=`pwc:mutation:${e}:${JSON.stringify(t)}`,a=sessionStorage.getItem(o);if(a){const h=JSON.parse(a);return{"Idempotency-Key":h.key,"If-Match":h.version}}const r=crypto.randomUUID();return sessionStorage.setItem(o,JSON.stringify({key:r,version:s})),sessionStorage.setItem(`pwc:mutation-key:${r}`,o),{"Idempotency-Key":r,"If-Match":s}}clearAttempt(e){const t=new Headers(e.headers).get("Idempotency-Key");if(!t)return;const s=sessionStorage.getItem(`pwc:mutation-key:${t}`);s&&sessionStorage.removeItem(s),sessionStorage.removeItem(`pwc:mutation-key:${t}`),this.paperLoads.clear(),this.evaluationLoads.clear()}}const T=new S(v);export{p as F,y as P,_ as i,T as p}; diff --git a/assets/database-Ci0ufNyG.js b/assets/database-stY-9KZX.js similarity index 89% rename from assets/database-Ci0ufNyG.js rename to assets/database-stY-9KZX.js index 3363dd6784acc07642de97a335913963765eeacd..effa7d5605dba0593b6417e4d2fb4afcab129757 100644 --- a/assets/database-Ci0ufNyG.js +++ b/assets/database-stY-9KZX.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-D2fBL-s6.js";/** +import{c as e}from"./index-BeSw2DVP.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/dialog-DgUROq2j.js b/assets/dialog-EpDnY6a5.js similarity index 96% rename from assets/dialog-DgUROq2j.js rename to assets/dialog-EpDnY6a5.js index d0083a1e3d9f6ccca6d668e0bc4cc1f718b25822..3e88b33d207041a70c33a183a1e65aaee6716863 100644 --- a/assets/dialog-DgUROq2j.js +++ b/assets/dialog-EpDnY6a5.js @@ -1 +1 @@ -import{ag as f,f as l,j as t,ah as p,aj as d,al as g,X as x,I as o,ai as n,am as i,an as r}from"./index-D2fBL-s6.js";const w=f,u=p,c=l.forwardRef(({className:a,...e},s)=>t.jsx(n,{ref:s,className:o("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...e}));c.displayName=n.displayName;const y=l.forwardRef(({className:a,children:e,...s},m)=>t.jsxs(u,{children:[t.jsx(c,{}),t.jsxs(d,{ref:m,className:o("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",a),...s,children:[e,t.jsxs(g,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[t.jsx(x,{className:"h-4 w-4"}),t.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));y.displayName=d.displayName;const N=({className:a,...e})=>t.jsx("div",{className:o("flex flex-col space-y-1.5 text-center sm:text-left",a),...e});N.displayName="DialogHeader";const j=({className:a,...e})=>t.jsx("div",{className:o("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",a),...e});j.displayName="DialogFooter";const D=l.forwardRef(({className:a,...e},s)=>t.jsx(i,{ref:s,className:o("text-lg font-semibold leading-none tracking-tight",a),...e}));D.displayName=i.displayName;const b=l.forwardRef(({className:a,...e},s)=>t.jsx(r,{ref:s,className:o("text-sm text-muted-foreground",a),...e}));b.displayName=r.displayName;export{w as D,y as a,D as b,N as c,b as d,j as e}; +import{ag as f,f as l,j as t,ah as p,aj as d,al as g,X as x,I as o,ai as n,am as i,an as r}from"./index-BeSw2DVP.js";const w=f,u=p,c=l.forwardRef(({className:a,...e},s)=>t.jsx(n,{ref:s,className:o("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...e}));c.displayName=n.displayName;const y=l.forwardRef(({className:a,children:e,...s},m)=>t.jsxs(u,{children:[t.jsx(c,{}),t.jsxs(d,{ref:m,className:o("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",a),...s,children:[e,t.jsxs(g,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[t.jsx(x,{className:"h-4 w-4"}),t.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));y.displayName=d.displayName;const N=({className:a,...e})=>t.jsx("div",{className:o("flex flex-col space-y-1.5 text-center sm:text-left",a),...e});N.displayName="DialogHeader";const j=({className:a,...e})=>t.jsx("div",{className:o("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",a),...e});j.displayName="DialogFooter";const D=l.forwardRef(({className:a,...e},s)=>t.jsx(i,{ref:s,className:o("text-lg font-semibold leading-none tracking-tight",a),...e}));D.displayName=i.displayName;const b=l.forwardRef(({className:a,...e},s)=>t.jsx(r,{ref:s,className:o("text-sm text-muted-foreground",a),...e}));b.displayName=r.displayName;export{w as D,y as a,D as b,N as c,b as d,j as e}; diff --git a/assets/evaluationQueryInvalidation-Cs0hE-wT.js b/assets/evaluationQueryInvalidation-Fkke0ERS.js similarity index 97% rename from assets/evaluationQueryInvalidation-Cs0hE-wT.js rename to assets/evaluationQueryInvalidation-Fkke0ERS.js index d7f6aa21ea240de2da081587ab1a626aba491e65..a472fe74900b9f2c420459a0fd2a16225a9fb12a 100644 --- a/assets/evaluationQueryInvalidation-Cs0hE-wT.js +++ b/assets/evaluationQueryInvalidation-Fkke0ERS.js @@ -1 +1 @@ -var z=a=>{throw TypeError(a)};var I=(a,e,t)=>e.has(a)||z("Cannot "+t);var u=(a,e,t)=>(I(a,e,"read from private field"),t?t.call(a):e.get(a)),v=(a,e,t)=>e.has(a)?z("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(a):e.set(a,t),l=(a,e,t,s)=>(I(a,e,"write to private field"),s?s.call(a,t):e.set(a,t),t),g=(a,e,t)=>(I(a,e,"access private method"),t);import{aB as Y,aF as H,aC as Z,aS as J,aN as N,l as W,aT as ee,aU as se,f as C,aV as te,aW as re,aX as ae,aG as ie,aY as F,aZ as ne,a_ as oe,t as A,q as B}from"./index-D2fBL-s6.js";import{i as ue,a as ce}from"./queryInvalidation-BVOtRFkG.js";function j(a,e){const t=new Set(e);return a.filter(s=>!t.has(s))}function de(a,e,t){const s=a.slice(0);return s[e]=t,s}var _,f,w,E,y,k,x,K,M,P,d,L,D,V,T,$,U,G,he=(G=class extends Y{constructor(e,t,s){super();v(this,d);v(this,_);v(this,f);v(this,w);v(this,E);v(this,y);v(this,k);v(this,x);v(this,K);v(this,M);v(this,P,[]);l(this,_,e),l(this,E,s),l(this,w,[]),l(this,y,[]),l(this,f,[]),this.setQueries(t)}onSubscribe(){this.listeners.size===1&&u(this,y).forEach(e=>{e.subscribe(t=>{g(this,d,$).call(this,e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,u(this,y).forEach(e=>{e.destroy()})}setQueries(e,t){l(this,w,e),l(this,E,t),H.batch(()=>{const s=u(this,y),n=g(this,d,T).call(this,u(this,w));n.forEach(i=>i.observer.setOptions(i.defaultedQueryOptions));const r=n.map(i=>i.observer),o=r.map(i=>i.getCurrentResult()),h=s.length!==r.length,m=r.some((i,b)=>i!==s[b]),S=h||m,c=S?!0:o.some((i,b)=>{const R=u(this,f)[b];return!R||!Z(i,R)});!S&&!c||(S&&(l(this,P,n),l(this,y,r)),l(this,f,o),this.hasListeners()&&(S&&(j(s,r).forEach(i=>{i.destroy()}),j(r,s).forEach(i=>{i.subscribe(b=>{g(this,d,$).call(this,i,b)})})),g(this,d,U).call(this)))})}getCurrentResult(){return u(this,f)}getQueries(){return u(this,y).map(e=>e.getCurrentQuery())}getObservers(){return u(this,y)}getOptimisticResult(e,t){const s=g(this,d,T).call(this,e),n=s.map(o=>o.observer.getOptimisticResult(o.defaultedQueryOptions)),r=s.map(o=>o.defaultedQueryOptions.queryHash);return[n,o=>g(this,d,D).call(this,o??n,t,r),()=>g(this,d,L).call(this,n,s)]}},_=new WeakMap,f=new WeakMap,w=new WeakMap,E=new WeakMap,y=new WeakMap,k=new WeakMap,x=new WeakMap,K=new WeakMap,M=new WeakMap,P=new WeakMap,d=new WeakSet,L=function(e,t){return t.map((s,n)=>{const r=e[n];return s.defaultedQueryOptions.notifyOnChangeProps?r:s.observer.trackResult(r,o=>{t.forEach(h=>{h.observer.trackProp(o)})})})},D=function(e,t,s){if(t){const n=u(this,M),r=s!==void 0&&n!==void 0&&(n.length!==s.length||s.some((o,h)=>o!==n[h]));return(!u(this,k)||u(this,f)!==u(this,K)||r||t!==u(this,x))&&(l(this,x,t),l(this,K,u(this,f)),s!==void 0&&l(this,M,s),l(this,k,J(u(this,k),t(e)))),u(this,k)}return e},V=function(){var e;return((e=u(this,E))==null?void 0:e.combine)!==void 0&&u(this,y).some((t,s)=>{var n;return t.options.suspense&&((n=u(this,f)[s])==null?void 0:n.data)===void 0})},T=function(e){const t=new Map;u(this,y).forEach(n=>{const r=n.options.queryHash;if(!r)return;const o=t.get(r);o?o.push(n):t.set(r,[n])});const s=[];return e.forEach(n=>{var m;const r=u(this,_).defaultQueryOptions(n),h=((m=t.get(r.queryHash))==null?void 0:m.shift())??new N(u(this,_),r);s.push({defaultedQueryOptions:r,observer:h})}),s},$=function(e,t){const s=u(this,y).indexOf(e);s!==-1&&(l(this,f,de(u(this,f),s,t)),g(this,d,U).call(this))},U=function(){var e;if(this.hasListeners()){const t=g(this,d,L).call(this,u(this,f),u(this,P)),s=g(this,d,V).call(this),n=u(this,k),r=s?n:g(this,d,D).call(this,t,(e=u(this,E))==null?void 0:e.combine);(s||n!==r)&&H.batch(()=>{this.listeners.forEach(o=>{o(u(this,f))})})}},G);function ye({queries:a,...e},t){const s=W(),n=ee(),r=se(),o=C.useMemo(()=>a.map(p=>{const Q=s.defaultQueryOptions(p);return Q._optimisticResults=n?"isRestoring":"optimistic",Q}),[a,s,n]);o.forEach(p=>{te(p);const Q=s.getQueryCache().get(p.queryHash);re(p,r,Q)}),ae(r);const[h]=C.useState(()=>new he(s,o,e)),[m,S,c]=h.getOptimisticResult(o,e.combine),i=!n&&e.subscribed!==!1;C.useSyncExternalStore(C.useCallback(p=>i?h.subscribe(H.batchCalls(p)):ie,[h,i]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),C.useEffect(()=>{h.setQueries(o,e)},[o,e,h]);const R=m.some((p,Q)=>F(o[Q],p))?m.flatMap((p,Q)=>{const O=o[Q];if(O&&F(O,p)){const X=new N(s,O);return ne(O,X,r)}return[]}):[];if(R.length>0)throw Promise.all(R);const q=m.find((p,Q)=>{const O=o[Q];return O&&oe({result:p,errorResetBoundary:r,throwOnError:O.throwOnError,query:s.getQueryCache().get(O.queryHash),suspense:O.suspense})});if(q!=null&&q.error)throw q.error;return S(c())}function be(a,e,t,s){const n=new Set(t.flatMap(r=>r.op==="create"?[]:[String(r.evaluation_id)]));return{paperId:a,arxivId:s,contexts:[...e.filter(r=>r.id!==void 0&&n.has(String(r.id))),...t.flatMap(r=>r.op==="delete"?[]:[r.data])]}}function ve(a,e){const t=new Set(e.contexts.flatMap(c=>c.dataset_id==null?[]:[String(c.dataset_id)])),s=new Set(e.contexts.flatMap(c=>c.task_id==null?[]:[String(c.task_id)])),n=new Set([e.paperId]),r=new Set;e.arxivId&&r.add(e.arxivId);const o=new Set(e.contexts.map(c=>`${c.task_id}:${c.dataset_id}`)),h=a.getQueryCache(),m=[...h.findAll({queryKey:A.byDatasetAll}),...h.findAll({queryKey:A.byPaperAll})];for(const c of m)for(const i of c.state.data??[])o.has(`${i.task_id}:${i.dataset_id}`)&&(n.add(String(i.paper_id)),i.paper_arxiv_id&&r.add(i.paper_arxiv_id));ue(a,[...n,...r]),ce(a),a.invalidateQueries({queryKey:A.byPaperAll,predicate:c=>n.has(String(c.queryKey[2]))});const S=c=>t.has(String(c.queryKey[1]));a.invalidateQueries({queryKey:A.byDatasetAll,predicate:S}),a.invalidateQueries({queryKey:B.datasetTasks,predicate:S}),a.invalidateQueries({queryKey:B.datasets,predicate:c=>{const i=c.state.data;return S(c)||!!(i&&t.has(String(i.id)))}}),a.invalidateQueries({queryKey:B.taskPage,predicate:c=>{const i=c.state.data;return s.has(String(c.queryKey[1]))||!!(i&&(s.has(String(i.task.id))||i.subtask_benchmarks.some(b=>s.has(String(b.subtask_id)))||i.benchmarks.some(b=>t.has(String(b.id)))||i.subtask_benchmarks.some(b=>b.benchmarks.some(R=>t.has(String(R.id))))))}}),a.invalidateQueries({queryKey:B.taskBenchmarkTrends,predicate:c=>{const i=c.state.data;return s.has(String(c.queryKey[1]))||!!(i&&s.has(String(i.task_id)))}})}export{be as e,ve as r,ye as u}; +var z=a=>{throw TypeError(a)};var I=(a,e,t)=>e.has(a)||z("Cannot "+t);var u=(a,e,t)=>(I(a,e,"read from private field"),t?t.call(a):e.get(a)),v=(a,e,t)=>e.has(a)?z("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(a):e.set(a,t),l=(a,e,t,s)=>(I(a,e,"write to private field"),s?s.call(a,t):e.set(a,t),t),g=(a,e,t)=>(I(a,e,"access private method"),t);import{aB as Y,aF as H,aC as Z,aS as J,aN as N,l as W,aT as ee,aU as se,f as C,aV as te,aW as re,aX as ae,aG as ie,aY as F,aZ as ne,a_ as oe,t as A,q as B}from"./index-BeSw2DVP.js";import{i as ue,a as ce}from"./queryInvalidation-DU8xd9pK.js";function j(a,e){const t=new Set(e);return a.filter(s=>!t.has(s))}function de(a,e,t){const s=a.slice(0);return s[e]=t,s}var _,f,w,E,y,k,x,K,M,P,d,L,D,V,T,$,U,G,he=(G=class extends Y{constructor(e,t,s){super();v(this,d);v(this,_);v(this,f);v(this,w);v(this,E);v(this,y);v(this,k);v(this,x);v(this,K);v(this,M);v(this,P,[]);l(this,_,e),l(this,E,s),l(this,w,[]),l(this,y,[]),l(this,f,[]),this.setQueries(t)}onSubscribe(){this.listeners.size===1&&u(this,y).forEach(e=>{e.subscribe(t=>{g(this,d,$).call(this,e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,u(this,y).forEach(e=>{e.destroy()})}setQueries(e,t){l(this,w,e),l(this,E,t),H.batch(()=>{const s=u(this,y),n=g(this,d,T).call(this,u(this,w));n.forEach(i=>i.observer.setOptions(i.defaultedQueryOptions));const r=n.map(i=>i.observer),o=r.map(i=>i.getCurrentResult()),h=s.length!==r.length,m=r.some((i,b)=>i!==s[b]),S=h||m,c=S?!0:o.some((i,b)=>{const R=u(this,f)[b];return!R||!Z(i,R)});!S&&!c||(S&&(l(this,P,n),l(this,y,r)),l(this,f,o),this.hasListeners()&&(S&&(j(s,r).forEach(i=>{i.destroy()}),j(r,s).forEach(i=>{i.subscribe(b=>{g(this,d,$).call(this,i,b)})})),g(this,d,U).call(this)))})}getCurrentResult(){return u(this,f)}getQueries(){return u(this,y).map(e=>e.getCurrentQuery())}getObservers(){return u(this,y)}getOptimisticResult(e,t){const s=g(this,d,T).call(this,e),n=s.map(o=>o.observer.getOptimisticResult(o.defaultedQueryOptions)),r=s.map(o=>o.defaultedQueryOptions.queryHash);return[n,o=>g(this,d,D).call(this,o??n,t,r),()=>g(this,d,L).call(this,n,s)]}},_=new WeakMap,f=new WeakMap,w=new WeakMap,E=new WeakMap,y=new WeakMap,k=new WeakMap,x=new WeakMap,K=new WeakMap,M=new WeakMap,P=new WeakMap,d=new WeakSet,L=function(e,t){return t.map((s,n)=>{const r=e[n];return s.defaultedQueryOptions.notifyOnChangeProps?r:s.observer.trackResult(r,o=>{t.forEach(h=>{h.observer.trackProp(o)})})})},D=function(e,t,s){if(t){const n=u(this,M),r=s!==void 0&&n!==void 0&&(n.length!==s.length||s.some((o,h)=>o!==n[h]));return(!u(this,k)||u(this,f)!==u(this,K)||r||t!==u(this,x))&&(l(this,x,t),l(this,K,u(this,f)),s!==void 0&&l(this,M,s),l(this,k,J(u(this,k),t(e)))),u(this,k)}return e},V=function(){var e;return((e=u(this,E))==null?void 0:e.combine)!==void 0&&u(this,y).some((t,s)=>{var n;return t.options.suspense&&((n=u(this,f)[s])==null?void 0:n.data)===void 0})},T=function(e){const t=new Map;u(this,y).forEach(n=>{const r=n.options.queryHash;if(!r)return;const o=t.get(r);o?o.push(n):t.set(r,[n])});const s=[];return e.forEach(n=>{var m;const r=u(this,_).defaultQueryOptions(n),h=((m=t.get(r.queryHash))==null?void 0:m.shift())??new N(u(this,_),r);s.push({defaultedQueryOptions:r,observer:h})}),s},$=function(e,t){const s=u(this,y).indexOf(e);s!==-1&&(l(this,f,de(u(this,f),s,t)),g(this,d,U).call(this))},U=function(){var e;if(this.hasListeners()){const t=g(this,d,L).call(this,u(this,f),u(this,P)),s=g(this,d,V).call(this),n=u(this,k),r=s?n:g(this,d,D).call(this,t,(e=u(this,E))==null?void 0:e.combine);(s||n!==r)&&H.batch(()=>{this.listeners.forEach(o=>{o(u(this,f))})})}},G);function ye({queries:a,...e},t){const s=W(),n=ee(),r=se(),o=C.useMemo(()=>a.map(p=>{const Q=s.defaultQueryOptions(p);return Q._optimisticResults=n?"isRestoring":"optimistic",Q}),[a,s,n]);o.forEach(p=>{te(p);const Q=s.getQueryCache().get(p.queryHash);re(p,r,Q)}),ae(r);const[h]=C.useState(()=>new he(s,o,e)),[m,S,c]=h.getOptimisticResult(o,e.combine),i=!n&&e.subscribed!==!1;C.useSyncExternalStore(C.useCallback(p=>i?h.subscribe(H.batchCalls(p)):ie,[h,i]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),C.useEffect(()=>{h.setQueries(o,e)},[o,e,h]);const R=m.some((p,Q)=>F(o[Q],p))?m.flatMap((p,Q)=>{const O=o[Q];if(O&&F(O,p)){const X=new N(s,O);return ne(O,X,r)}return[]}):[];if(R.length>0)throw Promise.all(R);const q=m.find((p,Q)=>{const O=o[Q];return O&&oe({result:p,errorResetBoundary:r,throwOnError:O.throwOnError,query:s.getQueryCache().get(O.queryHash),suspense:O.suspense})});if(q!=null&&q.error)throw q.error;return S(c())}function be(a,e,t,s){const n=new Set(t.flatMap(r=>r.op==="create"?[]:[String(r.evaluation_id)]));return{paperId:a,arxivId:s,contexts:[...e.filter(r=>r.id!==void 0&&n.has(String(r.id))),...t.flatMap(r=>r.op==="delete"?[]:[r.data])]}}function ve(a,e){const t=new Set(e.contexts.flatMap(c=>c.dataset_id==null?[]:[String(c.dataset_id)])),s=new Set(e.contexts.flatMap(c=>c.task_id==null?[]:[String(c.task_id)])),n=new Set([e.paperId]),r=new Set;e.arxivId&&r.add(e.arxivId);const o=new Set(e.contexts.map(c=>`${c.task_id}:${c.dataset_id}`)),h=a.getQueryCache(),m=[...h.findAll({queryKey:A.byDatasetAll}),...h.findAll({queryKey:A.byPaperAll})];for(const c of m)for(const i of c.state.data??[])o.has(`${i.task_id}:${i.dataset_id}`)&&(n.add(String(i.paper_id)),i.paper_arxiv_id&&r.add(i.paper_arxiv_id));ue(a,[...n,...r]),ce(a),a.invalidateQueries({queryKey:A.byPaperAll,predicate:c=>n.has(String(c.queryKey[2]))});const S=c=>t.has(String(c.queryKey[1]));a.invalidateQueries({queryKey:A.byDatasetAll,predicate:S}),a.invalidateQueries({queryKey:B.datasetTasks,predicate:S}),a.invalidateQueries({queryKey:B.datasets,predicate:c=>{const i=c.state.data;return S(c)||!!(i&&t.has(String(i.id)))}}),a.invalidateQueries({queryKey:B.taskPage,predicate:c=>{const i=c.state.data;return s.has(String(c.queryKey[1]))||!!(i&&(s.has(String(i.task.id))||i.subtask_benchmarks.some(b=>s.has(String(b.subtask_id)))||i.benchmarks.some(b=>t.has(String(b.id)))||i.subtask_benchmarks.some(b=>b.benchmarks.some(R=>t.has(String(R.id))))))}}),a.invalidateQueries({queryKey:B.taskBenchmarkTrends,predicate:c=>{const i=c.state.data;return s.has(String(c.queryKey[1]))||!!(i&&s.has(String(i.task_id)))}})}export{be as e,ve as r,ye as u}; diff --git a/assets/external-link-Ddavpnin.js b/assets/external-link-BAPjX9Up.js similarity index 89% rename from assets/external-link-Ddavpnin.js rename to assets/external-link-BAPjX9Up.js index 5306473af06043711e91a1422d95d12b06583749..9f8572f8300422c6bfd3b89d1a84af413572c51a 100644 --- a/assets/external-link-Ddavpnin.js +++ b/assets/external-link-BAPjX9Up.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-D2fBL-s6.js";/** +import{c as a}from"./index-BeSw2DVP.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/file-text-CikzkPqz.js b/assets/file-text-BHvaEohD.js similarity index 91% rename from assets/file-text-CikzkPqz.js rename to assets/file-text-BHvaEohD.js index de408fb88379db3494def3cdf4bb5b6378f93785..90385eb593f452124c52df4e86cf07255740c005 100644 --- a/assets/file-text-CikzkPqz.js +++ b/assets/file-text-BHvaEohD.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-D2fBL-s6.js";/** +import{c as e}from"./index-BeSw2DVP.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/github-DcIeypA5.js b/assets/github-CTNIgqBO.js similarity index 93% rename from assets/github-DcIeypA5.js rename to assets/github-CTNIgqBO.js index efbaa8df9020965e09541bf299328e127fefb258..caa0c55835e230bf860c2fbc3a752ae52ac2ab42 100644 --- a/assets/github-DcIeypA5.js +++ b/assets/github-CTNIgqBO.js @@ -1,4 +1,4 @@ -import{c}from"./index-D2fBL-s6.js";/** +import{c}from"./index-BeSw2DVP.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/globe-BPKDvPgp.js b/assets/globe-B-CTr8Vu.js similarity index 89% rename from assets/globe-BPKDvPgp.js rename to assets/globe-B-CTr8Vu.js index 9ba7bdc09424328f899160c6b35e52080a9bdb58..e8d575bad4ae7240f3e1f68525843e2b0c119018 100644 --- a/assets/globe-BPKDvPgp.js +++ b/assets/globe-B-CTr8Vu.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-D2fBL-s6.js";/** +import{c as e}from"./index-BeSw2DVP.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/hover-card-DWpZK4fW.js b/assets/hover-card-BbFULETs.js similarity index 98% rename from assets/hover-card-DWpZK4fW.js rename to assets/hover-card-BbFULETs.js index 047fe922e45c222f5f6818bcad45c89e5bee5e5d..ed1a93d09c72aa92b13776a2b7e87438f93331f9 100644 --- a/assets/hover-card-DWpZK4fW.js +++ b/assets/hover-card-BbFULETs.js @@ -1 +1 @@ -import{f as n,B as k,j as c,ap as F,aq as I,z as U,E as l,ar as T,P as O,as as $,G as z,D as B,at as W,au as G,av as K,I as q}from"./index-D2fBL-s6.js";var E,g="HoverCard",[y]=z(g,[T]),w=T(),[V,S]=y(g),N=e=>{const{__scopeHoverCard:o,children:r,open:s,defaultOpen:a,onOpenChange:i,openDelay:f=700,closeDelay:v=300}=e,d=w(o),C=n.useRef(0),u=n.useRef(0),h=n.useRef(!1),p=n.useRef(!1),[m,t]=k({prop:s,defaultProp:a??!1,onChange:i,caller:g}),x=n.useCallback(()=>{clearTimeout(u.current),C.current=window.setTimeout(()=>t(!0),f)},[f,t]),P=n.useCallback(()=>{clearTimeout(C.current),!h.current&&!p.current&&(u.current=window.setTimeout(()=>t(!1),v))},[v,t]),M=n.useCallback(()=>t(!1),[t]);return n.useEffect(()=>()=>{clearTimeout(C.current),clearTimeout(u.current)},[]),c.jsx(V,{scope:o,open:m,onOpenChange:t,onOpen:x,onClose:P,onDismiss:M,hasSelectionRef:h,isPointerDownOnContentRef:p,children:c.jsx(F,{...d,children:r})})};N.displayName=g;var _="HoverCardTrigger",D=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,...s}=e,a=S(_,r),i=w(r);return c.jsx(I,{asChild:!0,...i,children:c.jsx(U.a,{"data-state":a.open?"open":"closed",...s,ref:o,onPointerEnter:l(e.onPointerEnter,b(a.onOpen)),onPointerLeave:l(e.onPointerLeave,b(a.onClose)),onFocus:l(e.onFocus,a.onOpen),onBlur:l(e.onBlur,a.onClose),onTouchStart:l(e.onTouchStart,f=>f.preventDefault())})})});D.displayName=_;var H="HoverCardPortal",[J,Q]=y(H,{forceMount:void 0}),j=e=>{const{__scopeHoverCard:o,forceMount:r,children:s,container:a}=e,i=S(H,o);return c.jsx(J,{scope:o,forceMount:r,children:c.jsx(O,{present:r||i.open,children:c.jsx($,{asChild:!0,container:a,children:s})})})};j.displayName=H;var R="HoverCardContent",A=n.forwardRef((e,o)=>{const r=Q(R,e.__scopeHoverCard),{forceMount:s=r.forceMount,...a}=e,i=S(R,e.__scopeHoverCard);return c.jsx(O,{present:s||i.open,children:c.jsx(X,{"data-state":i.open?"open":"closed",...a,onPointerEnter:l(e.onPointerEnter,b(i.onOpen)),onPointerLeave:l(e.onPointerLeave,b(i.onClose)),ref:o})})});A.displayName=R;var X=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:f,...v}=e,d=S(R,r),C=w(r),u=n.useRef(null),h=B(o,u),[p,m]=n.useState(!1);return n.useEffect(()=>{if(p){const t=document.body;return E=t.style.userSelect||t.style.webkitUserSelect,t.style.userSelect="none",t.style.webkitUserSelect="none",()=>{t.style.userSelect=E,t.style.webkitUserSelect=E}}},[p]),n.useEffect(()=>{if(u.current){const t=()=>{m(!1),d.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var P;((P=document.getSelection())==null?void 0:P.toString())!==""&&(d.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",t),()=>{document.removeEventListener("pointerup",t),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!1}}},[d.isPointerDownOnContentRef,d.hasSelectionRef]),n.useEffect(()=>{u.current&&ee(u.current).forEach(x=>x.setAttribute("tabindex","-1"))}),c.jsx(W,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:f,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:l(i,t=>{t.preventDefault()}),onDismiss:d.onDismiss,children:c.jsx(G,{...C,...v,onPointerDown:l(v.onPointerDown,t=>{t.currentTarget.contains(t.target)&&m(!0),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!0}),ref:h,style:{...v.style,userSelect:p?"text":void 0,WebkitUserSelect:p?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),Y="HoverCardArrow",Z=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,...s}=e,a=w(r);return c.jsx(K,{...a,...s,ref:o})});Z.displayName=Y;function b(e){return o=>o.pointerType==="touch"?void 0:e()}function ee(e){const o=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;r.nextNode();)o.push(r.currentNode);return o}var te=N,oe=D,re=j,L=A;const se=te,ce=oe,ne=n.forwardRef(({className:e,align:o="center",sideOffset:r=4,...s},a)=>c.jsx(re,{children:c.jsx(L,{ref:a,align:o,sideOffset:r,className:q("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...s})}));ne.displayName=L.displayName;export{se as H,ce as a,ne as b}; +import{f as n,B as k,j as c,ap as F,aq as I,z as U,E as l,ar as T,P as O,as as $,G as z,D as B,at as W,au as G,av as K,I as q}from"./index-BeSw2DVP.js";var E,g="HoverCard",[y]=z(g,[T]),w=T(),[V,S]=y(g),N=e=>{const{__scopeHoverCard:o,children:r,open:s,defaultOpen:a,onOpenChange:i,openDelay:f=700,closeDelay:v=300}=e,d=w(o),C=n.useRef(0),u=n.useRef(0),h=n.useRef(!1),p=n.useRef(!1),[m,t]=k({prop:s,defaultProp:a??!1,onChange:i,caller:g}),x=n.useCallback(()=>{clearTimeout(u.current),C.current=window.setTimeout(()=>t(!0),f)},[f,t]),P=n.useCallback(()=>{clearTimeout(C.current),!h.current&&!p.current&&(u.current=window.setTimeout(()=>t(!1),v))},[v,t]),M=n.useCallback(()=>t(!1),[t]);return n.useEffect(()=>()=>{clearTimeout(C.current),clearTimeout(u.current)},[]),c.jsx(V,{scope:o,open:m,onOpenChange:t,onOpen:x,onClose:P,onDismiss:M,hasSelectionRef:h,isPointerDownOnContentRef:p,children:c.jsx(F,{...d,children:r})})};N.displayName=g;var _="HoverCardTrigger",D=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,...s}=e,a=S(_,r),i=w(r);return c.jsx(I,{asChild:!0,...i,children:c.jsx(U.a,{"data-state":a.open?"open":"closed",...s,ref:o,onPointerEnter:l(e.onPointerEnter,b(a.onOpen)),onPointerLeave:l(e.onPointerLeave,b(a.onClose)),onFocus:l(e.onFocus,a.onOpen),onBlur:l(e.onBlur,a.onClose),onTouchStart:l(e.onTouchStart,f=>f.preventDefault())})})});D.displayName=_;var H="HoverCardPortal",[J,Q]=y(H,{forceMount:void 0}),j=e=>{const{__scopeHoverCard:o,forceMount:r,children:s,container:a}=e,i=S(H,o);return c.jsx(J,{scope:o,forceMount:r,children:c.jsx(O,{present:r||i.open,children:c.jsx($,{asChild:!0,container:a,children:s})})})};j.displayName=H;var R="HoverCardContent",A=n.forwardRef((e,o)=>{const r=Q(R,e.__scopeHoverCard),{forceMount:s=r.forceMount,...a}=e,i=S(R,e.__scopeHoverCard);return c.jsx(O,{present:s||i.open,children:c.jsx(X,{"data-state":i.open?"open":"closed",...a,onPointerEnter:l(e.onPointerEnter,b(i.onOpen)),onPointerLeave:l(e.onPointerLeave,b(i.onClose)),ref:o})})});A.displayName=R;var X=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:f,...v}=e,d=S(R,r),C=w(r),u=n.useRef(null),h=B(o,u),[p,m]=n.useState(!1);return n.useEffect(()=>{if(p){const t=document.body;return E=t.style.userSelect||t.style.webkitUserSelect,t.style.userSelect="none",t.style.webkitUserSelect="none",()=>{t.style.userSelect=E,t.style.webkitUserSelect=E}}},[p]),n.useEffect(()=>{if(u.current){const t=()=>{m(!1),d.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var P;((P=document.getSelection())==null?void 0:P.toString())!==""&&(d.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",t),()=>{document.removeEventListener("pointerup",t),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!1}}},[d.isPointerDownOnContentRef,d.hasSelectionRef]),n.useEffect(()=>{u.current&&ee(u.current).forEach(x=>x.setAttribute("tabindex","-1"))}),c.jsx(W,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:f,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:l(i,t=>{t.preventDefault()}),onDismiss:d.onDismiss,children:c.jsx(G,{...C,...v,onPointerDown:l(v.onPointerDown,t=>{t.currentTarget.contains(t.target)&&m(!0),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!0}),ref:h,style:{...v.style,userSelect:p?"text":void 0,WebkitUserSelect:p?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),Y="HoverCardArrow",Z=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,...s}=e,a=w(r);return c.jsx(K,{...a,...s,ref:o})});Z.displayName=Y;function b(e){return o=>o.pointerType==="touch"?void 0:e()}function ee(e){const o=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;r.nextNode();)o.push(r.currentNode);return o}var te=N,oe=D,re=j,L=A;const se=te,ce=oe,ne=n.forwardRef(({className:e,align:o="center",sideOffset:r=4,...s},a)=>c.jsx(re,{children:c.jsx(L,{ref:a,align:o,sideOffset:r,className:q("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...s})}));ne.displayName=L.displayName;export{se as H,ce as a,ne as b}; diff --git a/assets/index-D2fBL-s6.js b/assets/index-BeSw2DVP.js similarity index 98% rename from assets/index-D2fBL-s6.js rename to assets/index-BeSw2DVP.js index c61dd6fe7ba5eddf46cf24c073351ebae20973e3..dfa9f526a6049ca4c17023df74a670cee2b94b72 100644 --- a/assets/index-D2fBL-s6.js +++ b/assets/index-BeSw2DVP.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/AuthorizePaperEditView-DtkWcUHu.js","assets/useMutation-9dlTbuQj.js","assets/button-D0XfbdrX.js","assets/paperEdits-C-9tVqXs.js","assets/FollowingView-BemIb4-Z.js","assets/FeedView-6xUWjpm4.js","assets/sparkles-4rJdywIs.js","assets/dialog-DgUROq2j.js","assets/catalog-5AxvKr4D.js","assets/researchTopic-jOpECA0z.js","assets/transform-B_GaHMvk.js","assets/plus-BI8-JXK0.js","assets/arrow-right-COzkrAUH.js","assets/SortableList-BzRDhhmi.js","assets/PaperFeed-BERxHjrg.js","assets/PaperCard-DhorusY5.js","assets/AuthorAvatar-C8tz_syh.js","assets/AuthorAvatar-o5W6pl_W.css","assets/SotaBadges-r6iGzLRW.js","assets/colors-BkWRhvFI.js","assets/Icon-Uhh78KjL.js","assets/LatexTitle-WIQJ1ke0.js","assets/papers-khuZaSFb.js","assets/curation-BtfabyzA.js","assets/safeExternalHref-CkBrsh84.js","assets/popover-DS5Jzsg5.js","assets/skeleton-BDwfco0_.js","assets/useIntersectionObserver-C0Rq0EXm.js","assets/McpShowcase-R1ucnqw2.js","assets/AgentLogos-B5etEEwg.js","assets/chatSessions-CoHSP58H.js","assets/chat-BOZIonsX.js","assets/usePapers-CAjdcUuj.js","assets/useInfiniteQuery-CjJA-90e.js","assets/alert-PnePcfgX.js","assets/TopicView-Dcpv-HZh.js","assets/link-2-DK2lGD4M.js","assets/ChatView-DAikess2.js","assets/chatLifecycle-nMvmiYGF.js","assets/hover-card-DWpZK4fW.js","assets/CatalogEntityPreviewLink-xL6TDpUk.js","assets/github-DcIeypA5.js","assets/file-text-CikzkPqz.js","assets/PaperPreviewLink-BZuRBR1p.js","assets/index-BPshewTi.js","assets/index-BtZPsygG.js","assets/katex-DkKDou_j.js","assets/thumbs-up-BnMguJ3s.js","assets/copy-CcyqVsMW.js","assets/queryOptions-C9woPjwX.js","assets/arrow-left-CzTG6LBL.js","assets/external-link-Ddavpnin.js","assets/search-0R_Hc3S2.js","assets/chevron-up-B9KJ5aUJ.js","assets/chatLifecycle-Lr_OJaUk.css","assets/katex-wklAmtGL.css","assets/share-2-SmaUf3DC.js","assets/mlIntern-KBHZ6tOl.js","assets/openrouter-BRMbmxz_.js","assets/SharedChatView-4eHoic3i.js","assets/PapersListView-tKeAfHNj.js","assets/useDebounce-BLmmIPYP.js","assets/apiErrors-DV2aaDjL.js","assets/frameworks-DDA0P4Tf.js","assets/PaperDetailView-BRUxkorx.js","assets/ExternalSourceEvalBadge-C2AscbJz.js","assets/ExternalSourceEvalBadge-CWUQ52cV.css","assets/paperReader-td2aJigh.js","assets/useDocumentTitle-ibepJVy2.js","assets/preferences-BHmRHfHN.js","assets/account-BHlQBDNT.js","assets/evaluationQueryInvalidation-Cs0hE-wT.js","assets/queryInvalidation-BVOtRFkG.js","assets/input-DdobyT4w.js","assets/searchable-select-CsXzzP_V.js","assets/loader-circle-CoLo2trx.js","assets/SignInToEditDialog-BBAwjxYj.js","assets/textarea-B8b7WxcV.js","assets/submissions-LRopJJKL.js","assets/database-Ci0ufNyG.js","assets/badge-Pw584nS3.js","assets/globe-BPKDvPgp.js","assets/index-C_9KPu-E.js","assets/codex-BUTI-2RM.js","assets/savedPapersAuth-0s9GFyfF.js","assets/organizationNames-BVKzYEBp.js","assets/PaperDetailView-CnKK6W4F.css","assets/PaperReaderView-Bdokcr9P.js","assets/MarkdownText-ludE7yuw.js","assets/TagsIndexView-B8PyY2yF.js","assets/slug-BpH-Nkvz.js","assets/triangle-alert-VQM9i8wl.js","assets/trending-up-DFLWFJuY.js","assets/moon-vNTgqlOp.js","assets/trophy-DbAb1jY1.js","assets/activity-DWWgzth6.js","assets/AreaSection-COKqvfmt.js","assets/TaxonomySuggestionTile-UxnpnHcy.js","assets/useHashScrollOnReady-C36cVkc9.js","assets/areas-Dvi8w2dp.js","assets/TagBrowseView-zzh9zkuk.js","assets/ResearchFollowButton-Bwb5EiPm.js","assets/BenchmarkTrendSparkline-BV1XDSWE.js","assets/NotFound-L0ldWZg9.js","assets/MethodsIndexView-DI2_sTpn.js","assets/FrameworksIndexView-CogZFpfQ.js","assets/TrendsView-BuSUElxo.js","assets/ConferencesIndexView-DGftnYu4.js","assets/deadlines-BG5SWwEG.js","assets/AiDeadlinesView-BG77EAes.js","assets/switch-B4eVY4fu.js","assets/ConferenceDetailView-BapnrC2V.js","assets/conferenceListings-BnmhBx-_.js","assets/ConferenceTaskView-DG4QYE8x.js","assets/OrganizationsIndexView-f5uEFGH-.js","assets/OrganizationsIndexView-CJnrfIkP.css","assets/OrganizationDetailView-BFZVxf5K.js","assets/OrganizationContributionGraph-BFOi-mI4.js","assets/AuthorDetailView-CDAXgj3C.js","assets/MethodDetailView-BP_5bAuS.js","assets/BenchmarkDetailView-CLQh8rRr.js","assets/BenchmarkDetailView-CXxK75GR.css","assets/SavedPapersView-CWCS7z3x.js","assets/SettingsView-BrTjKeDA.js","assets/PrivacyView-D9qn84RB.js","assets/ApiDocsView-C6VvPmjf.js","assets/ApiDocsView-DPuMdYvY.css","assets/McpView-DPmcihrm.js","assets/McpView-EGeqkP46.css","assets/SubmitView-DGwEiuGz.js","assets/CronDashboard-Wker39-h.js","assets/CronDashboard-C733Wslj.js","assets/CronDashboard-DwChfW9h.css","assets/refresh-cw-fOkD1TSw.js","assets/circle-check-1e3iPSaF.js","assets/AutonomousOperations-CPgyKQKJ.js","assets/SubmissionsDashboard-BlDtgY38.js","assets/SubmissionsDashboard-BTmvDoLW.css","assets/UserProfileView-y4tNT8rK.js","assets/RateLimitsView-BdVhhRn6.js","assets/AstraForRoboticsView-4cqZq7Uv.js","assets/AstraForRoboticsView-C_lTF_XB.css","assets/SearchOverlay-BWsLpwx1.js","assets/StagingAccessRequestView-KKG5yc76.js"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/AuthorizePaperEditView-C0qgOk3Y.js","assets/useMutation-CsS-RfeE.js","assets/button-CO2XYoBd.js","assets/paperEdits-CoVzQ5th.js","assets/FollowingView-Cfi3OwP1.js","assets/FeedView-Bv5eNETi.js","assets/sparkles-BjZnVOru.js","assets/dialog-EpDnY6a5.js","assets/catalog-D3XT9SmX.js","assets/researchTopic-Cb4NrTKj.js","assets/transform-BadO0Aba.js","assets/plus-imZJbVTM.js","assets/arrow-right-3wBGidD3.js","assets/SortableList-B8qe5lIn.js","assets/PaperFeed-Cge1MWHJ.js","assets/PaperCard-Dx07g-aj.js","assets/AuthorAvatar-Dpan5W1F.js","assets/AuthorAvatar-o5W6pl_W.css","assets/SotaBadges-FMpqi2HS.js","assets/colors-BkWRhvFI.js","assets/Icon-BWcOShxk.js","assets/LatexTitle-C5yrYbA-.js","assets/papers-B58HJw9r.js","assets/curation-CCIsdsjV.js","assets/safeExternalHref-CkBrsh84.js","assets/popover-CYoFzAud.js","assets/skeleton-BBv4iC5Z.js","assets/useIntersectionObserver-BBx3EHQ9.js","assets/McpShowcase-CMNatnnu.js","assets/AgentLogos-BC7uX8n_.js","assets/chatSessions-v3d2DQH8.js","assets/chat-Bvpu56kX.js","assets/usePapers-Cj1tt_u6.js","assets/useInfiniteQuery-C8JHYWz5.js","assets/alert-uwP129N7.js","assets/TopicView-B1L4_v00.js","assets/link-2-CGWO-evG.js","assets/ChatView-2NhnPPPO.js","assets/chatLifecycle-ByiWkgE5.js","assets/hover-card-BbFULETs.js","assets/CatalogEntityPreviewLink-BPnp82vP.js","assets/github-CTNIgqBO.js","assets/file-text-BHvaEohD.js","assets/PaperPreviewLink-BughwfUv.js","assets/index-CbsMwfXw.js","assets/index-XKdmo9ij.js","assets/katex-DkKDou_j.js","assets/thumbs-up-DGIteJ7Z.js","assets/copy-3DjQpd64.js","assets/queryOptions-C9woPjwX.js","assets/arrow-left-C-qXYpsS.js","assets/external-link-BAPjX9Up.js","assets/search-B4RgSU4h.js","assets/chevron-up-CSi6wXAh.js","assets/chatLifecycle-Lr_OJaUk.css","assets/katex-wklAmtGL.css","assets/share-2-CGSfn6ux.js","assets/mlIntern-C-RSIXvd.js","assets/openrouter-C8otLyGB.js","assets/SharedChatView-C7yziquD.js","assets/PapersListView-CBCcd07A.js","assets/useDebounce-B-RrGVzu.js","assets/apiErrors-CXiv7lxc.js","assets/frameworks-DDA0P4Tf.js","assets/PaperDetailView-DAUcj691.js","assets/ExternalSourceEvalBadge-CfB9WUzn.js","assets/ExternalSourceEvalBadge-CWUQ52cV.css","assets/paperReader-td2aJigh.js","assets/useDocumentTitle-BD_JtGPy.js","assets/preferences-BcztmdfT.js","assets/account-B-4MwKsq.js","assets/evaluationQueryInvalidation-Fkke0ERS.js","assets/queryInvalidation-DU8xd9pK.js","assets/input-B5SDgz8U.js","assets/searchable-select-C_dIHH-q.js","assets/loader-circle-C4luyo5I.js","assets/SignInToEditDialog-DDBzf9N6.js","assets/textarea-VtGLPxu8.js","assets/submissions-D_EEKc6c.js","assets/database-stY-9KZX.js","assets/badge-PwLfXWCy.js","assets/globe-B-CTr8Vu.js","assets/index-b5_7myf0.js","assets/codex-JTzG52Zs.js","assets/savedPapersAuth-CcDg6HlA.js","assets/organizationNames-BVKzYEBp.js","assets/PaperDetailView-CnKK6W4F.css","assets/PaperReaderView-C6y6ZAlb.js","assets/MarkdownText-BdL6XBXC.js","assets/TagsIndexView-CCfD3bxP.js","assets/slug-BpH-Nkvz.js","assets/triangle-alert-1tg5iDLg.js","assets/trending-up-Bx9WuS-7.js","assets/moon-DNdxOMOb.js","assets/trophy-D44BVGMf.js","assets/activity-DCd4sApj.js","assets/AreaSection-DhnFgZsX.js","assets/TaxonomySuggestionTile-CEhbbEDc.js","assets/useHashScrollOnReady-BpiOpyLB.js","assets/areas-Dvi8w2dp.js","assets/TagBrowseView-Cve79Quf.js","assets/ResearchFollowButton-lzWAD6Jv.js","assets/BenchmarkTrendSparkline-BwPQcLi3.js","assets/NotFound-BkVU3ijx.js","assets/MethodsIndexView-tojTcao9.js","assets/FrameworksIndexView-BUbqSHfG.js","assets/TrendsView-Dh0c9hMm.js","assets/ConferencesIndexView-DKRLcCka.js","assets/deadlines-BG5SWwEG.js","assets/AiDeadlinesView-Bq7_kcGg.js","assets/switch-4sA3DCrD.js","assets/ConferenceDetailView-CBVBkALA.js","assets/conferenceListings-BnmhBx-_.js","assets/ConferenceTaskView-DMB1KJgG.js","assets/OrganizationsIndexView-bxW7rJXB.js","assets/OrganizationsIndexView-CJnrfIkP.css","assets/OrganizationDetailView-CPbcJCA-.js","assets/OrganizationContributionGraph-D-wuKwmH.js","assets/AuthorDetailView-YZ5SXaLH.js","assets/MethodDetailView-HXoiJFPs.js","assets/BenchmarkDetailView-YsyYtOrf.js","assets/BenchmarkDetailView-CXxK75GR.css","assets/SavedPapersView-fg5rGNas.js","assets/SettingsView-CqvK81AI.js","assets/PrivacyView-DpQagkBi.js","assets/ApiDocsView-DGZ54Cn7.js","assets/ApiDocsView-DPuMdYvY.css","assets/McpView--ssj-T70.js","assets/McpView-EGeqkP46.css","assets/SubmitView-DjhEFLk3.js","assets/CronDashboard-8Mh93TaY.js","assets/CronDashboard-3jn82om4.js","assets/CronDashboard-DwChfW9h.css","assets/refresh-cw-_ZzKdPgT.js","assets/circle-check-fwAHrwbg.js","assets/AutonomousOperations-CMfRlc27.js","assets/SubmissionsDashboard-C7elnzzl.js","assets/SubmissionsDashboard-BTmvDoLW.css","assets/UserProfileView-D_mh3ZLC.js","assets/RateLimitsView-BaJDbrzN.js","assets/AstraForRoboticsView-D8dJpc99.js","assets/AstraForRoboticsView-C_lTF_XB.css","assets/SearchOverlay-Dj2wmUrg.js","assets/StagingAccessRequestView-CeS3fa4F.js"])))=>i.map(i=>d[i]); var zk=Object.defineProperty;var ym=e=>{throw TypeError(e)};var Uk=(e,t,n)=>t in e?zk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var kr=(e,t,n)=>Uk(e,typeof t!="symbol"?t+"":t,n),Nd=(e,t,n)=>t.has(e)||ym("Cannot "+n);var k=(e,t,n)=>(Nd(e,t,"read from private field"),n?n.call(e):t.get(e)),X=(e,t,n)=>t.has(e)?ym("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),H=(e,t,n,r)=>(Nd(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),ue=(e,t,n)=>(Nd(e,t,"access private method"),n);var Tl=(e,t,n,r)=>({set _(i){H(e,t,i,n)},get _(){return k(e,t,r)}});function Vk(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var rz=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ow(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var aw={exports:{}},Gc={},lw={exports:{}},le={};/** * @license React * react.production.min.js @@ -159,4 +159,4 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const c2=Id("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),d2=t2,f2=n2,h2=g.forwardRef(({className:e,inset:t,children:n,...r},i)=>w.jsxs(ak,{ref:i,className:ct("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent focus:bg-accent",t&&"pl-8",e),...r,children:[n,w.jsx(l2,{className:"ml-auto h-4 w-4"})]}));h2.displayName=ak.displayName;const p2=g.forwardRef(({className:e,...t},n)=>w.jsx(lk,{ref:n,className:ct("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));p2.displayName=lk.displayName;const ck=g.forwardRef(({className:e,sideOffset:t=4,...n},r)=>w.jsx(r2,{children:w.jsx(ek,{ref:r,sideOffset:t,className:ct("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));ck.displayName=ek.displayName;const er=g.forwardRef(({className:e,inset:t,...n},r)=>w.jsx(nk,{ref:r,className:ct("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",t&&"pl-8",e),...n}));er.displayName=nk.displayName;const v2=g.forwardRef(({className:e,children:t,checked:n,...r},i)=>w.jsxs(rk,{ref:i,className:ct("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),checked:n,...r,children:[w.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:w.jsx(sk,{children:w.jsx(a2,{className:"h-4 w-4"})})}),t]}));v2.displayName=rk.displayName;const g2=g.forwardRef(({className:e,children:t,...n},r)=>w.jsxs(ik,{ref:r,className:ct("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...n,children:[w.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:w.jsx(sk,{children:w.jsx(u2,{className:"h-2 w-2 fill-current"})})}),t]}));g2.displayName=ik.displayName;const dk=g.forwardRef(({className:e,inset:t,...n},r)=>w.jsx(tk,{ref:r,className:ct("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));dk.displayName=tk.displayName;const uv=g.forwardRef(({className:e,...t},n)=>w.jsx(ok,{ref:n,className:ct("-mx-1 my-1 h-px bg-muted",e),...t}));uv.displayName=ok.displayName;function m2(e){const n=(e.name||e.username||"?").trim().split(/\s+/).filter(Boolean);return n.length===0?"?":n.length===1?n[0][0].toUpperCase():(n[0][0]+n[n.length-1][0]).toUpperCase()}const y2=({user:e,onLogout:t})=>w.jsxs(d2,{children:[w.jsx(f2,{asChild:!0,children:w.jsx("button",{type:"button",className:"user-avatar-btn","aria-label":`Account menu for ${e.username}`,children:w.jsxs(j1,{className:"h-8 w-8",children:[e.avatar_url&&w.jsx(D1,{src:e.avatar_url,alt:e.username}),w.jsx(z1,{className:"text-xs",children:m2(e)})]})})}),w.jsxs(ck,{align:"end",className:"w-56",children:[w.jsxs(dk,{className:"flex flex-col gap-0.5 py-2",children:[w.jsx("span",{className:"text-sm font-medium leading-tight",children:e.name||e.username}),w.jsxs("span",{className:"text-xs font-normal text-muted-foreground",children:["@",e.username]}),e.is_admin&&w.jsx("span",{className:"mt-1 inline-flex w-fit items-center rounded-full bg-amber-100 px-2 py-0.5 text-[10px] font-medium uppercase tracking-wide text-amber-900",children:"Admin"}),e.role==="contributor"&&w.jsx("span",{className:"mt-1 inline-flex w-fit items-center rounded-full bg-blue-100 px-2 py-0.5 text-[10px] font-medium uppercase tracking-wide text-blue-900",children:"Contributor"})]}),w.jsx(uv,{}),w.jsx(er,{asChild:!0,children:w.jsx("a",{href:`https://huggingface.co/${encodeURIComponent(e.username)}`,target:"_blank",rel:"noopener noreferrer",children:"Hugging Face profile"})}),w.jsx(er,{asChild:!0,children:w.jsx(bn,{to:"/frameworks",children:"Frameworks"})}),w.jsx(er,{asChild:!0,children:w.jsx(bn,{to:"/trends",children:"Trends"})}),e.is_admin&&w.jsxs(w.Fragment,{children:[w.jsx(er,{asChild:!0,children:w.jsx(bn,{to:"/admin-dashboard",children:"Admin dashboard"})}),w.jsx(er,{asChild:!0,children:w.jsx(bn,{to:"/submissions",children:"Review submissions"})})]}),w.jsx(er,{asChild:!0,children:w.jsx(bn,{to:`/${encodeURIComponent(e.username)}`,children:"My contributions"})}),w.jsx(er,{asChild:!0,children:w.jsx(bn,{to:"/settings",children:"Settings"})}),w.jsx(uv,{}),w.jsx(er,{onSelect:n=>{n.preventDefault(),t()},children:"Log out"})]})]}),_2=!1;class Od extends Error{constructor(n,r){var i;super(`API request failed: ${n.status} ${n.statusText}`);kr(this,"status");kr(this,"statusText");kr(this,"response");kr(this,"detail");kr(this,"code");kr(this,"displayMessage");this.name="ApiError",this.status=n.status,this.statusText=n.statusText,this.response=r;try{if(this.detail=(i=JSON.parse(r))==null?void 0:i.detail,typeof this.detail=="string"&&(this.message=this.detail),Array.isArray(this.detail)){const s=this.detail[0];typeof s=="object"&&s!==null&&"msg"in s&&typeof s.msg=="string"&&(this.message=s.msg)}if(typeof this.detail=="object"&&this.detail!==null&&"code"in this.detail&&typeof this.detail.code=="string"&&(this.code=this.detail.code),typeof this.detail=="object"&&this.detail!==null&&"message"in this.detail&&typeof this.detail.message=="string"){const s="help"in this.detail&&typeof this.detail.help=="string"?` See ${this.detail.help} for help.`:"";this.message=`${this.detail.message}${s}`}}catch{this.detail=void 0,this.displayMessage=r||this.message;return}this.displayMessage=this.message}}function wz(e,t){return e instanceof Od?e.displayMessage||t:typeof e=="object"&&e!==null&&"message"in e&&typeof e.message=="string"&&e.message||t}class w2{constructor(t){this.baseUrl=t}async fetch(t,n){const r=`${this.baseUrl}${t}`;try{const{headers:i,...s}=n??{},a=(s.method??"GET").toUpperCase()==="GET"?"default":"no-store",l=new Headers(i);return typeof s.body=="string"&&!l.has("Content-Type")&&l.set("Content-Type","application/json"),await fetch(r,{...s,cache:s.cache??a,credentials:s.credentials??"include",headers:l})}catch(i){throw console.error(`[API] Request to ${r} failed:`,i),i}}async fetchOk(t,n){const r=await this.fetch(t,n);if(!r.ok){const i=new Od(r,await r.text());throw console.error("[API] Error response:",i.response),i}return r}async request(t,n){const r=await this.fetchOk(t,n);return r.status===204?void 0:await r.json()}}function x2(e){e instanceof Od&&e.status===401&&e.code!=="fresh_auth_required"&&e.code!=="saved_papers_bucket_authorization_required"&&typeof window<"u"&&window.dispatchEvent(new CustomEvent("pwc:auth-stale"))}async function fk(e){try{return await e()}catch(t){throw x2(t),t}}const cm=new w2(`${Bg()}/api/v1`),b2=(e,t)=>cm.fetch(e,t),xz=(e,t)=>fk(()=>cm.fetchOk(e,t)),cv=(e,t)=>fk(()=>cm.request(e,t));async function bz(e,t){try{return await cv(e,t)}catch(n){if(n instanceof Od&&n.status===404)return null;throw n}}const z0={async getCurrentUser(){if($o())return null;const e=await b2("/auth/me",{cache:"no-store"});return e.status===401||!e.ok?null:e.json()},async logout(){await cv("/auth/logout",{method:"POST"})},async requestStagingAccess(){await cv("/staging-access-request",{method:"POST"})}},E2={detail:e=>["paper",e],arxiv:e=>["paper-arxiv",e],preview:e=>["paper-preview",e],summary:e=>["paper-summary",e],feeds:{list:["papers"],infinite:["papers-infinite"],following:["research-feed"],search:["paper-search-feed"],task:["task-papers-infinite"],conference:["conference-papers-infinite"],organization:["organization-papers-infinite"],method:["method-papers-infinite"],saved:["my-bookmarks"],related:["related-papers"],versions:["paper-versions"],searchOverlay:["search-papers"],mentions:["chat-paper-mention-search"],trending:["trending-papers"]}},Ez=10*60*1e3,hu={me:["auth","me"]},Sz={preferences:["account","preferences"],bookmarkIds:["my-bookmark-ids"]},Cz={areas:["areas-all"],area:e=>["area",e],topTasksSidebar:["top-tasks-sidebar"],task:e=>["task",e],method:e=>["method",e],organization:e=>["organization",e],dataset:e=>["dataset",e],datasets:["dataset"],datasetTasks:["dataset-tasks"],taskPage:["task-page"],taskBenchmarkTrends:["task-benchmark-trends"],organizations:["organizations"]},kz={all:["evaluations"],byPaper:e=>["evaluations","paper",e],byPaperAll:["evaluations","paper"],byDatasetAll:["dataset-evals"],byDataset:e=>["dataset-evals",e]},Pz={pendingEdits:["pendingPaperEdits"]},Rz={all:["admin"],cronStatus:["admin","cronStatus"],chatSandboxSpend:e=>["admin","chatSandboxSpend",e],chatWebSearchBudget:["admin","chatWebSearchBudget"],autonomousOperations:["admin","autonomousOperations"],paperMarkdownJobs:["admin","paperMarkdownJobs"],codexPaperJobs:["admin","codexPaperJobs"],codexPaperJob:(e,t)=>["admin","codexPaperJob",e,t],catalogAudit:["catalog-audit"]},Tz={follows:e=>["research-follows",e],topics:e=>["research-topics",e],publicTopics:["research-public-topic"],publicTopic:(e,t)=>["research-public-topic",e,t],topicPapers:(e,t,n,r)=>[`research-topic-papers-${e}`,t,n.startDate??null,n.endDate??null,r],featuredTopics:["research-featured-topics"],email:e=>["research-email",e],feed:e=>[...E2.feeds.following,e]},dm=q.createContext(null),U0="pwc:auth-stale",S2=({children:e})=>{const t=DS(),n=uN({queryKey:hu.me,queryFn:()=>z0.getCurrentUser(),staleTime:1/0}),r=n.data??null,i=q.useRef(null),{refetch:s}=n,o=q.useCallback(async()=>{await s()},[s]),a=q.useCallback(async()=>{const u=qg("/api/v1/auth/logout");if(new URL(u,window.location.origin).origin!==window.location.origin){const c=document.createElement("form");c.method="POST",c.action=`${u}?return_to=${encodeURIComponent(window.location.href)}`,document.body.appendChild(c),c.submit();return}await z0.logout(),t.setQueryData(hu.me,null)},[t]);q.useEffect(()=>{},[r]),q.useEffect(()=>{i.current&&!r&&t.resetQueries({predicate:u=>u.queryKey[0]!==hu.me[0]}),i.current=r},[t,r]),q.useEffect(()=>{const u=()=>t.setQueryData(hu.me,null);return window.addEventListener(U0,u),()=>window.removeEventListener(U0,u)},[t]);const l=q.useMemo(()=>({user:r,isLoading:n.isPending,refresh:o,logout:a}),[r,n.isPending,o,a]);return w.jsx(dm.Provider,{value:l,children:e})};function hk(){const e=q.useContext(dm);if(!e)throw new Error("useAuth must be used inside an ");return e}function Iz(){return q.useContext(dm)}const Mr=({name:e,size:t=14})=>{const n={search:w.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"}),bookmark:w.jsx("path",{d:"M4 2h8v12l-4-3-4 3V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),menu:w.jsx("path",{d:"M2 4h12M2 8h12M2 12h12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),close:w.jsx("path",{d:"M3 3l10 10M13 3L3 13",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),github:w.jsx("path",{fill:"currentColor",d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"})};return w.jsx("svg",{className:t===11?"icon-sm":"icon",viewBox:"0 0 16 16",width:t,height:t,children:n[e]})},V0="https://github.com/huggingface/paperswithcode-feedback/issues",B0="https://github.com/huggingface/paperswithcode",C2="https://paperswithcode.co/following",q0="pwc:announcement:following-feed:v1:dismissed",th=[{to:"/",label:"Trending",end:!0},{to:"/tasks",label:"Browse state-of-the-art",end:!1},{to:"/methods",label:"Methods",end:!1},{to:"/conferences",label:"Conferences",end:!1},{to:"/organizations",label:"Organizations",end:!1},{to:"/submit",label:"Submit",end:!1}],k2=()=>{if(typeof navigator>"u")return!1;const e=navigator.userAgentData,t=(e==null?void 0:e.platform)||navigator.platform||navigator.userAgent||"";return/Mac|iPhone|iPad|iPod/i.test(t)},P2=()=>{const[e,t]=q.useState(!1);return q.useEffect(()=>{t(k2())},[]),w.jsx("kbd",{children:e?"⌘K":"Ctrl K"})},R2=({onOpenSearch:e})=>{const[t,n]=q.useState(!1),[r,i]=q.useState(()=>localStorage.getItem(q0)!=="1"),s=q.useRef(null),o=q.useRef(null),a=()=>n(!1),{user:l,logout:u}=hk(),c=hn(),d=c.pathname.startsWith("/pdf/"),f=`${c.pathname}${c.search}`||"/",m=$o(),_=al()?{to:"/chat",label:"Chat",end:!1,badge:"New"}:tF()?{to:"/chat",label:"Chat",end:!1,badge:"New",href:eF}:null,p=_?[th[0],_,...th.slice(1)]:th;return q.useLayoutEffect(()=>{var S;const y=s.current,h=o.current;if(!y||!h)return;let v=!1;const x=()=>{if(v)return;const P=y.querySelector(".nav-item.active"),C=(P==null?void 0:P.offsetWidth)??0;h.style.width=`${C}px`,h.style.transform=`translateX(${(P==null?void 0:P.offsetLeft)??0}px)`,h.style.opacity=C>0?"1":"0"};x();const b=window.requestAnimationFrame(()=>{h.classList.add("nav-indicator-ready")}),E=typeof ResizeObserver>"u"?null:new ResizeObserver(x);return E==null||E.observe(y),window.addEventListener("resize",x),(S=document.fonts)==null||S.ready.then(x),()=>{v=!0,window.cancelAnimationFrame(b),E==null||E.disconnect(),window.removeEventListener("resize",x)}},[c.pathname,p.length]),w.jsxs(q$,{open:t,onOpenChange:n,children:[w.jsxs("header",{className:"app-header",children:[w.jsxs("div",{className:"app-header-inner",children:[w.jsxs(ys,{to:"/",className:"brand",onClick:a,children:[w.jsx("span",{className:"brand-mark"}),w.jsxs("span",{className:"brand-name",children:["Papers ",w.jsx("em",{children:"With Code"})]})]}),w.jsxs("nav",{className:"nav",ref:s,children:[p.map(({to:y,label:h,end:v,badge:x,href:b})=>{const E=w.jsxs(w.Fragment,{children:[w.jsx("span",{children:h}),x&&w.jsx("span",{className:"nav-new-badge","aria-hidden":"true",children:x})]});return b?w.jsx("a",{href:b,target:"_blank",rel:"noreferrer",className:`nav-item${x?" nav-item-with-badge":""}`,children:E},y):w.jsx(ys,{to:y,end:v,className:({isActive:S})=>`nav-item${x?" nav-item-with-badge":""}${S?" active":""}`,children:E},y)}),w.jsx("span",{ref:o,className:"nav-indicator","aria-hidden":"true"})]}),w.jsx("div",{className:"header-spacer"}),w.jsx("a",{className:"feedback-link header-feedback-link",href:V0,target:"_blank",rel:"noreferrer",children:"Submit feedback"}),w.jsx("a",{className:"icon-btn header-github-btn",href:B0,target:"_blank",rel:"noreferrer","aria-label":"GitHub repository",title:"GitHub repository",children:w.jsx(Mr,{name:"github",size:14})}),w.jsxs("button",{className:"search-trigger","aria-label":"Search papers, authors, domains",onClick:e,children:[w.jsx(Mr,{name:"search",size:13}),w.jsx("span",{children:"Search papers, authors, domains…"}),w.jsx(P2,{})]}),w.jsx("button",{className:"icon-btn mobile-search-btn","aria-label":"Search",onClick:e,children:w.jsx(Mr,{name:"search",size:14})}),!m&&w.jsx(ys,{to:"/saved",className:"icon-btn header-bookmark-btn","aria-label":"Saved papers",title:"Saved papers",children:w.jsx(Mr,{name:"bookmark",size:13})}),m?null:l?w.jsx(y2,{user:l,onLogout:u}):w.jsx(m1,{returnTo:f}),w.jsx(W$,{asChild:!0,children:w.jsx("button",{className:"icon-btn mobile-menu-btn","aria-label":"Open menu",children:w.jsx(Mr,{name:"menu",size:14})})})]}),!d&&r&&w.jsxs("div",{className:"site-announcement",role:"status",children:[w.jsx("span",{children:"New: "}),m?w.jsx("a",{href:C2,target:"_blank",rel:"noreferrer",children:"following feed"}):w.jsx(bn,{to:"/following",children:"following feed"}),w.jsx("span",{children:", follow your favorite tasks, benchmarks, authors or organizations"}),w.jsx("button",{type:"button",className:"site-announcement-close","aria-label":"Dismiss announcement",onClick:()=>{localStorage.setItem(q0,"1"),i(!1)},children:w.jsx(Mr,{name:"close",size:11})})]})]}),w.jsx(H$,{children:w.jsx(G$,{className:"mobile-nav-drawer",children:w.jsxs(K$,{className:"mobile-nav-panel","aria-describedby":void 0,children:[w.jsx(Q$,{className:"sr-only",children:"Navigation menu"}),w.jsx(Y$,{className:"icon-btn mobile-nav-close","aria-label":"Close menu",children:w.jsx(Mr,{name:"close",size:14})}),w.jsxs("button",{type:"button",className:"mobile-nav-link mobile-nav-search",onClick:()=>{a(),e()},children:[w.jsx(Mr,{name:"search",size:14}),w.jsx("span",{children:"Search papers, authors, domains…"})]}),p.map(({to:y,label:h,end:v,badge:x,href:b})=>{const E=`mobile-nav-link${x?" mobile-nav-link-with-badge":""}`,S=w.jsxs(w.Fragment,{children:[w.jsx("span",{children:h}),x&&w.jsx("span",{className:"nav-new-badge","aria-hidden":"true",children:x})]});return b?w.jsx("a",{href:b,target:"_blank",rel:"noreferrer",className:E,onClick:a,children:S},y):w.jsx(ys,{to:y,end:v,className:E,onClick:a,children:S},y)}),w.jsx("a",{className:"mobile-nav-link",href:V0,target:"_blank",rel:"noreferrer",onClick:a,children:"Submit feedback"}),w.jsx("a",{className:"mobile-nav-link",href:B0,target:"_blank",rel:"noreferrer",onClick:a,children:"GitHub"}),!m&&w.jsx(ys,{to:"/saved",className:"mobile-nav-link",onClick:a,children:"Saved papers"}),!m&&(l==null?void 0:l.is_admin)&&w.jsx(ys,{to:"/admin-dashboard",className:"mobile-nav-link",onClick:a,children:"Admin dashboard"})]})})})]})},T2=()=>{const{pathname:e}=hn();return e==="/chat"||e.startsWith("/chat/")||e.startsWith("/pdf/")?null:w.jsx("footer",{className:"site-footer",children:w.jsxs("div",{className:"site-footer-inner",children:[w.jsxs("span",{children:["© ",new Date().getFullYear()," Hugging Face"]}),w.jsx(bn,{to:"/docs/api",children:"API"}),w.jsx(bn,{to:"/mcp",children:"MCP"}),w.jsx(bn,{to:"/privacy",children:"Privacy"}),w.jsx("a",{href:"https://github.com/huggingface/paperswithcode-feedback/issues",target:"_blank",rel:"noreferrer",children:"Feedback"})]})})},I2=1,O2=1e6;let nh=0;function M2(){return nh=(nh+1)%Number.MAX_SAFE_INTEGER,nh.toString()}const rh=new Map,W0=e=>{if(rh.has(e))return;const t=setTimeout(()=>{rh.delete(e),Ia({type:"REMOVE_TOAST",toastId:e})},O2);rh.set(e,t)},A2=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,I2)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?W0(n):e.toasts.forEach(r=>{W0(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},Lu=[];let ju={toasts:[]};function Ia(e){ju=A2(ju,e),Lu.forEach(t=>{t(ju)})}function N2({...e}){const t=M2(),n=i=>Ia({type:"UPDATE_TOAST",toast:{...i,id:t}}),r=()=>Ia({type:"DISMISS_TOAST",toastId:t});return Ia({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:i=>{i||r()}}}),{id:t,dismiss:r,update:n}}function $2(){const[e,t]=g.useState(ju);return g.useEffect(()=>(Lu.push(t),()=>{const n=Lu.indexOf(t);n>-1&&Lu.splice(n,1)}),[e]),{...e,toast:N2,dismiss:n=>Ia({type:"DISMISS_TOAST",toastId:n})}}var F2=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),L2="VisuallyHidden",fm=g.forwardRef((e,t)=>w.jsx(ke.span,{...e,ref:t,style:{...F2,...e.style}}));fm.displayName=L2;var hm="ToastProvider",[pm,j2,D2]=Kg("Toast"),[pk]=os("Toast",[D2]),[z2,Md]=pk(hm),vk=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:i="right",swipeThreshold:s=50,children:o}=e,[a,l]=g.useState(null),[u,c]=g.useState(0),d=g.useRef(!1),f=g.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${hm}\`. Expected non-empty \`string\`.`),w.jsx(pm.Provider,{scope:t,children:w.jsx(z2,{scope:t,label:n,duration:r,swipeDirection:i,swipeThreshold:s,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:g.useCallback(()=>c(m=>m+1),[]),onToastRemove:g.useCallback(()=>c(m=>m-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:o})})};vk.displayName=hm;var gk="ToastViewport",U2=["F8"],dv="toast.viewportPause",fv="toast.viewportResume",mk=g.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=U2,label:i="Notifications ({hotkey})",...s}=e,o=Md(gk,n),a=j2(n),l=g.useRef(null),u=g.useRef(null),c=g.useRef(null),d=g.useRef(null),f=et(t,d,o.onViewportChange),m=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),_=o.toastCount>0;g.useEffect(()=>{const y=h=>{var x;r.length!==0&&r.every(b=>h[b]||h.code===b)&&((x=d.current)==null||x.focus())};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[r]),g.useEffect(()=>{const y=l.current,h=d.current;if(_&&y&&h){const v=()=>{if(!o.isClosePausedRef.current){const S=new CustomEvent(dv);h.dispatchEvent(S),o.isClosePausedRef.current=!0}},x=()=>{if(o.isClosePausedRef.current){const S=new CustomEvent(fv);h.dispatchEvent(S),o.isClosePausedRef.current=!1}},b=S=>{!y.contains(S.relatedTarget)&&x()},E=()=>{y.contains(document.activeElement)||x()};return y.addEventListener("focusin",v),y.addEventListener("focusout",b),y.addEventListener("pointermove",v),y.addEventListener("pointerleave",E),window.addEventListener("blur",v),window.addEventListener("focus",x),()=>{y.removeEventListener("focusin",v),y.removeEventListener("focusout",b),y.removeEventListener("pointermove",v),y.removeEventListener("pointerleave",E),window.removeEventListener("blur",v),window.removeEventListener("focus",x)}}},[_,o.isClosePausedRef]);const p=g.useCallback(({tabbingDirection:y})=>{const v=a().map(x=>{const b=x.ref.current,E=[b,...e3(b)];return y==="forwards"?E:E.reverse()});return(y==="forwards"?v.reverse():v).flat()},[a]);return g.useEffect(()=>{const y=d.current;if(y){const h=v=>{var E,S,P;const x=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!x){const C=document.activeElement,T=v.shiftKey;if(v.target===y&&T){(E=u.current)==null||E.focus();return}const M=p({tabbingDirection:T?"backwards":"forwards"}),z=M.findIndex(F=>F===C);ih(M.slice(z+1))?v.preventDefault():T?(S=u.current)==null||S.focus():(P=c.current)==null||P.focus()}};return y.addEventListener("keydown",h),()=>y.removeEventListener("keydown",h)}},[a,p]),w.jsxs(MN,{ref:l,role:"region","aria-label":i.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:_?void 0:"none"},children:[_&&w.jsx(hv,{ref:u,onFocusFromOutsideViewport:()=>{const y=p({tabbingDirection:"forwards"});ih(y)}}),w.jsx(pm.Slot,{scope:n,children:w.jsx(ke.ol,{tabIndex:-1,...s,ref:f})}),_&&w.jsx(hv,{ref:c,onFocusFromOutsideViewport:()=>{const y=p({tabbingDirection:"backwards"});ih(y)}})]})});mk.displayName=gk;var yk="ToastFocusProxy",hv=g.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=e,s=Md(yk,n);return w.jsx(fm,{tabIndex:0,...i,ref:t,style:{position:"fixed"},onFocus:o=>{var u;const a=o.relatedTarget;!((u=s.viewport)!=null&&u.contains(a))&&r()}})});hv.displayName=yk;var Rl="Toast",V2="toast.swipeStart",B2="toast.swipeMove",q2="toast.swipeCancel",W2="toast.swipeEnd",_k=g.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:i,onOpenChange:s,...o}=e,[a,l]=yd({prop:r,defaultProp:i??!0,onChange:s,caller:Rl});return w.jsx(br,{present:n||a,children:w.jsx(K2,{open:a,...o,ref:t,onClose:()=>l(!1),onPause:Ut(e.onPause),onResume:Ut(e.onResume),onSwipeStart:ee(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ee(e.onSwipeMove,u=>{const{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:ee(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ee(e.onSwipeEnd,u=>{const{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});_k.displayName=Rl;var[H2,G2]=pk(Rl,{onClose(){}}),K2=g.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:i,open:s,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:c,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:m,..._}=e,p=Md(Rl,n),[y,h]=g.useState(null),v=et(t,F=>h(F)),x=g.useRef(null),b=g.useRef(null),E=i||p.duration,S=g.useRef(0),P=g.useRef(E),C=g.useRef(0),{onToastAdd:T,onToastRemove:R}=p,N=Ut(()=>{var W;(y==null?void 0:y.contains(document.activeElement))&&((W=p.viewport)==null||W.focus()),o()}),M=g.useCallback(F=>{!F||F===1/0||(window.clearTimeout(C.current),S.current=new Date().getTime(),C.current=window.setTimeout(N,F))},[N]);g.useEffect(()=>{const F=p.viewport;if(F){const W=()=>{M(P.current),u==null||u()},B=()=>{const Q=new Date().getTime()-S.current;P.current=P.current-Q,window.clearTimeout(C.current),l==null||l()};return F.addEventListener(dv,B),F.addEventListener(fv,W),()=>{F.removeEventListener(dv,B),F.removeEventListener(fv,W)}}},[p.viewport,E,l,u,M]),g.useEffect(()=>{s&&!p.isClosePausedRef.current&&M(E)},[s,E,p.isClosePausedRef,M]),g.useEffect(()=>(T(),()=>R()),[T,R]);const z=g.useMemo(()=>y?kk(y):null,[y]);return p.viewport?w.jsxs(w.Fragment,{children:[z&&w.jsx(Q2,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:z}),w.jsx(H2,{scope:n,onClose:N,children:xl.createPortal(w.jsx(pm.ItemSlot,{scope:n,children:w.jsx(ON,{asChild:!0,onEscapeKeyDown:ee(a,()=>{p.isFocusedToastEscapeKeyDownRef.current||N(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:w.jsx(ke.li,{tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":p.swipeDirection,..._,ref:v,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:ee(e.onKeyDown,F=>{F.key==="Escape"&&(a==null||a(F.nativeEvent),F.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,N()))}),onPointerDown:ee(e.onPointerDown,F=>{F.button===0&&(x.current={x:F.clientX,y:F.clientY})}),onPointerMove:ee(e.onPointerMove,F=>{if(!x.current)return;const W=F.clientX-x.current.x,B=F.clientY-x.current.y,Q=!!b.current,O=["left","right"].includes(p.swipeDirection),A=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,V=O?A(0,W):0,K=O?0:A(0,B),te=F.pointerType==="touch"?10:2,oe={x:V,y:K},de={originalEvent:F,delta:oe};Q?(b.current=oe,pu(B2,d,de,{discrete:!1})):H0(oe,p.swipeDirection,te)?(b.current=oe,pu(V2,c,de,{discrete:!1}),F.target.setPointerCapture(F.pointerId)):(Math.abs(W)>te||Math.abs(B)>te)&&(x.current=null)}),onPointerUp:ee(e.onPointerUp,F=>{const W=b.current,B=F.target;if(B.hasPointerCapture(F.pointerId)&&B.releasePointerCapture(F.pointerId),b.current=null,x.current=null,W){const Q=F.currentTarget,O={originalEvent:F,delta:W};H0(W,p.swipeDirection,p.swipeThreshold)?pu(W2,m,O,{discrete:!0}):pu(q2,f,O,{discrete:!0}),Q.addEventListener("click",A=>A.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),Q2=e=>{const{__scopeToast:t,children:n,...r}=e,i=Md(Rl,t),[s,o]=g.useState(!1),[a,l]=g.useState(!1);return J2(()=>o(!0)),g.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:w.jsx(wd,{asChild:!0,children:w.jsx(fm,{...r,children:s&&w.jsxs(w.Fragment,{children:[i.label," ",n]})})})},Y2="ToastTitle",wk=g.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return w.jsx(ke.div,{...r,ref:t})});wk.displayName=Y2;var X2="ToastDescription",xk=g.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return w.jsx(ke.div,{...r,ref:t})});xk.displayName=X2;var bk="ToastAction",Ek=g.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?w.jsx(Ck,{altText:n,asChild:!0,children:w.jsx(vm,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${bk}\`. Expected non-empty \`string\`.`),null)});Ek.displayName=bk;var Sk="ToastClose",vm=g.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,i=G2(Sk,n);return w.jsx(Ck,{asChild:!0,children:w.jsx(ke.button,{type:"button",...r,ref:t,onClick:ee(e.onClick,i.onClose)})})});vm.displayName=Sk;var Ck=g.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...i}=e;return w.jsx(ke.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...i,ref:t})});function kk(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),Z2(r)){const i=r.ariaHidden||r.hidden||r.style.display==="none",s=r.dataset.radixToastAnnounceExclude==="";if(!i)if(s){const o=r.dataset.radixToastAnnounceAlt;o&&t.push(o)}else t.push(...kk(r))}}),t}function pu(e,t,n,{discrete:r}){const i=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Lg(i,s):i.dispatchEvent(s)}var H0=(e,t,n=0)=>{const r=Math.abs(e.x),i=Math.abs(e.y),s=r>i;return t==="left"||t==="right"?s&&r>n:!s&&i>n};function J2(e=()=>{}){const t=Ut(e);fn(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function Z2(e){return e.nodeType===e.ELEMENT_NODE}function e3(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ih(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var t3=vk,Pk=mk,Rk=_k,Tk=wk,Ik=xk,Ok=Ek,Mk=vm;const G0=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,K0=M1,n3=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return K0(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:s}=t,o=Object.keys(i).map(u=>{const c=n==null?void 0:n[u],d=s==null?void 0:s[u];if(c===null)return null;const f=G0(c)||G0(d);return i[u][f]}),a=n&&Object.entries(n).reduce((u,c)=>{let[d,f]=c;return f===void 0||(u[d]=f),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:d,className:f,...m}=c;return Object.entries(m).every(_=>{let[p,y]=_;return Array.isArray(y)?y.includes({...s,...a}[p]):{...s,...a}[p]===y})?[...u,d,f]:u},[]);return K0(e,o,l,n==null?void 0:n.class,n==null?void 0:n.className)},r3=t3,Ak=g.forwardRef(({className:e,...t},n)=>w.jsx(Pk,{ref:n,className:ct("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));Ak.displayName=Pk.displayName;const i3=n3("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-16 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Nk=g.forwardRef(({className:e,variant:t,...n},r)=>w.jsx(Rk,{ref:r,className:ct(i3({variant:t}),e),...n}));Nk.displayName=Rk.displayName;const s3=g.forwardRef(({className:e,...t},n)=>w.jsx(Ok,{ref:n,className:ct("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));s3.displayName=Ok.displayName;const $k=g.forwardRef(({className:e,...t},n)=>w.jsx(Mk,{ref:n,className:ct("absolute right-2 top-2 inline-flex h-11 w-11 items-center justify-center rounded-md text-foreground transition-colors hover:bg-muted focus:outline-none focus:ring-2 focus:ring-ring group-[.destructive]:text-destructive-foreground group-[.destructive]:hover:bg-destructive-foreground/10 group-[.destructive]:focus:ring-destructive-foreground",e),"aria-label":"Dismiss notification","toast-close":"",...t,children:w.jsx(c2,{className:"h-4 w-4"})}));$k.displayName=Mk.displayName;const Fk=g.forwardRef(({className:e,...t},n)=>w.jsx(Tk,{ref:n,className:ct("text-sm font-semibold",e),...t}));Fk.displayName=Tk.displayName;const Lk=g.forwardRef(({className:e,...t},n)=>w.jsx(Ik,{ref:n,className:ct("text-sm opacity-90",e),...t}));Lk.displayName=Ik.displayName;function o3(){const{toasts:e}=$2();return w.jsxs(r3,{children:[e.map(function({id:t,title:n,description:r,action:i,...s}){return w.jsxs(Nk,{...s,children:[w.jsxs("div",{className:"grid gap-1",children:[n&&w.jsx(Fk,{children:n}),r&&w.jsx(Lk,{children:r})]}),i,w.jsx($k,{})]},t)}),w.jsx(Ak,{})]})}function a3(){const{pathname:e,hash:t}=hn();g.useLayoutEffect(()=>{t||window.scrollTo({top:0,left:0,behavior:"instant"})},[e,t])}const jk=rF(),l3=jk?wA:_A;if(!jk&&typeof window<"u"){const e=window.location.hash;e.startsWith("#/")&&!e.startsWith("#//")&&window.history.replaceState(null,"",e.slice(1))}const u3=q.lazy(()=>ae(()=>import("./AuthorizePaperEditView-DtkWcUHu.js"),__vite__mapDeps([0,1,2,3]))),c3=q.lazy(()=>ae(()=>import("./FollowingView-BemIb4-Z.js"),__vite__mapDeps([4,5,6,7,8,9,1,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34]))),d3=q.lazy(()=>ae(()=>import("./TopicView-Dcpv-HZh.js"),__vite__mapDeps([35,14,15,16,17,18,19,10,20,21,22,23,24,25,26,27,32,33,9,1,11,36]))),f3=q.lazy(()=>ae(()=>import("./FeedView-6xUWjpm4.js"),__vite__mapDeps([5,6,7,8,9,1,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34]))),h3=q.lazy(()=>ae(()=>import("./ChatView-DAikess2.js"),__vite__mapDeps([37,38,30,31,22,23,39,40,8,41,42,43,44,45,46,1,47,48,49,50,51,11,52,53,16,17,54,55,28,29,56,20,57,58]))),p3=q.lazy(()=>ae(()=>import("./SharedChatView-4eHoic3i.js"),__vite__mapDeps([59,38,30,31,22,23,39,40,8,41,42,43,44,45,46,1,47,48,49,50,51,11,52,53,16,17,54,55]))),v3=q.lazy(()=>ae(()=>import("./PapersListView-tKeAfHNj.js"),__vite__mapDeps([60,18,19,10,20,14,15,16,17,21,22,23,24,25,26,27,8,32,33,61,34,62,63]))),g3=q.lazy(()=>ae(()=>import("./PaperDetailView-BRUxkorx.js"),__vite__mapDeps([64,1,20,18,19,10,21,65,23,39,24,66,22,67,32,33,68,69,70,57,26,34,2,7,29,48,71,72,73,74,25,52,75,40,8,76,77,78,79,11,80,81,41,82,83,44,45,27,84,85,16,17,86]))),m3=q.lazy(()=>ae(()=>import("./PaperReaderView-Bdokcr9P.js"),__vite__mapDeps([87,38,30,31,22,23,39,40,8,41,42,43,44,45,46,1,47,48,49,50,51,11,52,53,16,17,54,55,88,67,24,32,33,37,28,29,56,20,57,58]))),y3=q.lazy(()=>ae(()=>import("./TagsIndexView-B8PyY2yF.js"),__vite__mapDeps([89,8,19,10,90,52,91,56,92,93,47,79,36,94,42,95,81,6,34,96,26,97,76,2,73,77,74,25,7,75,1,78,11,98,99]))),_3=q.lazy(()=>ae(()=>import("./TagBrowseView-zzh9zkuk.js"),__vite__mapDeps([100,101,9,1,11,18,19,10,14,15,16,17,20,21,22,23,24,25,26,27,12,102,88,43,44,45,46,39,55,8,62,63,69,70,90,32,33,34,103,94,41]))),w3=q.lazy(()=>ae(()=>import("./MethodsIndexView-DI2_sTpn.js"),__vite__mapDeps([104,8,99,90,34,96,26,97,76,2,73,77,74,25,7,52,75,1,78,11,98,92]))),x3=q.lazy(()=>ae(()=>import("./FrameworksIndexView-CogZFpfQ.js"),__vite__mapDeps([105,20,8,19,63]))),b3=q.lazy(()=>ae(()=>import("./TrendsView-BuSUElxo.js"),__vite__mapDeps([106,34,26]))),E3=q.lazy(()=>ae(()=>import("./ConferencesIndexView-DGftnYu4.js"),__vite__mapDeps([107,8,108,34,96,26,97,76,2,73,77,74,25,7,52,75,1,78,11]))),S3=q.lazy(()=>ae(()=>import("./AiDeadlinesView-BG77EAes.js"),__vite__mapDeps([109,8,110,82,26,34,24,7,108]))),C3=q.lazy(()=>ae(()=>import("./ConferenceDetailView-BapnrC2V.js"),__vite__mapDeps([111,96,26,88,43,44,45,46,39,22,23,1,55,8,62,99,19,112,108,10,34,24,103]))),k3=q.lazy(()=>ae(()=>import("./ConferenceTaskView-DG4QYE8x.js"),__vite__mapDeps([113,14,15,16,17,18,19,10,20,21,22,23,24,25,26,27,88,43,44,45,46,39,1,55,8,62,112,32,33,34,103]))),P3=q.lazy(()=>ae(()=>import("./OrganizationsIndexView-f5uEFGH-.js"),__vite__mapDeps([114,34,8,115]))),R3=q.lazy(()=>ae(()=>import("./OrganizationDetailView-BFZVxf5K.js"),__vite__mapDeps([116,101,9,1,11,88,43,44,45,46,39,22,23,55,117,26,8,14,15,16,17,18,19,10,20,21,24,25,27,34,74,2,7,52,75,32,33,62,85,103]))),T3=q.lazy(()=>ae(()=>import("./OrganizationDetailView-BFZVxf5K.js"),__vite__mapDeps([116,101,9,1,11,88,43,44,45,46,39,22,23,55,117,26,8,14,15,16,17,18,19,10,20,21,24,25,27,34,74,2,7,52,75,32,33,62,85,103]))),I3=q.lazy(()=>ae(()=>import("./AuthorDetailView-CDAXgj3C.js"),__vite__mapDeps([118,16,17,14,15,18,19,10,20,21,22,23,24,25,26,27,101,9,1,11,34,32,33,62,103]))),O3=q.lazy(()=>ae(()=>import("./MethodDetailView-BP_5bAuS.js"),__vite__mapDeps([119,101,9,1,11,18,19,10,14,15,16,17,20,21,22,23,24,25,26,27,88,43,44,45,46,39,55,8,62,90,32,33,34,103]))),M3=q.lazy(()=>ae(()=>import("./BenchmarkDetailView-CLQh8rRr.js"),__vite__mapDeps([120,101,9,1,11,8,65,23,39,24,66,69,70,21,110,82,20,26,34,102,90,62,103,121]))),A3=q.lazy(()=>ae(()=>import("./SavedPapersView-CWCS7z3x.js"),__vite__mapDeps([122,15,16,17,18,19,10,20,21,22,23,24,26,34,70,84]))),N3=q.lazy(()=>ae(()=>import("./SettingsView-BrTjKeDA.js"),__vite__mapDeps([123,1,9,110,82,13,6,12,94,31,68,58,69,70,51,93]))),$3=q.lazy(()=>ae(()=>import("./PrivacyView-D9qn84RB.js"),__vite__mapDeps([124,68]))),F3=q.lazy(()=>ae(()=>import("./ApiDocsView-C6VvPmjf.js"),__vite__mapDeps([125,68,44,126]))),L3=q.lazy(()=>ae(()=>import("./McpView-DPmcihrm.js"),__vite__mapDeps([127,68,49,41,51,48,128]))),j3=q.lazy(()=>ae(()=>import("./SubmitView-DGwEiuGz.js"),__vite__mapDeps([129,1,34,2,73,77,22,23,72]))),D3=q.lazy(()=>ae(()=>import("./CronDashboard-Wker39-h.js"),__vite__mapDeps([130,1,131,132,80,2,53,79,92,95,42,91,51,133,75,134,83,33,3,8,31]))),z3=q.lazy(()=>ae(()=>import("./AutonomousOperations-CPgyKQKJ.js"),__vite__mapDeps([135,1,131,132,80,2,73,95,50]))),U3=q.lazy(()=>ae(()=>import("./SubmissionsDashboard-BlDtgY38.js"),__vite__mapDeps([136,71,72,1,33,8,24,78,22,23,133,75,134,137]))),V3=q.lazy(()=>ae(()=>import("./UserProfileView-y4tNT8rK.js"),__vite__mapDeps([138,117,26,8]))),B3=q.lazy(()=>ae(()=>import("./RateLimitsView-BdVhhRn6.js"),__vite__mapDeps([139,70]))),q3=q.lazy(()=>ae(()=>import("./AstraForRoboticsView-4cqZq7Uv.js"),__vite__mapDeps([140,14,15,16,17,18,19,10,20,21,22,23,24,25,26,27,34,32,33,68,141]))),sh=q.lazy(()=>ae(()=>import("./NotFound-L0ldWZg9.js"),[])),W3=q.lazy(()=>ae(()=>import("./SearchOverlay-BWsLpwx1.js"),__vite__mapDeps([142,21,8,22,23,61,19,10]))),H3=q.lazy(()=>ae(()=>import("./StagingAccessRequestView-KKG5yc76.js"),__vite__mapDeps([143,134]))),Dk=()=>w.jsxs("div",{className:"page","aria-busy":"true","aria-live":"polite",children:[w.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:24,width:"30%",marginBottom:24}}),w.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:64,width:"60%",marginBottom:32}}),w.jsxs("div",{className:"paper-list",style:{display:"grid",gap:16},children:[w.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:96}}),w.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:96}}),w.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:96}})]})]}),G3=new YA({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}}),K3=()=>{const{arxivId:e}=wS();return w.jsx(Ki,{to:e?`/paper/${e}`:"/papers",replace:!0})},Q3=()=>{const{taskSlug:e}=wS();return w.jsx(Ki,{to:e?`/tasks/${e}`:"/tasks",replace:!0})},Y3=({element:e})=>$o()?w.jsx(Ki,{to:"/",replace:!0}):w.jsx(w.Fragment,{children:e}),pv=({element:e})=>{const{user:t,isLoading:n}=hk(),r=hn();return $o()?w.jsx(Ki,{to:"/",replace:!0}):n?w.jsx("div",{className:"page",children:w.jsx("div",{className:"submission-loading",children:w.jsx("span",{children:"Checking admin session..."})})}):t?t.is_admin?w.jsx(w.Fragment,{children:e}):w.jsx("div",{className:"page",children:w.jsxs("div",{className:"submission-empty submission-empty-warn",children:[w.jsx("h1",{children:"Admin access required"}),w.jsxs("p",{children:["Signed in as @",t.username,". This dashboard is limited to allowlisted admin accounts."]})]})}):w.jsx("div",{className:"page",children:w.jsxs("div",{className:"submission-empty submission-empty-warn",children:[w.jsx("h1",{children:"Sign in required"}),w.jsx("p",{children:"Sign in with an allowlisted Hugging Face admin account to view admin operations."}),w.jsx(m1,{returnTo:`${r.pathname}${r.search}`})]})})},X3=()=>{const e=Z$(),t=typeof window<"u"&&new URL(e,window.location.origin).origin!==window.location.origin;return q.useEffect(()=>{t&&window.location.replace(e)},[e,t]),t?w.jsx("div",{className:"page",children:w.jsxs("div",{className:"submission-loading",children:[w.jsx("span",{children:"Opening the production admin dashboard..."}),w.jsx("a",{href:e,children:"Continue"})]})}):w.jsx(pv,{element:w.jsx(D3,{})})},Q0=({reader:e=!1})=>{const[t,n]=q.useState(!1),{pathname:r}=hn();q.useEffect(()=>{const a=l=>{(l.metaKey||l.ctrlKey)&&l.key==="k"&&(l.preventDefault(),n(!0))};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[]);const i=w.jsx(R2,{onOpenSearch:()=>n(!0)}),s=w.jsx(dS,{resetKey:r,children:w.jsx(q.Suspense,{fallback:w.jsx(Dk,{}),children:w.jsx(uA,{})})}),o=t&&w.jsx(q.Suspense,{fallback:null,children:w.jsx(W3,{open:t,onClose:()=>n(!1)})});return e?w.jsxs("div",{className:"reader-route-shell",children:[i,w.jsx("div",{className:"reader-route-content",children:s}),o]}):w.jsxs(w.Fragment,{children:[i,w.jsx("main",{children:s}),w.jsx(T2,{}),o]})},J3=()=>(a3(),q.useLayoutEffect(()=>{var e;(e=document.getElementById("initial-discovery-footer"))==null||e.remove()},[]),w.jsxs(cA,{children:[w.jsx(re,{path:"/request-access",element:w.jsx(q.Suspense,{fallback:w.jsx(Dk,{}),children:w.jsx(H3,{})})}),w.jsx(re,{element:w.jsx(Q0,{reader:!0}),children:w.jsx(re,{path:"/pdf/:paperId",element:nF()?w.jsx(m3,{}):w.jsx(sh,{})})}),w.jsxs(re,{element:w.jsx(Q0,{}),children:[w.jsx(re,{path:"/",element:w.jsx(f3,{})}),w.jsx(re,{path:"/following",element:w.jsx(c3,{})}),w.jsx(re,{path:"/topics/:topicParam",element:w.jsx(d3,{})}),w.jsx(re,{path:"/x-trending",element:w.jsx(Ki,{to:"/",replace:!0})}),w.jsx(re,{path:"/chat/:sessionId?",element:al()?w.jsx(h3,{}):w.jsx(Ki,{to:"/",replace:!0})}),w.jsx(re,{path:"/share/:shareId",element:al()?w.jsx(p3,{}):w.jsx(sh,{})}),w.jsx(re,{path:"/papers",element:w.jsx(v3,{})}),w.jsx(re,{path:"/papers/:arxivId",element:w.jsx(K3,{})}),w.jsx(re,{path:"/paper/:arxivId",element:w.jsx(g3,{})}),w.jsx(re,{path:"/tasks",element:w.jsx(y3,{})}),w.jsx(re,{path:"/tasks/:taskSlug",element:w.jsx(_3,{})}),w.jsx(re,{path:"/task/:taskSlug",element:w.jsx(Q3,{})}),w.jsx(re,{path:"/methods",element:w.jsx(w3,{})}),w.jsx(re,{path:"/methods/:methodSlug",element:w.jsx(O3,{})}),w.jsx(re,{path:"/frameworks",element:w.jsx(x3,{})}),w.jsx(re,{path:"/trends",element:w.jsx(b3,{})}),w.jsx(re,{path:"/conferences",element:w.jsx(E3,{})}),w.jsx(re,{path:"/ai-deadlines",element:w.jsx(S3,{})}),w.jsx(re,{path:"/conferences/:confSlug",element:w.jsx(C3,{})}),w.jsx(re,{path:"/conferences/:confSlug/:taskSlug",element:w.jsx(k3,{})}),w.jsx(re,{path:"/organizations",element:w.jsx(P3,{})}),w.jsx(re,{path:"/orgs/:orgSlug",element:w.jsx(R3,{})}),w.jsx(re,{path:"/orgs/:orgSlug/:taskSlug",element:w.jsx(T3,{})}),w.jsx(re,{path:"/authors/:authorId",element:w.jsx(I3,{})}),w.jsx(re,{path:"/benchmark/:datasetSlug",element:w.jsx(M3,{})}),w.jsx(re,{path:"/authorize-paper-edit/:authorizationId",element:w.jsx(u3,{})}),w.jsx(re,{path:"/submit",element:w.jsx(j3,{})}),w.jsx(re,{path:"/saved",element:w.jsx(Y3,{element:w.jsx(A3,{})})}),w.jsx(re,{path:"/settings",element:w.jsx(N3,{})}),w.jsx(re,{path:"/privacy",element:w.jsx($3,{})}),w.jsx(re,{path:"/docs/api",element:w.jsx(F3,{})}),w.jsx(re,{path:"/mcp",element:w.jsx(L3,{})}),w.jsx(re,{path:"/admin-dashboard",element:w.jsx(X3,{})}),w.jsx(re,{path:"/autonomous-operations",element:w.jsx(pv,{element:w.jsx(z3,{})})}),w.jsx(re,{path:"/cron-dashboard",element:w.jsx(Ki,{to:"/admin-dashboard",replace:!0})}),w.jsx(re,{path:"/submissions",element:w.jsx(pv,{element:w.jsx(U3,{})})}),w.jsx(re,{path:"/rate-limits",element:w.jsx(B3,{})}),w.jsx(re,{path:"/astra-for-robotics",element:w.jsx(q3,{})}),w.jsx(re,{path:"/:username",element:w.jsx(V3,{})}),w.jsx(re,{path:"*",element:w.jsx(sh,{})})]})]})),Z3=()=>w.jsx(XA,{client:G3,children:w.jsxs(S2,{children:[w.jsx(l3,{children:w.jsx(J3,{})}),w.jsx(o3,{}),!1]})});mM();const ez=w.jsx(mT,{attribute:"class",defaultTheme:"system",enableSystem:!0,disableTransitionOnChange:!0,storageKey:"pwc-theme",children:w.jsx(dS,{children:w.jsx(Z3,{})})}),tz=_b(document.getElementById("root"));tz.render(w.jsx(q.StrictMode,{children:ez}));export{f2 as $,Od as A,yd as B,a2 as C,et as D,ee as E,wj as F,os as G,m1 as H,ct as I,Rz as J,fz as K,bn as L,yz as M,U1 as N,Vj as O,br as P,dC as Q,Uj as R,u2 as S,Ez as T,s3 as U,q as V,Sz as W,c2 as X,nF as Y,dz as Z,d2 as _,hk as a,Pz as a$,ck as a0,er as a1,hz as a2,cz as a3,ow as a4,X$ as a5,l2 as a6,ae as a7,M1 as a8,xl as a9,vz as aA,El as aB,Up as aC,il as aD,GA as aE,at as aF,At as aG,IS as aH,bz as aI,e1 as aJ,Dg as aK,WS as aL,jg as aM,BA as aN,az as aO,oz as aP,lN as aQ,qg as aR,RS as aS,JA as aT,tN as aU,sN as aV,nN as aW,rN as aX,aN as aY,l0 as aZ,iN as a_,$g as aa,x2 as ab,cv as ac,_1 as ad,n3 as ae,Ys as af,q$ as ag,H$ as ah,G$ as ai,K$ as aj,vi as ak,Y$ as al,Q$ as am,uz as an,Ki as ao,Pj as ap,Rj as aq,tC as ar,wd as as,_d as at,Tj as au,Ij as av,iz as aw,rz as ax,b2 as ay,xz as az,uN as b,j1 as b0,D1 as b1,z1 as b2,z0 as b3,Id as c,Iz as d,sz as e,g as f,hn as g,J$ as h,$o as i,w as j,Mg as k,DS as l,al as m,tF as n,eF as o,E2 as p,Cz as q,Tz as r,pz as s,kz as t,wS as u,gz as v,mz as w,$2 as x,wz as y,ke as z}; + */const c2=Id("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),d2=t2,f2=n2,h2=g.forwardRef(({className:e,inset:t,children:n,...r},i)=>w.jsxs(ak,{ref:i,className:ct("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent focus:bg-accent",t&&"pl-8",e),...r,children:[n,w.jsx(l2,{className:"ml-auto h-4 w-4"})]}));h2.displayName=ak.displayName;const p2=g.forwardRef(({className:e,...t},n)=>w.jsx(lk,{ref:n,className:ct("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));p2.displayName=lk.displayName;const ck=g.forwardRef(({className:e,sideOffset:t=4,...n},r)=>w.jsx(r2,{children:w.jsx(ek,{ref:r,sideOffset:t,className:ct("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));ck.displayName=ek.displayName;const er=g.forwardRef(({className:e,inset:t,...n},r)=>w.jsx(nk,{ref:r,className:ct("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",t&&"pl-8",e),...n}));er.displayName=nk.displayName;const v2=g.forwardRef(({className:e,children:t,checked:n,...r},i)=>w.jsxs(rk,{ref:i,className:ct("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),checked:n,...r,children:[w.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:w.jsx(sk,{children:w.jsx(a2,{className:"h-4 w-4"})})}),t]}));v2.displayName=rk.displayName;const g2=g.forwardRef(({className:e,children:t,...n},r)=>w.jsxs(ik,{ref:r,className:ct("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...n,children:[w.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:w.jsx(sk,{children:w.jsx(u2,{className:"h-2 w-2 fill-current"})})}),t]}));g2.displayName=ik.displayName;const dk=g.forwardRef(({className:e,inset:t,...n},r)=>w.jsx(tk,{ref:r,className:ct("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));dk.displayName=tk.displayName;const uv=g.forwardRef(({className:e,...t},n)=>w.jsx(ok,{ref:n,className:ct("-mx-1 my-1 h-px bg-muted",e),...t}));uv.displayName=ok.displayName;function m2(e){const n=(e.name||e.username||"?").trim().split(/\s+/).filter(Boolean);return n.length===0?"?":n.length===1?n[0][0].toUpperCase():(n[0][0]+n[n.length-1][0]).toUpperCase()}const y2=({user:e,onLogout:t})=>w.jsxs(d2,{children:[w.jsx(f2,{asChild:!0,children:w.jsx("button",{type:"button",className:"user-avatar-btn","aria-label":`Account menu for ${e.username}`,children:w.jsxs(j1,{className:"h-8 w-8",children:[e.avatar_url&&w.jsx(D1,{src:e.avatar_url,alt:e.username}),w.jsx(z1,{className:"text-xs",children:m2(e)})]})})}),w.jsxs(ck,{align:"end",className:"w-56",children:[w.jsxs(dk,{className:"flex flex-col gap-0.5 py-2",children:[w.jsx("span",{className:"text-sm font-medium leading-tight",children:e.name||e.username}),w.jsxs("span",{className:"text-xs font-normal text-muted-foreground",children:["@",e.username]}),e.is_admin&&w.jsx("span",{className:"mt-1 inline-flex w-fit items-center rounded-full bg-amber-100 px-2 py-0.5 text-[10px] font-medium uppercase tracking-wide text-amber-900",children:"Admin"}),e.role==="contributor"&&w.jsx("span",{className:"mt-1 inline-flex w-fit items-center rounded-full bg-blue-100 px-2 py-0.5 text-[10px] font-medium uppercase tracking-wide text-blue-900",children:"Contributor"})]}),w.jsx(uv,{}),w.jsx(er,{asChild:!0,children:w.jsx("a",{href:`https://huggingface.co/${encodeURIComponent(e.username)}`,target:"_blank",rel:"noopener noreferrer",children:"Hugging Face profile"})}),w.jsx(er,{asChild:!0,children:w.jsx(bn,{to:"/frameworks",children:"Frameworks"})}),w.jsx(er,{asChild:!0,children:w.jsx(bn,{to:"/trends",children:"Trends"})}),e.is_admin&&w.jsxs(w.Fragment,{children:[w.jsx(er,{asChild:!0,children:w.jsx(bn,{to:"/admin-dashboard",children:"Admin dashboard"})}),w.jsx(er,{asChild:!0,children:w.jsx(bn,{to:"/submissions",children:"Review submissions"})})]}),w.jsx(er,{asChild:!0,children:w.jsx(bn,{to:`/${encodeURIComponent(e.username)}`,children:"My contributions"})}),w.jsx(er,{asChild:!0,children:w.jsx(bn,{to:"/settings",children:"Settings"})}),w.jsx(uv,{}),w.jsx(er,{onSelect:n=>{n.preventDefault(),t()},children:"Log out"})]})]}),_2=!1;class Od extends Error{constructor(n,r){var i;super(`API request failed: ${n.status} ${n.statusText}`);kr(this,"status");kr(this,"statusText");kr(this,"response");kr(this,"detail");kr(this,"code");kr(this,"displayMessage");this.name="ApiError",this.status=n.status,this.statusText=n.statusText,this.response=r;try{if(this.detail=(i=JSON.parse(r))==null?void 0:i.detail,typeof this.detail=="string"&&(this.message=this.detail),Array.isArray(this.detail)){const s=this.detail[0];typeof s=="object"&&s!==null&&"msg"in s&&typeof s.msg=="string"&&(this.message=s.msg)}if(typeof this.detail=="object"&&this.detail!==null&&"code"in this.detail&&typeof this.detail.code=="string"&&(this.code=this.detail.code),typeof this.detail=="object"&&this.detail!==null&&"message"in this.detail&&typeof this.detail.message=="string"){const s="help"in this.detail&&typeof this.detail.help=="string"?` See ${this.detail.help} for help.`:"";this.message=`${this.detail.message}${s}`}}catch{this.detail=void 0,this.displayMessage=r||this.message;return}this.displayMessage=this.message}}function wz(e,t){return e instanceof Od?e.displayMessage||t:typeof e=="object"&&e!==null&&"message"in e&&typeof e.message=="string"&&e.message||t}class w2{constructor(t){this.baseUrl=t}async fetch(t,n){const r=`${this.baseUrl}${t}`;try{const{headers:i,...s}=n??{},a=(s.method??"GET").toUpperCase()==="GET"?"default":"no-store",l=new Headers(i);return typeof s.body=="string"&&!l.has("Content-Type")&&l.set("Content-Type","application/json"),await fetch(r,{...s,cache:s.cache??a,credentials:s.credentials??"include",headers:l})}catch(i){throw console.error(`[API] Request to ${r} failed:`,i),i}}async fetchOk(t,n){const r=await this.fetch(t,n);if(!r.ok){const i=new Od(r,await r.text());throw console.error("[API] Error response:",i.response),i}return r}async request(t,n){const r=await this.fetchOk(t,n);return r.status===204?void 0:await r.json()}}function x2(e){e instanceof Od&&e.status===401&&e.code!=="fresh_auth_required"&&e.code!=="saved_papers_bucket_authorization_required"&&typeof window<"u"&&window.dispatchEvent(new CustomEvent("pwc:auth-stale"))}async function fk(e){try{return await e()}catch(t){throw x2(t),t}}const cm=new w2(`${Bg()}/api/v1`),b2=(e,t)=>cm.fetch(e,t),xz=(e,t)=>fk(()=>cm.fetchOk(e,t)),cv=(e,t)=>fk(()=>cm.request(e,t));async function bz(e,t){try{return await cv(e,t)}catch(n){if(n instanceof Od&&n.status===404)return null;throw n}}const z0={async getCurrentUser(){if($o())return null;const e=await b2("/auth/me",{cache:"no-store"});return e.status===401||!e.ok?null:e.json()},async logout(){await cv("/auth/logout",{method:"POST"})},async requestStagingAccess(){await cv("/staging-access-request",{method:"POST"})}},E2={detail:e=>["paper",e],arxiv:e=>["paper-arxiv",e],preview:e=>["paper-preview",e],summary:e=>["paper-summary",e],feeds:{list:["papers"],infinite:["papers-infinite"],following:["research-feed"],search:["paper-search-feed"],task:["task-papers-infinite"],conference:["conference-papers-infinite"],organization:["organization-papers-infinite"],method:["method-papers-infinite"],saved:["my-bookmarks"],related:["related-papers"],versions:["paper-versions"],searchOverlay:["search-papers"],mentions:["chat-paper-mention-search"],trending:["trending-papers"]}},Ez=10*60*1e3,hu={me:["auth","me"]},Sz={preferences:["account","preferences"],bookmarkIds:["my-bookmark-ids"]},Cz={areas:["areas-all"],area:e=>["area",e],topTasksSidebar:["top-tasks-sidebar"],task:e=>["task",e],method:e=>["method",e],organization:e=>["organization",e],dataset:e=>["dataset",e],datasets:["dataset"],datasetTasks:["dataset-tasks"],taskPage:["task-page"],taskBenchmarkTrends:["task-benchmark-trends"],organizations:["organizations"]},kz={all:["evaluations"],byPaper:e=>["evaluations","paper",e],byPaperAll:["evaluations","paper"],byDatasetAll:["dataset-evals"],byDataset:e=>["dataset-evals",e]},Pz={pendingEdits:["pendingPaperEdits"]},Rz={all:["admin"],cronStatus:["admin","cronStatus"],chatSandboxSpend:e=>["admin","chatSandboxSpend",e],chatWebSearchBudget:["admin","chatWebSearchBudget"],autonomousOperations:["admin","autonomousOperations"],paperMarkdownJobs:["admin","paperMarkdownJobs"],codexPaperJobs:["admin","codexPaperJobs"],codexPaperJob:(e,t)=>["admin","codexPaperJob",e,t],catalogAudit:["catalog-audit"]},Tz={follows:e=>["research-follows",e],topics:e=>["research-topics",e],publicTopics:["research-public-topic"],publicTopic:(e,t)=>["research-public-topic",e,t],topicPapers:(e,t,n,r)=>[`research-topic-papers-${e}`,t,n.startDate??null,n.endDate??null,r],featuredTopics:["research-featured-topics"],email:e=>["research-email",e],feed:e=>[...E2.feeds.following,e]},dm=q.createContext(null),U0="pwc:auth-stale",S2=({children:e})=>{const t=DS(),n=uN({queryKey:hu.me,queryFn:()=>z0.getCurrentUser(),staleTime:1/0}),r=n.data??null,i=q.useRef(null),{refetch:s}=n,o=q.useCallback(async()=>{await s()},[s]),a=q.useCallback(async()=>{const u=qg("/api/v1/auth/logout");if(new URL(u,window.location.origin).origin!==window.location.origin){const c=document.createElement("form");c.method="POST",c.action=`${u}?return_to=${encodeURIComponent(window.location.href)}`,document.body.appendChild(c),c.submit();return}await z0.logout(),t.setQueryData(hu.me,null)},[t]);q.useEffect(()=>{},[r]),q.useEffect(()=>{i.current&&!r&&t.resetQueries({predicate:u=>u.queryKey[0]!==hu.me[0]}),i.current=r},[t,r]),q.useEffect(()=>{const u=()=>t.setQueryData(hu.me,null);return window.addEventListener(U0,u),()=>window.removeEventListener(U0,u)},[t]);const l=q.useMemo(()=>({user:r,isLoading:n.isPending,refresh:o,logout:a}),[r,n.isPending,o,a]);return w.jsx(dm.Provider,{value:l,children:e})};function hk(){const e=q.useContext(dm);if(!e)throw new Error("useAuth must be used inside an ");return e}function Iz(){return q.useContext(dm)}const Mr=({name:e,size:t=14})=>{const n={search:w.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"}),bookmark:w.jsx("path",{d:"M4 2h8v12l-4-3-4 3V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),menu:w.jsx("path",{d:"M2 4h12M2 8h12M2 12h12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),close:w.jsx("path",{d:"M3 3l10 10M13 3L3 13",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),github:w.jsx("path",{fill:"currentColor",d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"})};return w.jsx("svg",{className:t===11?"icon-sm":"icon",viewBox:"0 0 16 16",width:t,height:t,children:n[e]})},V0="https://github.com/huggingface/paperswithcode-feedback/issues",B0="https://github.com/huggingface/paperswithcode",C2="https://paperswithcode.co/following",q0="pwc:announcement:following-feed:v1:dismissed",th=[{to:"/",label:"Trending",end:!0},{to:"/tasks",label:"Browse state-of-the-art",end:!1},{to:"/methods",label:"Methods",end:!1},{to:"/conferences",label:"Conferences",end:!1},{to:"/organizations",label:"Organizations",end:!1},{to:"/submit",label:"Submit",end:!1}],k2=()=>{if(typeof navigator>"u")return!1;const e=navigator.userAgentData,t=(e==null?void 0:e.platform)||navigator.platform||navigator.userAgent||"";return/Mac|iPhone|iPad|iPod/i.test(t)},P2=()=>{const[e,t]=q.useState(!1);return q.useEffect(()=>{t(k2())},[]),w.jsx("kbd",{children:e?"⌘K":"Ctrl K"})},R2=({onOpenSearch:e})=>{const[t,n]=q.useState(!1),[r,i]=q.useState(()=>localStorage.getItem(q0)!=="1"),s=q.useRef(null),o=q.useRef(null),a=()=>n(!1),{user:l,logout:u}=hk(),c=hn(),d=c.pathname.startsWith("/pdf/"),f=`${c.pathname}${c.search}`||"/",m=$o(),_=al()?{to:"/chat",label:"Chat",end:!1,badge:"New"}:tF()?{to:"/chat",label:"Chat",end:!1,badge:"New",href:eF}:null,p=_?[th[0],_,...th.slice(1)]:th;return q.useLayoutEffect(()=>{var S;const y=s.current,h=o.current;if(!y||!h)return;let v=!1;const x=()=>{if(v)return;const P=y.querySelector(".nav-item.active"),C=(P==null?void 0:P.offsetWidth)??0;h.style.width=`${C}px`,h.style.transform=`translateX(${(P==null?void 0:P.offsetLeft)??0}px)`,h.style.opacity=C>0?"1":"0"};x();const b=window.requestAnimationFrame(()=>{h.classList.add("nav-indicator-ready")}),E=typeof ResizeObserver>"u"?null:new ResizeObserver(x);return E==null||E.observe(y),window.addEventListener("resize",x),(S=document.fonts)==null||S.ready.then(x),()=>{v=!0,window.cancelAnimationFrame(b),E==null||E.disconnect(),window.removeEventListener("resize",x)}},[c.pathname,p.length]),w.jsxs(q$,{open:t,onOpenChange:n,children:[w.jsxs("header",{className:"app-header",children:[w.jsxs("div",{className:"app-header-inner",children:[w.jsxs(ys,{to:"/",className:"brand",onClick:a,children:[w.jsx("span",{className:"brand-mark"}),w.jsxs("span",{className:"brand-name",children:["Papers ",w.jsx("em",{children:"With Code"})]})]}),w.jsxs("nav",{className:"nav",ref:s,children:[p.map(({to:y,label:h,end:v,badge:x,href:b})=>{const E=w.jsxs(w.Fragment,{children:[w.jsx("span",{children:h}),x&&w.jsx("span",{className:"nav-new-badge","aria-hidden":"true",children:x})]});return b?w.jsx("a",{href:b,target:"_blank",rel:"noreferrer",className:`nav-item${x?" nav-item-with-badge":""}`,children:E},y):w.jsx(ys,{to:y,end:v,className:({isActive:S})=>`nav-item${x?" nav-item-with-badge":""}${S?" active":""}`,children:E},y)}),w.jsx("span",{ref:o,className:"nav-indicator","aria-hidden":"true"})]}),w.jsx("div",{className:"header-spacer"}),w.jsx("a",{className:"feedback-link header-feedback-link",href:V0,target:"_blank",rel:"noreferrer",children:"Submit feedback"}),w.jsx("a",{className:"icon-btn header-github-btn",href:B0,target:"_blank",rel:"noreferrer","aria-label":"GitHub repository",title:"GitHub repository",children:w.jsx(Mr,{name:"github",size:14})}),w.jsxs("button",{className:"search-trigger","aria-label":"Search papers, authors, domains",onClick:e,children:[w.jsx(Mr,{name:"search",size:13}),w.jsx("span",{children:"Search papers, authors, domains…"}),w.jsx(P2,{})]}),w.jsx("button",{className:"icon-btn mobile-search-btn","aria-label":"Search",onClick:e,children:w.jsx(Mr,{name:"search",size:14})}),!m&&w.jsx(ys,{to:"/saved",className:"icon-btn header-bookmark-btn","aria-label":"Saved papers",title:"Saved papers",children:w.jsx(Mr,{name:"bookmark",size:13})}),m?null:l?w.jsx(y2,{user:l,onLogout:u}):w.jsx(m1,{returnTo:f}),w.jsx(W$,{asChild:!0,children:w.jsx("button",{className:"icon-btn mobile-menu-btn","aria-label":"Open menu",children:w.jsx(Mr,{name:"menu",size:14})})})]}),!d&&r&&w.jsxs("div",{className:"site-announcement",role:"status",children:[w.jsx("span",{children:"New: "}),m?w.jsx("a",{href:C2,target:"_blank",rel:"noreferrer",children:"following feed"}):w.jsx(bn,{to:"/following",children:"following feed"}),w.jsx("span",{children:", follow your favorite tasks, benchmarks, authors or organizations"}),w.jsx("button",{type:"button",className:"site-announcement-close","aria-label":"Dismiss announcement",onClick:()=>{localStorage.setItem(q0,"1"),i(!1)},children:w.jsx(Mr,{name:"close",size:11})})]})]}),w.jsx(H$,{children:w.jsx(G$,{className:"mobile-nav-drawer",children:w.jsxs(K$,{className:"mobile-nav-panel","aria-describedby":void 0,children:[w.jsx(Q$,{className:"sr-only",children:"Navigation menu"}),w.jsx(Y$,{className:"icon-btn mobile-nav-close","aria-label":"Close menu",children:w.jsx(Mr,{name:"close",size:14})}),w.jsxs("button",{type:"button",className:"mobile-nav-link mobile-nav-search",onClick:()=>{a(),e()},children:[w.jsx(Mr,{name:"search",size:14}),w.jsx("span",{children:"Search papers, authors, domains…"})]}),p.map(({to:y,label:h,end:v,badge:x,href:b})=>{const E=`mobile-nav-link${x?" mobile-nav-link-with-badge":""}`,S=w.jsxs(w.Fragment,{children:[w.jsx("span",{children:h}),x&&w.jsx("span",{className:"nav-new-badge","aria-hidden":"true",children:x})]});return b?w.jsx("a",{href:b,target:"_blank",rel:"noreferrer",className:E,onClick:a,children:S},y):w.jsx(ys,{to:y,end:v,className:E,onClick:a,children:S},y)}),w.jsx("a",{className:"mobile-nav-link",href:V0,target:"_blank",rel:"noreferrer",onClick:a,children:"Submit feedback"}),w.jsx("a",{className:"mobile-nav-link",href:B0,target:"_blank",rel:"noreferrer",onClick:a,children:"GitHub"}),!m&&w.jsx(ys,{to:"/saved",className:"mobile-nav-link",onClick:a,children:"Saved papers"}),!m&&(l==null?void 0:l.is_admin)&&w.jsx(ys,{to:"/admin-dashboard",className:"mobile-nav-link",onClick:a,children:"Admin dashboard"})]})})})]})},T2=()=>{const{pathname:e}=hn();return e==="/chat"||e.startsWith("/chat/")||e.startsWith("/pdf/")?null:w.jsx("footer",{className:"site-footer",children:w.jsxs("div",{className:"site-footer-inner",children:[w.jsxs("span",{children:["© ",new Date().getFullYear()," Hugging Face"]}),w.jsx(bn,{to:"/docs/api",children:"API"}),w.jsx(bn,{to:"/mcp",children:"MCP"}),w.jsx(bn,{to:"/privacy",children:"Privacy"}),w.jsx("a",{href:"https://github.com/huggingface/paperswithcode-feedback/issues",target:"_blank",rel:"noreferrer",children:"Feedback"})]})})},I2=1,O2=1e6;let nh=0;function M2(){return nh=(nh+1)%Number.MAX_SAFE_INTEGER,nh.toString()}const rh=new Map,W0=e=>{if(rh.has(e))return;const t=setTimeout(()=>{rh.delete(e),Ia({type:"REMOVE_TOAST",toastId:e})},O2);rh.set(e,t)},A2=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,I2)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?W0(n):e.toasts.forEach(r=>{W0(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},Lu=[];let ju={toasts:[]};function Ia(e){ju=A2(ju,e),Lu.forEach(t=>{t(ju)})}function N2({...e}){const t=M2(),n=i=>Ia({type:"UPDATE_TOAST",toast:{...i,id:t}}),r=()=>Ia({type:"DISMISS_TOAST",toastId:t});return Ia({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:i=>{i||r()}}}),{id:t,dismiss:r,update:n}}function $2(){const[e,t]=g.useState(ju);return g.useEffect(()=>(Lu.push(t),()=>{const n=Lu.indexOf(t);n>-1&&Lu.splice(n,1)}),[e]),{...e,toast:N2,dismiss:n=>Ia({type:"DISMISS_TOAST",toastId:n})}}var F2=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),L2="VisuallyHidden",fm=g.forwardRef((e,t)=>w.jsx(ke.span,{...e,ref:t,style:{...F2,...e.style}}));fm.displayName=L2;var hm="ToastProvider",[pm,j2,D2]=Kg("Toast"),[pk]=os("Toast",[D2]),[z2,Md]=pk(hm),vk=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:i="right",swipeThreshold:s=50,children:o}=e,[a,l]=g.useState(null),[u,c]=g.useState(0),d=g.useRef(!1),f=g.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${hm}\`. Expected non-empty \`string\`.`),w.jsx(pm.Provider,{scope:t,children:w.jsx(z2,{scope:t,label:n,duration:r,swipeDirection:i,swipeThreshold:s,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:g.useCallback(()=>c(m=>m+1),[]),onToastRemove:g.useCallback(()=>c(m=>m-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:o})})};vk.displayName=hm;var gk="ToastViewport",U2=["F8"],dv="toast.viewportPause",fv="toast.viewportResume",mk=g.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=U2,label:i="Notifications ({hotkey})",...s}=e,o=Md(gk,n),a=j2(n),l=g.useRef(null),u=g.useRef(null),c=g.useRef(null),d=g.useRef(null),f=et(t,d,o.onViewportChange),m=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),_=o.toastCount>0;g.useEffect(()=>{const y=h=>{var x;r.length!==0&&r.every(b=>h[b]||h.code===b)&&((x=d.current)==null||x.focus())};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[r]),g.useEffect(()=>{const y=l.current,h=d.current;if(_&&y&&h){const v=()=>{if(!o.isClosePausedRef.current){const S=new CustomEvent(dv);h.dispatchEvent(S),o.isClosePausedRef.current=!0}},x=()=>{if(o.isClosePausedRef.current){const S=new CustomEvent(fv);h.dispatchEvent(S),o.isClosePausedRef.current=!1}},b=S=>{!y.contains(S.relatedTarget)&&x()},E=()=>{y.contains(document.activeElement)||x()};return y.addEventListener("focusin",v),y.addEventListener("focusout",b),y.addEventListener("pointermove",v),y.addEventListener("pointerleave",E),window.addEventListener("blur",v),window.addEventListener("focus",x),()=>{y.removeEventListener("focusin",v),y.removeEventListener("focusout",b),y.removeEventListener("pointermove",v),y.removeEventListener("pointerleave",E),window.removeEventListener("blur",v),window.removeEventListener("focus",x)}}},[_,o.isClosePausedRef]);const p=g.useCallback(({tabbingDirection:y})=>{const v=a().map(x=>{const b=x.ref.current,E=[b,...e3(b)];return y==="forwards"?E:E.reverse()});return(y==="forwards"?v.reverse():v).flat()},[a]);return g.useEffect(()=>{const y=d.current;if(y){const h=v=>{var E,S,P;const x=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!x){const C=document.activeElement,T=v.shiftKey;if(v.target===y&&T){(E=u.current)==null||E.focus();return}const M=p({tabbingDirection:T?"backwards":"forwards"}),z=M.findIndex(F=>F===C);ih(M.slice(z+1))?v.preventDefault():T?(S=u.current)==null||S.focus():(P=c.current)==null||P.focus()}};return y.addEventListener("keydown",h),()=>y.removeEventListener("keydown",h)}},[a,p]),w.jsxs(MN,{ref:l,role:"region","aria-label":i.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:_?void 0:"none"},children:[_&&w.jsx(hv,{ref:u,onFocusFromOutsideViewport:()=>{const y=p({tabbingDirection:"forwards"});ih(y)}}),w.jsx(pm.Slot,{scope:n,children:w.jsx(ke.ol,{tabIndex:-1,...s,ref:f})}),_&&w.jsx(hv,{ref:c,onFocusFromOutsideViewport:()=>{const y=p({tabbingDirection:"backwards"});ih(y)}})]})});mk.displayName=gk;var yk="ToastFocusProxy",hv=g.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=e,s=Md(yk,n);return w.jsx(fm,{tabIndex:0,...i,ref:t,style:{position:"fixed"},onFocus:o=>{var u;const a=o.relatedTarget;!((u=s.viewport)!=null&&u.contains(a))&&r()}})});hv.displayName=yk;var Rl="Toast",V2="toast.swipeStart",B2="toast.swipeMove",q2="toast.swipeCancel",W2="toast.swipeEnd",_k=g.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:i,onOpenChange:s,...o}=e,[a,l]=yd({prop:r,defaultProp:i??!0,onChange:s,caller:Rl});return w.jsx(br,{present:n||a,children:w.jsx(K2,{open:a,...o,ref:t,onClose:()=>l(!1),onPause:Ut(e.onPause),onResume:Ut(e.onResume),onSwipeStart:ee(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ee(e.onSwipeMove,u=>{const{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:ee(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ee(e.onSwipeEnd,u=>{const{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});_k.displayName=Rl;var[H2,G2]=pk(Rl,{onClose(){}}),K2=g.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:i,open:s,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:c,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:m,..._}=e,p=Md(Rl,n),[y,h]=g.useState(null),v=et(t,F=>h(F)),x=g.useRef(null),b=g.useRef(null),E=i||p.duration,S=g.useRef(0),P=g.useRef(E),C=g.useRef(0),{onToastAdd:T,onToastRemove:R}=p,N=Ut(()=>{var W;(y==null?void 0:y.contains(document.activeElement))&&((W=p.viewport)==null||W.focus()),o()}),M=g.useCallback(F=>{!F||F===1/0||(window.clearTimeout(C.current),S.current=new Date().getTime(),C.current=window.setTimeout(N,F))},[N]);g.useEffect(()=>{const F=p.viewport;if(F){const W=()=>{M(P.current),u==null||u()},B=()=>{const Q=new Date().getTime()-S.current;P.current=P.current-Q,window.clearTimeout(C.current),l==null||l()};return F.addEventListener(dv,B),F.addEventListener(fv,W),()=>{F.removeEventListener(dv,B),F.removeEventListener(fv,W)}}},[p.viewport,E,l,u,M]),g.useEffect(()=>{s&&!p.isClosePausedRef.current&&M(E)},[s,E,p.isClosePausedRef,M]),g.useEffect(()=>(T(),()=>R()),[T,R]);const z=g.useMemo(()=>y?kk(y):null,[y]);return p.viewport?w.jsxs(w.Fragment,{children:[z&&w.jsx(Q2,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:z}),w.jsx(H2,{scope:n,onClose:N,children:xl.createPortal(w.jsx(pm.ItemSlot,{scope:n,children:w.jsx(ON,{asChild:!0,onEscapeKeyDown:ee(a,()=>{p.isFocusedToastEscapeKeyDownRef.current||N(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:w.jsx(ke.li,{tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":p.swipeDirection,..._,ref:v,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:ee(e.onKeyDown,F=>{F.key==="Escape"&&(a==null||a(F.nativeEvent),F.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,N()))}),onPointerDown:ee(e.onPointerDown,F=>{F.button===0&&(x.current={x:F.clientX,y:F.clientY})}),onPointerMove:ee(e.onPointerMove,F=>{if(!x.current)return;const W=F.clientX-x.current.x,B=F.clientY-x.current.y,Q=!!b.current,O=["left","right"].includes(p.swipeDirection),A=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,V=O?A(0,W):0,K=O?0:A(0,B),te=F.pointerType==="touch"?10:2,oe={x:V,y:K},de={originalEvent:F,delta:oe};Q?(b.current=oe,pu(B2,d,de,{discrete:!1})):H0(oe,p.swipeDirection,te)?(b.current=oe,pu(V2,c,de,{discrete:!1}),F.target.setPointerCapture(F.pointerId)):(Math.abs(W)>te||Math.abs(B)>te)&&(x.current=null)}),onPointerUp:ee(e.onPointerUp,F=>{const W=b.current,B=F.target;if(B.hasPointerCapture(F.pointerId)&&B.releasePointerCapture(F.pointerId),b.current=null,x.current=null,W){const Q=F.currentTarget,O={originalEvent:F,delta:W};H0(W,p.swipeDirection,p.swipeThreshold)?pu(W2,m,O,{discrete:!0}):pu(q2,f,O,{discrete:!0}),Q.addEventListener("click",A=>A.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),Q2=e=>{const{__scopeToast:t,children:n,...r}=e,i=Md(Rl,t),[s,o]=g.useState(!1),[a,l]=g.useState(!1);return J2(()=>o(!0)),g.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:w.jsx(wd,{asChild:!0,children:w.jsx(fm,{...r,children:s&&w.jsxs(w.Fragment,{children:[i.label," ",n]})})})},Y2="ToastTitle",wk=g.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return w.jsx(ke.div,{...r,ref:t})});wk.displayName=Y2;var X2="ToastDescription",xk=g.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return w.jsx(ke.div,{...r,ref:t})});xk.displayName=X2;var bk="ToastAction",Ek=g.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?w.jsx(Ck,{altText:n,asChild:!0,children:w.jsx(vm,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${bk}\`. Expected non-empty \`string\`.`),null)});Ek.displayName=bk;var Sk="ToastClose",vm=g.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,i=G2(Sk,n);return w.jsx(Ck,{asChild:!0,children:w.jsx(ke.button,{type:"button",...r,ref:t,onClick:ee(e.onClick,i.onClose)})})});vm.displayName=Sk;var Ck=g.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...i}=e;return w.jsx(ke.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...i,ref:t})});function kk(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),Z2(r)){const i=r.ariaHidden||r.hidden||r.style.display==="none",s=r.dataset.radixToastAnnounceExclude==="";if(!i)if(s){const o=r.dataset.radixToastAnnounceAlt;o&&t.push(o)}else t.push(...kk(r))}}),t}function pu(e,t,n,{discrete:r}){const i=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Lg(i,s):i.dispatchEvent(s)}var H0=(e,t,n=0)=>{const r=Math.abs(e.x),i=Math.abs(e.y),s=r>i;return t==="left"||t==="right"?s&&r>n:!s&&i>n};function J2(e=()=>{}){const t=Ut(e);fn(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function Z2(e){return e.nodeType===e.ELEMENT_NODE}function e3(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ih(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var t3=vk,Pk=mk,Rk=_k,Tk=wk,Ik=xk,Ok=Ek,Mk=vm;const G0=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,K0=M1,n3=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return K0(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:s}=t,o=Object.keys(i).map(u=>{const c=n==null?void 0:n[u],d=s==null?void 0:s[u];if(c===null)return null;const f=G0(c)||G0(d);return i[u][f]}),a=n&&Object.entries(n).reduce((u,c)=>{let[d,f]=c;return f===void 0||(u[d]=f),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:d,className:f,...m}=c;return Object.entries(m).every(_=>{let[p,y]=_;return Array.isArray(y)?y.includes({...s,...a}[p]):{...s,...a}[p]===y})?[...u,d,f]:u},[]);return K0(e,o,l,n==null?void 0:n.class,n==null?void 0:n.className)},r3=t3,Ak=g.forwardRef(({className:e,...t},n)=>w.jsx(Pk,{ref:n,className:ct("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));Ak.displayName=Pk.displayName;const i3=n3("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-16 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Nk=g.forwardRef(({className:e,variant:t,...n},r)=>w.jsx(Rk,{ref:r,className:ct(i3({variant:t}),e),...n}));Nk.displayName=Rk.displayName;const s3=g.forwardRef(({className:e,...t},n)=>w.jsx(Ok,{ref:n,className:ct("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));s3.displayName=Ok.displayName;const $k=g.forwardRef(({className:e,...t},n)=>w.jsx(Mk,{ref:n,className:ct("absolute right-2 top-2 inline-flex h-11 w-11 items-center justify-center rounded-md text-foreground transition-colors hover:bg-muted focus:outline-none focus:ring-2 focus:ring-ring group-[.destructive]:text-destructive-foreground group-[.destructive]:hover:bg-destructive-foreground/10 group-[.destructive]:focus:ring-destructive-foreground",e),"aria-label":"Dismiss notification","toast-close":"",...t,children:w.jsx(c2,{className:"h-4 w-4"})}));$k.displayName=Mk.displayName;const Fk=g.forwardRef(({className:e,...t},n)=>w.jsx(Tk,{ref:n,className:ct("text-sm font-semibold",e),...t}));Fk.displayName=Tk.displayName;const Lk=g.forwardRef(({className:e,...t},n)=>w.jsx(Ik,{ref:n,className:ct("text-sm opacity-90",e),...t}));Lk.displayName=Ik.displayName;function o3(){const{toasts:e}=$2();return w.jsxs(r3,{children:[e.map(function({id:t,title:n,description:r,action:i,...s}){return w.jsxs(Nk,{...s,children:[w.jsxs("div",{className:"grid gap-1",children:[n&&w.jsx(Fk,{children:n}),r&&w.jsx(Lk,{children:r})]}),i,w.jsx($k,{})]},t)}),w.jsx(Ak,{})]})}function a3(){const{pathname:e,hash:t}=hn();g.useLayoutEffect(()=>{t||window.scrollTo({top:0,left:0,behavior:"instant"})},[e,t])}const jk=rF(),l3=jk?wA:_A;if(!jk&&typeof window<"u"){const e=window.location.hash;e.startsWith("#/")&&!e.startsWith("#//")&&window.history.replaceState(null,"",e.slice(1))}const u3=q.lazy(()=>ae(()=>import("./AuthorizePaperEditView-C0qgOk3Y.js"),__vite__mapDeps([0,1,2,3]))),c3=q.lazy(()=>ae(()=>import("./FollowingView-Cfi3OwP1.js"),__vite__mapDeps([4,5,6,7,8,9,1,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34]))),d3=q.lazy(()=>ae(()=>import("./TopicView-B1L4_v00.js"),__vite__mapDeps([35,14,15,16,17,18,19,10,20,21,22,23,24,25,26,27,32,33,9,1,11,36]))),f3=q.lazy(()=>ae(()=>import("./FeedView-Bv5eNETi.js"),__vite__mapDeps([5,6,7,8,9,1,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34]))),h3=q.lazy(()=>ae(()=>import("./ChatView-2NhnPPPO.js"),__vite__mapDeps([37,38,30,31,22,23,39,40,8,41,42,43,44,45,46,1,47,48,49,50,51,11,52,53,16,17,54,55,28,29,56,20,57,58]))),p3=q.lazy(()=>ae(()=>import("./SharedChatView-C7yziquD.js"),__vite__mapDeps([59,38,30,31,22,23,39,40,8,41,42,43,44,45,46,1,47,48,49,50,51,11,52,53,16,17,54,55]))),v3=q.lazy(()=>ae(()=>import("./PapersListView-CBCcd07A.js"),__vite__mapDeps([60,18,19,10,20,14,15,16,17,21,22,23,24,25,26,27,8,32,33,61,34,62,63]))),g3=q.lazy(()=>ae(()=>import("./PaperDetailView-DAUcj691.js"),__vite__mapDeps([64,1,20,18,19,10,21,65,23,39,24,66,22,67,32,33,68,69,70,57,26,34,2,7,29,48,71,72,73,74,25,52,75,40,8,76,77,78,79,11,80,81,41,82,83,44,45,27,84,85,16,17,86]))),m3=q.lazy(()=>ae(()=>import("./PaperReaderView-C6y6ZAlb.js"),__vite__mapDeps([87,38,30,31,22,23,39,40,8,41,42,43,44,45,46,1,47,48,49,50,51,11,52,53,16,17,54,55,88,67,24,32,33,37,28,29,56,20,57,58]))),y3=q.lazy(()=>ae(()=>import("./TagsIndexView-CCfD3bxP.js"),__vite__mapDeps([89,8,19,10,90,52,91,56,92,93,47,79,36,94,42,95,81,6,34,96,26,97,76,2,73,77,74,25,7,75,1,78,11,98,99]))),_3=q.lazy(()=>ae(()=>import("./TagBrowseView-Cve79Quf.js"),__vite__mapDeps([100,101,9,1,11,18,19,10,14,15,16,17,20,21,22,23,24,25,26,27,12,102,88,43,44,45,46,39,55,8,62,63,69,70,90,32,33,34,103,94,41]))),w3=q.lazy(()=>ae(()=>import("./MethodsIndexView-tojTcao9.js"),__vite__mapDeps([104,8,99,90,34,96,26,97,76,2,73,77,74,25,7,52,75,1,78,11,98,92]))),x3=q.lazy(()=>ae(()=>import("./FrameworksIndexView-BUbqSHfG.js"),__vite__mapDeps([105,20,8,19,63]))),b3=q.lazy(()=>ae(()=>import("./TrendsView-Dh0c9hMm.js"),__vite__mapDeps([106,34,26]))),E3=q.lazy(()=>ae(()=>import("./ConferencesIndexView-DKRLcCka.js"),__vite__mapDeps([107,8,108,34,96,26,97,76,2,73,77,74,25,7,52,75,1,78,11]))),S3=q.lazy(()=>ae(()=>import("./AiDeadlinesView-Bq7_kcGg.js"),__vite__mapDeps([109,8,110,82,26,34,24,7,108]))),C3=q.lazy(()=>ae(()=>import("./ConferenceDetailView-CBVBkALA.js"),__vite__mapDeps([111,96,26,88,43,44,45,46,39,22,23,1,55,8,62,99,19,112,108,10,34,24,103]))),k3=q.lazy(()=>ae(()=>import("./ConferenceTaskView-DMB1KJgG.js"),__vite__mapDeps([113,14,15,16,17,18,19,10,20,21,22,23,24,25,26,27,88,43,44,45,46,39,1,55,8,62,112,32,33,34,103]))),P3=q.lazy(()=>ae(()=>import("./OrganizationsIndexView-bxW7rJXB.js"),__vite__mapDeps([114,34,8,115]))),R3=q.lazy(()=>ae(()=>import("./OrganizationDetailView-CPbcJCA-.js"),__vite__mapDeps([116,101,9,1,11,88,43,44,45,46,39,22,23,55,117,26,8,14,15,16,17,18,19,10,20,21,24,25,27,34,74,2,7,52,75,32,33,62,85,103]))),T3=q.lazy(()=>ae(()=>import("./OrganizationDetailView-CPbcJCA-.js"),__vite__mapDeps([116,101,9,1,11,88,43,44,45,46,39,22,23,55,117,26,8,14,15,16,17,18,19,10,20,21,24,25,27,34,74,2,7,52,75,32,33,62,85,103]))),I3=q.lazy(()=>ae(()=>import("./AuthorDetailView-YZ5SXaLH.js"),__vite__mapDeps([118,16,17,14,15,18,19,10,20,21,22,23,24,25,26,27,101,9,1,11,34,32,33,62,103]))),O3=q.lazy(()=>ae(()=>import("./MethodDetailView-HXoiJFPs.js"),__vite__mapDeps([119,101,9,1,11,18,19,10,14,15,16,17,20,21,22,23,24,25,26,27,88,43,44,45,46,39,55,8,62,90,32,33,34,103]))),M3=q.lazy(()=>ae(()=>import("./BenchmarkDetailView-YsyYtOrf.js"),__vite__mapDeps([120,101,9,1,11,8,65,23,39,24,66,69,70,21,110,82,20,26,34,102,90,62,103,121]))),A3=q.lazy(()=>ae(()=>import("./SavedPapersView-fg5rGNas.js"),__vite__mapDeps([122,15,16,17,18,19,10,20,21,22,23,24,26,34,70,84]))),N3=q.lazy(()=>ae(()=>import("./SettingsView-CqvK81AI.js"),__vite__mapDeps([123,1,9,110,82,13,6,12,94,31,68,58,69,70,51,93]))),$3=q.lazy(()=>ae(()=>import("./PrivacyView-DpQagkBi.js"),__vite__mapDeps([124,68]))),F3=q.lazy(()=>ae(()=>import("./ApiDocsView-DGZ54Cn7.js"),__vite__mapDeps([125,68,44,126]))),L3=q.lazy(()=>ae(()=>import("./McpView--ssj-T70.js"),__vite__mapDeps([127,68,49,41,51,48,128]))),j3=q.lazy(()=>ae(()=>import("./SubmitView-DjhEFLk3.js"),__vite__mapDeps([129,1,34,2,73,77,22,23,72]))),D3=q.lazy(()=>ae(()=>import("./CronDashboard-8Mh93TaY.js"),__vite__mapDeps([130,1,131,132,80,2,53,79,92,95,42,91,51,133,75,134,83,33,3,8,31]))),z3=q.lazy(()=>ae(()=>import("./AutonomousOperations-CMfRlc27.js"),__vite__mapDeps([135,1,131,132,80,2,73,95,50]))),U3=q.lazy(()=>ae(()=>import("./SubmissionsDashboard-C7elnzzl.js"),__vite__mapDeps([136,71,72,1,33,8,24,78,22,23,133,75,134,137]))),V3=q.lazy(()=>ae(()=>import("./UserProfileView-D_mh3ZLC.js"),__vite__mapDeps([138,117,26,8]))),B3=q.lazy(()=>ae(()=>import("./RateLimitsView-BaJDbrzN.js"),__vite__mapDeps([139,70]))),q3=q.lazy(()=>ae(()=>import("./AstraForRoboticsView-D8dJpc99.js"),__vite__mapDeps([140,14,15,16,17,18,19,10,20,21,22,23,24,25,26,27,34,32,33,68,141]))),sh=q.lazy(()=>ae(()=>import("./NotFound-BkVU3ijx.js"),[])),W3=q.lazy(()=>ae(()=>import("./SearchOverlay-Dj2wmUrg.js"),__vite__mapDeps([142,21,8,22,23,61,19,10]))),H3=q.lazy(()=>ae(()=>import("./StagingAccessRequestView-CeS3fa4F.js"),__vite__mapDeps([143,134]))),Dk=()=>w.jsxs("div",{className:"page","aria-busy":"true","aria-live":"polite",children:[w.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:24,width:"30%",marginBottom:24}}),w.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:64,width:"60%",marginBottom:32}}),w.jsxs("div",{className:"paper-list",style:{display:"grid",gap:16},children:[w.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:96}}),w.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:96}}),w.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:96}})]})]}),G3=new YA({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}}),K3=()=>{const{arxivId:e}=wS();return w.jsx(Ki,{to:e?`/paper/${e}`:"/papers",replace:!0})},Q3=()=>{const{taskSlug:e}=wS();return w.jsx(Ki,{to:e?`/tasks/${e}`:"/tasks",replace:!0})},Y3=({element:e})=>$o()?w.jsx(Ki,{to:"/",replace:!0}):w.jsx(w.Fragment,{children:e}),pv=({element:e})=>{const{user:t,isLoading:n}=hk(),r=hn();return $o()?w.jsx(Ki,{to:"/",replace:!0}):n?w.jsx("div",{className:"page",children:w.jsx("div",{className:"submission-loading",children:w.jsx("span",{children:"Checking admin session..."})})}):t?t.is_admin?w.jsx(w.Fragment,{children:e}):w.jsx("div",{className:"page",children:w.jsxs("div",{className:"submission-empty submission-empty-warn",children:[w.jsx("h1",{children:"Admin access required"}),w.jsxs("p",{children:["Signed in as @",t.username,". This dashboard is limited to allowlisted admin accounts."]})]})}):w.jsx("div",{className:"page",children:w.jsxs("div",{className:"submission-empty submission-empty-warn",children:[w.jsx("h1",{children:"Sign in required"}),w.jsx("p",{children:"Sign in with an allowlisted Hugging Face admin account to view admin operations."}),w.jsx(m1,{returnTo:`${r.pathname}${r.search}`})]})})},X3=()=>{const e=Z$(),t=typeof window<"u"&&new URL(e,window.location.origin).origin!==window.location.origin;return q.useEffect(()=>{t&&window.location.replace(e)},[e,t]),t?w.jsx("div",{className:"page",children:w.jsxs("div",{className:"submission-loading",children:[w.jsx("span",{children:"Opening the production admin dashboard..."}),w.jsx("a",{href:e,children:"Continue"})]})}):w.jsx(pv,{element:w.jsx(D3,{})})},Q0=({reader:e=!1})=>{const[t,n]=q.useState(!1),{pathname:r}=hn();q.useEffect(()=>{const a=l=>{(l.metaKey||l.ctrlKey)&&l.key==="k"&&(l.preventDefault(),n(!0))};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[]);const i=w.jsx(R2,{onOpenSearch:()=>n(!0)}),s=w.jsx(dS,{resetKey:r,children:w.jsx(q.Suspense,{fallback:w.jsx(Dk,{}),children:w.jsx(uA,{})})}),o=t&&w.jsx(q.Suspense,{fallback:null,children:w.jsx(W3,{open:t,onClose:()=>n(!1)})});return e?w.jsxs("div",{className:"reader-route-shell",children:[i,w.jsx("div",{className:"reader-route-content",children:s}),o]}):w.jsxs(w.Fragment,{children:[i,w.jsx("main",{children:s}),w.jsx(T2,{}),o]})},J3=()=>(a3(),q.useLayoutEffect(()=>{var e;(e=document.getElementById("initial-discovery-footer"))==null||e.remove()},[]),w.jsxs(cA,{children:[w.jsx(re,{path:"/request-access",element:w.jsx(q.Suspense,{fallback:w.jsx(Dk,{}),children:w.jsx(H3,{})})}),w.jsx(re,{element:w.jsx(Q0,{reader:!0}),children:w.jsx(re,{path:"/pdf/:paperId",element:nF()?w.jsx(m3,{}):w.jsx(sh,{})})}),w.jsxs(re,{element:w.jsx(Q0,{}),children:[w.jsx(re,{path:"/",element:w.jsx(f3,{})}),w.jsx(re,{path:"/following",element:w.jsx(c3,{})}),w.jsx(re,{path:"/topics/:topicParam",element:w.jsx(d3,{})}),w.jsx(re,{path:"/x-trending",element:w.jsx(Ki,{to:"/",replace:!0})}),w.jsx(re,{path:"/chat/:sessionId?",element:al()?w.jsx(h3,{}):w.jsx(Ki,{to:"/",replace:!0})}),w.jsx(re,{path:"/share/:shareId",element:al()?w.jsx(p3,{}):w.jsx(sh,{})}),w.jsx(re,{path:"/papers",element:w.jsx(v3,{})}),w.jsx(re,{path:"/papers/:arxivId",element:w.jsx(K3,{})}),w.jsx(re,{path:"/paper/:arxivId",element:w.jsx(g3,{})}),w.jsx(re,{path:"/tasks",element:w.jsx(y3,{})}),w.jsx(re,{path:"/tasks/:taskSlug",element:w.jsx(_3,{})}),w.jsx(re,{path:"/task/:taskSlug",element:w.jsx(Q3,{})}),w.jsx(re,{path:"/methods",element:w.jsx(w3,{})}),w.jsx(re,{path:"/methods/:methodSlug",element:w.jsx(O3,{})}),w.jsx(re,{path:"/frameworks",element:w.jsx(x3,{})}),w.jsx(re,{path:"/trends",element:w.jsx(b3,{})}),w.jsx(re,{path:"/conferences",element:w.jsx(E3,{})}),w.jsx(re,{path:"/ai-deadlines",element:w.jsx(S3,{})}),w.jsx(re,{path:"/conferences/:confSlug",element:w.jsx(C3,{})}),w.jsx(re,{path:"/conferences/:confSlug/:taskSlug",element:w.jsx(k3,{})}),w.jsx(re,{path:"/organizations",element:w.jsx(P3,{})}),w.jsx(re,{path:"/orgs/:orgSlug",element:w.jsx(R3,{})}),w.jsx(re,{path:"/orgs/:orgSlug/:taskSlug",element:w.jsx(T3,{})}),w.jsx(re,{path:"/authors/:authorId",element:w.jsx(I3,{})}),w.jsx(re,{path:"/benchmark/:datasetSlug",element:w.jsx(M3,{})}),w.jsx(re,{path:"/authorize-paper-edit/:authorizationId",element:w.jsx(u3,{})}),w.jsx(re,{path:"/submit",element:w.jsx(j3,{})}),w.jsx(re,{path:"/saved",element:w.jsx(Y3,{element:w.jsx(A3,{})})}),w.jsx(re,{path:"/settings",element:w.jsx(N3,{})}),w.jsx(re,{path:"/privacy",element:w.jsx($3,{})}),w.jsx(re,{path:"/docs/api",element:w.jsx(F3,{})}),w.jsx(re,{path:"/mcp",element:w.jsx(L3,{})}),w.jsx(re,{path:"/admin-dashboard",element:w.jsx(X3,{})}),w.jsx(re,{path:"/autonomous-operations",element:w.jsx(pv,{element:w.jsx(z3,{})})}),w.jsx(re,{path:"/cron-dashboard",element:w.jsx(Ki,{to:"/admin-dashboard",replace:!0})}),w.jsx(re,{path:"/submissions",element:w.jsx(pv,{element:w.jsx(U3,{})})}),w.jsx(re,{path:"/rate-limits",element:w.jsx(B3,{})}),w.jsx(re,{path:"/astra-for-robotics",element:w.jsx(q3,{})}),w.jsx(re,{path:"/:username",element:w.jsx(V3,{})}),w.jsx(re,{path:"*",element:w.jsx(sh,{})})]})]})),Z3=()=>w.jsx(XA,{client:G3,children:w.jsxs(S2,{children:[w.jsx(l3,{children:w.jsx(J3,{})}),w.jsx(o3,{}),!1]})});mM();const ez=w.jsx(mT,{attribute:"class",defaultTheme:"system",enableSystem:!0,disableTransitionOnChange:!0,storageKey:"pwc-theme",children:w.jsx(dS,{children:w.jsx(Z3,{})})}),tz=_b(document.getElementById("root"));tz.render(w.jsx(q.StrictMode,{children:ez}));export{f2 as $,Od as A,yd as B,a2 as C,et as D,ee as E,wj as F,os as G,m1 as H,ct as I,Rz as J,fz as K,bn as L,yz as M,U1 as N,Vj as O,br as P,dC as Q,Uj as R,u2 as S,Ez as T,s3 as U,q as V,Sz as W,c2 as X,nF as Y,dz as Z,d2 as _,hk as a,Pz as a$,ck as a0,er as a1,hz as a2,cz as a3,ow as a4,X$ as a5,l2 as a6,ae as a7,M1 as a8,xl as a9,vz as aA,El as aB,Up as aC,il as aD,GA as aE,at as aF,At as aG,IS as aH,bz as aI,e1 as aJ,Dg as aK,WS as aL,jg as aM,BA as aN,az as aO,oz as aP,lN as aQ,qg as aR,RS as aS,JA as aT,tN as aU,sN as aV,nN as aW,rN as aX,aN as aY,l0 as aZ,iN as a_,$g as aa,x2 as ab,cv as ac,_1 as ad,n3 as ae,Ys as af,q$ as ag,H$ as ah,G$ as ai,K$ as aj,vi as ak,Y$ as al,Q$ as am,uz as an,Ki as ao,Pj as ap,Rj as aq,tC as ar,wd as as,_d as at,Tj as au,Ij as av,iz as aw,rz as ax,b2 as ay,xz as az,uN as b,j1 as b0,D1 as b1,z1 as b2,z0 as b3,Id as c,Iz as d,sz as e,g as f,hn as g,J$ as h,$o as i,w as j,Mg as k,DS as l,al as m,tF as n,eF as o,E2 as p,Cz as q,Tz as r,pz as s,kz as t,wS as u,gz as v,mz as w,$2 as x,wz as y,ke as z}; diff --git a/assets/index-BPshewTi.js b/assets/index-CbsMwfXw.js similarity index 99% rename from assets/index-BPshewTi.js rename to assets/index-CbsMwfXw.js index 239ba31c0b1bc3c852d35241354e79f693f6caac..ae904ff5efe5f87435a2b70d00370ce2d42201ae 100644 --- a/assets/index-BPshewTi.js +++ b/assets/index-CbsMwfXw.js @@ -1,4 +1,4 @@ -import{ax as We,a4 as Ot,j as Ze}from"./index-D2fBL-s6.js";function hu(){}function mu(e){const n=[],t=String(e||"");let r=t.indexOf(","),i=0,l=!1;for(;!l;){r===-1&&(r=t.length,l=!0);const o=t.slice(i,r).trim();(o||!l)&&n.push(o),i=r+1,r=t.indexOf(",",i)}return n}function Ir(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const Tr=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ar=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Pr={};function Vn(e,n){return(Pr.jsx?Ar:Tr).test(e)}const zr=/[ \t\n\f\r]/g;function Lr(e){return typeof e=="object"?e.type==="text"?qn(e.value):!1:qn(e)}function qn(e){return e.replace(zr,"")===""}class Me{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}Me.prototype.normal={};Me.prototype.property={};Me.prototype.space=void 0;function _t(e,n){const t={},r={};for(const i of e)Object.assign(t,i.property),Object.assign(r,i.normal);return new Me(t,r,n)}function fn(e){return e.toLowerCase()}class J{constructor(n,t){this.attribute=t,this.property=n}}J.prototype.attribute="";J.prototype.booleanish=!1;J.prototype.boolean=!1;J.prototype.commaOrSpaceSeparated=!1;J.prototype.commaSeparated=!1;J.prototype.defined=!1;J.prototype.mustUseProperty=!1;J.prototype.number=!1;J.prototype.overloadedBoolean=!1;J.prototype.property="";J.prototype.spaceSeparated=!1;J.prototype.space=void 0;let vr=0;const z=be(),$=be(),hn=be(),k=be(),R=be(),Ie=be(),ee=be();function be(){return 2**++vr}const mn=Object.freeze(Object.defineProperty({__proto__:null,boolean:z,booleanish:$,commaOrSpaceSeparated:ee,commaSeparated:Ie,number:k,overloadedBoolean:hn,spaceSeparated:R},Symbol.toStringTag,{value:"Module"})),en=Object.keys(mn);class En extends J{constructor(n,t,r,i){let l=-1;if(super(n,t),$n(this,"space",i),typeof r=="number")for(;++l4&&t.slice(0,4)==="data"&&Fr.test(n)){if(n.charAt(4)==="-"){const l=n.slice(5).replace(Wn,Br);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=n.slice(4);if(!Wn.test(l)){let o=l.replace(Nr,Mr);o.charAt(0)!=="-"&&(o="-"+o),n="data"+o}}i=En}return new i(r,n)}function Mr(e){return"-"+e.toLowerCase()}function Br(e){return e.charAt(1).toUpperCase()}const jr=_t([Nt,Dr,Mt,Bt,jt],"html"),Cn=_t([Nt,Or,Mt,Bt,jt],"svg");function du(e){const n=String(e||"").trim();return n?n.split(/[ \t\n\r\f]+/g):[]}function Hr(e){return e.join(" ").trim()}var In={},Yn=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Ur=/\n/g,Vr=/^\s*/,qr=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,$r=/^:\s*/,Wr=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Yr=/^[;\s]*/,Xr=/^\s+|\s+$/g,Qr=` +import{ax as We,a4 as Ot,j as Ze}from"./index-BeSw2DVP.js";function hu(){}function mu(e){const n=[],t=String(e||"");let r=t.indexOf(","),i=0,l=!1;for(;!l;){r===-1&&(r=t.length,l=!0);const o=t.slice(i,r).trim();(o||!l)&&n.push(o),i=r+1,r=t.indexOf(",",i)}return n}function Ir(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const Tr=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ar=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Pr={};function Vn(e,n){return(Pr.jsx?Ar:Tr).test(e)}const zr=/[ \t\n\f\r]/g;function Lr(e){return typeof e=="object"?e.type==="text"?qn(e.value):!1:qn(e)}function qn(e){return e.replace(zr,"")===""}class Me{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}Me.prototype.normal={};Me.prototype.property={};Me.prototype.space=void 0;function _t(e,n){const t={},r={};for(const i of e)Object.assign(t,i.property),Object.assign(r,i.normal);return new Me(t,r,n)}function fn(e){return e.toLowerCase()}class J{constructor(n,t){this.attribute=t,this.property=n}}J.prototype.attribute="";J.prototype.booleanish=!1;J.prototype.boolean=!1;J.prototype.commaOrSpaceSeparated=!1;J.prototype.commaSeparated=!1;J.prototype.defined=!1;J.prototype.mustUseProperty=!1;J.prototype.number=!1;J.prototype.overloadedBoolean=!1;J.prototype.property="";J.prototype.spaceSeparated=!1;J.prototype.space=void 0;let vr=0;const z=be(),$=be(),hn=be(),k=be(),R=be(),Ie=be(),ee=be();function be(){return 2**++vr}const mn=Object.freeze(Object.defineProperty({__proto__:null,boolean:z,booleanish:$,commaOrSpaceSeparated:ee,commaSeparated:Ie,number:k,overloadedBoolean:hn,spaceSeparated:R},Symbol.toStringTag,{value:"Module"})),en=Object.keys(mn);class En extends J{constructor(n,t,r,i){let l=-1;if(super(n,t),$n(this,"space",i),typeof r=="number")for(;++l4&&t.slice(0,4)==="data"&&Fr.test(n)){if(n.charAt(4)==="-"){const l=n.slice(5).replace(Wn,Br);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=n.slice(4);if(!Wn.test(l)){let o=l.replace(Nr,Mr);o.charAt(0)!=="-"&&(o="-"+o),n="data"+o}}i=En}return new i(r,n)}function Mr(e){return"-"+e.toLowerCase()}function Br(e){return e.charAt(1).toUpperCase()}const jr=_t([Nt,Dr,Mt,Bt,jt],"html"),Cn=_t([Nt,Or,Mt,Bt,jt],"svg");function du(e){const n=String(e||"").trim();return n?n.split(/[ \t\n\r\f]+/g):[]}function Hr(e){return e.join(" ").trim()}var In={},Yn=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Ur=/\n/g,Vr=/^\s*/,qr=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,$r=/^:\s*/,Wr=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Yr=/^[;\s]*/,Xr=/^\s+|\s+$/g,Qr=` `,Xn="/",Qn="*",ke="",Gr="comment",Kr="declaration";function Jr(e,n){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];n=n||{};var t=1,r=1;function i(y){var b=y.match(Ur);b&&(t+=b.length);var T=y.lastIndexOf(Qr);r=~T?y.length-T:r+y.length}function l(){var y={line:t,column:r};return function(b){return b.position=new o(y),c(),b}}function o(y){this.start=y,this.end={line:t,column:r},this.source=n.source}o.prototype.content=e;function a(y){var b=new Error(n.source+":"+t+":"+r+": "+y);if(b.reason=y,b.filename=n.source,b.line=t,b.column=r,b.source=e,!n.silent)throw b}function u(y){var b=y.exec(e);if(b){var T=b[0];return i(T),e=e.slice(T.length),b}}function c(){u(Vr)}function s(y){var b;for(y=y||[];b=f();)b!==!1&&y.push(b);return y}function f(){var y=l();if(!(Xn!=e.charAt(0)||Qn!=e.charAt(1))){for(var b=2;ke!=e.charAt(b)&&(Qn!=e.charAt(b)||Xn!=e.charAt(b+1));)++b;if(b+=2,ke===e.charAt(b-1))return a("End of comment missing");var T=e.slice(2,b-2);return r+=2,i(T),e=e.slice(b),r+=2,y({type:Gr,comment:T})}}function d(){var y=l(),b=u(qr);if(b){if(f(),!u($r))return a("property missing ':'");var T=u(Wr),w=y({type:Kr,property:Gn(b[0].replace(Yn,ke)),value:T?Gn(T[0].replace(Yn,ke)):ke});return u(Yr),w}}function p(){var y=[];s(y);for(var b;b=d();)b!==!1&&(y.push(b),s(y));return y}return c(),p()}function Gn(e){return e?e.replace(Xr,ke):ke}var Zr=Jr,ei=We&&We.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(In,"__esModule",{value:!0});In.default=ti;const ni=ei(Zr);function ti(e,n){let t=null;if(!e||typeof e!="string")return t;const r=(0,ni.default)(e),i=typeof n=="function";return r.forEach(l=>{if(l.type!=="declaration")return;const{property:o,value:a}=l;i?n(o,a,l):a&&(t=t||{},t[o]=a)}),t}var Qe={};Object.defineProperty(Qe,"__esModule",{value:!0});Qe.camelCase=void 0;var ri=/^--[a-zA-Z0-9_-]+$/,ii=/-([a-z])/g,li=/^[^-]+$/,oi=/^-(webkit|moz|ms|o|khtml)-/,ai=/^-(ms)-/,ui=function(e){return!e||li.test(e)||ri.test(e)},si=function(e,n){return n.toUpperCase()},Kn=function(e,n){return"".concat(n,"-")},ci=function(e,n){return n===void 0&&(n={}),ui(e)?e:(e=e.toLowerCase(),n.reactCompat?e=e.replace(ai,Kn):e=e.replace(oi,Kn),e.replace(ii,si))};Qe.camelCase=ci;var pi=We&&We.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},fi=pi(In),hi=Qe;function dn(e,n){var t={};return!e||typeof e!="string"||(0,fi.default)(e,function(r,i){r&&i&&(t[(0,hi.camelCase)(r,n)]=i)}),t}dn.default=dn;var mi=dn;const di=Ot(mi),Ht=Ut("end"),Tn=Ut("start");function Ut(e){return n;function n(t){const r=t&&t.position&&t.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function gi(e){const n=Tn(e),t=Ht(e);if(n&&t)return{start:n,end:t}}function _e(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Jn(e.position):"start"in e||"end"in e?Jn(e):"line"in e||"column"in e?gn(e):""}function gn(e){return Zn(e&&e.line)+":"+Zn(e&&e.column)}function Jn(e){return gn(e&&e.start)+"-"+gn(e&&e.end)}function Zn(e){return e&&typeof e=="number"?e:1}class Q extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",l={},o=!1;if(t&&("line"in t&&"column"in t?l={place:t}:"start"in t&&"end"in t?l={place:t}:"type"in t?l={ancestors:[t],place:t.position}:l={...t}),typeof n=="string"?i=n:!l.cause&&n&&(o=!0,i=n.message,l.cause=n),!l.ruleId&&!l.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?l.ruleId=r:(l.source=r.slice(0,u),l.ruleId=r.slice(u+1))}if(!l.place&&l.ancestors&&l.ancestors){const u=l.ancestors[l.ancestors.length-1];u&&(l.place=u.position)}const a=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=_e(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=o&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Q.prototype.file="";Q.prototype.name="";Q.prototype.reason="";Q.prototype.message="";Q.prototype.stack="";Q.prototype.column=void 0;Q.prototype.line=void 0;Q.prototype.ancestors=void 0;Q.prototype.cause=void 0;Q.prototype.fatal=void 0;Q.prototype.place=void 0;Q.prototype.ruleId=void 0;Q.prototype.source=void 0;const An={}.hasOwnProperty,yi=new Map,xi=/[A-Z]/g,ki=new Set(["table","tbody","thead","tfoot","tr"]),bi=new Set(["td","th"]),Vt="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function wi(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let r;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=zi(t,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Pi(t,n.jsx,n.jsxs)}const i={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:r,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?Cn:jr,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},l=qt(i,e,void 0);return l&&typeof l!="string"?l:i.create(e,i.Fragment,{children:l||void 0},void 0)}function qt(e,n,t){if(n.type==="element")return Si(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return Ei(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return Ii(e,n,t);if(n.type==="mdxjsEsm")return Ci(e,n);if(n.type==="root")return Ti(e,n,t);if(n.type==="text")return Ai(e,n)}function Si(e,n,t){const r=e.schema;let i=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Cn,e.schema=i),e.ancestors.push(n);const l=Wt(e,n.tagName,!1),o=Li(e,n);let a=zn(e,n);return ki.has(n.tagName)&&(a=a.filter(function(u){return typeof u=="string"?!Lr(u):!0})),$t(e,o,l,n),Pn(o,a),e.ancestors.pop(),e.schema=r,e.create(n,l,o,t)}function Ei(e,n){if(n.data&&n.data.estree&&e.evaluater){const r=n.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Re(e,n.position)}function Ci(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);Re(e,n.position)}function Ii(e,n,t){const r=e.schema;let i=r;n.name==="svg"&&r.space==="html"&&(i=Cn,e.schema=i),e.ancestors.push(n);const l=n.name===null?e.Fragment:Wt(e,n.name,!0),o=vi(e,n),a=zn(e,n);return $t(e,o,l,n),Pn(o,a),e.ancestors.pop(),e.schema=r,e.create(n,l,o,t)}function Ti(e,n,t){const r={};return Pn(r,zn(e,n)),e.create(n,e.Fragment,r,t)}function Ai(e,n){return n.value}function $t(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function Pn(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function Pi(e,n,t){return r;function r(i,l,o,a){const c=Array.isArray(o.children)?t:n;return a?c(l,o,a):c(l,o)}}function zi(e,n){return t;function t(r,i,l,o){const a=Array.isArray(l.children),u=Tn(r);return n(i,l,o,a,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function Li(e,n){const t={};let r,i;for(i in n.properties)if(i!=="children"&&An.call(n.properties,i)){const l=Di(e,i,n.properties[i]);if(l){const[o,a]=l;e.tableCellAlignToStyle&&o==="align"&&typeof a=="string"&&bi.has(n.tagName)?r=a:t[o]=a}}if(r){const l=t.style||(t.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function vi(e,n){const t={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const l=r.data.estree.body[0];l.type;const o=l.expression;o.type;const a=o.properties[0];a.type,Object.assign(t,e.evaluater.evaluateExpression(a.argument))}else Re(e,n.position);else{const i=r.name;let l;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,l=e.evaluater.evaluateExpression(a.expression)}else Re(e,n.position);else l=r.value===null?!0:r.value;t[i]=l}return t}function zn(e,n){const t=[];let r=-1;const i=e.passKeys?new Map:yi;for(;++ri?0:i+n:n=n>i?i:n,t=t>0?t:0,r.length<1e4)o=Array.from(r),o.unshift(n,t),e.splice(...o);else for(t&&e.splice(n,t);l0?(se(e,e.length,0,n),e):n}const tt={}.hasOwnProperty;function ji(e){const n={};let t=-1;for(;++t13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function Te(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ue=ge(/[A-Za-z]/),ne=ge(/[\dA-Za-z]/),Vi=ge(/[#-'*+\--9=?A-Z^-~]/);function yn(e){return e!==null&&(e<32||e===127)}const xn=ge(/\d/),qi=ge(/[\dA-Fa-f]/),$i=ge(/[!-/:-@[-`{-~]/);function A(e){return e!==null&&e<-2}function K(e){return e!==null&&(e<0||e===32)}function O(e){return e===-2||e===-1||e===32}const Wi=ge(new RegExp("\\p{P}|\\p{S}","u")),Yi=ge(/\s/);function ge(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Pe(e){const n=[];let t=-1,r=0,i=0;for(;++t55295&&l<57344){const a=e.charCodeAt(t+1);l<56320&&a>56319&&a<57344?(o=String.fromCharCode(l,a),i=1):o="�"}else o=String.fromCharCode(l);o&&(n.push(e.slice(r,t),encodeURIComponent(o)),r=t+i+1,o=""),i&&(t+=i,i=0)}return n.join("")+e.slice(r)}function M(e,n,t,r){const i=r?r-1:Number.POSITIVE_INFINITY;let l=0;return o;function o(u){return O(u)?(e.enter(t),a(u)):n(u)}function a(u){return O(u)&&l++o))return;const _=n.events.length;let V=_,N,B;for(;V--;)if(n.events[V][0]==="exit"&&n.events[V][1].type==="chunkFlow"){if(N){B=n.events[V][1].end;break}N=!0}for(w(r),x=_;xE;){const U=t[j];n.containerState=U[1],U[0].exit.call(n,e)}t.length=E}function L(){i.write([null]),l=void 0,i=void 0,n.containerState._closeFlow=void 0}}function Ji(e,n,t){return M(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function it(e){if(e===null||K(e)||Yi(e))return 1;if(Wi(e))return 2}function vn(e,n,t){const r=[];let i=-1;for(;++i1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const f={...e[r][1].end},d={...e[t][1].start};lt(f,-u),lt(d,u),o={type:u>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},a={type:u>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:d},l={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},i={type:u>1?"strong":"emphasis",start:{...o.start},end:{...a.end}},e[r][1].end={...o.start},e[t][1].start={...a.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=te(c,[["enter",e[r][1],n],["exit",e[r][1],n]])),c=te(c,[["enter",i,n],["enter",o,n],["exit",o,n],["enter",l,n]]),c=te(c,vn(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),c=te(c,[["exit",l,n],["enter",a,n],["exit",a,n],["exit",i,n]]),e[t][1].end.offset-e[t][1].start.offset?(s=2,c=te(c,[["enter",e[t][1],n],["exit",e[t][1],n]])):s=0,se(e,r-1,t-r+3,c),t=r+c.length-s-2;break}}for(t=-1;++t0&&O(x)?M(e,L,"linePrefix",l+1)(x):L(x)}function L(x){return x===null||A(x)?e.check(ot,b,j)(x):(e.enter("codeFlowValue"),E(x))}function E(x){return x===null||A(x)?(e.exit("codeFlowValue"),L(x)):(e.consume(x),E)}function j(x){return e.exit("codeFenced"),n(x)}function U(x,_,V){let N=0;return B;function B(D){return x.enter("lineEnding"),x.consume(D),x.exit("lineEnding"),I}function I(D){return x.enter("codeFencedFence"),O(D)?M(x,C,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):C(D)}function C(D){return D===a?(x.enter("codeFencedFenceSequence"),H(D)):V(D)}function H(D){return D===a?(N++,x.consume(D),H):N>=o?(x.exit("codeFencedFenceSequence"),O(D)?M(x,q,"whitespace")(D):q(D)):V(D)}function q(D){return D===null||A(D)?(x.exit("codeFencedFence"),_(D)):V(D)}}}function cl(e,n,t){const r=this;return i;function i(o){return o===null?t(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l)}function l(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}const tn={name:"codeIndented",tokenize:fl},pl={partial:!0,tokenize:hl};function fl(e,n,t){const r=this;return i;function i(c){return e.enter("codeIndented"),M(e,l,"linePrefix",5)(c)}function l(c){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?o(c):t(c)}function o(c){return c===null?u(c):A(c)?e.attempt(pl,o,u)(c):(e.enter("codeFlowValue"),a(c))}function a(c){return c===null||A(c)?(e.exit("codeFlowValue"),o(c)):(e.consume(c),a)}function u(c){return e.exit("codeIndented"),n(c)}}function hl(e,n,t){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?t(o):A(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):M(e,l,"linePrefix",5)(o)}function l(o){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?n(o):A(o)?i(o):t(o)}}const ml={name:"codeText",previous:gl,resolve:dl,tokenize:yl};function dl(e){let n=e.length-4,t=3,r,i;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return nthis.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){const i=t||0;this.setCursor(Math.trunc(n));const l=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&De(this.left,r),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),De(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),De(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n=4?n(o):e.interrupt(r.parser.constructs.flow,t,n)(o)}}function Zt(e,n,t,r,i,l,o,a,u){const c=u||Number.POSITIVE_INFINITY;let s=0;return f;function f(w){return w===60?(e.enter(r),e.enter(i),e.enter(l),e.consume(w),e.exit(l),d):w===null||w===32||w===41||yn(w)?t(w):(e.enter(r),e.enter(o),e.enter(a),e.enter("chunkString",{contentType:"string"}),b(w))}function d(w){return w===62?(e.enter(l),e.consume(w),e.exit(l),e.exit(i),e.exit(r),n):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(w))}function p(w){return w===62?(e.exit("chunkString"),e.exit(a),d(w)):w===null||w===60||A(w)?t(w):(e.consume(w),w===92?y:p)}function y(w){return w===60||w===62||w===92?(e.consume(w),p):p(w)}function b(w){return!s&&(w===null||w===41||K(w))?(e.exit("chunkString"),e.exit(a),e.exit(o),e.exit(r),n(w)):s999||p===null||p===91||p===93&&!u||p===94&&!a&&"_hiddenFootnoteSupport"in o.parser.constructs?t(p):p===93?(e.exit(l),e.enter(i),e.consume(p),e.exit(i),e.exit(r),n):A(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),s):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||A(p)||a++>999?(e.exit("chunkString"),s(p)):(e.consume(p),u||(u=!O(p)),p===92?d:f)}function d(p){return p===91||p===92||p===93?(e.consume(p),a++,f):f(p)}}function nr(e,n,t,r,i,l){let o;return a;function a(d){return d===34||d===39||d===40?(e.enter(r),e.enter(i),e.consume(d),e.exit(i),o=d===40?41:d,u):t(d)}function u(d){return d===o?(e.enter(i),e.consume(d),e.exit(i),e.exit(r),n):(e.enter(l),c(d))}function c(d){return d===o?(e.exit(l),u(o)):d===null?t(d):A(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),M(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),s(d))}function s(d){return d===o||d===null||A(d)?(e.exit("chunkString"),c(d)):(e.consume(d),d===92?f:s)}function f(d){return d===o||d===92?(e.consume(d),s):s(d)}}function Ne(e,n){let t;return r;function r(i){return A(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r):O(i)?M(e,r,t?"linePrefix":"lineSuffix")(i):n(i)}}const Il={name:"definition",tokenize:Al},Tl={partial:!0,tokenize:Pl};function Al(e,n,t){const r=this;let i;return l;function l(p){return e.enter("definition"),o(p)}function o(p){return er.call(r,e,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return i=Te(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),u):t(p)}function u(p){return K(p)?Ne(e,c)(p):c(p)}function c(p){return Zt(e,s,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function s(p){return e.attempt(Tl,f,f)(p)}function f(p){return O(p)?M(e,d,"whitespace")(p):d(p)}function d(p){return p===null||A(p)?(e.exit("definition"),r.parser.defined.push(i),n(p)):t(p)}}function Pl(e,n,t){return r;function r(a){return K(a)?Ne(e,i)(a):t(a)}function i(a){return nr(e,l,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function l(a){return O(a)?M(e,o,"whitespace")(a):o(a)}function o(a){return a===null||A(a)?n(a):t(a)}}const zl={name:"hardBreakEscape",tokenize:Ll};function Ll(e,n,t){return r;function r(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return A(l)?(e.exit("hardBreakEscape"),n(l)):t(l)}}const vl={name:"headingAtx",resolve:Dl,tokenize:Ol};function Dl(e,n){let t=e.length-2,r=3,i,l;return e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},l={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},se(e,r,t-r+1,[["enter",i,n],["enter",l,n],["exit",l,n],["exit",i,n]])),e}function Ol(e,n,t){let r=0;return i;function i(s){return e.enter("atxHeading"),l(s)}function l(s){return e.enter("atxHeadingSequence"),o(s)}function o(s){return s===35&&r++<6?(e.consume(s),o):s===null||K(s)?(e.exit("atxHeadingSequence"),a(s)):t(s)}function a(s){return s===35?(e.enter("atxHeadingSequence"),u(s)):s===null||A(s)?(e.exit("atxHeading"),n(s)):O(s)?M(e,a,"whitespace")(s):(e.enter("atxHeadingText"),c(s))}function u(s){return s===35?(e.consume(s),u):(e.exit("atxHeadingSequence"),a(s))}function c(s){return s===null||s===35||K(s)?(e.exit("atxHeadingText"),a(s)):(e.consume(s),c)}}const _l=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],ut=["pre","script","style","textarea"],Nl={concrete:!0,name:"htmlFlow",resolveTo:Ml,tokenize:Bl},Fl={partial:!0,tokenize:Hl},Rl={partial:!0,tokenize:jl};function Ml(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function Bl(e,n,t){const r=this;let i,l,o,a,u;return c;function c(m){return s(m)}function s(m){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(m),f}function f(m){return m===33?(e.consume(m),d):m===47?(e.consume(m),l=!0,b):m===63?(e.consume(m),i=3,r.interrupt?n:h):ue(m)?(e.consume(m),o=String.fromCharCode(m),T):t(m)}function d(m){return m===45?(e.consume(m),i=2,p):m===91?(e.consume(m),i=5,a=0,y):ue(m)?(e.consume(m),i=4,r.interrupt?n:h):t(m)}function p(m){return m===45?(e.consume(m),r.interrupt?n:h):t(m)}function y(m){const le="CDATA[";return m===le.charCodeAt(a++)?(e.consume(m),a===le.length?r.interrupt?n:C:y):t(m)}function b(m){return ue(m)?(e.consume(m),o=String.fromCharCode(m),T):t(m)}function T(m){if(m===null||m===47||m===62||K(m)){const le=m===47,ye=o.toLowerCase();return!le&&!l&&ut.includes(ye)?(i=1,r.interrupt?n(m):C(m)):_l.includes(o.toLowerCase())?(i=6,le?(e.consume(m),w):r.interrupt?n(m):C(m)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(m):l?L(m):E(m))}return m===45||ne(m)?(e.consume(m),o+=String.fromCharCode(m),T):t(m)}function w(m){return m===62?(e.consume(m),r.interrupt?n:C):t(m)}function L(m){return O(m)?(e.consume(m),L):B(m)}function E(m){return m===47?(e.consume(m),B):m===58||m===95||ue(m)?(e.consume(m),j):O(m)?(e.consume(m),E):B(m)}function j(m){return m===45||m===46||m===58||m===95||ne(m)?(e.consume(m),j):U(m)}function U(m){return m===61?(e.consume(m),x):O(m)?(e.consume(m),U):E(m)}function x(m){return m===null||m===60||m===61||m===62||m===96?t(m):m===34||m===39?(e.consume(m),u=m,_):O(m)?(e.consume(m),x):V(m)}function _(m){return m===u?(e.consume(m),u=null,N):m===null||A(m)?t(m):(e.consume(m),_)}function V(m){return m===null||m===34||m===39||m===47||m===60||m===61||m===62||m===96||K(m)?U(m):(e.consume(m),V)}function N(m){return m===47||m===62||O(m)?E(m):t(m)}function B(m){return m===62?(e.consume(m),I):t(m)}function I(m){return m===null||A(m)?C(m):O(m)?(e.consume(m),I):t(m)}function C(m){return m===45&&i===2?(e.consume(m),X):m===60&&i===1?(e.consume(m),W):m===62&&i===4?(e.consume(m),ie):m===63&&i===3?(e.consume(m),h):m===93&&i===5?(e.consume(m),ce):A(m)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Fl,pe,H)(m)):m===null||A(m)?(e.exit("htmlFlowData"),H(m)):(e.consume(m),C)}function H(m){return e.check(Rl,q,pe)(m)}function q(m){return e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),D}function D(m){return m===null||A(m)?H(m):(e.enter("htmlFlowData"),C(m))}function X(m){return m===45?(e.consume(m),h):C(m)}function W(m){return m===47?(e.consume(m),o="",re):C(m)}function re(m){if(m===62){const le=o.toLowerCase();return ut.includes(le)?(e.consume(m),ie):C(m)}return ue(m)&&o.length<8?(e.consume(m),o+=String.fromCharCode(m),re):C(m)}function ce(m){return m===93?(e.consume(m),h):C(m)}function h(m){return m===62?(e.consume(m),ie):m===45&&i===2?(e.consume(m),h):C(m)}function ie(m){return m===null||A(m)?(e.exit("htmlFlowData"),pe(m)):(e.consume(m),ie)}function pe(m){return e.exit("htmlFlow"),n(m)}}function jl(e,n,t){const r=this;return i;function i(o){return A(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l):t(o)}function l(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}function Hl(e,n,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Ge,n,t)}}const Ul={name:"htmlText",tokenize:Vl};function Vl(e,n,t){const r=this;let i,l,o;return a;function a(h){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(h),u}function u(h){return h===33?(e.consume(h),c):h===47?(e.consume(h),U):h===63?(e.consume(h),E):ue(h)?(e.consume(h),V):t(h)}function c(h){return h===45?(e.consume(h),s):h===91?(e.consume(h),l=0,y):ue(h)?(e.consume(h),L):t(h)}function s(h){return h===45?(e.consume(h),p):t(h)}function f(h){return h===null?t(h):h===45?(e.consume(h),d):A(h)?(o=f,W(h)):(e.consume(h),f)}function d(h){return h===45?(e.consume(h),p):f(h)}function p(h){return h===62?X(h):h===45?d(h):f(h)}function y(h){const ie="CDATA[";return h===ie.charCodeAt(l++)?(e.consume(h),l===ie.length?b:y):t(h)}function b(h){return h===null?t(h):h===93?(e.consume(h),T):A(h)?(o=b,W(h)):(e.consume(h),b)}function T(h){return h===93?(e.consume(h),w):b(h)}function w(h){return h===62?X(h):h===93?(e.consume(h),w):b(h)}function L(h){return h===null||h===62?X(h):A(h)?(o=L,W(h)):(e.consume(h),L)}function E(h){return h===null?t(h):h===63?(e.consume(h),j):A(h)?(o=E,W(h)):(e.consume(h),E)}function j(h){return h===62?X(h):E(h)}function U(h){return ue(h)?(e.consume(h),x):t(h)}function x(h){return h===45||ne(h)?(e.consume(h),x):_(h)}function _(h){return A(h)?(o=_,W(h)):O(h)?(e.consume(h),_):X(h)}function V(h){return h===45||ne(h)?(e.consume(h),V):h===47||h===62||K(h)?N(h):t(h)}function N(h){return h===47?(e.consume(h),X):h===58||h===95||ue(h)?(e.consume(h),B):A(h)?(o=N,W(h)):O(h)?(e.consume(h),N):X(h)}function B(h){return h===45||h===46||h===58||h===95||ne(h)?(e.consume(h),B):I(h)}function I(h){return h===61?(e.consume(h),C):A(h)?(o=I,W(h)):O(h)?(e.consume(h),I):N(h)}function C(h){return h===null||h===60||h===61||h===62||h===96?t(h):h===34||h===39?(e.consume(h),i=h,H):A(h)?(o=C,W(h)):O(h)?(e.consume(h),C):(e.consume(h),q)}function H(h){return h===i?(e.consume(h),i=void 0,D):h===null?t(h):A(h)?(o=H,W(h)):(e.consume(h),H)}function q(h){return h===null||h===34||h===39||h===60||h===61||h===96?t(h):h===47||h===62||K(h)?N(h):(e.consume(h),q)}function D(h){return h===47||h===62||K(h)?N(h):t(h)}function X(h){return h===62?(e.consume(h),e.exit("htmlTextData"),e.exit("htmlText"),n):t(h)}function W(h){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),re}function re(h){return O(h)?M(e,ce,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(h):ce(h)}function ce(h){return e.enter("htmlTextData"),o(h)}}const Dn={name:"labelEnd",resolveAll:Yl,resolveTo:Xl,tokenize:Ql},ql={tokenize:Gl},$l={tokenize:Kl},Wl={tokenize:Jl};function Yl(e){let n=-1;const t=[];for(;++n=3&&(c===null||A(c))?(e.exit("thematicBreak"),n(c)):t(c)}function u(c){return c===i?(e.consume(c),r++,u):(e.exit("thematicBreakSequence"),O(c)?M(e,a,"whitespace")(c):a(c))}}const G={continuation:{tokenize:uo},exit:co,name:"list",tokenize:ao},lo={partial:!0,tokenize:po},oo={partial:!0,tokenize:so};function ao(e,n,t){const r=this,i=r.events[r.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return a;function a(p){const y=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(y==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:xn(p)){if(r.containerState.type||(r.containerState.type=y,e.enter(y,{_container:!0})),y==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(qe,t,c)(p):c(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(p)}return t(p)}function u(p){return xn(p)&&++o<10?(e.consume(p),u):(!r.interrupt||o<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),c(p)):t(p)}function c(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Ge,r.interrupt?t:s,e.attempt(lo,d,f))}function s(p){return r.containerState.initialBlankLine=!0,l++,d(p)}function f(p){return O(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),d):t(p)}function d(p){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(p)}}function uo(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(Ge,i,l);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,M(e,n,"listItemIndent",r.containerState.size+1)(a)}function l(a){return r.containerState.furtherBlankLines||!O(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(oo,n,o)(a))}function o(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,M(e,e.attempt(G,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function so(e,n,t){const r=this;return M(e,i,"listItemIndent",r.containerState.size+1);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?n(l):t(l)}}function co(e){e.exit(this.containerState.type)}function po(e,n,t){const r=this;return M(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(l){const o=r.events[r.events.length-1];return!O(l)&&o&&o[1].type==="listItemPrefixWhitespace"?n(l):t(l)}}const st={name:"setextUnderline",resolveTo:fo,tokenize:ho};function fo(e,n){let t=e.length,r,i,l;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(i=t)}else e[t][1].type==="content"&&e.splice(t,1),!l&&e[t][1].type==="definition"&&(l=t);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",l?(e.splice(i,0,["enter",o,n]),e.splice(l+1,0,["exit",e[r][1],n]),e[r][1].end={...e[l][1].end}):e[r][1]=o,e.push(["exit",o,n]),e}function ho(e,n,t){const r=this;let i;return l;function l(c){let s=r.events.length,f;for(;s--;)if(r.events[s][1].type!=="lineEnding"&&r.events[s][1].type!=="linePrefix"&&r.events[s][1].type!=="content"){f=r.events[s][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=c,o(c)):t(c)}function o(c){return e.enter("setextHeadingLineSequence"),a(c)}function a(c){return c===i?(e.consume(c),a):(e.exit("setextHeadingLineSequence"),O(c)?M(e,u,"lineSuffix")(c):u(c))}function u(c){return c===null||A(c)?(e.exit("setextHeadingLine"),n(c)):t(c)}}const mo={tokenize:go};function go(e){const n=this,t=e.attempt(Ge,r,e.attempt(this.parser.constructs.flowInitial,i,M(e,e.attempt(this.parser.constructs.flow,i,e.attempt(bl,i)),"linePrefix")));return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function i(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const yo={resolveAll:rr()},xo=tr("string"),ko=tr("text");function tr(e){return{resolveAll:rr(e==="text"?bo:void 0),tokenize:n};function n(t){const r=this,i=this.parser.constructs[e],l=t.attempt(i,o,a);return o;function o(s){return c(s)?l(s):a(s)}function a(s){if(s===null){t.consume(s);return}return t.enter("data"),t.consume(s),u}function u(s){return c(s)?(t.exit("data"),l(s)):(t.consume(s),u)}function c(s){if(s===null)return!0;const f=i[s];let d=-1;if(f)for(;++d-1){const a=o[0];typeof a=="string"?o[0]=a.slice(r):o.shift()}l>0&&o.push(e[i].slice(0,l))}return o}function Oo(e,n){let t=-1;const r=[];let i;for(;++t0){const oe=P.tokenStack[P.tokenStack.length-1];(oe[1]||pt).call(P,void 0,oe[0])}for(S.position={start:de(g.length>0?g[0][1].start:{line:1,column:1,offset:0}),end:de(g.length>0?g[g.length-2][1].end:{line:1,column:1,offset:0})},F=-1;++F0?{type:"text",value:y}:void 0),y===!1?p.lastIndex=v+1:(m!==v&&w.push({type:"text",value:s.value.slice(m,v)}),Array.isArray(y)?w.push(...y):y&&w.push(y),m=v+d[0].length,k=!0),!p.global)break;d=p.exec(s.value)}return k?(m?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],i=t.indexOf(")");const o=re(e,"(");let a=re(e,")");for(;i!==-1&&o>a;)e+=t.slice(0,i+1),t=t.slice(i+1),i=t.indexOf(")"),a++;return[e,t]}function he(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||I(t)||Z(t))&&(!n||t!==47)}me.peek=pt;function ot(){this.buffer()}function at(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function ut(){this.buffer()}function st(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function ct(e){const n=this.resume(),t=this.stack[this.stack.length-1];E(t.type==="footnoteReference"),t.identifier=O(this.sliceSerialize(e)).toLowerCase(),t.label=n}function ft(e){this.exit(e)}function ht(e){const n=this.resume(),t=this.stack[this.stack.length-1];E(t.type==="footnoteDefinition"),t.identifier=O(this.sliceSerialize(e)).toLowerCase(),t.label=n}function mt(e){this.exit(e)}function pt(){return"["}function me(e,n,t,i){const o=t.createTracker(i);let a=o.move("[^");const r=t.enter("footnoteReference"),u=t.enter("reference");return a+=o.move(t.safe(t.associationId(e),{after:"]",before:a})),u(),r(),a+=o.move("]"),a}function gt(){return{enter:{gfmFootnoteCallString:ot,gfmFootnoteCall:at,gfmFootnoteDefinitionLabelString:ut,gfmFootnoteDefinition:st},exit:{gfmFootnoteCallString:ct,gfmFootnoteCall:ft,gfmFootnoteDefinitionLabelString:ht,gfmFootnoteDefinition:mt}}}function kt(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:me},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(i,o,a,r){const u=a.createTracker(r);let l=u.move("[^");const s=a.enter("footnoteDefinition"),h=a.enter("label");return l+=u.move(a.safe(a.associationId(i),{before:l,after:"]"})),h(),l+=u.move("]:"),i.children&&i.children.length>0&&(u.shift(4),l+=u.move((n?` +import{c as ce,v as _e,o as E,u as I,e as Z,g as O,i as W,j as Oe,t as fe,E as je,k as J,l as M,q as A,r as Be,w as qe,f as S,x as H,y as We,m as P,z as T,A as $e}from"./index-CbsMwfXw.js";function re(e,n){const t=String(e);if(typeof n!="string")throw new TypeError("Expected character");let i=0,o=t.indexOf(n);for(;o!==-1;)i++,o=t.indexOf(n,o+n.length);return i}function He(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Ue(e,n,t){const o=ce((t||{}).ignore||[]),a=Ve(n);let r=-1;for(;++r0?{type:"text",value:y}:void 0),y===!1?p.lastIndex=v+1:(m!==v&&w.push({type:"text",value:s.value.slice(m,v)}),Array.isArray(y)?w.push(...y):y&&w.push(y),m=v+d[0].length,k=!0),!p.global)break;d=p.exec(s.value)}return k?(m?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],i=t.indexOf(")");const o=re(e,"(");let a=re(e,")");for(;i!==-1&&o>a;)e+=t.slice(0,i+1),t=t.slice(i+1),i=t.indexOf(")"),a++;return[e,t]}function he(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||I(t)||Z(t))&&(!n||t!==47)}me.peek=pt;function ot(){this.buffer()}function at(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function ut(){this.buffer()}function st(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function ct(e){const n=this.resume(),t=this.stack[this.stack.length-1];E(t.type==="footnoteReference"),t.identifier=O(this.sliceSerialize(e)).toLowerCase(),t.label=n}function ft(e){this.exit(e)}function ht(e){const n=this.resume(),t=this.stack[this.stack.length-1];E(t.type==="footnoteDefinition"),t.identifier=O(this.sliceSerialize(e)).toLowerCase(),t.label=n}function mt(e){this.exit(e)}function pt(){return"["}function me(e,n,t,i){const o=t.createTracker(i);let a=o.move("[^");const r=t.enter("footnoteReference"),u=t.enter("reference");return a+=o.move(t.safe(t.associationId(e),{after:"]",before:a})),u(),r(),a+=o.move("]"),a}function gt(){return{enter:{gfmFootnoteCallString:ot,gfmFootnoteCall:at,gfmFootnoteDefinitionLabelString:ut,gfmFootnoteDefinition:st},exit:{gfmFootnoteCallString:ct,gfmFootnoteCall:ft,gfmFootnoteDefinitionLabelString:ht,gfmFootnoteDefinition:mt}}}function kt(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:me},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(i,o,a,r){const u=a.createTracker(r);let l=u.move("[^");const s=a.enter("footnoteDefinition"),h=a.enter("label");return l+=u.move(a.safe(a.associationId(i),{before:l,after:"]"})),h(),l+=u.move("]:"),i.children&&i.children.length>0&&(u.shift(4),l+=u.move((n?` `:" ")+a.indentLines(a.containerFlow(i,u.current()),n?pe:bt))),s(),l}}function bt(e,n,t){return n===0?e:pe(e,n,t)}function pe(e,n,t){return(t?"":" ")+e}const xt=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];ge.peek=vt;function wt(){return{canContainEols:["delete"],enter:{strikethrough:yt},exit:{strikethrough:Ct}}}function dt(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:xt}],handlers:{delete:ge}}}function yt(e){this.enter({type:"delete",children:[]},e)}function Ct(e){this.exit(e)}function ge(e,n,t,i){const o=t.createTracker(i),a=t.enter("strikethrough");let r=o.move("~~");return r+=t.containerPhrasing(e,{...o.current(),before:r,after:"~"}),r+=o.move("~~"),a(),r}function vt(){return"~"}function At(e){return e.length}function Dt(e,n){const t=n||{},i=(t.align||[]).concat(),o=t.stringLength||At,a=[],r=[],u=[],l=[];let s=0,h=-1;for(;++hs&&(s=e[h].length);++kl[k])&&(l[k]=d)}b.push(w)}r[h]=b,u[h]=x}let c=-1;if(typeof i=="object"&&"length"in i)for(;++cl[c]&&(l[c]=w),g[c]=w),p[c]=d}r.splice(1,0,p),u.splice(1,0,g),h=-1;const m=[];for(;++h "),a.shift(2);const r=t.indentLines(t.containerFlow(e,a.current()),Lt);return o(),r}function Lt(e,n,t){return">"+(t?"":" ")+e}function Tt(e,n){return le(e,n.inConstruct,!0)&&!le(e,n.notInConstruct,!1)}function le(e,n,t){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return t;let i=-1;for(;++i(e.current.value!==r&&(e.current.previous=e.current.value,e.current.value=r),e.current.previous),[r])}export{o as u}; +import{f as u}from"./index-BeSw2DVP.js";function o(r){const e=u.useRef({value:r,previous:r});return u.useMemo(()=>(e.current.value!==r&&(e.current.previous=e.current.value,e.current.value=r),e.current.previous),[r])}export{o as u}; diff --git a/assets/input-DdobyT4w.js b/assets/input-B5SDgz8U.js similarity index 88% rename from assets/input-DdobyT4w.js rename to assets/input-B5SDgz8U.js index 2bb25646413aab6d2283e8d03bc66c79dac3d883..d7241408240f1b35226e78cadd2767cc9affe613 100644 --- a/assets/input-DdobyT4w.js +++ b/assets/input-B5SDgz8U.js @@ -1 +1 @@ -import{f as s,j as i,I as n}from"./index-D2fBL-s6.js";const f=s.forwardRef(({className:e,type:r,...o},t)=>i.jsx("input",{type:r,className:n("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:t,...o}));f.displayName="Input";export{f as I}; +import{f as s,j as i,I as n}from"./index-BeSw2DVP.js";const f=s.forwardRef(({className:e,type:r,...o},t)=>i.jsx("input",{type:r,className:n("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:t,...o}));f.displayName="Input";export{f as I}; diff --git a/assets/link-2-DK2lGD4M.js b/assets/link-2-CGWO-evG.js similarity index 89% rename from assets/link-2-DK2lGD4M.js rename to assets/link-2-CGWO-evG.js index 1c23e3032ef6d066997718b5c8cb8b07ac99b5c6..27efce579c59adae36764d61a819227977ffd854 100644 --- a/assets/link-2-DK2lGD4M.js +++ b/assets/link-2-CGWO-evG.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-D2fBL-s6.js";/** +import{c as e}from"./index-BeSw2DVP.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/loader-circle-CoLo2trx.js b/assets/loader-circle-C4luyo5I.js similarity index 85% rename from assets/loader-circle-CoLo2trx.js rename to assets/loader-circle-C4luyo5I.js index 493b21bf9d095a8c3349112b67a30c81b09b5187..b72e728b642257df23cc38e3c51c1b013fc0ea04 100644 --- a/assets/loader-circle-CoLo2trx.js +++ b/assets/loader-circle-C4luyo5I.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-D2fBL-s6.js";/** +import{c as e}from"./index-BeSw2DVP.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/mlIntern-KBHZ6tOl.js b/assets/mlIntern-C-RSIXvd.js similarity index 90% rename from assets/mlIntern-KBHZ6tOl.js rename to assets/mlIntern-C-RSIXvd.js index 49801586a9664ba6901b1bfce43586b857d61148..f6cd7a4a2ef793928efab9d431359f2442c9722c 100644 --- a/assets/mlIntern-KBHZ6tOl.js +++ b/assets/mlIntern-C-RSIXvd.js @@ -1 +1 @@ -import{v as a}from"./index-D2fBL-s6.js";function n(t,e){const r=e?` (arXiv:${a(e)})`:"";return[`Reproduce the central claims of the research paper "${t}"${r}.`,"If it is not feasible to fully reproduce the experiments from the paper, then run smaller-scale experiments that can still validate or falsify the claims.","Publish any trained models, processed datasets, and demos as Hub repos, and upload everything else to a Hugging Face Bucket, with the final report as README.md at the bucket's root linking to them."].join(" ")}function s(t,e){return`https://huggingface.co/chat/?${new URLSearchParams({mode:"ml-intern",prompt:n(t,e)}).toString()}`}export{s as m}; +import{v as a}from"./index-BeSw2DVP.js";function n(t,e){const r=e?` (arXiv:${a(e)})`:"";return[`Reproduce the central claims of the research paper "${t}"${r}.`,"If it is not feasible to fully reproduce the experiments from the paper, then run smaller-scale experiments that can still validate or falsify the claims.","Publish any trained models, processed datasets, and demos as Hub repos, and upload everything else to a Hugging Face Bucket, with the final report as README.md at the bucket's root linking to them."].join(" ")}function s(t,e){return`https://huggingface.co/chat/?${new URLSearchParams({mode:"ml-intern",prompt:n(t,e)}).toString()}`}export{s as m}; diff --git a/assets/moon-vNTgqlOp.js b/assets/moon-DNdxOMOb.js similarity index 85% rename from assets/moon-vNTgqlOp.js rename to assets/moon-DNdxOMOb.js index 0920028296de52861706c507e1c9057efe0fbc15..d1ab4c9219afcb77eb48353ac95922c0c07f8609 100644 --- a/assets/moon-vNTgqlOp.js +++ b/assets/moon-DNdxOMOb.js @@ -1,4 +1,4 @@ -import{c as o}from"./index-D2fBL-s6.js";/** +import{c as o}from"./index-BeSw2DVP.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/openrouter-BRMbmxz_.js b/assets/openrouter-C8otLyGB.js similarity index 82% rename from assets/openrouter-BRMbmxz_.js rename to assets/openrouter-C8otLyGB.js index c3ca66c6af6da2d21d7a7f6ca9463e2c27466d72..81f9cdf3b13a9499c6afd126229df625a983cded 100644 --- a/assets/openrouter-BRMbmxz_.js +++ b/assets/openrouter-C8otLyGB.js @@ -1 +1 @@ -import{b as r}from"./index-D2fBL-s6.js";import{c as n}from"./chat-BOZIonsX.js";const o=["chat","openrouter","usage"],u=["chat","openrouter","credential"];function s(e=!0){return r({queryKey:o,queryFn:()=>n.getUsage(),enabled:e,staleTime:3e4,refetchOnWindowFocus:!0})}function c(e=!0){return r({queryKey:u,queryFn:()=>n.getOpenRouterCredential(),enabled:e,refetchOnWindowFocus:!0})}function m(e){const t=new Date(e);return{local:new Intl.DateTimeFormat(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"}).format(t),utc:`${t.toLocaleString("en-GB",{timeZone:"UTC",year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})} UTC`}}export{u as O,s as a,m as r,c as u}; +import{b as r}from"./index-BeSw2DVP.js";import{c as n}from"./chat-Bvpu56kX.js";const o=["chat","openrouter","usage"],u=["chat","openrouter","credential"];function s(e=!0){return r({queryKey:o,queryFn:()=>n.getUsage(),enabled:e,staleTime:3e4,refetchOnWindowFocus:!0})}function c(e=!0){return r({queryKey:u,queryFn:()=>n.getOpenRouterCredential(),enabled:e,refetchOnWindowFocus:!0})}function m(e){const t=new Date(e);return{local:new Intl.DateTimeFormat(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"}).format(t),utc:`${t.toLocaleString("en-GB",{timeZone:"UTC",year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})} UTC`}}export{u as O,s as a,m as r,c as u}; diff --git a/assets/paperEdits-C-9tVqXs.js b/assets/paperEdits-CoVzQ5th.js similarity index 84% rename from assets/paperEdits-C-9tVqXs.js rename to assets/paperEdits-CoVzQ5th.js index 0dfbe05a42463dedc43578f1b17ac3badb977521..e2d56527917d5fcc12d24f3800e0157288afe730 100644 --- a/assets/paperEdits-C-9tVqXs.js +++ b/assets/paperEdits-CoVzQ5th.js @@ -1 +1 @@ -import{ac as p}from"./index-D2fBL-s6.js";const a={authorization:e=>p(`/paper-edit-authorizations/${encodeURIComponent(e)}`),approve:e=>p(`/paper-edit-authorizations/${encodeURIComponent(e)}/approve`,{method:"POST"}),digest:(e,t)=>p(`/admin/paper-edit-digest?day=${e}&page=${t}`),suspend:(e,t)=>p("/admin/paper-edit-suspension",{method:"POST",body:JSON.stringify({hf_subject:e,suspended:t})})};export{a as p}; +import{ac as p}from"./index-BeSw2DVP.js";const a={authorization:e=>p(`/paper-edit-authorizations/${encodeURIComponent(e)}`),approve:e=>p(`/paper-edit-authorizations/${encodeURIComponent(e)}/approve`,{method:"POST"}),digest:(e,t)=>p(`/admin/paper-edit-digest?day=${e}&page=${t}`),suspend:(e,t)=>p("/admin/paper-edit-suspension",{method:"POST",body:JSON.stringify({hf_subject:e,suspended:t})})};export{a as p}; diff --git a/assets/papers-khuZaSFb.js b/assets/papers-B58HJw9r.js similarity index 96% rename from assets/papers-khuZaSFb.js rename to assets/papers-B58HJw9r.js index 3ca670b3e47e098b1f1d858f62f4273f854dceb3..87b9da829a15445a1832eda63a7081d2d12e4c79 100644 --- a/assets/papers-khuZaSFb.js +++ b/assets/papers-B58HJw9r.js @@ -1 +1 @@ -import{p as a}from"./curation-BtfabyzA.js";import{ac as c,az as h,aI as m}from"./index-D2fBL-s6.js";function i(o){const e=new URLSearchParams;for(const[r,s]of Object.entries(o??{}))s!==void 0&&s!==""&&e.set(r,String(s));const t=e.toString();return t?`?${t}`:""}class d{constructor(e){this.request=e}list(e){const t=new URLSearchParams;for(const[s,n]of Object.entries(e??{}))n!==void 0&&n!==""&&t.set(s,String(n));const r=t.toString();return this.request(`/papers/${r?`?${r}`:""}`,{cache:"no-cache"})}search(e,t=1,r=10,s,n,u){const p=new URLSearchParams({q:e,page:t.toString(),page_size:r.toString()});return s&&p.set("mode",s),u!=null&&u.start_date&&p.set("start_date",u.start_date),u!=null&&u.end_date&&p.set("end_date",u.end_date),this.request(`/papers/search?${p.toString()}`,{signal:n})}searchFeed(e){return this.request(`/papers/search/feed${i(e)}`,{cache:"no-cache"})}get(e,t=!0){const r=t?"?include_resources=true":"";return this.request(`/papers/${e}${r}`)}getByArxivId(e,t=!0){const r=t?"?include_resources=true":"";return this.request(`/papers/arxiv/${e}${r}`)}lookup(e){return this.request("/papers/lookup",{method:"POST",body:JSON.stringify({references:e})})}related(e,t=4){return this.request(`/papers/${encodeURIComponent(e)}/related?limit=${t}`)}suggestedQuestions(e){return this.request(`/papers/${encodeURIComponent(e)}/suggested-questions`)}versions(e){return this.request(`/papers/arxiv/${e}/versions`)}indexFromArxiv(e){return this.request(`/papers/index/${e}`,{method:"POST"})}submit(e){return this.request("/papers/submit",{method:"POST",body:JSON.stringify(e)})}copyToBucket(e,t){return this.request(`/papers/${encodeURIComponent(e)}/copy-to-bucket`,{method:"POST",body:JSON.stringify(t)})}trending(e){const t=new URLSearchParams;for(const[s,n]of Object.entries(e??{}))n!==void 0&&t.set(s,String(n));const r=t.toString();return this.request(`/papers/trending${r?`?${r}`:""}`,{cache:"no-store"})}forTask(e,t){return this.request(`/tasks/${e}/papers${i(t)}`)}forMethod(e,t){return this.request(`/methods/${encodeURIComponent(e)}/papers${i(t)}`)}forConference(e,t){return this.request(`/conferences/${e}/papers${i(t)}`)}forOrganization(e,t){return this.request(`/organizations/${e}/papers${i(t)}`)}getAuthor(e){return this.request(`/authors/${e}`)}searchAuthors(e,t){return this.request(`/authors/${i({search:e,page_size:t})}`)}primeCurationState(e,t=!1){return a.primePaper(e,t)}freshAuthMutationDraft(){return a.freshAuthMutationDraft()}resumeFreshAuthMutation(){return a.resumeFreshAuthMutation()}updateTasks(e,t){const r=new URLSearchParams(t.map(s=>["task_ids",String(s)])).toString();return a.mutatePaper(e,"tasks",t,`/papers/${e}/tasks?${r}`,{method:"PUT"})}updateMethods(e,t){const r=new URLSearchParams(t.map(s=>["method_ids",String(s)])).toString();return a.mutatePaper(e,"methods",t,`/papers/${e}/methods?${r}`,{method:"PUT"})}updateOrganizations(e,t){const r=new URLSearchParams(t.map(s=>["organization_ids",String(s)])).toString();return a.mutatePaper(e,"organizations",t,`/papers/${e}/organizations?${r}`,{method:"PUT"})}updateRepositories(e,t){return a.mutatePaper(e,"repositories",t,`/papers/${e}/repositories`,{method:"PUT",body:JSON.stringify({repositories:t})})}updateProjectPages(e,t){return a.mutatePaper(e,"project_pages",t,`/papers/${e}/project-pages`,{method:"PUT",body:JSON.stringify({project_pages:t})})}updateXThreads(e,t){return a.mutatePaper(e,"x_threads",t,`/papers/${e}/x-threads`,{method:"PUT",body:JSON.stringify({x_threads:t})})}updateSourceUrl(e,t){return a.mutatePaper(e,"source_url",t,`/papers/${e}/source-url`,{method:"PUT",body:JSON.stringify({source_url:t})})}updateHfArtifacts(e,t){return a.mutatePaper(e,"hf_artifacts",t,`/papers/${e}/hf-artifacts`,{method:"PUT",body:JSON.stringify(t)})}}const g=new d(c);async function P(o){return(await h(`/papers/${encodeURIComponent(o)}/web-markdown`)).text()}function S(o){return c(`/papers/${encodeURIComponent(o)}/web-page`)}function y(o){return m(`/papers/${encodeURIComponent(o)}/layout`)}export{P as a,y as b,S as g,g as p}; +import{p as a}from"./curation-CCIsdsjV.js";import{ac as c,az as h,aI as m}from"./index-BeSw2DVP.js";function i(o){const e=new URLSearchParams;for(const[r,s]of Object.entries(o??{}))s!==void 0&&s!==""&&e.set(r,String(s));const t=e.toString();return t?`?${t}`:""}class d{constructor(e){this.request=e}list(e){const t=new URLSearchParams;for(const[s,n]of Object.entries(e??{}))n!==void 0&&n!==""&&t.set(s,String(n));const r=t.toString();return this.request(`/papers/${r?`?${r}`:""}`,{cache:"no-cache"})}search(e,t=1,r=10,s,n,u){const p=new URLSearchParams({q:e,page:t.toString(),page_size:r.toString()});return s&&p.set("mode",s),u!=null&&u.start_date&&p.set("start_date",u.start_date),u!=null&&u.end_date&&p.set("end_date",u.end_date),this.request(`/papers/search?${p.toString()}`,{signal:n})}searchFeed(e){return this.request(`/papers/search/feed${i(e)}`,{cache:"no-cache"})}get(e,t=!0){const r=t?"?include_resources=true":"";return this.request(`/papers/${e}${r}`)}getByArxivId(e,t=!0){const r=t?"?include_resources=true":"";return this.request(`/papers/arxiv/${e}${r}`)}lookup(e){return this.request("/papers/lookup",{method:"POST",body:JSON.stringify({references:e})})}related(e,t=4){return this.request(`/papers/${encodeURIComponent(e)}/related?limit=${t}`)}suggestedQuestions(e){return this.request(`/papers/${encodeURIComponent(e)}/suggested-questions`)}versions(e){return this.request(`/papers/arxiv/${e}/versions`)}indexFromArxiv(e){return this.request(`/papers/index/${e}`,{method:"POST"})}submit(e){return this.request("/papers/submit",{method:"POST",body:JSON.stringify(e)})}copyToBucket(e,t){return this.request(`/papers/${encodeURIComponent(e)}/copy-to-bucket`,{method:"POST",body:JSON.stringify(t)})}trending(e){const t=new URLSearchParams;for(const[s,n]of Object.entries(e??{}))n!==void 0&&t.set(s,String(n));const r=t.toString();return this.request(`/papers/trending${r?`?${r}`:""}`,{cache:"no-store"})}forTask(e,t){return this.request(`/tasks/${e}/papers${i(t)}`)}forMethod(e,t){return this.request(`/methods/${encodeURIComponent(e)}/papers${i(t)}`)}forConference(e,t){return this.request(`/conferences/${e}/papers${i(t)}`)}forOrganization(e,t){return this.request(`/organizations/${e}/papers${i(t)}`)}getAuthor(e){return this.request(`/authors/${e}`)}searchAuthors(e,t){return this.request(`/authors/${i({search:e,page_size:t})}`)}primeCurationState(e,t=!1){return a.primePaper(e,t)}freshAuthMutationDraft(){return a.freshAuthMutationDraft()}resumeFreshAuthMutation(){return a.resumeFreshAuthMutation()}updateTasks(e,t){const r=new URLSearchParams(t.map(s=>["task_ids",String(s)])).toString();return a.mutatePaper(e,"tasks",t,`/papers/${e}/tasks?${r}`,{method:"PUT"})}updateMethods(e,t){const r=new URLSearchParams(t.map(s=>["method_ids",String(s)])).toString();return a.mutatePaper(e,"methods",t,`/papers/${e}/methods?${r}`,{method:"PUT"})}updateOrganizations(e,t){const r=new URLSearchParams(t.map(s=>["organization_ids",String(s)])).toString();return a.mutatePaper(e,"organizations",t,`/papers/${e}/organizations?${r}`,{method:"PUT"})}updateRepositories(e,t){return a.mutatePaper(e,"repositories",t,`/papers/${e}/repositories`,{method:"PUT",body:JSON.stringify({repositories:t})})}updateProjectPages(e,t){return a.mutatePaper(e,"project_pages",t,`/papers/${e}/project-pages`,{method:"PUT",body:JSON.stringify({project_pages:t})})}updateXThreads(e,t){return a.mutatePaper(e,"x_threads",t,`/papers/${e}/x-threads`,{method:"PUT",body:JSON.stringify({x_threads:t})})}updateSourceUrl(e,t){return a.mutatePaper(e,"source_url",t,`/papers/${e}/source-url`,{method:"PUT",body:JSON.stringify({source_url:t})})}updateHfArtifacts(e,t){return a.mutatePaper(e,"hf_artifacts",t,`/papers/${e}/hf-artifacts`,{method:"PUT",body:JSON.stringify(t)})}}const g=new d(c);async function P(o){return(await h(`/papers/${encodeURIComponent(o)}/web-markdown`)).text()}function S(o){return c(`/papers/${encodeURIComponent(o)}/web-page`)}function y(o){return m(`/papers/${encodeURIComponent(o)}/layout`)}export{P as a,y as b,S as g,g as p}; diff --git a/assets/plus-BI8-JXK0.js b/assets/plus-imZJbVTM.js similarity index 86% rename from assets/plus-BI8-JXK0.js rename to assets/plus-imZJbVTM.js index 3d877fefec97596fb6284a84c64b44d45b7c1ba1..b7ca232880d790652ab4d34a97a71bdcc758e02b 100644 --- a/assets/plus-BI8-JXK0.js +++ b/assets/plus-imZJbVTM.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-D2fBL-s6.js";/** +import{c as e}from"./index-BeSw2DVP.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/popover-DS5Jzsg5.js b/assets/popover-CYoFzAud.js similarity index 98% rename from assets/popover-DS5Jzsg5.js rename to assets/popover-CYoFzAud.js index 283a772d0f499354e869270019296313c3077bf3..e2caa93f915097bba736647aecb9094c51be73c7 100644 --- a/assets/popover-DS5Jzsg5.js +++ b/assets/popover-CYoFzAud.js @@ -1 +1 @@ -import{f as s,j as l,ak as L,B as V,ap as $,af as W,D as A,z as O,E as h,aq as E,ar as y,P as _,as as H,G as z,aJ as G,aK as B,aL as K,aM as Z,at as q,au as J,av as U,I as Q}from"./index-D2fBL-s6.js";function X(e){const t=Y(e),r=s.forwardRef((n,o)=>{const{children:a,...c}=n,i=s.Children.toArray(a),p=i.find(oe);if(p){const u=p.props.children,P=i.map(f=>f===p?s.Children.count(u)>1?s.Children.only(null):s.isValidElement(u)?u.props.children:null:f);return l.jsx(t,{...c,ref:o,children:s.isValidElement(u)?s.cloneElement(u,void 0,P):null})}return l.jsx(t,{...c,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}function Y(e){const t=s.forwardRef((r,n)=>{const{children:o,...a}=r;if(s.isValidElement(o)){const c=re(o),i=te(a,o.props);return o.type!==s.Fragment&&(i.ref=n?L(n,c):c),s.cloneElement(o,i)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ee=Symbol("radix.slottable");function oe(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ee}function te(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...i)=>{const p=a(...i);return o(...i),p}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function re(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var C="Popover",[b]=z(C,[y]),m=y(),[ne,d]=b(C),j=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:c=!1}=e,i=m(t),p=s.useRef(null),[u,P]=s.useState(!1),[f,v]=V({prop:n,defaultProp:o??!1,onChange:a,caller:C});return l.jsx($,{...i,children:l.jsx(ne,{scope:t,contentId:W(),triggerRef:p,open:f,onOpenChange:v,onOpenToggle:s.useCallback(()=>v(x=>!x),[v]),hasCustomAnchor:u,onCustomAnchorAdd:s.useCallback(()=>P(!0),[]),onCustomAnchorRemove:s.useCallback(()=>P(!1),[]),modal:c,children:r})})};j.displayName=C;var w="PopoverAnchor",ae=s.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=d(w,r),a=m(r),{onCustomAnchorAdd:c,onCustomAnchorRemove:i}=o;return s.useEffect(()=>(c(),()=>i()),[c,i]),l.jsx(E,{...a,...n,ref:t})});ae.displayName=w;var S="PopoverTrigger",N=s.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=d(S,r),a=m(r),c=A(t,o.triggerRef),i=l.jsx(O.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":M(o.open),...n,ref:c,onClick:h(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:l.jsx(E,{asChild:!0,...a,children:i})});N.displayName=S;var R="PopoverPortal",[se,ce]=b(R,{forceMount:void 0}),F=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,a=d(R,t);return l.jsx(se,{scope:t,forceMount:r,children:l.jsx(_,{present:r||a.open,children:l.jsx(H,{asChild:!0,container:o,children:n})})})};F.displayName=R;var g="PopoverContent",D=s.forwardRef((e,t)=>{const r=ce(g,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,a=d(g,e.__scopePopover);return l.jsx(_,{present:n||a.open,children:a.modal?l.jsx(le,{...o,ref:t}):l.jsx(pe,{...o,ref:t})})});D.displayName=g;var ie=X("PopoverContent.RemoveScroll"),le=s.forwardRef((e,t)=>{const r=d(g,e.__scopePopover),n=s.useRef(null),o=A(t,n),a=s.useRef(!1);return s.useEffect(()=>{const c=n.current;if(c)return G(c)},[]),l.jsx(B,{as:ie,allowPinchZoom:!0,children:l.jsx(I,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:h(e.onCloseAutoFocus,c=>{var i;c.preventDefault(),a.current||(i=r.triggerRef.current)==null||i.focus()}),onPointerDownOutside:h(e.onPointerDownOutside,c=>{const i=c.detail.originalEvent,p=i.button===0&&i.ctrlKey===!0,u=i.button===2||p;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:h(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1})})})}),pe=s.forwardRef((e,t)=>{const r=d(g,e.__scopePopover),n=s.useRef(!1),o=s.useRef(!1);return l.jsx(I,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var c,i;(c=e.onCloseAutoFocus)==null||c.call(e,a),a.defaultPrevented||(n.current||(i=r.triggerRef.current)==null||i.focus(),a.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:a=>{var p,u;(p=e.onInteractOutside)==null||p.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=a.target;((u=r.triggerRef.current)==null?void 0:u.contains(c))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),I=s.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:c,onEscapeKeyDown:i,onPointerDownOutside:p,onFocusOutside:u,onInteractOutside:P,...f}=e,v=d(g,r),x=m(r);return K(),l.jsx(Z,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:l.jsx(q,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:P,onEscapeKeyDown:i,onPointerDownOutside:p,onFocusOutside:u,onDismiss:()=>v.onOpenChange(!1),children:l.jsx(J,{"data-state":M(v.open),role:"dialog",id:v.contentId,...x,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),T="PopoverClose",ue=s.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=d(T,r);return l.jsx(O.button,{type:"button",...n,ref:t,onClick:h(e.onClick,()=>o.onOpenChange(!1))})});ue.displayName=T;var de="PopoverArrow",fe=s.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=m(r);return l.jsx(U,{...o,...n,ref:t})});fe.displayName=de;function M(e){return e?"open":"closed"}var ve=j,Pe=N,ge=F,k=D;const Ce=ve,xe=Pe,he=s.forwardRef(({className:e,align:t="center",sideOffset:r=4,...n},o)=>l.jsx(ge,{children:l.jsx(k,{ref:o,align:t,sideOffset:r,className:Q("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));he.displayName=k.displayName;export{Ce as P,xe as a,he as b}; +import{f as s,j as l,ak as L,B as V,ap as $,af as W,D as A,z as O,E as h,aq as E,ar as y,P as _,as as H,G as z,aJ as G,aK as B,aL as K,aM as Z,at as q,au as J,av as U,I as Q}from"./index-BeSw2DVP.js";function X(e){const t=Y(e),r=s.forwardRef((n,o)=>{const{children:a,...c}=n,i=s.Children.toArray(a),p=i.find(oe);if(p){const u=p.props.children,P=i.map(f=>f===p?s.Children.count(u)>1?s.Children.only(null):s.isValidElement(u)?u.props.children:null:f);return l.jsx(t,{...c,ref:o,children:s.isValidElement(u)?s.cloneElement(u,void 0,P):null})}return l.jsx(t,{...c,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}function Y(e){const t=s.forwardRef((r,n)=>{const{children:o,...a}=r;if(s.isValidElement(o)){const c=re(o),i=te(a,o.props);return o.type!==s.Fragment&&(i.ref=n?L(n,c):c),s.cloneElement(o,i)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ee=Symbol("radix.slottable");function oe(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ee}function te(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...i)=>{const p=a(...i);return o(...i),p}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function re(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var C="Popover",[b]=z(C,[y]),m=y(),[ne,d]=b(C),j=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:c=!1}=e,i=m(t),p=s.useRef(null),[u,P]=s.useState(!1),[f,v]=V({prop:n,defaultProp:o??!1,onChange:a,caller:C});return l.jsx($,{...i,children:l.jsx(ne,{scope:t,contentId:W(),triggerRef:p,open:f,onOpenChange:v,onOpenToggle:s.useCallback(()=>v(x=>!x),[v]),hasCustomAnchor:u,onCustomAnchorAdd:s.useCallback(()=>P(!0),[]),onCustomAnchorRemove:s.useCallback(()=>P(!1),[]),modal:c,children:r})})};j.displayName=C;var w="PopoverAnchor",ae=s.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=d(w,r),a=m(r),{onCustomAnchorAdd:c,onCustomAnchorRemove:i}=o;return s.useEffect(()=>(c(),()=>i()),[c,i]),l.jsx(E,{...a,...n,ref:t})});ae.displayName=w;var S="PopoverTrigger",N=s.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=d(S,r),a=m(r),c=A(t,o.triggerRef),i=l.jsx(O.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":M(o.open),...n,ref:c,onClick:h(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:l.jsx(E,{asChild:!0,...a,children:i})});N.displayName=S;var R="PopoverPortal",[se,ce]=b(R,{forceMount:void 0}),F=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,a=d(R,t);return l.jsx(se,{scope:t,forceMount:r,children:l.jsx(_,{present:r||a.open,children:l.jsx(H,{asChild:!0,container:o,children:n})})})};F.displayName=R;var g="PopoverContent",D=s.forwardRef((e,t)=>{const r=ce(g,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,a=d(g,e.__scopePopover);return l.jsx(_,{present:n||a.open,children:a.modal?l.jsx(le,{...o,ref:t}):l.jsx(pe,{...o,ref:t})})});D.displayName=g;var ie=X("PopoverContent.RemoveScroll"),le=s.forwardRef((e,t)=>{const r=d(g,e.__scopePopover),n=s.useRef(null),o=A(t,n),a=s.useRef(!1);return s.useEffect(()=>{const c=n.current;if(c)return G(c)},[]),l.jsx(B,{as:ie,allowPinchZoom:!0,children:l.jsx(I,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:h(e.onCloseAutoFocus,c=>{var i;c.preventDefault(),a.current||(i=r.triggerRef.current)==null||i.focus()}),onPointerDownOutside:h(e.onPointerDownOutside,c=>{const i=c.detail.originalEvent,p=i.button===0&&i.ctrlKey===!0,u=i.button===2||p;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:h(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1})})})}),pe=s.forwardRef((e,t)=>{const r=d(g,e.__scopePopover),n=s.useRef(!1),o=s.useRef(!1);return l.jsx(I,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var c,i;(c=e.onCloseAutoFocus)==null||c.call(e,a),a.defaultPrevented||(n.current||(i=r.triggerRef.current)==null||i.focus(),a.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:a=>{var p,u;(p=e.onInteractOutside)==null||p.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=a.target;((u=r.triggerRef.current)==null?void 0:u.contains(c))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),I=s.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:c,onEscapeKeyDown:i,onPointerDownOutside:p,onFocusOutside:u,onInteractOutside:P,...f}=e,v=d(g,r),x=m(r);return K(),l.jsx(Z,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:l.jsx(q,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:P,onEscapeKeyDown:i,onPointerDownOutside:p,onFocusOutside:u,onDismiss:()=>v.onOpenChange(!1),children:l.jsx(J,{"data-state":M(v.open),role:"dialog",id:v.contentId,...x,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),T="PopoverClose",ue=s.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=d(T,r);return l.jsx(O.button,{type:"button",...n,ref:t,onClick:h(e.onClick,()=>o.onOpenChange(!1))})});ue.displayName=T;var de="PopoverArrow",fe=s.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=m(r);return l.jsx(U,{...o,...n,ref:t})});fe.displayName=de;function M(e){return e?"open":"closed"}var ve=j,Pe=N,ge=F,k=D;const Ce=ve,xe=Pe,he=s.forwardRef(({className:e,align:t="center",sideOffset:r=4,...n},o)=>l.jsx(ge,{children:l.jsx(k,{ref:o,align:t,sideOffset:r,className:Q("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));he.displayName=k.displayName;export{Ce as P,xe as a,he as b}; diff --git a/assets/preferences-BHmRHfHN.js b/assets/preferences-BcztmdfT.js similarity index 74% rename from assets/preferences-BHmRHfHN.js rename to assets/preferences-BcztmdfT.js index e243d6cc39e00ed68fccbf838a25ff3789405d5b..663ad0dc44dbca5ded4b0e62c478188d2bbb837b 100644 --- a/assets/preferences-BHmRHfHN.js +++ b/assets/preferences-BcztmdfT.js @@ -1 +1 @@ -import{a as y,l as d,b as f,W as p}from"./index-D2fBL-s6.js";import{u as m}from"./useMutation-9dlTbuQj.js";import{a as c}from"./account-BHlQBDNT.js";const i={hide_closed_source_evals:!1};function v(){const{user:t}=y(),r=d(),s=p.preferences,a=f({queryKey:s,queryFn:()=>c.getPreferences(),enabled:!!t,staleTime:1/0}),o=a.data??i,l=m({mutationFn:e=>t?c.updatePreferences(e):Promise.resolve(e),onMutate:async e=>{await r.cancelQueries({queryKey:s});const u=r.getQueryData(s)??i;return r.setQueryData(s,e),{previous:u}},onError:(e,u,n)=>{n&&r.setQueryData(s,n.previous)},onSuccess:e=>r.setQueryData(s,e)});return{preferences:o,canPersist:!!t,isLoading:a.isLoading,setHideClosedSourceEvals:e=>l.mutate({...o,hide_closed_source_evals:e})}}export{v as u}; +import{a as y,l as d,b as f,W as p}from"./index-BeSw2DVP.js";import{u as m}from"./useMutation-CsS-RfeE.js";import{a as c}from"./account-B-4MwKsq.js";const i={hide_closed_source_evals:!1};function v(){const{user:t}=y(),r=d(),s=p.preferences,a=f({queryKey:s,queryFn:()=>c.getPreferences(),enabled:!!t,staleTime:1/0}),o=a.data??i,l=m({mutationFn:e=>t?c.updatePreferences(e):Promise.resolve(e),onMutate:async e=>{await r.cancelQueries({queryKey:s});const u=r.getQueryData(s)??i;return r.setQueryData(s,e),{previous:u}},onError:(e,u,n)=>{n&&r.setQueryData(s,n.previous)},onSuccess:e=>r.setQueryData(s,e)});return{preferences:o,canPersist:!!t,isLoading:a.isLoading,setHideClosedSourceEvals:e=>l.mutate({...o,hide_closed_source_evals:e})}}export{v as u}; diff --git a/assets/queryInvalidation-BVOtRFkG.js b/assets/queryInvalidation-DU8xd9pK.js similarity index 93% rename from assets/queryInvalidation-BVOtRFkG.js rename to assets/queryInvalidation-DU8xd9pK.js index cf5d1230ad47ddec6e66cc645d9068ca6782ae0d..24de417a537f7ce9cb9224dec2782e82cfa887f0 100644 --- a/assets/queryInvalidation-BVOtRFkG.js +++ b/assets/queryInvalidation-DU8xd9pK.js @@ -1 +1 @@ -import{p as n,t as u}from"./index-D2fBL-s6.js";function f(e,t,a){if(!e)return e;const i=r=>r.paper_id!==t||r.paper_title===a?r:{...r,paper_title:a};if(Array.isArray(e)){const r=e.map(i);return r.some((s,o)=>s!==e[o])?r:e}if(Array.isArray(e.results)){const r=e.results.map(i);return r.some((s,o)=>s!==e.results[o])?{...e,results:r}:e}return e}function p(e,t){const a=new Set(t.filter(i=>!!i));for(const i of a)for(const r of[n.detail(i),n.arxiv(i),n.preview(i),n.summary(i)])e.invalidateQueries({queryKey:r,exact:!0})}function y(e){for(const t of Object.values(n.feeds))e.invalidateQueries({queryKey:t,refetchType:"none"})}function h(e,t,a){new Set([...a,t.id,t.arxiv_id].filter(s=>!!s)).forEach(s=>{e.setQueryData(n.detail(s),t),e.setQueryData(n.arxiv(s),t),e.setQueriesData({queryKey:n.preview(s),exact:!0},t),e.setQueriesData({queryKey:n.summary(s),exact:!0},t)}),y(e);const r=String(t.id),c=s=>f(s,r,t.title);for(const s of[u.all,u.byDatasetAll])e.setQueriesData({queryKey:s},c),e.invalidateQueries({queryKey:s,refetchType:"none"})}export{y as a,p as i,h as r}; +import{p as n,t as u}from"./index-BeSw2DVP.js";function f(e,t,a){if(!e)return e;const i=r=>r.paper_id!==t||r.paper_title===a?r:{...r,paper_title:a};if(Array.isArray(e)){const r=e.map(i);return r.some((s,o)=>s!==e[o])?r:e}if(Array.isArray(e.results)){const r=e.results.map(i);return r.some((s,o)=>s!==e.results[o])?{...e,results:r}:e}return e}function p(e,t){const a=new Set(t.filter(i=>!!i));for(const i of a)for(const r of[n.detail(i),n.arxiv(i),n.preview(i),n.summary(i)])e.invalidateQueries({queryKey:r,exact:!0})}function y(e){for(const t of Object.values(n.feeds))e.invalidateQueries({queryKey:t,refetchType:"none"})}function h(e,t,a){new Set([...a,t.id,t.arxiv_id].filter(s=>!!s)).forEach(s=>{e.setQueryData(n.detail(s),t),e.setQueryData(n.arxiv(s),t),e.setQueriesData({queryKey:n.preview(s),exact:!0},t),e.setQueriesData({queryKey:n.summary(s),exact:!0},t)}),y(e);const r=String(t.id),c=s=>f(s,r,t.title);for(const s of[u.all,u.byDatasetAll])e.setQueriesData({queryKey:s},c),e.invalidateQueries({queryKey:s,refetchType:"none"})}export{y as a,p as i,h as r}; diff --git a/assets/refresh-cw-fOkD1TSw.js b/assets/refresh-cw-_ZzKdPgT.js similarity index 94% rename from assets/refresh-cw-fOkD1TSw.js rename to assets/refresh-cw-_ZzKdPgT.js index 218a24bd7028929db700fbdd3dc2905b270bd8b5..1779caadbbb74e305f04714f5028d54ecb9b1e59 100644 --- a/assets/refresh-cw-fOkD1TSw.js +++ b/assets/refresh-cw-_ZzKdPgT.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-D2fBL-s6.js";/** +import{c as e}from"./index-BeSw2DVP.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/researchTopic-jOpECA0z.js b/assets/researchTopic-Cb4NrTKj.js similarity index 97% rename from assets/researchTopic-jOpECA0z.js rename to assets/researchTopic-Cb4NrTKj.js index 09b79a2715a9f7f03bd2a3465c8ec3ec7a5fd580..a3e752659588b8a2ca2a18219c2e42b210e41691 100644 --- a/assets/researchTopic-jOpECA0z.js +++ b/assets/researchTopic-Cb4NrTKj.js @@ -1 +1 @@ -import{ac as n,d as u,b as h,r as l,l as p}from"./index-D2fBL-s6.js";import{u as f}from"./useMutation-9dlTbuQj.js";const S=20,E=300,D=10,c={follows:()=>n("/me/follows"),followSuggestions:()=>n("/research/follow-suggestions"),setFollow:(e,t,s)=>n(`/me/follows/${e}/${t}`,{method:s?"PUT":"DELETE"}),following:(e=0,t={})=>{const s=new URLSearchParams({offset:String(e),limit:"40"});return t.startDate&&s.set("start_date",t.startDate),t.endDate&&s.set("end_date",t.endDate),!t.startDate&&!t.endDate&&s.set("all_time","true"),t.topicOnly&&s.set("topic_only","true"),t.topicId!==void 0&&s.set("topic_id",String(t.topicId)),n(`/me/following?${s}`)},topics:()=>n("/me/topics"),addTopic:e=>n("/me/topics",{method:"POST",body:JSON.stringify({text:e})}),updateTopic:(e,t)=>n(`/me/topics/${e}`,{method:"PUT",body:JSON.stringify({text:t})}),removeTopic:e=>n(`/me/topics/${e}`,{method:"DELETE"}),reorderTopics:e=>n("/me/topics/order",{method:"PUT",body:JSON.stringify({topic_ids:e})}),followTopic:e=>n(`/me/topics/${e}/follow`,{method:"POST"}),setTopicPublic:(e,t)=>n(`/me/topics/${e}`,{method:"PATCH",body:JSON.stringify({is_public:t})}),setShowAsFollower:e=>n("/me/topic-follower-visibility",{method:"PUT",body:JSON.stringify({show_as_follower:e})}),publicTopic:e=>n(`/research/topics/${e}`),topicPapers:(e,t,s=0,o={})=>{const i=new URLSearchParams({order:t,offset:String(s),limit:String(S)});return o.startDate&&i.set("start_date",o.startDate),o.endDate&&i.set("end_date",o.endDate),n(`/research/topics/${e}/papers?${i}`)},featuredTopics:()=>n("/research/topics/featured"),email:()=>n("/me/research-email"),setEmail:e=>n("/me/research-email",{method:"PUT",body:JSON.stringify({enabled:e})})};function m(e,t,{follows:s}){return Promise.all([s&&e.invalidateQueries({queryKey:l.follows(t)}),e.invalidateQueries({queryKey:l.feed(t)}),e.invalidateQueries({queryKey:l.email(t)})])}function N(e=!0){var s;const t=(s=u())==null?void 0:s.user;return h({queryKey:l.follows(t==null?void 0:t.hf_subject),queryFn:c.follows,enabled:e&&!!t})}function q({onChanged:e,awaitRefresh:t=!1}={}){var i;const s=(i=u())==null?void 0:i.user,o=p();return f({mutationFn:({kind:r,entityId:a,follow:d})=>c.setFollow(r,a,d),onSuccess:async(r,a)=>{e==null||e(a);const d=m(o,s==null?void 0:s.hf_subject,{follows:!0});t&&await d}})}function P(e){const t=e.label??e.text;return t.charAt(0).toUpperCase()+t.slice(1)}function K(e){const t=P(e).toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,60);return t?`/topics/${e.id}-${t}`:`/topics/${e.id}`}function $(e){return e.split(/[,;\n]|\s-\s|^\s*-\s/m).filter(t=>t.trim().length>=3).length>=4}function L(){var s;const e=(s=u())==null?void 0:s.user,t=p();return f({mutationFn:o=>c.followTopic(o),onSuccess:async()=>{_(),await y(t,e==null?void 0:e.hf_subject)}})}function Q(){var o;const e=(o=u())==null?void 0:o.user,t=p(),s=l.topics(e==null?void 0:e.hf_subject);return f({mutationFn:i=>c.reorderTopics(i.map(r=>r.id)),onMutate:async i=>{await t.cancelQueries({queryKey:s}),t.setQueryData(s,i)},onSuccess:i=>t.setQueryData(s,i),onError:()=>void t.invalidateQueries({queryKey:s})})}function j(){var s;const e=(s=u())==null?void 0:s.user,t=p();return f({mutationFn:({id:o,isPublic:i})=>c.setTopicPublic(o,i),onSuccess:()=>t.invalidateQueries({queryKey:l.topics(e==null?void 0:e.hf_subject)})})}const w="pwc:pending-topic-follow";function R(e){sessionStorage.setItem(w,String(e))}function A(){const e=Number(sessionStorage.getItem(w));return Number.isInteger(e)&&e>0?e:null}function _(){sessionStorage.removeItem(w)}const b=e=>e.status==="pending"||e.status==="running";function J(e=!0,t=5e3){var o;const s=(o=u())==null?void 0:o.user;return h({queryKey:l.topics(s==null?void 0:s.hf_subject),queryFn:c.topics,enabled:e&&!!s,refetchInterval:i=>{var r;return(r=i.state.data)!=null&&r.some(b)?t:!1}})}function y(e,t){return m(e,t,{follows:!1}),e.invalidateQueries({queryKey:l.publicTopics}),e.invalidateQueries({queryKey:l.topics(t)})}function U(e){var o;const t=(o=u())==null?void 0:o.user,s=p();return f({mutationFn:({id:i,text:r})=>i===void 0?c.addTopic(r):c.updateTopic(i,r),onSuccess:async()=>{F(),await y(s,t==null?void 0:t.hf_subject),e==null||e()}})}function C(){var s;const e=(s=u())==null?void 0:s.user,t=p();return f({mutationFn:async o=>{const r=(await Promise.allSettled(o.map(a=>c.removeTopic(a)))).find(a=>a.status==="rejected");if(r)throw r.reason},onSettled:()=>void y(t,e==null?void 0:e.hf_subject)})}const T="pwc:following-pending-topic";function G(e){sessionStorage.setItem(T,e)}function M(){return sessionStorage.getItem(T)}function F(){sessionStorage.removeItem(T)}function k(){var s;const e=(s=u())==null?void 0:s.user,t=p();return f({mutationFn:async o=>{const r=(await Promise.allSettled(o.map(a=>c.setFollow(a.kind,a.id,a.follow??!0)))).find(a=>a.status==="rejected");if(r)throw r.reason},onSuccess:()=>I(),onSettled:()=>void m(t,e==null?void 0:e.hf_subject,{follows:!0})})}const g="pwc:following-pending-follows";function Y(e){sessionStorage.setItem(g,JSON.stringify(e))}function H(){return JSON.parse(sessionStorage.getItem(g)??"[]")}function I(){sessionStorage.removeItem(g)}export{S as T,K as a,C as b,A as c,J as d,N as e,U as f,k as g,D as h,E as i,G as j,Y as k,Q as l,b as m,M as n,H as o,F as p,q,c as r,R as s,P as t,L as u,$ as v,j as w}; +import{ac as n,d as u,b as h,r as l,l as p}from"./index-BeSw2DVP.js";import{u as f}from"./useMutation-CsS-RfeE.js";const S=20,E=300,D=10,c={follows:()=>n("/me/follows"),followSuggestions:()=>n("/research/follow-suggestions"),setFollow:(e,t,s)=>n(`/me/follows/${e}/${t}`,{method:s?"PUT":"DELETE"}),following:(e=0,t={})=>{const s=new URLSearchParams({offset:String(e),limit:"40"});return t.startDate&&s.set("start_date",t.startDate),t.endDate&&s.set("end_date",t.endDate),!t.startDate&&!t.endDate&&s.set("all_time","true"),t.topicOnly&&s.set("topic_only","true"),t.topicId!==void 0&&s.set("topic_id",String(t.topicId)),n(`/me/following?${s}`)},topics:()=>n("/me/topics"),addTopic:e=>n("/me/topics",{method:"POST",body:JSON.stringify({text:e})}),updateTopic:(e,t)=>n(`/me/topics/${e}`,{method:"PUT",body:JSON.stringify({text:t})}),removeTopic:e=>n(`/me/topics/${e}`,{method:"DELETE"}),reorderTopics:e=>n("/me/topics/order",{method:"PUT",body:JSON.stringify({topic_ids:e})}),followTopic:e=>n(`/me/topics/${e}/follow`,{method:"POST"}),setTopicPublic:(e,t)=>n(`/me/topics/${e}`,{method:"PATCH",body:JSON.stringify({is_public:t})}),setShowAsFollower:e=>n("/me/topic-follower-visibility",{method:"PUT",body:JSON.stringify({show_as_follower:e})}),publicTopic:e=>n(`/research/topics/${e}`),topicPapers:(e,t,s=0,o={})=>{const i=new URLSearchParams({order:t,offset:String(s),limit:String(S)});return o.startDate&&i.set("start_date",o.startDate),o.endDate&&i.set("end_date",o.endDate),n(`/research/topics/${e}/papers?${i}`)},featuredTopics:()=>n("/research/topics/featured"),email:()=>n("/me/research-email"),setEmail:e=>n("/me/research-email",{method:"PUT",body:JSON.stringify({enabled:e})})};function m(e,t,{follows:s}){return Promise.all([s&&e.invalidateQueries({queryKey:l.follows(t)}),e.invalidateQueries({queryKey:l.feed(t)}),e.invalidateQueries({queryKey:l.email(t)})])}function N(e=!0){var s;const t=(s=u())==null?void 0:s.user;return h({queryKey:l.follows(t==null?void 0:t.hf_subject),queryFn:c.follows,enabled:e&&!!t})}function q({onChanged:e,awaitRefresh:t=!1}={}){var i;const s=(i=u())==null?void 0:i.user,o=p();return f({mutationFn:({kind:r,entityId:a,follow:d})=>c.setFollow(r,a,d),onSuccess:async(r,a)=>{e==null||e(a);const d=m(o,s==null?void 0:s.hf_subject,{follows:!0});t&&await d}})}function P(e){const t=e.label??e.text;return t.charAt(0).toUpperCase()+t.slice(1)}function K(e){const t=P(e).toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,60);return t?`/topics/${e.id}-${t}`:`/topics/${e.id}`}function $(e){return e.split(/[,;\n]|\s-\s|^\s*-\s/m).filter(t=>t.trim().length>=3).length>=4}function L(){var s;const e=(s=u())==null?void 0:s.user,t=p();return f({mutationFn:o=>c.followTopic(o),onSuccess:async()=>{_(),await y(t,e==null?void 0:e.hf_subject)}})}function Q(){var o;const e=(o=u())==null?void 0:o.user,t=p(),s=l.topics(e==null?void 0:e.hf_subject);return f({mutationFn:i=>c.reorderTopics(i.map(r=>r.id)),onMutate:async i=>{await t.cancelQueries({queryKey:s}),t.setQueryData(s,i)},onSuccess:i=>t.setQueryData(s,i),onError:()=>void t.invalidateQueries({queryKey:s})})}function j(){var s;const e=(s=u())==null?void 0:s.user,t=p();return f({mutationFn:({id:o,isPublic:i})=>c.setTopicPublic(o,i),onSuccess:()=>t.invalidateQueries({queryKey:l.topics(e==null?void 0:e.hf_subject)})})}const w="pwc:pending-topic-follow";function R(e){sessionStorage.setItem(w,String(e))}function A(){const e=Number(sessionStorage.getItem(w));return Number.isInteger(e)&&e>0?e:null}function _(){sessionStorage.removeItem(w)}const b=e=>e.status==="pending"||e.status==="running";function J(e=!0,t=5e3){var o;const s=(o=u())==null?void 0:o.user;return h({queryKey:l.topics(s==null?void 0:s.hf_subject),queryFn:c.topics,enabled:e&&!!s,refetchInterval:i=>{var r;return(r=i.state.data)!=null&&r.some(b)?t:!1}})}function y(e,t){return m(e,t,{follows:!1}),e.invalidateQueries({queryKey:l.publicTopics}),e.invalidateQueries({queryKey:l.topics(t)})}function U(e){var o;const t=(o=u())==null?void 0:o.user,s=p();return f({mutationFn:({id:i,text:r})=>i===void 0?c.addTopic(r):c.updateTopic(i,r),onSuccess:async()=>{F(),await y(s,t==null?void 0:t.hf_subject),e==null||e()}})}function C(){var s;const e=(s=u())==null?void 0:s.user,t=p();return f({mutationFn:async o=>{const r=(await Promise.allSettled(o.map(a=>c.removeTopic(a)))).find(a=>a.status==="rejected");if(r)throw r.reason},onSettled:()=>void y(t,e==null?void 0:e.hf_subject)})}const T="pwc:following-pending-topic";function G(e){sessionStorage.setItem(T,e)}function M(){return sessionStorage.getItem(T)}function F(){sessionStorage.removeItem(T)}function k(){var s;const e=(s=u())==null?void 0:s.user,t=p();return f({mutationFn:async o=>{const r=(await Promise.allSettled(o.map(a=>c.setFollow(a.kind,a.id,a.follow??!0)))).find(a=>a.status==="rejected");if(r)throw r.reason},onSuccess:()=>I(),onSettled:()=>void m(t,e==null?void 0:e.hf_subject,{follows:!0})})}const g="pwc:following-pending-follows";function Y(e){sessionStorage.setItem(g,JSON.stringify(e))}function H(){return JSON.parse(sessionStorage.getItem(g)??"[]")}function I(){sessionStorage.removeItem(g)}export{S as T,K as a,C as b,A as c,J as d,N as e,U as f,k as g,D as h,E as i,G as j,Y as k,Q as l,b as m,M as n,H as o,F as p,q,c as r,R as s,P as t,L as u,$ as v,j as w}; diff --git a/assets/savedPapersAuth-0s9GFyfF.js b/assets/savedPapersAuth-CcDg6HlA.js similarity index 75% rename from assets/savedPapersAuth-0s9GFyfF.js rename to assets/savedPapersAuth-CcDg6HlA.js index 67af7a2c74a2d29c2b87ab0a672c7bc136928cf0..d72dfd3593ffacccc8c93b96bd6b577377596413 100644 --- a/assets/savedPapersAuth-0s9GFyfF.js +++ b/assets/savedPapersAuth-CcDg6HlA.js @@ -1 +1 @@ -import{h as a}from"./index-D2fBL-s6.js";const t="saved_papers_authorized";function o(r=!1){const e=new URL(window.location.href);return r&&e.searchParams.set(t,"1"),a(`${e.pathname}${e.search}${e.hash}`,{authorizeBucket:!0,bucketCreate:!0})}export{t as S,o as s}; +import{h as a}from"./index-BeSw2DVP.js";const t="saved_papers_authorized";function o(r=!1){const e=new URL(window.location.href);return r&&e.searchParams.set(t,"1"),a(`${e.pathname}${e.search}${e.hash}`,{authorizeBucket:!0,bucketCreate:!0})}export{t as S,o as s}; diff --git a/assets/search-0R_Hc3S2.js b/assets/search-B4RgSU4h.js similarity index 88% rename from assets/search-0R_Hc3S2.js rename to assets/search-B4RgSU4h.js index be947efb79f7502ba972e7fd4ee41a5b649de6be..60387eead451e1a935e29accd8f5e7ca134093a6 100644 --- a/assets/search-0R_Hc3S2.js +++ b/assets/search-B4RgSU4h.js @@ -1,4 +1,4 @@ -import{c}from"./index-D2fBL-s6.js";/** +import{c}from"./index-BeSw2DVP.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/searchable-select-CsXzzP_V.js b/assets/searchable-select-C_dIHH-q.js similarity index 98% rename from assets/searchable-select-CsXzzP_V.js rename to assets/searchable-select-C_dIHH-q.js index b8d1e7575ba4d7791d5317eaff61816d2ced9ca1..b61f94df2a8f75be385c6034ed7a6369289cf2f7 100644 --- a/assets/searchable-select-CsXzzP_V.js +++ b/assets/searchable-select-C_dIHH-q.js @@ -1,4 +1,4 @@ -import{c as Ae,f as a,af as z,z as L,ag as Me,ah as De,ai as $e,aj as Le,ak as H,j as p,I as D,b as Pe,C as Fe}from"./index-D2fBL-s6.js";import{B as Ke}from"./button-D0XfbdrX.js";import{P as qe,a as Ve,b as Be}from"./popover-DS5Jzsg5.js";import"./dialog-DgUROq2j.js";import{S as Ue}from"./search-0R_Hc3S2.js";import{L as ze}from"./loader-circle-CoLo2trx.js";/** +import{c as Ae,f as a,af as z,z as L,ag as Me,ah as De,ai as $e,aj as Le,ak as H,j as p,I as D,b as Pe,C as Fe}from"./index-BeSw2DVP.js";import{B as Ke}from"./button-CO2XYoBd.js";import{P as qe,a as Ve,b as Be}from"./popover-CYoFzAud.js";import"./dialog-EpDnY6a5.js";import{S as Ue}from"./search-B4RgSU4h.js";import{L as ze}from"./loader-circle-C4luyo5I.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/share-2-SmaUf3DC.js b/assets/share-2-CGSfn6ux.js similarity index 92% rename from assets/share-2-SmaUf3DC.js rename to assets/share-2-CGSfn6ux.js index e43c919aab42f3013736e931f3fab93b0cff19eb..1cdba7a56e0cbaebab4894d514c0bd651a68fb76 100644 --- a/assets/share-2-SmaUf3DC.js +++ b/assets/share-2-CGSfn6ux.js @@ -1,4 +1,4 @@ -import{c}from"./index-D2fBL-s6.js";/** +import{c}from"./index-BeSw2DVP.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/skeleton-BDwfco0_.js b/assets/skeleton-BBv4iC5Z.js similarity index 62% rename from assets/skeleton-BDwfco0_.js rename to assets/skeleton-BBv4iC5Z.js index ad4da54a033f120085a84da8a3e977d5632c72d6..79e15f48be9f4e707667e3585afb7ce01f8ff5a1 100644 --- a/assets/skeleton-BDwfco0_.js +++ b/assets/skeleton-BBv4iC5Z.js @@ -1 +1 @@ -import{j as t,I as n}from"./index-D2fBL-s6.js";function m({className:e,...s}){return t.jsx("div",{className:n("animate-pulse rounded-md bg-muted",e),...s})}export{m as S}; +import{j as t,I as n}from"./index-BeSw2DVP.js";function m({className:e,...s}){return t.jsx("div",{className:n("animate-pulse rounded-md bg-muted",e),...s})}export{m as S}; diff --git a/assets/sparkles-4rJdywIs.js b/assets/sparkles-BjZnVOru.js similarity index 93% rename from assets/sparkles-4rJdywIs.js rename to assets/sparkles-BjZnVOru.js index 7b7f1dfa9156120f906c0ae2b39a320558d91e6b..b5d268f8b6246d6d5def33cee8e8ef90232b1c0f 100644 --- a/assets/sparkles-4rJdywIs.js +++ b/assets/sparkles-BjZnVOru.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-D2fBL-s6.js";/** +import{c as a}from"./index-BeSw2DVP.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/submissions-LRopJJKL.js b/assets/submissions-D_EEKc6c.js similarity index 99% rename from assets/submissions-LRopJJKL.js rename to assets/submissions-D_EEKc6c.js index 2979d1faf9d0851dba3b916b03fae0e61e126674..5e1abfcc87974bdb52ec3fba88a6dd1ec639caf9 100644 --- a/assets/submissions-LRopJJKL.js +++ b/assets/submissions-D_EEKc6c.js @@ -1 +1 @@ -import{ac as Fe}from"./index-D2fBL-s6.js";var v;(function(s){s.assertEqual=a=>{};function e(a){}s.assertIs=e;function t(a){throw new Error}s.assertNever=t,s.arrayToEnum=a=>{const n={};for(const i of a)n[i]=i;return n},s.getValidEnumValues=a=>{const n=s.objectKeys(a).filter(o=>typeof a[a[o]]!="number"),i={};for(const o of n)i[o]=a[o];return s.objectValues(i)},s.objectValues=a=>s.objectKeys(a).map(function(n){return a[n]}),s.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const n=[];for(const i in a)Object.prototype.hasOwnProperty.call(a,i)&&n.push(i);return n},s.find=(a,n)=>{for(const i of a)if(n(i))return i},s.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function r(a,n=" | "){return a.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}s.joinValues=r,s.jsonStringifyReplacer=(a,n)=>typeof n=="bigint"?n.toString():n})(v||(v={}));var Se;(function(s){s.mergeShapes=(e,t)=>({...e,...t})})(Se||(Se={}));const u=v.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),$=s=>{switch(typeof s){case"undefined":return u.undefined;case"string":return u.string;case"number":return Number.isNaN(s)?u.nan:u.number;case"boolean":return u.boolean;case"function":return u.function;case"bigint":return u.bigint;case"symbol":return u.symbol;case"object":return Array.isArray(s)?u.array:s===null?u.null:s.then&&typeof s.then=="function"&&s.catch&&typeof s.catch=="function"?u.promise:typeof Map<"u"&&s instanceof Map?u.map:typeof Set<"u"&&s instanceof Set?u.set:typeof Date<"u"&&s instanceof Date?u.date:u.object;default:return u.unknown}},d=v.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class I extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(n){return n.message},r={_errors:[]},a=n=>{for(const i of n.issues)if(i.code==="invalid_union")i.unionErrors.map(a);else if(i.code==="invalid_return_type")a(i.returnTypeError);else if(i.code==="invalid_arguments")a(i.argumentsError);else if(i.path.length===0)r._errors.push(t(i));else{let o=r,f=0;for(;ft.message){const t={},r=[];for(const a of this.issues)if(a.path.length>0){const n=a.path[0];t[n]=t[n]||[],t[n].push(e(a))}else r.push(e(a));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}I.create=s=>new I(s);const le=(s,e)=>{let t;switch(s.code){case d.invalid_type:s.received===u.undefined?t="Required":t=`Expected ${s.expected}, received ${s.received}`;break;case d.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(s.expected,v.jsonStringifyReplacer)}`;break;case d.unrecognized_keys:t=`Unrecognized key(s) in object: ${v.joinValues(s.keys,", ")}`;break;case d.invalid_union:t="Invalid input";break;case d.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${v.joinValues(s.options)}`;break;case d.invalid_enum_value:t=`Invalid enum value. Expected ${v.joinValues(s.options)}, received '${s.received}'`;break;case d.invalid_arguments:t="Invalid function arguments";break;case d.invalid_return_type:t="Invalid function return type";break;case d.invalid_date:t="Invalid date";break;case d.invalid_string:typeof s.validation=="object"?"includes"in s.validation?(t=`Invalid input: must include "${s.validation.includes}"`,typeof s.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${s.validation.position}`)):"startsWith"in s.validation?t=`Invalid input: must start with "${s.validation.startsWith}"`:"endsWith"in s.validation?t=`Invalid input: must end with "${s.validation.endsWith}"`:v.assertNever(s.validation):s.validation!=="regex"?t=`Invalid ${s.validation}`:t="Invalid";break;case d.too_small:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at least":"more than"} ${s.minimum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at least":"over"} ${s.minimum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="bigint"?t=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(s.minimum))}`:t="Invalid input";break;case d.too_big:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at most":"less than"} ${s.maximum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at most":"under"} ${s.maximum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="bigint"?t=`BigInt must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly":s.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(s.maximum))}`:t="Invalid input";break;case d.custom:t="Invalid input";break;case d.invalid_intersection_types:t="Intersection results could not be merged";break;case d.not_multiple_of:t=`Number must be a multiple of ${s.multipleOf}`;break;case d.not_finite:t="Number must be finite";break;default:t=e.defaultError,v.assertNever(s)}return{message:t}};let We=le;function Je(){return We}const Ye=s=>{const{data:e,path:t,errorMaps:r,issueData:a}=s,n=[...t,...a.path||[]],i={...a,path:n};if(a.message!==void 0)return{...a,path:n,message:a.message};let o="";const f=r.filter(p=>!!p).slice().reverse();for(const p of f)o=p(i,{data:e,defaultError:o}).message;return{...a,path:n,message:o}};function c(s,e){const t=Je(),r=Ye({issueData:e,data:s.data,path:s.path,errorMaps:[s.common.contextualErrorMap,s.schemaErrorMap,t,t===le?void 0:le].filter(a=>!!a)});s.common.issues.push(r)}class C{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const r=[];for(const a of t){if(a.status==="aborted")return m;a.status==="dirty"&&e.dirty(),r.push(a.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){const r=[];for(const a of t){const n=await a.key,i=await a.value;r.push({key:n,value:i})}return C.mergeObjectSync(e,r)}static mergeObjectSync(e,t){const r={};for(const a of t){const{key:n,value:i}=a;if(n.status==="aborted"||i.status==="aborted")return m;n.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),n.value!=="__proto__"&&(typeof i.value<"u"||a.alwaysSet)&&(r[n.value]=i.value)}return{status:e.value,value:r}}}const m=Object.freeze({status:"aborted"}),J=s=>({status:"dirty",value:s}),O=s=>({status:"valid",value:s}),Ce=s=>s.status==="aborted",Oe=s=>s.status==="dirty",B=s=>s.status==="valid",X=s=>typeof Promise<"u"&&s instanceof Promise;var h;(function(s){s.errToObj=e=>typeof e=="string"?{message:e}:e||{},s.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(h||(h={}));class E{constructor(e,t,r,a){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=a}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Ne=(s,e)=>{if(B(e))return{success:!0,data:e.value};if(!s.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new I(s.common.issues);return this._error=t,this._error}}};function g(s){if(!s)return{};const{errorMap:e,invalid_type_error:t,required_error:r,description:a}=s;if(e&&(t||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:a}:{errorMap:(i,o)=>{const{message:f}=s;return i.code==="invalid_enum_value"?{message:f??o.defaultError}:typeof o.data>"u"?{message:f??r??o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:f??t??o.defaultError}},description:a}}class y{get description(){return this._def.description}_getType(e){return $(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:$(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new C,ctx:{common:e.parent.common,data:e.data,parsedType:$(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(X(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){const r={common:{issues:[],async:(t==null?void 0:t.async)??!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:$(e)},a=this._parseSync({data:e,path:r.path,parent:r});return Ne(r,a)}"~validate"(e){var r,a;const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:$(e)};if(!this["~standard"].async)try{const n=this._parseSync({data:e,path:[],parent:t});return B(n)?{value:n.value}:{issues:t.common.issues}}catch(n){(a=(r=n==null?void 0:n.message)==null?void 0:r.toLowerCase())!=null&&a.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(n=>B(n)?{value:n.value}:{issues:t.common.issues})}async parseAsync(e,t){const r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){const r={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:$(e)},a=this._parse({data:e,path:r.path,parent:r}),n=await(X(a)?a:Promise.resolve(a));return Ne(r,n)}refine(e,t){const r=a=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(a):t;return this._refinement((a,n)=>{const i=e(a),o=()=>n.addIssue({code:d.custom,...r(a)});return typeof Promise<"u"&&i instanceof Promise?i.then(f=>f?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,t){return this._refinement((r,a)=>e(r)?!0:(a.addIssue(typeof t=="function"?t(r,a):t),!1))}_refinement(e){return new L({schema:this,typeName:_.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return j.create(this,this._def)}nullable(){return D.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return N.create(this)}promise(){return ae.create(this,this._def)}or(e){return ee.create([this,e],this._def)}and(e){return te.create(this,e,this._def)}transform(e){return new L({...g(this._def),schema:this,typeName:_.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new ne({...g(this._def),innerType:this,defaultValue:t,typeName:_.ZodDefault})}brand(){return new ze({typeName:_.ZodBranded,type:this,...g(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new ie({...g(this._def),innerType:this,catchValue:t,typeName:_.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return be.create(this,e)}readonly(){return oe.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const He=/^c[^\s-]{8,}$/i,Ge=/^[0-9a-z]+$/,Qe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Xe=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Ke=/^[a-z0-9_-]{21}$/i,et=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,tt=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,st=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,rt="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let ue;const at=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,nt=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,it=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,ot=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,dt=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ct=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,$e="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",ut=new RegExp(`^${$e}$`);function Pe(s){let e="[0-5]\\d";s.precision?e=`${e}\\.\\d{${s.precision}}`:s.precision==null&&(e=`${e}(\\.\\d+)?`);const t=s.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function lt(s){return new RegExp(`^${Pe(s)}$`)}function ht(s){let e=`${$e}T${Pe(s)}`;const t=[];return t.push(s.local?"Z?":"Z"),s.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function ft(s,e){return!!((e==="v4"||!e)&&at.test(s)||(e==="v6"||!e)&&it.test(s))}function pt(s,e){if(!et.test(s))return!1;try{const[t]=s.split(".");if(!t)return!1;const r=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),a=JSON.parse(atob(r));return!(typeof a!="object"||a===null||"typ"in a&&(a==null?void 0:a.typ)!=="JWT"||!a.alg||e&&a.alg!==e)}catch{return!1}}function mt(s,e){return!!((e==="v4"||!e)&&nt.test(s)||(e==="v6"||!e)&&ot.test(s))}class R extends y{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==u.string){const n=this._getOrReturnCtx(e);return c(n,{code:d.invalid_type,expected:u.string,received:n.parsedType}),m}const r=new C;let a;for(const n of this._def.checks)if(n.kind==="min")e.data.lengthn.value&&(a=this._getOrReturnCtx(e,a),c(a,{code:d.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),r.dirty());else if(n.kind==="length"){const i=e.data.length>n.value,o=e.data.lengthe.test(a),{validation:t,code:d.invalid_string,...h.errToObj(r)})}_addCheck(e){return new R({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...h.errToObj(e)})}url(e){return this._addCheck({kind:"url",...h.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...h.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...h.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...h.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...h.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...h.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...h.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...h.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...h.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...h.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...h.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...h.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...h.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...h.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...h.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...h.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...h.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...h.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...h.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...h.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...h.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...h.errToObj(t)})}nonempty(e){return this.min(1,h.errToObj(e))}trim(){return new R({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new R({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new R({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew R({checks:[],typeName:_.ZodString,coerce:(s==null?void 0:s.coerce)??!1,...g(s)});function _t(s,e){const t=(s.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,a=t>r?t:r,n=Number.parseInt(s.toFixed(a).replace(".","")),i=Number.parseInt(e.toFixed(a).replace(".",""));return n%i/10**a}class q extends y{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==u.number){const n=this._getOrReturnCtx(e);return c(n,{code:d.invalid_type,expected:u.number,received:n.parsedType}),m}let r;const a=new C;for(const n of this._def.checks)n.kind==="int"?v.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),c(r,{code:d.invalid_type,expected:"integer",received:"float",message:n.message}),a.dirty()):n.kind==="min"?(n.inclusive?e.datan.value:e.data>=n.value)&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty()):n.kind==="multipleOf"?_t(e.data,n.value)!==0&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):n.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),c(r,{code:d.not_finite,message:n.message}),a.dirty()):v.assertNever(n);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,r,a){return new q({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:h.toString(a)}]})}_addCheck(e){return new q({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:h.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:h.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:h.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:h.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuee.kind==="int"||e.kind==="multipleOf"&&v.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(t===null||r.value>t)&&(t=r.value):r.kind==="max"&&(e===null||r.valuenew q({checks:[],typeName:_.ZodNumber,coerce:(s==null?void 0:s.coerce)||!1,...g(s)});class Y extends y{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==u.bigint)return this._getInvalidInput(e);let r;const a=new C;for(const n of this._def.checks)n.kind==="min"?(n.inclusive?e.datan.value:e.data>=n.value)&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty()):n.kind==="multipleOf"?e.data%n.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):v.assertNever(n);return{status:a.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return c(t,{code:d.invalid_type,expected:u.bigint,received:t.parsedType}),m}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,r,a){return new Y({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:h.toString(a)}]})}_addCheck(e){return new Y({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew Y({checks:[],typeName:_.ZodBigInt,coerce:(s==null?void 0:s.coerce)??!1,...g(s)});class he extends y{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==u.boolean){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.boolean,received:r.parsedType}),m}return O(e.data)}}he.create=s=>new he({typeName:_.ZodBoolean,coerce:(s==null?void 0:s.coerce)||!1,...g(s)});class K extends y{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==u.date){const n=this._getOrReturnCtx(e);return c(n,{code:d.invalid_type,expected:u.date,received:n.parsedType}),m}if(Number.isNaN(e.data.getTime())){const n=this._getOrReturnCtx(e);return c(n,{code:d.invalid_date}),m}const r=new C;let a;for(const n of this._def.checks)n.kind==="min"?e.data.getTime()n.value&&(a=this._getOrReturnCtx(e,a),c(a,{code:d.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),r.dirty()):v.assertNever(n);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new K({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:h.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:h.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew K({checks:[],coerce:(s==null?void 0:s.coerce)||!1,typeName:_.ZodDate,...g(s)});class Ae extends y{_parse(e){if(this._getType(e)!==u.symbol){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.symbol,received:r.parsedType}),m}return O(e.data)}}Ae.create=s=>new Ae({typeName:_.ZodSymbol,...g(s)});class fe extends y{_parse(e){if(this._getType(e)!==u.undefined){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.undefined,received:r.parsedType}),m}return O(e.data)}}fe.create=s=>new fe({typeName:_.ZodUndefined,...g(s)});class pe extends y{_parse(e){if(this._getType(e)!==u.null){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.null,received:r.parsedType}),m}return O(e.data)}}pe.create=s=>new pe({typeName:_.ZodNull,...g(s)});class Ee extends y{constructor(){super(...arguments),this._any=!0}_parse(e){return O(e.data)}}Ee.create=s=>new Ee({typeName:_.ZodAny,...g(s)});class me extends y{constructor(){super(...arguments),this._unknown=!0}_parse(e){return O(e.data)}}me.create=s=>new me({typeName:_.ZodUnknown,...g(s)});class P extends y{_parse(e){const t=this._getOrReturnCtx(e);return c(t,{code:d.invalid_type,expected:u.never,received:t.parsedType}),m}}P.create=s=>new P({typeName:_.ZodNever,...g(s)});class Ze extends y{_parse(e){if(this._getType(e)!==u.undefined){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.void,received:r.parsedType}),m}return O(e.data)}}Ze.create=s=>new Ze({typeName:_.ZodVoid,...g(s)});class N extends y{_parse(e){const{ctx:t,status:r}=this._processInputParams(e),a=this._def;if(t.parsedType!==u.array)return c(t,{code:d.invalid_type,expected:u.array,received:t.parsedType}),m;if(a.exactLength!==null){const i=t.data.length>a.exactLength.value,o=t.data.lengtha.maxLength.value&&(c(t,{code:d.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((i,o)=>a.type._parseAsync(new E(t,i,t.path,o)))).then(i=>C.mergeArray(r,i));const n=[...t.data].map((i,o)=>a.type._parseSync(new E(t,i,t.path,o)));return C.mergeArray(r,n)}get element(){return this._def.type}min(e,t){return new N({...this._def,minLength:{value:e,message:h.toString(t)}})}max(e,t){return new N({...this._def,maxLength:{value:e,message:h.toString(t)}})}length(e,t){return new N({...this._def,exactLength:{value:e,message:h.toString(t)}})}nonempty(e){return this.min(1,e)}}N.create=(s,e)=>new N({type:s,minLength:null,maxLength:null,exactLength:null,typeName:_.ZodArray,...g(e)});function U(s){if(s instanceof w){const e={};for(const t in s.shape){const r=s.shape[t];e[t]=j.create(U(r))}return new w({...s._def,shape:()=>e})}else return s instanceof N?new N({...s._def,type:U(s.element)}):s instanceof j?j.create(U(s.unwrap())):s instanceof D?D.create(U(s.unwrap())):s instanceof z?z.create(s.items.map(e=>U(e))):s}class w extends y{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=v.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==u.object){const p=this._getOrReturnCtx(e);return c(p,{code:d.invalid_type,expected:u.object,received:p.parsedType}),m}const{status:r,ctx:a}=this._processInputParams(e),{shape:n,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof P&&this._def.unknownKeys==="strip"))for(const p in a.data)i.includes(p)||o.push(p);const f=[];for(const p of i){const x=n[p],W=a.data[p];f.push({key:{status:"valid",value:p},value:x._parse(new E(a,W,a.path,p)),alwaysSet:p in a.data})}if(this._def.catchall instanceof P){const p=this._def.unknownKeys;if(p==="passthrough")for(const x of o)f.push({key:{status:"valid",value:x},value:{status:"valid",value:a.data[x]}});else if(p==="strict")o.length>0&&(c(a,{code:d.unrecognized_keys,keys:o}),r.dirty());else if(p!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const p=this._def.catchall;for(const x of o){const W=a.data[x];f.push({key:{status:"valid",value:x},value:p._parse(new E(a,W,a.path,x)),alwaysSet:x in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const p=[];for(const x of f){const W=await x.key,qe=await x.value;p.push({key:W,value:qe,alwaysSet:x.alwaysSet})}return p}).then(p=>C.mergeObjectSync(r,p)):C.mergeObjectSync(r,f)}get shape(){return this._def.shape()}strict(e){return h.errToObj,new w({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,r)=>{var n,i;const a=((i=(n=this._def).errorMap)==null?void 0:i.call(n,t,r).message)??r.defaultError;return t.code==="unrecognized_keys"?{message:h.errToObj(e).message??a}:{message:a}}}:{}})}strip(){return new w({...this._def,unknownKeys:"strip"})}passthrough(){return new w({...this._def,unknownKeys:"passthrough"})}extend(e){return new w({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new w({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:_.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new w({...this._def,catchall:e})}pick(e){const t={};for(const r of v.objectKeys(e))e[r]&&this.shape[r]&&(t[r]=this.shape[r]);return new w({...this._def,shape:()=>t})}omit(e){const t={};for(const r of v.objectKeys(this.shape))e[r]||(t[r]=this.shape[r]);return new w({...this._def,shape:()=>t})}deepPartial(){return U(this)}partial(e){const t={};for(const r of v.objectKeys(this.shape)){const a=this.shape[r];e&&!e[r]?t[r]=a:t[r]=a.optional()}return new w({...this._def,shape:()=>t})}required(e){const t={};for(const r of v.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let n=this.shape[r];for(;n instanceof j;)n=n._def.innerType;t[r]=n}return new w({...this._def,shape:()=>t})}keyof(){return Me(v.objectKeys(this.shape))}}w.create=(s,e)=>new w({shape:()=>s,unknownKeys:"strip",catchall:P.create(),typeName:_.ZodObject,...g(e)});w.strictCreate=(s,e)=>new w({shape:()=>s,unknownKeys:"strict",catchall:P.create(),typeName:_.ZodObject,...g(e)});w.lazycreate=(s,e)=>new w({shape:s,unknownKeys:"strip",catchall:P.create(),typeName:_.ZodObject,...g(e)});class ee extends y{_parse(e){const{ctx:t}=this._processInputParams(e),r=this._def.options;function a(n){for(const o of n)if(o.result.status==="valid")return o.result;for(const o of n)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const i=n.map(o=>new I(o.ctx.common.issues));return c(t,{code:d.invalid_union,unionErrors:i}),m}if(t.common.async)return Promise.all(r.map(async n=>{const i={...t,common:{...t.common,issues:[]},parent:null};return{result:await n._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(a);{let n;const i=[];for(const f of r){const p={...t,common:{...t.common,issues:[]},parent:null},x=f._parseSync({data:t.data,path:t.path,parent:p});if(x.status==="valid")return x;x.status==="dirty"&&!n&&(n={result:x,ctx:p}),p.common.issues.length&&i.push(p.common.issues)}if(n)return t.common.issues.push(...n.ctx.common.issues),n.result;const o=i.map(f=>new I(f));return c(t,{code:d.invalid_union,unionErrors:o}),m}}get options(){return this._def.options}}ee.create=(s,e)=>new ee({options:s,typeName:_.ZodUnion,...g(e)});const Z=s=>s instanceof ge?Z(s.schema):s instanceof L?Z(s.innerType()):s instanceof re?[s.value]:s instanceof V?s.options:s instanceof ye?v.objectValues(s.enum):s instanceof ne?Z(s._def.innerType):s instanceof fe?[void 0]:s instanceof pe?[null]:s instanceof j?[void 0,...Z(s.unwrap())]:s instanceof D?[null,...Z(s.unwrap())]:s instanceof ze||s instanceof oe?Z(s.unwrap()):s instanceof ie?Z(s._def.innerType):[];class ke extends y{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.object)return c(t,{code:d.invalid_type,expected:u.object,received:t.parsedType}),m;const r=this.discriminator,a=t.data[r],n=this.optionsMap.get(a);return n?t.common.async?n._parseAsync({data:t.data,path:t.path,parent:t}):n._parseSync({data:t.data,path:t.path,parent:t}):(c(t,{code:d.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),m)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){const a=new Map;for(const n of t){const i=Z(n.shape[e]);if(!i.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const o of i){if(a.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);a.set(o,n)}}return new ke({typeName:_.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:a,...g(r)})}}function _e(s,e){const t=$(s),r=$(e);if(s===e)return{valid:!0,data:s};if(t===u.object&&r===u.object){const a=v.objectKeys(e),n=v.objectKeys(s).filter(o=>a.indexOf(o)!==-1),i={...s,...e};for(const o of n){const f=_e(s[o],e[o]);if(!f.valid)return{valid:!1};i[o]=f.data}return{valid:!0,data:i}}else if(t===u.array&&r===u.array){if(s.length!==e.length)return{valid:!1};const a=[];for(let n=0;n{if(Ce(n)||Ce(i))return m;const o=_e(n.value,i.value);return o.valid?((Oe(n)||Oe(i))&&t.dirty(),{status:t.value,value:o.data}):(c(r,{code:d.invalid_intersection_types}),m)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([n,i])=>a(n,i)):a(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}te.create=(s,e,t)=>new te({left:s,right:e,typeName:_.ZodIntersection,...g(t)});class z extends y{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.array)return c(r,{code:d.invalid_type,expected:u.array,received:r.parsedType}),m;if(r.data.lengththis._def.items.length&&(c(r,{code:d.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const n=[...r.data].map((i,o)=>{const f=this._def.items[o]||this._def.rest;return f?f._parse(new E(r,i,r.path,o)):null}).filter(i=>!!i);return r.common.async?Promise.all(n).then(i=>C.mergeArray(t,i)):C.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new z({...this._def,rest:e})}}z.create=(s,e)=>{if(!Array.isArray(s))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new z({items:s,typeName:_.ZodTuple,rest:null,...g(e)})};class se extends y{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.object)return c(r,{code:d.invalid_type,expected:u.object,received:r.parsedType}),m;const a=[],n=this._def.keyType,i=this._def.valueType;for(const o in r.data)a.push({key:n._parse(new E(r,o,r.path,o)),value:i._parse(new E(r,r.data[o],r.path,o)),alwaysSet:o in r.data});return r.common.async?C.mergeObjectAsync(t,a):C.mergeObjectSync(t,a)}get element(){return this._def.valueType}static create(e,t,r){return t instanceof y?new se({keyType:e,valueType:t,typeName:_.ZodRecord,...g(r)}):new se({keyType:R.create(),valueType:e,typeName:_.ZodRecord,...g(t)})}}class Re extends y{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.map)return c(r,{code:d.invalid_type,expected:u.map,received:r.parsedType}),m;const a=this._def.keyType,n=this._def.valueType,i=[...r.data.entries()].map(([o,f],p)=>({key:a._parse(new E(r,o,r.path,[p,"key"])),value:n._parse(new E(r,f,r.path,[p,"value"]))}));if(r.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const f of i){const p=await f.key,x=await f.value;if(p.status==="aborted"||x.status==="aborted")return m;(p.status==="dirty"||x.status==="dirty")&&t.dirty(),o.set(p.value,x.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const f of i){const p=f.key,x=f.value;if(p.status==="aborted"||x.status==="aborted")return m;(p.status==="dirty"||x.status==="dirty")&&t.dirty(),o.set(p.value,x.value)}return{status:t.value,value:o}}}}Re.create=(s,e,t)=>new Re({valueType:e,keyType:s,typeName:_.ZodMap,...g(t)});class H extends y{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.set)return c(r,{code:d.invalid_type,expected:u.set,received:r.parsedType}),m;const a=this._def;a.minSize!==null&&r.data.sizea.maxSize.value&&(c(r,{code:d.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),t.dirty());const n=this._def.valueType;function i(f){const p=new Set;for(const x of f){if(x.status==="aborted")return m;x.status==="dirty"&&t.dirty(),p.add(x.value)}return{status:t.value,value:p}}const o=[...r.data.values()].map((f,p)=>n._parse(new E(r,f,r.path,p)));return r.common.async?Promise.all(o).then(f=>i(f)):i(o)}min(e,t){return new H({...this._def,minSize:{value:e,message:h.toString(t)}})}max(e,t){return new H({...this._def,maxSize:{value:e,message:h.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}H.create=(s,e)=>new H({valueType:s,minSize:null,maxSize:null,typeName:_.ZodSet,...g(e)});class ge extends y{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}ge.create=(s,e)=>new ge({getter:s,typeName:_.ZodLazy,...g(e)});class re extends y{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return c(t,{received:t.data,code:d.invalid_literal,expected:this._def.value}),m}return{status:"valid",value:e.data}}get value(){return this._def.value}}re.create=(s,e)=>new re({value:s,typeName:_.ZodLiteral,...g(e)});function Me(s,e){return new V({values:s,typeName:_.ZodEnum,...g(e)})}class V extends y{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),r=this._def.values;return c(t,{expected:v.joinValues(r),received:t.parsedType,code:d.invalid_type}),m}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),r=this._def.values;return c(t,{received:t.data,code:d.invalid_enum_value,options:r}),m}return O(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return V.create(e,{...this._def,...t})}exclude(e,t=this._def){return V.create(this.options.filter(r=>!e.includes(r)),{...this._def,...t})}}V.create=Me;class ye extends y{_parse(e){const t=v.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==u.string&&r.parsedType!==u.number){const a=v.objectValues(t);return c(r,{expected:v.joinValues(a),received:r.parsedType,code:d.invalid_type}),m}if(this._cache||(this._cache=new Set(v.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const a=v.objectValues(t);return c(r,{received:r.data,code:d.invalid_enum_value,options:a}),m}return O(e.data)}get enum(){return this._def.values}}ye.create=(s,e)=>new ye({values:s,typeName:_.ZodNativeEnum,...g(e)});class ae extends y{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.promise&&t.common.async===!1)return c(t,{code:d.invalid_type,expected:u.promise,received:t.parsedType}),m;const r=t.parsedType===u.promise?t.data:Promise.resolve(t.data);return O(r.then(a=>this._def.type.parseAsync(a,{path:t.path,errorMap:t.common.contextualErrorMap})))}}ae.create=(s,e)=>new ae({type:s,typeName:_.ZodPromise,...g(e)});class L extends y{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===_.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:r}=this._processInputParams(e),a=this._def.effect||null,n={addIssue:i=>{c(r,i),i.fatal?t.abort():t.dirty()},get path(){return r.path}};if(n.addIssue=n.addIssue.bind(n),a.type==="preprocess"){const i=a.transform(r.data,n);if(r.common.async)return Promise.resolve(i).then(async o=>{if(t.value==="aborted")return m;const f=await this._def.schema._parseAsync({data:o,path:r.path,parent:r});return f.status==="aborted"?m:f.status==="dirty"||t.value==="dirty"?J(f.value):f});{if(t.value==="aborted")return m;const o=this._def.schema._parseSync({data:i,path:r.path,parent:r});return o.status==="aborted"?m:o.status==="dirty"||t.value==="dirty"?J(o.value):o}}if(a.type==="refinement"){const i=o=>{const f=a.refinement(o,n);if(r.common.async)return Promise.resolve(f);if(f instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?m:(o.status==="dirty"&&t.dirty(),i(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>o.status==="aborted"?m:(o.status==="dirty"&&t.dirty(),i(o.value).then(()=>({status:t.value,value:o.value}))))}if(a.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!B(i))return m;const o=a.transform(i.value,n);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>B(i)?Promise.resolve(a.transform(i.value,n)).then(o=>({status:t.value,value:o})):m);v.assertNever(a)}}L.create=(s,e,t)=>new L({schema:s,typeName:_.ZodEffects,effect:e,...g(t)});L.createWithPreprocess=(s,e,t)=>new L({schema:e,effect:{type:"preprocess",transform:s},typeName:_.ZodEffects,...g(t)});class j extends y{_parse(e){return this._getType(e)===u.undefined?O(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}j.create=(s,e)=>new j({innerType:s,typeName:_.ZodOptional,...g(e)});class D extends y{_parse(e){return this._getType(e)===u.null?O(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}D.create=(s,e)=>new D({innerType:s,typeName:_.ZodNullable,...g(e)});class ne extends y{_parse(e){const{ctx:t}=this._processInputParams(e);let r=t.data;return t.parsedType===u.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}ne.create=(s,e)=>new ne({innerType:s,typeName:_.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...g(e)});class ie extends y{_parse(e){const{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},a=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return X(a)?a.then(n=>({status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new I(r.common.issues)},input:r.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new I(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}ie.create=(s,e)=>new ie({innerType:s,typeName:_.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...g(e)});class je extends y{_parse(e){if(this._getType(e)!==u.nan){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.nan,received:r.parsedType}),m}return{status:"valid",value:e.data}}}je.create=s=>new je({typeName:_.ZodNaN,...g(s)});class ze extends y{_parse(e){const{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class be extends y{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const n=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return n.status==="aborted"?m:n.status==="dirty"?(t.dirty(),J(n.value)):this._def.out._parseAsync({data:n.value,path:r.path,parent:r})})();{const a=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?m:a.status==="dirty"?(t.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:r.path,parent:r})}}static create(e,t){return new be({in:e,out:t,typeName:_.ZodPipeline})}}class oe extends y{_parse(e){const t=this._def.innerType._parse(e),r=a=>(B(a)&&(a.value=Object.freeze(a.value)),a);return X(t)?t.then(a=>r(a)):r(t)}unwrap(){return this._def.innerType}}oe.create=(s,e)=>new oe({innerType:s,typeName:_.ZodReadonly,...g(e)});var _;(function(s){s.ZodString="ZodString",s.ZodNumber="ZodNumber",s.ZodNaN="ZodNaN",s.ZodBigInt="ZodBigInt",s.ZodBoolean="ZodBoolean",s.ZodDate="ZodDate",s.ZodSymbol="ZodSymbol",s.ZodUndefined="ZodUndefined",s.ZodNull="ZodNull",s.ZodAny="ZodAny",s.ZodUnknown="ZodUnknown",s.ZodNever="ZodNever",s.ZodVoid="ZodVoid",s.ZodArray="ZodArray",s.ZodObject="ZodObject",s.ZodUnion="ZodUnion",s.ZodDiscriminatedUnion="ZodDiscriminatedUnion",s.ZodIntersection="ZodIntersection",s.ZodTuple="ZodTuple",s.ZodRecord="ZodRecord",s.ZodMap="ZodMap",s.ZodSet="ZodSet",s.ZodFunction="ZodFunction",s.ZodLazy="ZodLazy",s.ZodLiteral="ZodLiteral",s.ZodEnum="ZodEnum",s.ZodEffects="ZodEffects",s.ZodNativeEnum="ZodNativeEnum",s.ZodOptional="ZodOptional",s.ZodNullable="ZodNullable",s.ZodDefault="ZodDefault",s.ZodCatch="ZodCatch",s.ZodPromise="ZodPromise",s.ZodBranded="ZodBranded",s.ZodPipeline="ZodPipeline",s.ZodReadonly="ZodReadonly"})(_||(_={}));const l=R.create,b=q.create,de=he.create,gt=me.create;P.create;const T=N.create,k=w.create,Ve=ee.create,Le=ke.create;te.create;z.create;const De=se.create,Q=re.create,ve=V.create;ae.create;j.create;D.create;const A=De(gt()),we=k({id:b(),name:l(),slug:l().optional()}).passthrough(),ce=k({url:l(),is_official:de()}),xe=k({task_id:b(),dataset_id:b(),model_name:l().nullish(),harness:l().nullish(),methodology:l().nullish(),metrics:De(Ve([l(),b()])),uses_additional_data:de().optional(),is_open:de().optional(),best_rank:b().nullish(),best_metric:l().nullish(),evaluated_on:l().nullish(),external_source_url:l().nullish(),num_parameters:b().nullish(),hf_model_url:l().nullish()}).passthrough(),yt=xe.partial().extend({id:b().optional()}),vt=Le("op",[k({op:Q("create"),data:xe}),k({op:Q("update"),evaluation_id:b(),data:xe}),k({op:Q("delete"),evaluation_id:b()})]),Ie=k({hf_models:T(l()),hf_datasets:T(l()),hf_spaces:T(l())}),Te=k({file_name:l(),mime_type:l(),data_url:l().optional(),url:l().optional()}),F=k({name:l(),description:l().optional()}),xt=F.extend({image:Te.optional(),image_credit:l().optional(),parent_id:b().optional(),area_id:b().optional(),keywords:l().optional()}),kt=F.extend({image:Te.optional(),image_credit:l().optional(),source_paper_id:b().optional(),source_url:l().optional(),source_title:l().optional()}),bt=Ve([k({benchmark:l(),task:l(),description:l()}),F.extend({description:l(),task_ids:T(b()),full_name:l().optional(),url:l().optional(),hf_url:l().optional(),paper_url:l().optional(),license_name:l().optional(),license_url:l().optional()})]),wt=F.extend({description:l(),direction:ve(["higher_is_better","lower_is_better"]),full_name:l().optional(),scale:l().optional(),task_id:b(),dataset_id:b()}),Tt=F.extend({short_name:l().optional(),venue:l().optional(),location:l().optional(),url:l(),year:b(),start_date:l().optional(),end_date:l().optional()}),St=F.extend({hf_slug:l().optional(),website_url:l().optional(),image:Te.optional()}),Ct=k({id:b(),paper_id:b().nullable(),hf_username:l(),hf_subject:l().nullish(),is_author:de(),status:ve(["pending","approved","rejected"]),applied_payload:A.nullish(),conflict_payload:A.nullish(),result_entity_type:l().nullish(),result_entity_id:l().nullish(),admin_note:l().nullish(),user_review_reason:l().nullish(),reviewed_by:l().nullish(),reviewed_by_kind:ve(["human","codex","auto"]).nullish(),catalog_event_id:l().nullish(),review_evidence:A.nullish(),created_at:l(),updated_at:l(),reviewed_at:l().nullish()});function S(s,e,t){return Ct.extend({edit_type:Q(s),proposed_payload:e,current_payload:t.nullish()})}const Ot=S("tasks",k({task_ids:T(b())}),k({tasks:T(we)})),Nt=S("methods",k({method_ids:T(b())}),k({methods:T(we)})),At=S("evaluations",k({operations:T(vt)}),k({evaluations:T(yt)})),Et=S("repositories",k({repositories:T(ce)}),k({repositories:T(ce)})),Zt=S("project_pages",k({project_pages:T(ce)}),k({project_pages:T(ce)})),Rt=S("source_url",k({source_url:l()}),k({source_url:l().nullish()})),jt=S("hf_artifacts",Ie,Ie),It=S("x_threads",k({x_threads:T(l())}),k({x_threads:T(k({url:l()}))})),$t=S("organizations",k({organization_ids:T(b())}),k({organizations:T(we)})),Pt=S("new_task",xt,A),Mt=S("new_method",kt,A),zt=S("new_benchmark",bt,A),Vt=S("new_metric",wt,A),Lt=S("new_conference",Tt,A),Dt=S("new_organization",St,A),Ut=S("new_external_paper",k({title:l().optional(),source_url:l(),authors:T(l()),date_published:l().optional(),abstract:l().optional()}),A),Ue=Le("edit_type",[Ot,Nt,At,Et,Zt,Rt,jt,It,$t,Pt,Mt,zt,Vt,Lt,Dt,Ut]);function Yt(s,e,t){return{paper_id:s,edit_type:e,proposed_payload:t}}const M=(s,e)=>({directory:{title:s,subtitle:e}}),Ht={tasks:{label:"tasks",administrative:!1},methods:{label:"methods",administrative:!1},evaluations:{label:"evaluations",administrative:!1},repositories:{label:"repositories",administrative:!1},project_pages:{label:"project pages",administrative:!1},source_url:{label:"source url",administrative:!1},x_threads:{label:"x threads",administrative:!1},hf_artifacts:{label:"hf artifacts",administrative:!1},organizations:{label:"organizations",administrative:!1},new_task:{label:"new task",administrative:!0,...M("New task","Task suggestion")},new_method:{label:"new method",administrative:!0,...M("New method","Method suggestion")},new_benchmark:{label:"new benchmark",administrative:!0,...M("New benchmark","Benchmark suggestion")},new_metric:{label:"new metric",administrative:!0,...M("New metric","Metric suggestion")},new_conference:{label:"new conference",administrative:!0,...M("New conference","Conference suggestion")},new_organization:{label:"new organization",administrative:!1,...M("New organization","Organization suggestion")},new_external_paper:{label:"external paper",administrative:!1,...M("External paper","External paper submission")}},Bt=k({count:b(),results:T(Ue)});class qt extends Error{constructor(e){super(`Malformed pending-edit payload: ${e}`),this.name="PendingEditPayloadError"}}function Be(s,e){const t=s.safeParse(e);if(t.success)return t.data;const r=t.error.issues[0];throw new qt(`${(r==null?void 0:r.path.join("."))||"response"}: ${(r==null?void 0:r.message)||"invalid value"}`)}const G=s=>Be(Ue,s),Ft=s=>Be(Bt,s);class Wt{constructor(e){this.request=e}async submit(e){return G(await this.request("/me/paper-edits",{method:"POST",body:JSON.stringify(e)}))}list(e){const t=new URLSearchParams;for(const[a,n]of Object.entries(e??{}))n!==void 0&&t.set(a,String(n));const r=t.toString();return this.request(`/admin/paper-edits${r?`?${r}`:""}`).then(Ft)}revertAutoApproved(e,t={}){return this.request(`/admin/submitters/${encodeURIComponent(e)}/revert-auto-approved`,{method:"POST",body:JSON.stringify(t)})}async get(e){return G(await this.request(`/admin/paper-edits/${e}`))}async approve(e,t={}){return G(await this.request(`/admin/paper-edits/${e}/approve`,{method:"POST",body:JSON.stringify(t)}))}async reject(e,t={}){return G(await this.request(`/admin/paper-edits/${e}/reject`,{method:"POST",body:JSON.stringify(t)}))}}const Gt=new Wt(Fe);export{Ht as E,Yt as p,Gt as s}; +import{ac as Fe}from"./index-BeSw2DVP.js";var v;(function(s){s.assertEqual=a=>{};function e(a){}s.assertIs=e;function t(a){throw new Error}s.assertNever=t,s.arrayToEnum=a=>{const n={};for(const i of a)n[i]=i;return n},s.getValidEnumValues=a=>{const n=s.objectKeys(a).filter(o=>typeof a[a[o]]!="number"),i={};for(const o of n)i[o]=a[o];return s.objectValues(i)},s.objectValues=a=>s.objectKeys(a).map(function(n){return a[n]}),s.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const n=[];for(const i in a)Object.prototype.hasOwnProperty.call(a,i)&&n.push(i);return n},s.find=(a,n)=>{for(const i of a)if(n(i))return i},s.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function r(a,n=" | "){return a.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}s.joinValues=r,s.jsonStringifyReplacer=(a,n)=>typeof n=="bigint"?n.toString():n})(v||(v={}));var Se;(function(s){s.mergeShapes=(e,t)=>({...e,...t})})(Se||(Se={}));const u=v.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),$=s=>{switch(typeof s){case"undefined":return u.undefined;case"string":return u.string;case"number":return Number.isNaN(s)?u.nan:u.number;case"boolean":return u.boolean;case"function":return u.function;case"bigint":return u.bigint;case"symbol":return u.symbol;case"object":return Array.isArray(s)?u.array:s===null?u.null:s.then&&typeof s.then=="function"&&s.catch&&typeof s.catch=="function"?u.promise:typeof Map<"u"&&s instanceof Map?u.map:typeof Set<"u"&&s instanceof Set?u.set:typeof Date<"u"&&s instanceof Date?u.date:u.object;default:return u.unknown}},d=v.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class I extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(n){return n.message},r={_errors:[]},a=n=>{for(const i of n.issues)if(i.code==="invalid_union")i.unionErrors.map(a);else if(i.code==="invalid_return_type")a(i.returnTypeError);else if(i.code==="invalid_arguments")a(i.argumentsError);else if(i.path.length===0)r._errors.push(t(i));else{let o=r,f=0;for(;ft.message){const t={},r=[];for(const a of this.issues)if(a.path.length>0){const n=a.path[0];t[n]=t[n]||[],t[n].push(e(a))}else r.push(e(a));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}I.create=s=>new I(s);const le=(s,e)=>{let t;switch(s.code){case d.invalid_type:s.received===u.undefined?t="Required":t=`Expected ${s.expected}, received ${s.received}`;break;case d.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(s.expected,v.jsonStringifyReplacer)}`;break;case d.unrecognized_keys:t=`Unrecognized key(s) in object: ${v.joinValues(s.keys,", ")}`;break;case d.invalid_union:t="Invalid input";break;case d.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${v.joinValues(s.options)}`;break;case d.invalid_enum_value:t=`Invalid enum value. Expected ${v.joinValues(s.options)}, received '${s.received}'`;break;case d.invalid_arguments:t="Invalid function arguments";break;case d.invalid_return_type:t="Invalid function return type";break;case d.invalid_date:t="Invalid date";break;case d.invalid_string:typeof s.validation=="object"?"includes"in s.validation?(t=`Invalid input: must include "${s.validation.includes}"`,typeof s.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${s.validation.position}`)):"startsWith"in s.validation?t=`Invalid input: must start with "${s.validation.startsWith}"`:"endsWith"in s.validation?t=`Invalid input: must end with "${s.validation.endsWith}"`:v.assertNever(s.validation):s.validation!=="regex"?t=`Invalid ${s.validation}`:t="Invalid";break;case d.too_small:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at least":"more than"} ${s.minimum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at least":"over"} ${s.minimum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="bigint"?t=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(s.minimum))}`:t="Invalid input";break;case d.too_big:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at most":"less than"} ${s.maximum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at most":"under"} ${s.maximum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="bigint"?t=`BigInt must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly":s.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(s.maximum))}`:t="Invalid input";break;case d.custom:t="Invalid input";break;case d.invalid_intersection_types:t="Intersection results could not be merged";break;case d.not_multiple_of:t=`Number must be a multiple of ${s.multipleOf}`;break;case d.not_finite:t="Number must be finite";break;default:t=e.defaultError,v.assertNever(s)}return{message:t}};let We=le;function Je(){return We}const Ye=s=>{const{data:e,path:t,errorMaps:r,issueData:a}=s,n=[...t,...a.path||[]],i={...a,path:n};if(a.message!==void 0)return{...a,path:n,message:a.message};let o="";const f=r.filter(p=>!!p).slice().reverse();for(const p of f)o=p(i,{data:e,defaultError:o}).message;return{...a,path:n,message:o}};function c(s,e){const t=Je(),r=Ye({issueData:e,data:s.data,path:s.path,errorMaps:[s.common.contextualErrorMap,s.schemaErrorMap,t,t===le?void 0:le].filter(a=>!!a)});s.common.issues.push(r)}class C{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const r=[];for(const a of t){if(a.status==="aborted")return m;a.status==="dirty"&&e.dirty(),r.push(a.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){const r=[];for(const a of t){const n=await a.key,i=await a.value;r.push({key:n,value:i})}return C.mergeObjectSync(e,r)}static mergeObjectSync(e,t){const r={};for(const a of t){const{key:n,value:i}=a;if(n.status==="aborted"||i.status==="aborted")return m;n.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),n.value!=="__proto__"&&(typeof i.value<"u"||a.alwaysSet)&&(r[n.value]=i.value)}return{status:e.value,value:r}}}const m=Object.freeze({status:"aborted"}),J=s=>({status:"dirty",value:s}),O=s=>({status:"valid",value:s}),Ce=s=>s.status==="aborted",Oe=s=>s.status==="dirty",B=s=>s.status==="valid",X=s=>typeof Promise<"u"&&s instanceof Promise;var h;(function(s){s.errToObj=e=>typeof e=="string"?{message:e}:e||{},s.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(h||(h={}));class E{constructor(e,t,r,a){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=a}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Ne=(s,e)=>{if(B(e))return{success:!0,data:e.value};if(!s.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new I(s.common.issues);return this._error=t,this._error}}};function g(s){if(!s)return{};const{errorMap:e,invalid_type_error:t,required_error:r,description:a}=s;if(e&&(t||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:a}:{errorMap:(i,o)=>{const{message:f}=s;return i.code==="invalid_enum_value"?{message:f??o.defaultError}:typeof o.data>"u"?{message:f??r??o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:f??t??o.defaultError}},description:a}}class y{get description(){return this._def.description}_getType(e){return $(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:$(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new C,ctx:{common:e.parent.common,data:e.data,parsedType:$(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(X(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){const r={common:{issues:[],async:(t==null?void 0:t.async)??!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:$(e)},a=this._parseSync({data:e,path:r.path,parent:r});return Ne(r,a)}"~validate"(e){var r,a;const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:$(e)};if(!this["~standard"].async)try{const n=this._parseSync({data:e,path:[],parent:t});return B(n)?{value:n.value}:{issues:t.common.issues}}catch(n){(a=(r=n==null?void 0:n.message)==null?void 0:r.toLowerCase())!=null&&a.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(n=>B(n)?{value:n.value}:{issues:t.common.issues})}async parseAsync(e,t){const r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){const r={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:$(e)},a=this._parse({data:e,path:r.path,parent:r}),n=await(X(a)?a:Promise.resolve(a));return Ne(r,n)}refine(e,t){const r=a=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(a):t;return this._refinement((a,n)=>{const i=e(a),o=()=>n.addIssue({code:d.custom,...r(a)});return typeof Promise<"u"&&i instanceof Promise?i.then(f=>f?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,t){return this._refinement((r,a)=>e(r)?!0:(a.addIssue(typeof t=="function"?t(r,a):t),!1))}_refinement(e){return new L({schema:this,typeName:_.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return j.create(this,this._def)}nullable(){return D.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return N.create(this)}promise(){return ae.create(this,this._def)}or(e){return ee.create([this,e],this._def)}and(e){return te.create(this,e,this._def)}transform(e){return new L({...g(this._def),schema:this,typeName:_.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new ne({...g(this._def),innerType:this,defaultValue:t,typeName:_.ZodDefault})}brand(){return new ze({typeName:_.ZodBranded,type:this,...g(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new ie({...g(this._def),innerType:this,catchValue:t,typeName:_.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return be.create(this,e)}readonly(){return oe.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const He=/^c[^\s-]{8,}$/i,Ge=/^[0-9a-z]+$/,Qe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Xe=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Ke=/^[a-z0-9_-]{21}$/i,et=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,tt=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,st=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,rt="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let ue;const at=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,nt=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,it=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,ot=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,dt=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ct=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,$e="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",ut=new RegExp(`^${$e}$`);function Pe(s){let e="[0-5]\\d";s.precision?e=`${e}\\.\\d{${s.precision}}`:s.precision==null&&(e=`${e}(\\.\\d+)?`);const t=s.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function lt(s){return new RegExp(`^${Pe(s)}$`)}function ht(s){let e=`${$e}T${Pe(s)}`;const t=[];return t.push(s.local?"Z?":"Z"),s.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function ft(s,e){return!!((e==="v4"||!e)&&at.test(s)||(e==="v6"||!e)&&it.test(s))}function pt(s,e){if(!et.test(s))return!1;try{const[t]=s.split(".");if(!t)return!1;const r=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),a=JSON.parse(atob(r));return!(typeof a!="object"||a===null||"typ"in a&&(a==null?void 0:a.typ)!=="JWT"||!a.alg||e&&a.alg!==e)}catch{return!1}}function mt(s,e){return!!((e==="v4"||!e)&&nt.test(s)||(e==="v6"||!e)&&ot.test(s))}class R extends y{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==u.string){const n=this._getOrReturnCtx(e);return c(n,{code:d.invalid_type,expected:u.string,received:n.parsedType}),m}const r=new C;let a;for(const n of this._def.checks)if(n.kind==="min")e.data.lengthn.value&&(a=this._getOrReturnCtx(e,a),c(a,{code:d.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),r.dirty());else if(n.kind==="length"){const i=e.data.length>n.value,o=e.data.lengthe.test(a),{validation:t,code:d.invalid_string,...h.errToObj(r)})}_addCheck(e){return new R({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...h.errToObj(e)})}url(e){return this._addCheck({kind:"url",...h.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...h.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...h.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...h.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...h.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...h.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...h.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...h.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...h.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...h.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...h.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...h.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...h.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...h.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...h.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...h.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...h.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...h.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...h.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...h.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...h.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...h.errToObj(t)})}nonempty(e){return this.min(1,h.errToObj(e))}trim(){return new R({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new R({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new R({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew R({checks:[],typeName:_.ZodString,coerce:(s==null?void 0:s.coerce)??!1,...g(s)});function _t(s,e){const t=(s.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,a=t>r?t:r,n=Number.parseInt(s.toFixed(a).replace(".","")),i=Number.parseInt(e.toFixed(a).replace(".",""));return n%i/10**a}class q extends y{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==u.number){const n=this._getOrReturnCtx(e);return c(n,{code:d.invalid_type,expected:u.number,received:n.parsedType}),m}let r;const a=new C;for(const n of this._def.checks)n.kind==="int"?v.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),c(r,{code:d.invalid_type,expected:"integer",received:"float",message:n.message}),a.dirty()):n.kind==="min"?(n.inclusive?e.datan.value:e.data>=n.value)&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty()):n.kind==="multipleOf"?_t(e.data,n.value)!==0&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):n.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),c(r,{code:d.not_finite,message:n.message}),a.dirty()):v.assertNever(n);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,r,a){return new q({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:h.toString(a)}]})}_addCheck(e){return new q({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:h.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:h.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:h.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:h.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuee.kind==="int"||e.kind==="multipleOf"&&v.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(t===null||r.value>t)&&(t=r.value):r.kind==="max"&&(e===null||r.valuenew q({checks:[],typeName:_.ZodNumber,coerce:(s==null?void 0:s.coerce)||!1,...g(s)});class Y extends y{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==u.bigint)return this._getInvalidInput(e);let r;const a=new C;for(const n of this._def.checks)n.kind==="min"?(n.inclusive?e.datan.value:e.data>=n.value)&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty()):n.kind==="multipleOf"?e.data%n.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):v.assertNever(n);return{status:a.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return c(t,{code:d.invalid_type,expected:u.bigint,received:t.parsedType}),m}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,r,a){return new Y({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:h.toString(a)}]})}_addCheck(e){return new Y({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew Y({checks:[],typeName:_.ZodBigInt,coerce:(s==null?void 0:s.coerce)??!1,...g(s)});class he extends y{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==u.boolean){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.boolean,received:r.parsedType}),m}return O(e.data)}}he.create=s=>new he({typeName:_.ZodBoolean,coerce:(s==null?void 0:s.coerce)||!1,...g(s)});class K extends y{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==u.date){const n=this._getOrReturnCtx(e);return c(n,{code:d.invalid_type,expected:u.date,received:n.parsedType}),m}if(Number.isNaN(e.data.getTime())){const n=this._getOrReturnCtx(e);return c(n,{code:d.invalid_date}),m}const r=new C;let a;for(const n of this._def.checks)n.kind==="min"?e.data.getTime()n.value&&(a=this._getOrReturnCtx(e,a),c(a,{code:d.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),r.dirty()):v.assertNever(n);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new K({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:h.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:h.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew K({checks:[],coerce:(s==null?void 0:s.coerce)||!1,typeName:_.ZodDate,...g(s)});class Ae extends y{_parse(e){if(this._getType(e)!==u.symbol){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.symbol,received:r.parsedType}),m}return O(e.data)}}Ae.create=s=>new Ae({typeName:_.ZodSymbol,...g(s)});class fe extends y{_parse(e){if(this._getType(e)!==u.undefined){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.undefined,received:r.parsedType}),m}return O(e.data)}}fe.create=s=>new fe({typeName:_.ZodUndefined,...g(s)});class pe extends y{_parse(e){if(this._getType(e)!==u.null){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.null,received:r.parsedType}),m}return O(e.data)}}pe.create=s=>new pe({typeName:_.ZodNull,...g(s)});class Ee extends y{constructor(){super(...arguments),this._any=!0}_parse(e){return O(e.data)}}Ee.create=s=>new Ee({typeName:_.ZodAny,...g(s)});class me extends y{constructor(){super(...arguments),this._unknown=!0}_parse(e){return O(e.data)}}me.create=s=>new me({typeName:_.ZodUnknown,...g(s)});class P extends y{_parse(e){const t=this._getOrReturnCtx(e);return c(t,{code:d.invalid_type,expected:u.never,received:t.parsedType}),m}}P.create=s=>new P({typeName:_.ZodNever,...g(s)});class Ze extends y{_parse(e){if(this._getType(e)!==u.undefined){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.void,received:r.parsedType}),m}return O(e.data)}}Ze.create=s=>new Ze({typeName:_.ZodVoid,...g(s)});class N extends y{_parse(e){const{ctx:t,status:r}=this._processInputParams(e),a=this._def;if(t.parsedType!==u.array)return c(t,{code:d.invalid_type,expected:u.array,received:t.parsedType}),m;if(a.exactLength!==null){const i=t.data.length>a.exactLength.value,o=t.data.lengtha.maxLength.value&&(c(t,{code:d.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((i,o)=>a.type._parseAsync(new E(t,i,t.path,o)))).then(i=>C.mergeArray(r,i));const n=[...t.data].map((i,o)=>a.type._parseSync(new E(t,i,t.path,o)));return C.mergeArray(r,n)}get element(){return this._def.type}min(e,t){return new N({...this._def,minLength:{value:e,message:h.toString(t)}})}max(e,t){return new N({...this._def,maxLength:{value:e,message:h.toString(t)}})}length(e,t){return new N({...this._def,exactLength:{value:e,message:h.toString(t)}})}nonempty(e){return this.min(1,e)}}N.create=(s,e)=>new N({type:s,minLength:null,maxLength:null,exactLength:null,typeName:_.ZodArray,...g(e)});function U(s){if(s instanceof w){const e={};for(const t in s.shape){const r=s.shape[t];e[t]=j.create(U(r))}return new w({...s._def,shape:()=>e})}else return s instanceof N?new N({...s._def,type:U(s.element)}):s instanceof j?j.create(U(s.unwrap())):s instanceof D?D.create(U(s.unwrap())):s instanceof z?z.create(s.items.map(e=>U(e))):s}class w extends y{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=v.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==u.object){const p=this._getOrReturnCtx(e);return c(p,{code:d.invalid_type,expected:u.object,received:p.parsedType}),m}const{status:r,ctx:a}=this._processInputParams(e),{shape:n,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof P&&this._def.unknownKeys==="strip"))for(const p in a.data)i.includes(p)||o.push(p);const f=[];for(const p of i){const x=n[p],W=a.data[p];f.push({key:{status:"valid",value:p},value:x._parse(new E(a,W,a.path,p)),alwaysSet:p in a.data})}if(this._def.catchall instanceof P){const p=this._def.unknownKeys;if(p==="passthrough")for(const x of o)f.push({key:{status:"valid",value:x},value:{status:"valid",value:a.data[x]}});else if(p==="strict")o.length>0&&(c(a,{code:d.unrecognized_keys,keys:o}),r.dirty());else if(p!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const p=this._def.catchall;for(const x of o){const W=a.data[x];f.push({key:{status:"valid",value:x},value:p._parse(new E(a,W,a.path,x)),alwaysSet:x in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const p=[];for(const x of f){const W=await x.key,qe=await x.value;p.push({key:W,value:qe,alwaysSet:x.alwaysSet})}return p}).then(p=>C.mergeObjectSync(r,p)):C.mergeObjectSync(r,f)}get shape(){return this._def.shape()}strict(e){return h.errToObj,new w({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,r)=>{var n,i;const a=((i=(n=this._def).errorMap)==null?void 0:i.call(n,t,r).message)??r.defaultError;return t.code==="unrecognized_keys"?{message:h.errToObj(e).message??a}:{message:a}}}:{}})}strip(){return new w({...this._def,unknownKeys:"strip"})}passthrough(){return new w({...this._def,unknownKeys:"passthrough"})}extend(e){return new w({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new w({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:_.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new w({...this._def,catchall:e})}pick(e){const t={};for(const r of v.objectKeys(e))e[r]&&this.shape[r]&&(t[r]=this.shape[r]);return new w({...this._def,shape:()=>t})}omit(e){const t={};for(const r of v.objectKeys(this.shape))e[r]||(t[r]=this.shape[r]);return new w({...this._def,shape:()=>t})}deepPartial(){return U(this)}partial(e){const t={};for(const r of v.objectKeys(this.shape)){const a=this.shape[r];e&&!e[r]?t[r]=a:t[r]=a.optional()}return new w({...this._def,shape:()=>t})}required(e){const t={};for(const r of v.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let n=this.shape[r];for(;n instanceof j;)n=n._def.innerType;t[r]=n}return new w({...this._def,shape:()=>t})}keyof(){return Me(v.objectKeys(this.shape))}}w.create=(s,e)=>new w({shape:()=>s,unknownKeys:"strip",catchall:P.create(),typeName:_.ZodObject,...g(e)});w.strictCreate=(s,e)=>new w({shape:()=>s,unknownKeys:"strict",catchall:P.create(),typeName:_.ZodObject,...g(e)});w.lazycreate=(s,e)=>new w({shape:s,unknownKeys:"strip",catchall:P.create(),typeName:_.ZodObject,...g(e)});class ee extends y{_parse(e){const{ctx:t}=this._processInputParams(e),r=this._def.options;function a(n){for(const o of n)if(o.result.status==="valid")return o.result;for(const o of n)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const i=n.map(o=>new I(o.ctx.common.issues));return c(t,{code:d.invalid_union,unionErrors:i}),m}if(t.common.async)return Promise.all(r.map(async n=>{const i={...t,common:{...t.common,issues:[]},parent:null};return{result:await n._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(a);{let n;const i=[];for(const f of r){const p={...t,common:{...t.common,issues:[]},parent:null},x=f._parseSync({data:t.data,path:t.path,parent:p});if(x.status==="valid")return x;x.status==="dirty"&&!n&&(n={result:x,ctx:p}),p.common.issues.length&&i.push(p.common.issues)}if(n)return t.common.issues.push(...n.ctx.common.issues),n.result;const o=i.map(f=>new I(f));return c(t,{code:d.invalid_union,unionErrors:o}),m}}get options(){return this._def.options}}ee.create=(s,e)=>new ee({options:s,typeName:_.ZodUnion,...g(e)});const Z=s=>s instanceof ge?Z(s.schema):s instanceof L?Z(s.innerType()):s instanceof re?[s.value]:s instanceof V?s.options:s instanceof ye?v.objectValues(s.enum):s instanceof ne?Z(s._def.innerType):s instanceof fe?[void 0]:s instanceof pe?[null]:s instanceof j?[void 0,...Z(s.unwrap())]:s instanceof D?[null,...Z(s.unwrap())]:s instanceof ze||s instanceof oe?Z(s.unwrap()):s instanceof ie?Z(s._def.innerType):[];class ke extends y{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.object)return c(t,{code:d.invalid_type,expected:u.object,received:t.parsedType}),m;const r=this.discriminator,a=t.data[r],n=this.optionsMap.get(a);return n?t.common.async?n._parseAsync({data:t.data,path:t.path,parent:t}):n._parseSync({data:t.data,path:t.path,parent:t}):(c(t,{code:d.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),m)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){const a=new Map;for(const n of t){const i=Z(n.shape[e]);if(!i.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const o of i){if(a.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);a.set(o,n)}}return new ke({typeName:_.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:a,...g(r)})}}function _e(s,e){const t=$(s),r=$(e);if(s===e)return{valid:!0,data:s};if(t===u.object&&r===u.object){const a=v.objectKeys(e),n=v.objectKeys(s).filter(o=>a.indexOf(o)!==-1),i={...s,...e};for(const o of n){const f=_e(s[o],e[o]);if(!f.valid)return{valid:!1};i[o]=f.data}return{valid:!0,data:i}}else if(t===u.array&&r===u.array){if(s.length!==e.length)return{valid:!1};const a=[];for(let n=0;n{if(Ce(n)||Ce(i))return m;const o=_e(n.value,i.value);return o.valid?((Oe(n)||Oe(i))&&t.dirty(),{status:t.value,value:o.data}):(c(r,{code:d.invalid_intersection_types}),m)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([n,i])=>a(n,i)):a(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}te.create=(s,e,t)=>new te({left:s,right:e,typeName:_.ZodIntersection,...g(t)});class z extends y{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.array)return c(r,{code:d.invalid_type,expected:u.array,received:r.parsedType}),m;if(r.data.lengththis._def.items.length&&(c(r,{code:d.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const n=[...r.data].map((i,o)=>{const f=this._def.items[o]||this._def.rest;return f?f._parse(new E(r,i,r.path,o)):null}).filter(i=>!!i);return r.common.async?Promise.all(n).then(i=>C.mergeArray(t,i)):C.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new z({...this._def,rest:e})}}z.create=(s,e)=>{if(!Array.isArray(s))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new z({items:s,typeName:_.ZodTuple,rest:null,...g(e)})};class se extends y{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.object)return c(r,{code:d.invalid_type,expected:u.object,received:r.parsedType}),m;const a=[],n=this._def.keyType,i=this._def.valueType;for(const o in r.data)a.push({key:n._parse(new E(r,o,r.path,o)),value:i._parse(new E(r,r.data[o],r.path,o)),alwaysSet:o in r.data});return r.common.async?C.mergeObjectAsync(t,a):C.mergeObjectSync(t,a)}get element(){return this._def.valueType}static create(e,t,r){return t instanceof y?new se({keyType:e,valueType:t,typeName:_.ZodRecord,...g(r)}):new se({keyType:R.create(),valueType:e,typeName:_.ZodRecord,...g(t)})}}class Re extends y{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.map)return c(r,{code:d.invalid_type,expected:u.map,received:r.parsedType}),m;const a=this._def.keyType,n=this._def.valueType,i=[...r.data.entries()].map(([o,f],p)=>({key:a._parse(new E(r,o,r.path,[p,"key"])),value:n._parse(new E(r,f,r.path,[p,"value"]))}));if(r.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const f of i){const p=await f.key,x=await f.value;if(p.status==="aborted"||x.status==="aborted")return m;(p.status==="dirty"||x.status==="dirty")&&t.dirty(),o.set(p.value,x.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const f of i){const p=f.key,x=f.value;if(p.status==="aborted"||x.status==="aborted")return m;(p.status==="dirty"||x.status==="dirty")&&t.dirty(),o.set(p.value,x.value)}return{status:t.value,value:o}}}}Re.create=(s,e,t)=>new Re({valueType:e,keyType:s,typeName:_.ZodMap,...g(t)});class H extends y{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.set)return c(r,{code:d.invalid_type,expected:u.set,received:r.parsedType}),m;const a=this._def;a.minSize!==null&&r.data.sizea.maxSize.value&&(c(r,{code:d.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),t.dirty());const n=this._def.valueType;function i(f){const p=new Set;for(const x of f){if(x.status==="aborted")return m;x.status==="dirty"&&t.dirty(),p.add(x.value)}return{status:t.value,value:p}}const o=[...r.data.values()].map((f,p)=>n._parse(new E(r,f,r.path,p)));return r.common.async?Promise.all(o).then(f=>i(f)):i(o)}min(e,t){return new H({...this._def,minSize:{value:e,message:h.toString(t)}})}max(e,t){return new H({...this._def,maxSize:{value:e,message:h.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}H.create=(s,e)=>new H({valueType:s,minSize:null,maxSize:null,typeName:_.ZodSet,...g(e)});class ge extends y{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}ge.create=(s,e)=>new ge({getter:s,typeName:_.ZodLazy,...g(e)});class re extends y{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return c(t,{received:t.data,code:d.invalid_literal,expected:this._def.value}),m}return{status:"valid",value:e.data}}get value(){return this._def.value}}re.create=(s,e)=>new re({value:s,typeName:_.ZodLiteral,...g(e)});function Me(s,e){return new V({values:s,typeName:_.ZodEnum,...g(e)})}class V extends y{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),r=this._def.values;return c(t,{expected:v.joinValues(r),received:t.parsedType,code:d.invalid_type}),m}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),r=this._def.values;return c(t,{received:t.data,code:d.invalid_enum_value,options:r}),m}return O(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return V.create(e,{...this._def,...t})}exclude(e,t=this._def){return V.create(this.options.filter(r=>!e.includes(r)),{...this._def,...t})}}V.create=Me;class ye extends y{_parse(e){const t=v.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==u.string&&r.parsedType!==u.number){const a=v.objectValues(t);return c(r,{expected:v.joinValues(a),received:r.parsedType,code:d.invalid_type}),m}if(this._cache||(this._cache=new Set(v.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const a=v.objectValues(t);return c(r,{received:r.data,code:d.invalid_enum_value,options:a}),m}return O(e.data)}get enum(){return this._def.values}}ye.create=(s,e)=>new ye({values:s,typeName:_.ZodNativeEnum,...g(e)});class ae extends y{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.promise&&t.common.async===!1)return c(t,{code:d.invalid_type,expected:u.promise,received:t.parsedType}),m;const r=t.parsedType===u.promise?t.data:Promise.resolve(t.data);return O(r.then(a=>this._def.type.parseAsync(a,{path:t.path,errorMap:t.common.contextualErrorMap})))}}ae.create=(s,e)=>new ae({type:s,typeName:_.ZodPromise,...g(e)});class L extends y{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===_.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:r}=this._processInputParams(e),a=this._def.effect||null,n={addIssue:i=>{c(r,i),i.fatal?t.abort():t.dirty()},get path(){return r.path}};if(n.addIssue=n.addIssue.bind(n),a.type==="preprocess"){const i=a.transform(r.data,n);if(r.common.async)return Promise.resolve(i).then(async o=>{if(t.value==="aborted")return m;const f=await this._def.schema._parseAsync({data:o,path:r.path,parent:r});return f.status==="aborted"?m:f.status==="dirty"||t.value==="dirty"?J(f.value):f});{if(t.value==="aborted")return m;const o=this._def.schema._parseSync({data:i,path:r.path,parent:r});return o.status==="aborted"?m:o.status==="dirty"||t.value==="dirty"?J(o.value):o}}if(a.type==="refinement"){const i=o=>{const f=a.refinement(o,n);if(r.common.async)return Promise.resolve(f);if(f instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?m:(o.status==="dirty"&&t.dirty(),i(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>o.status==="aborted"?m:(o.status==="dirty"&&t.dirty(),i(o.value).then(()=>({status:t.value,value:o.value}))))}if(a.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!B(i))return m;const o=a.transform(i.value,n);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>B(i)?Promise.resolve(a.transform(i.value,n)).then(o=>({status:t.value,value:o})):m);v.assertNever(a)}}L.create=(s,e,t)=>new L({schema:s,typeName:_.ZodEffects,effect:e,...g(t)});L.createWithPreprocess=(s,e,t)=>new L({schema:e,effect:{type:"preprocess",transform:s},typeName:_.ZodEffects,...g(t)});class j extends y{_parse(e){return this._getType(e)===u.undefined?O(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}j.create=(s,e)=>new j({innerType:s,typeName:_.ZodOptional,...g(e)});class D extends y{_parse(e){return this._getType(e)===u.null?O(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}D.create=(s,e)=>new D({innerType:s,typeName:_.ZodNullable,...g(e)});class ne extends y{_parse(e){const{ctx:t}=this._processInputParams(e);let r=t.data;return t.parsedType===u.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}ne.create=(s,e)=>new ne({innerType:s,typeName:_.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...g(e)});class ie extends y{_parse(e){const{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},a=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return X(a)?a.then(n=>({status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new I(r.common.issues)},input:r.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new I(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}ie.create=(s,e)=>new ie({innerType:s,typeName:_.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...g(e)});class je extends y{_parse(e){if(this._getType(e)!==u.nan){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.nan,received:r.parsedType}),m}return{status:"valid",value:e.data}}}je.create=s=>new je({typeName:_.ZodNaN,...g(s)});class ze extends y{_parse(e){const{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class be extends y{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const n=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return n.status==="aborted"?m:n.status==="dirty"?(t.dirty(),J(n.value)):this._def.out._parseAsync({data:n.value,path:r.path,parent:r})})();{const a=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?m:a.status==="dirty"?(t.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:r.path,parent:r})}}static create(e,t){return new be({in:e,out:t,typeName:_.ZodPipeline})}}class oe extends y{_parse(e){const t=this._def.innerType._parse(e),r=a=>(B(a)&&(a.value=Object.freeze(a.value)),a);return X(t)?t.then(a=>r(a)):r(t)}unwrap(){return this._def.innerType}}oe.create=(s,e)=>new oe({innerType:s,typeName:_.ZodReadonly,...g(e)});var _;(function(s){s.ZodString="ZodString",s.ZodNumber="ZodNumber",s.ZodNaN="ZodNaN",s.ZodBigInt="ZodBigInt",s.ZodBoolean="ZodBoolean",s.ZodDate="ZodDate",s.ZodSymbol="ZodSymbol",s.ZodUndefined="ZodUndefined",s.ZodNull="ZodNull",s.ZodAny="ZodAny",s.ZodUnknown="ZodUnknown",s.ZodNever="ZodNever",s.ZodVoid="ZodVoid",s.ZodArray="ZodArray",s.ZodObject="ZodObject",s.ZodUnion="ZodUnion",s.ZodDiscriminatedUnion="ZodDiscriminatedUnion",s.ZodIntersection="ZodIntersection",s.ZodTuple="ZodTuple",s.ZodRecord="ZodRecord",s.ZodMap="ZodMap",s.ZodSet="ZodSet",s.ZodFunction="ZodFunction",s.ZodLazy="ZodLazy",s.ZodLiteral="ZodLiteral",s.ZodEnum="ZodEnum",s.ZodEffects="ZodEffects",s.ZodNativeEnum="ZodNativeEnum",s.ZodOptional="ZodOptional",s.ZodNullable="ZodNullable",s.ZodDefault="ZodDefault",s.ZodCatch="ZodCatch",s.ZodPromise="ZodPromise",s.ZodBranded="ZodBranded",s.ZodPipeline="ZodPipeline",s.ZodReadonly="ZodReadonly"})(_||(_={}));const l=R.create,b=q.create,de=he.create,gt=me.create;P.create;const T=N.create,k=w.create,Ve=ee.create,Le=ke.create;te.create;z.create;const De=se.create,Q=re.create,ve=V.create;ae.create;j.create;D.create;const A=De(gt()),we=k({id:b(),name:l(),slug:l().optional()}).passthrough(),ce=k({url:l(),is_official:de()}),xe=k({task_id:b(),dataset_id:b(),model_name:l().nullish(),harness:l().nullish(),methodology:l().nullish(),metrics:De(Ve([l(),b()])),uses_additional_data:de().optional(),is_open:de().optional(),best_rank:b().nullish(),best_metric:l().nullish(),evaluated_on:l().nullish(),external_source_url:l().nullish(),num_parameters:b().nullish(),hf_model_url:l().nullish()}).passthrough(),yt=xe.partial().extend({id:b().optional()}),vt=Le("op",[k({op:Q("create"),data:xe}),k({op:Q("update"),evaluation_id:b(),data:xe}),k({op:Q("delete"),evaluation_id:b()})]),Ie=k({hf_models:T(l()),hf_datasets:T(l()),hf_spaces:T(l())}),Te=k({file_name:l(),mime_type:l(),data_url:l().optional(),url:l().optional()}),F=k({name:l(),description:l().optional()}),xt=F.extend({image:Te.optional(),image_credit:l().optional(),parent_id:b().optional(),area_id:b().optional(),keywords:l().optional()}),kt=F.extend({image:Te.optional(),image_credit:l().optional(),source_paper_id:b().optional(),source_url:l().optional(),source_title:l().optional()}),bt=Ve([k({benchmark:l(),task:l(),description:l()}),F.extend({description:l(),task_ids:T(b()),full_name:l().optional(),url:l().optional(),hf_url:l().optional(),paper_url:l().optional(),license_name:l().optional(),license_url:l().optional()})]),wt=F.extend({description:l(),direction:ve(["higher_is_better","lower_is_better"]),full_name:l().optional(),scale:l().optional(),task_id:b(),dataset_id:b()}),Tt=F.extend({short_name:l().optional(),venue:l().optional(),location:l().optional(),url:l(),year:b(),start_date:l().optional(),end_date:l().optional()}),St=F.extend({hf_slug:l().optional(),website_url:l().optional(),image:Te.optional()}),Ct=k({id:b(),paper_id:b().nullable(),hf_username:l(),hf_subject:l().nullish(),is_author:de(),status:ve(["pending","approved","rejected"]),applied_payload:A.nullish(),conflict_payload:A.nullish(),result_entity_type:l().nullish(),result_entity_id:l().nullish(),admin_note:l().nullish(),user_review_reason:l().nullish(),reviewed_by:l().nullish(),reviewed_by_kind:ve(["human","codex","auto"]).nullish(),catalog_event_id:l().nullish(),review_evidence:A.nullish(),created_at:l(),updated_at:l(),reviewed_at:l().nullish()});function S(s,e,t){return Ct.extend({edit_type:Q(s),proposed_payload:e,current_payload:t.nullish()})}const Ot=S("tasks",k({task_ids:T(b())}),k({tasks:T(we)})),Nt=S("methods",k({method_ids:T(b())}),k({methods:T(we)})),At=S("evaluations",k({operations:T(vt)}),k({evaluations:T(yt)})),Et=S("repositories",k({repositories:T(ce)}),k({repositories:T(ce)})),Zt=S("project_pages",k({project_pages:T(ce)}),k({project_pages:T(ce)})),Rt=S("source_url",k({source_url:l()}),k({source_url:l().nullish()})),jt=S("hf_artifacts",Ie,Ie),It=S("x_threads",k({x_threads:T(l())}),k({x_threads:T(k({url:l()}))})),$t=S("organizations",k({organization_ids:T(b())}),k({organizations:T(we)})),Pt=S("new_task",xt,A),Mt=S("new_method",kt,A),zt=S("new_benchmark",bt,A),Vt=S("new_metric",wt,A),Lt=S("new_conference",Tt,A),Dt=S("new_organization",St,A),Ut=S("new_external_paper",k({title:l().optional(),source_url:l(),authors:T(l()),date_published:l().optional(),abstract:l().optional()}),A),Ue=Le("edit_type",[Ot,Nt,At,Et,Zt,Rt,jt,It,$t,Pt,Mt,zt,Vt,Lt,Dt,Ut]);function Yt(s,e,t){return{paper_id:s,edit_type:e,proposed_payload:t}}const M=(s,e)=>({directory:{title:s,subtitle:e}}),Ht={tasks:{label:"tasks",administrative:!1},methods:{label:"methods",administrative:!1},evaluations:{label:"evaluations",administrative:!1},repositories:{label:"repositories",administrative:!1},project_pages:{label:"project pages",administrative:!1},source_url:{label:"source url",administrative:!1},x_threads:{label:"x threads",administrative:!1},hf_artifacts:{label:"hf artifacts",administrative:!1},organizations:{label:"organizations",administrative:!1},new_task:{label:"new task",administrative:!0,...M("New task","Task suggestion")},new_method:{label:"new method",administrative:!0,...M("New method","Method suggestion")},new_benchmark:{label:"new benchmark",administrative:!0,...M("New benchmark","Benchmark suggestion")},new_metric:{label:"new metric",administrative:!0,...M("New metric","Metric suggestion")},new_conference:{label:"new conference",administrative:!0,...M("New conference","Conference suggestion")},new_organization:{label:"new organization",administrative:!1,...M("New organization","Organization suggestion")},new_external_paper:{label:"external paper",administrative:!1,...M("External paper","External paper submission")}},Bt=k({count:b(),results:T(Ue)});class qt extends Error{constructor(e){super(`Malformed pending-edit payload: ${e}`),this.name="PendingEditPayloadError"}}function Be(s,e){const t=s.safeParse(e);if(t.success)return t.data;const r=t.error.issues[0];throw new qt(`${(r==null?void 0:r.path.join("."))||"response"}: ${(r==null?void 0:r.message)||"invalid value"}`)}const G=s=>Be(Ue,s),Ft=s=>Be(Bt,s);class Wt{constructor(e){this.request=e}async submit(e){return G(await this.request("/me/paper-edits",{method:"POST",body:JSON.stringify(e)}))}list(e){const t=new URLSearchParams;for(const[a,n]of Object.entries(e??{}))n!==void 0&&t.set(a,String(n));const r=t.toString();return this.request(`/admin/paper-edits${r?`?${r}`:""}`).then(Ft)}revertAutoApproved(e,t={}){return this.request(`/admin/submitters/${encodeURIComponent(e)}/revert-auto-approved`,{method:"POST",body:JSON.stringify(t)})}async get(e){return G(await this.request(`/admin/paper-edits/${e}`))}async approve(e,t={}){return G(await this.request(`/admin/paper-edits/${e}/approve`,{method:"POST",body:JSON.stringify(t)}))}async reject(e,t={}){return G(await this.request(`/admin/paper-edits/${e}/reject`,{method:"POST",body:JSON.stringify(t)}))}}const Gt=new Wt(Fe);export{Ht as E,Yt as p,Gt as s}; diff --git a/assets/switch-B4eVY4fu.js b/assets/switch-4sA3DCrD.js similarity index 94% rename from assets/switch-B4eVY4fu.js rename to assets/switch-4sA3DCrD.js index dacb4854d06d01bd29de49a7bd6938ee1d211006..e8f9eb021d022d4e0a1f7afe7566a6d0fb810bcd 100644 --- a/assets/switch-B4eVY4fu.js +++ b/assets/switch-4sA3DCrD.js @@ -1 +1 @@ -import{f as s,D as C,B as T,j as a,z as y,E as M,F as H,G as z,I as x}from"./index-D2fBL-s6.js";import{u as A}from"./index-C_9KPu-E.js";var b="Switch",[U]=z(b),[q,D]=U(b),E=s.forwardRef((t,o)=>{const{__scopeSwitch:e,name:n,checked:r,defaultChecked:m,required:d,disabled:c,value:u="on",onCheckedChange:v,form:i,...w}=t,[l,p]=s.useState(null),S=C(o,h=>p(h)),k=s.useRef(!1),g=l?i||!!l.closest("form"):!0,[f,B]=T({prop:r,defaultProp:m??!1,onChange:v,caller:b});return a.jsxs(q,{scope:e,checked:f,disabled:c,children:[a.jsx(y.button,{type:"button",role:"switch","aria-checked":f,"aria-required":d,"data-state":j(f),"data-disabled":c?"":void 0,disabled:c,value:u,...w,ref:S,onClick:M(t.onClick,h=>{B(I=>!I),g&&(k.current=h.isPropagationStopped(),k.current||h.stopPropagation())})}),g&&a.jsx(N,{control:l,bubbles:!k.current,name:n,value:u,checked:f,required:d,disabled:c,form:i,style:{transform:"translateX(-100%)"}})]})});E.displayName=b;var P="SwitchThumb",R=s.forwardRef((t,o)=>{const{__scopeSwitch:e,...n}=t,r=D(P,e);return a.jsx(y.span,{"data-state":j(r.checked),"data-disabled":r.disabled?"":void 0,...n,ref:o})});R.displayName=P;var F="SwitchBubbleInput",N=s.forwardRef(({__scopeSwitch:t,control:o,checked:e,bubbles:n=!0,...r},m)=>{const d=s.useRef(null),c=C(d,m),u=A(e),v=H(o);return s.useEffect(()=>{const i=d.current;if(!i)return;const w=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(w,"checked").set;if(u!==e&&p){const S=new Event("click",{bubbles:n});p.call(i,e),i.dispatchEvent(S)}},[u,e,n]),a.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:e,...r,tabIndex:-1,ref:c,style:{...r.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});N.displayName=F;function j(t){return t?"checked":"unchecked"}var _=E,L=R;const O=s.forwardRef(({className:t,...o},e)=>a.jsx(_,{className:x("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",t),...o,ref:e,children:a.jsx(L,{className:x("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));O.displayName=_.displayName;export{O as S}; +import{f as s,D as C,B as T,j as a,z as y,E as M,F as H,G as z,I as x}from"./index-BeSw2DVP.js";import{u as A}from"./index-b5_7myf0.js";var b="Switch",[U]=z(b),[q,D]=U(b),E=s.forwardRef((t,o)=>{const{__scopeSwitch:e,name:n,checked:r,defaultChecked:m,required:d,disabled:c,value:u="on",onCheckedChange:v,form:i,...w}=t,[l,p]=s.useState(null),S=C(o,h=>p(h)),k=s.useRef(!1),g=l?i||!!l.closest("form"):!0,[f,B]=T({prop:r,defaultProp:m??!1,onChange:v,caller:b});return a.jsxs(q,{scope:e,checked:f,disabled:c,children:[a.jsx(y.button,{type:"button",role:"switch","aria-checked":f,"aria-required":d,"data-state":j(f),"data-disabled":c?"":void 0,disabled:c,value:u,...w,ref:S,onClick:M(t.onClick,h=>{B(I=>!I),g&&(k.current=h.isPropagationStopped(),k.current||h.stopPropagation())})}),g&&a.jsx(N,{control:l,bubbles:!k.current,name:n,value:u,checked:f,required:d,disabled:c,form:i,style:{transform:"translateX(-100%)"}})]})});E.displayName=b;var P="SwitchThumb",R=s.forwardRef((t,o)=>{const{__scopeSwitch:e,...n}=t,r=D(P,e);return a.jsx(y.span,{"data-state":j(r.checked),"data-disabled":r.disabled?"":void 0,...n,ref:o})});R.displayName=P;var F="SwitchBubbleInput",N=s.forwardRef(({__scopeSwitch:t,control:o,checked:e,bubbles:n=!0,...r},m)=>{const d=s.useRef(null),c=C(d,m),u=A(e),v=H(o);return s.useEffect(()=>{const i=d.current;if(!i)return;const w=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(w,"checked").set;if(u!==e&&p){const S=new Event("click",{bubbles:n});p.call(i,e),i.dispatchEvent(S)}},[u,e,n]),a.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:e,...r,tabIndex:-1,ref:c,style:{...r.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});N.displayName=F;function j(t){return t?"checked":"unchecked"}var _=E,L=R;const O=s.forwardRef(({className:t,...o},e)=>a.jsx(_,{className:x("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",t),...o,ref:e,children:a.jsx(L,{className:x("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));O.displayName=_.displayName;export{O as S}; diff --git a/assets/textarea-B8b7WxcV.js b/assets/textarea-VtGLPxu8.js similarity index 86% rename from assets/textarea-B8b7WxcV.js rename to assets/textarea-VtGLPxu8.js index f225cacb0ae11482ea6086ede61529b28eb8b3e3..72f1aa248ae1cd047b69c71c8288376d2134c28d 100644 --- a/assets/textarea-B8b7WxcV.js +++ b/assets/textarea-VtGLPxu8.js @@ -1 +1 @@ -import{f as s,j as a,I as t}from"./index-D2fBL-s6.js";const i=s.forwardRef(({className:e,...r},o)=>a.jsx("textarea",{className:t("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...r}));i.displayName="Textarea";export{i as T}; +import{f as s,j as a,I as t}from"./index-BeSw2DVP.js";const i=s.forwardRef(({className:e,...r},o)=>a.jsx("textarea",{className:t("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...r}));i.displayName="Textarea";export{i as T}; diff --git a/assets/thumbs-up-BnMguJ3s.js b/assets/thumbs-up-DGIteJ7Z.js similarity index 90% rename from assets/thumbs-up-BnMguJ3s.js rename to assets/thumbs-up-DGIteJ7Z.js index f6ff8aa7ad796f05db3b5c6b059e12b110a7f047..061db746ad625963785343eebdad93ff1a1a5d22 100644 --- a/assets/thumbs-up-BnMguJ3s.js +++ b/assets/thumbs-up-DGIteJ7Z.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-D2fBL-s6.js";/** +import{c as a}from"./index-BeSw2DVP.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/transform-B_GaHMvk.js b/assets/transform-BadO0Aba.js similarity index 99% rename from assets/transform-B_GaHMvk.js rename to assets/transform-BadO0Aba.js index cf2b7757d74ff557e6927e69bc84c1f99d4de69d..15b4e54667da8d5a19018a82fa8974c79c3ca25d 100644 --- a/assets/transform-B_GaHMvk.js +++ b/assets/transform-BadO0Aba.js @@ -1 +1 @@ -import{a3 as _}from"./index-D2fBL-s6.js";function w(t){const e=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&e==="[object Date]"?new t.constructor(+t):typeof t=="number"||e==="[object Number]"||typeof t=="string"||e==="[object String]"?new Date(t):new Date(NaN)}function D(t,e){return t instanceof Date?new t.constructor(e):new Date(e)}const A=6048e5,z=864e5,I=6e4,R=36e5;let V={};function W(){return V}function v(t,e){var s,u,d,f;const n=W(),r=(e==null?void 0:e.weekStartsOn)??((u=(s=e==null?void 0:e.locale)==null?void 0:s.options)==null?void 0:u.weekStartsOn)??n.weekStartsOn??((f=(d=n.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)??0,a=w(t),i=a.getDay(),o=(i=a.getTime()?n+1:e.getTime()>=o.getTime()?n:n-1}function F(t){const e=w(t);return e.setHours(0,0,0,0),e}function E(t){const e=w(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function J(t,e){const n=F(t),r=F(e),a=+n-E(n),i=+r-E(r);return Math.round((a-i)/z)}function Z(t){const e=j(t),n=D(t,0);return n.setFullYear(e,0,4),n.setHours(0,0,0,0),S(n)}function K(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function tt(t){if(!K(t)&&typeof t!="number")return!1;const e=w(t);return!isNaN(Number(e))}function et(t){const e=w(t),n=D(t,0);return n.setFullYear(e.getFullYear(),0,1),n.setHours(0,0,0,0),n}const nt={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},rt=(t,e,n)=>{let r;const a=nt[t];return typeof a=="string"?r=a:e===1?r=a.one:r=a.other.replace("{{count}}",e.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function N(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const at={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},it={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ot={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},st={date:N({formats:at,defaultWidth:"full"}),time:N({formats:it,defaultWidth:"full"}),dateTime:N({formats:ot,defaultWidth:"full"})},ut={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ct=(t,e,n,r)=>ut[t];function O(t){return(e,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let a;if(r==="formatting"&&t.formattingValues){const o=t.defaultFormattingWidth||t.defaultWidth,s=n!=null&&n.width?String(n.width):o;a=t.formattingValues[s]||t.formattingValues[o]}else{const o=t.defaultWidth,s=n!=null&&n.width?String(n.width):t.defaultWidth;a=t.values[s]||t.values[o]}const i=t.argumentCallback?t.argumentCallback(e):e;return a[i]}}const dt={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},lt={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ft={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ht={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},mt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},gt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},wt=(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},yt={ordinalNumber:wt,era:O({values:dt,defaultWidth:"wide"}),quarter:O({values:lt,defaultWidth:"wide",argumentCallback:t=>t-1}),month:O({values:ft,defaultWidth:"wide"}),day:O({values:ht,defaultWidth:"wide"}),dayPeriod:O({values:mt,defaultWidth:"wide",formattingValues:gt,defaultFormattingWidth:"wide"})};function P(t){return(e,n={})=>{const r=n.width,a=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],i=e.match(a);if(!i)return null;const o=i[0],s=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],u=Array.isArray(s)?Dt(s,g=>g.test(o)):bt(s,g=>g.test(o));let d;d=t.valueCallback?t.valueCallback(u):u,d=n.valueCallback?n.valueCallback(d):d;const f=e.slice(o.length);return{value:d,rest:f}}}function bt(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function Dt(t,e){for(let n=0;n{const r=e.match(t.matchPattern);if(!r)return null;const a=r[0],i=e.match(t.parsePattern);if(!i)return null;let o=t.valueCallback?t.valueCallback(i[0]):i[0];o=n.valueCallback?n.valueCallback(o):o;const s=e.slice(a.length);return{value:o,rest:s}}}const kt=/^(\d+)(th|st|nd|rd)?/i,Ot=/\d+/i,Pt={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},pt={any:[/^b/i,/^(a|c)/i]},vt={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},xt={any:[/1/i,/2/i,/3/i,/4/i]},Tt={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},St={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Wt={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Yt={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Nt={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Ct={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},_t={ordinalNumber:Mt({matchPattern:kt,parsePattern:Ot,valueCallback:t=>parseInt(t,10)}),era:P({matchPatterns:Pt,defaultMatchWidth:"wide",parsePatterns:pt,defaultParseWidth:"any"}),quarter:P({matchPatterns:vt,defaultMatchWidth:"wide",parsePatterns:xt,defaultParseWidth:"any",valueCallback:t=>t+1}),month:P({matchPatterns:Tt,defaultMatchWidth:"wide",parsePatterns:St,defaultParseWidth:"any"}),day:P({matchPatterns:Wt,defaultMatchWidth:"wide",parsePatterns:Yt,defaultParseWidth:"any"}),dayPeriod:P({matchPatterns:Nt,defaultMatchWidth:"any",parsePatterns:Ct,defaultParseWidth:"any"})},Ft={code:"en-US",formatDistance:rt,formatLong:st,formatRelative:ct,localize:yt,match:_t,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Et(t){const e=w(t);return J(e,et(e))+1}function qt(t){const e=w(t),n=+S(e)-+Z(e);return Math.round(n/A)+1}function Q(t,e){var f,g,l,k;const n=w(t),r=n.getFullYear(),a=W(),i=(e==null?void 0:e.firstWeekContainsDate)??((g=(f=e==null?void 0:e.locale)==null?void 0:f.options)==null?void 0:g.firstWeekContainsDate)??a.firstWeekContainsDate??((k=(l=a.locale)==null?void 0:l.options)==null?void 0:k.firstWeekContainsDate)??1,o=D(t,0);o.setFullYear(r+1,0,i),o.setHours(0,0,0,0);const s=v(o,e),u=D(t,0);u.setFullYear(r,0,i),u.setHours(0,0,0,0);const d=v(u,e);return n.getTime()>=s.getTime()?r+1:n.getTime()>=d.getTime()?r:r-1}function Ut(t,e){var s,u,d,f;const n=W(),r=(e==null?void 0:e.firstWeekContainsDate)??((u=(s=e==null?void 0:e.locale)==null?void 0:s.options)==null?void 0:u.firstWeekContainsDate)??n.firstWeekContainsDate??((f=(d=n.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??1,a=Q(t,e),i=D(t,0);return i.setFullYear(a,0,r),i.setHours(0,0,0,0),v(i,e)}function Lt(t,e){const n=w(t),r=+v(n,e)-+Ut(n,e);return Math.round(r/A)+1}function c(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const y={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return c(e==="yy"?r%100:r,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):c(n+1,2)},d(t,e){return c(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(t,e){return c(t.getHours()%12||12,e.length)},H(t,e){return c(t.getHours(),e.length)},m(t,e){return c(t.getMinutes(),e.length)},s(t,e){return c(t.getSeconds(),e.length)},S(t,e){const n=e.length,r=t.getMilliseconds(),a=Math.trunc(r*Math.pow(10,n-3));return c(a,e.length)}},M={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},q={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const r=t.getFullYear(),a=r>0?r:1-r;return n.ordinalNumber(a,{unit:"year"})}return y.y(t,e)},Y:function(t,e,n,r){const a=Q(t,r),i=a>0?a:1-a;if(e==="YY"){const o=i%100;return c(o,2)}return e==="Yo"?n.ordinalNumber(i,{unit:"year"}):c(i,e.length)},R:function(t,e){const n=j(t);return c(n,e.length)},u:function(t,e){const n=t.getFullYear();return c(n,e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return c(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return c(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return y.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return c(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const a=Lt(t,r);return e==="wo"?n.ordinalNumber(a,{unit:"week"}):c(a,e.length)},I:function(t,e,n){const r=qt(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):c(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):y.d(t,e)},D:function(t,e,n){const r=Et(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):c(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const a=t.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return c(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const a=t.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return c(i,e.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),a=r===0?7:r;switch(e){case"i":return String(a);case"ii":return c(a,e.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const a=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let a;switch(r===12?a=M.noon:r===0?a=M.midnight:a=r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let a;switch(r>=17?a=M.evening:r>=12?a=M.afternoon:r>=4?a=M.morning:a=M.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return y.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):y.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):c(r,e.length)},k:function(t,e,n){let r=t.getHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):c(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):y.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):y.s(t,e)},S:function(t,e){return y.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return L(r);case"XXXX":case"XX":return b(r);case"XXXXX":case"XXX":default:return b(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return L(r);case"xxxx":case"xx":return b(r);case"xxxxx":case"xxx":default:return b(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+U(r,":");case"OOOO":default:return"GMT"+b(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+U(r,":");case"zzzz":default:return"GMT"+b(r,":")}},t:function(t,e,n){const r=Math.trunc(t.getTime()/1e3);return c(r,e.length)},T:function(t,e,n){const r=t.getTime();return c(r,e.length)}};function U(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),a=Math.trunc(r/60),i=r%60;return i===0?n+String(a):n+String(a)+e+c(i,2)}function L(t,e){return t%60===0?(t>0?"-":"+")+c(Math.abs(t)/60,2):b(t,e)}function b(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),a=c(Math.trunc(r/60),2),i=c(r%60,2);return n+a+e+i}const H=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},X=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},Ht=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return H(t,e);let i;switch(r){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;case"PPPP":default:i=e.dateTime({width:"full"});break}return i.replace("{{date}}",H(r,e)).replace("{{time}}",X(a,e))},At={p:X,P:Ht},It=/^D+$/,Rt=/^Y+$/,jt=["D","DD","YY","YYYY"];function Qt(t){return It.test(t)}function Xt(t){return Rt.test(t)}function Bt(t,e,n){const r=Gt(t,e,n);if(console.warn(r),jt.includes(t))throw new RangeError(r)}function Gt(t,e,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const $t=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,zt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Vt=/^'([^]*?)'?$/,Jt=/''/g,Zt=/[a-zA-Z]/;function Kt(t,e,n){var f,g,l,k;const r=W(),a=r.locale??Ft,i=r.firstWeekContainsDate??((g=(f=r.locale)==null?void 0:f.options)==null?void 0:g.firstWeekContainsDate)??1,o=r.weekStartsOn??((k=(l=r.locale)==null?void 0:l.options)==null?void 0:k.weekStartsOn)??0,s=w(t);if(!tt(s))throw new RangeError("Invalid time value");let u=e.match(zt).map(m=>{const h=m[0];if(h==="p"||h==="P"){const Y=At[h];return Y(m,a.formatLong)}return m}).join("").match($t).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const h=m[0];if(h==="'")return{isToken:!1,value:te(m)};if(q[h])return{isToken:!0,value:m};if(h.match(Zt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+h+"`");return{isToken:!1,value:m}});a.localize.preprocessor&&(u=a.localize.preprocessor(s,u));const d={firstWeekContainsDate:i,weekStartsOn:o,locale:a};return u.map(m=>{if(!m.isToken)return m.value;const h=m.value;(Xt(h)||Qt(h))&&Bt(h,e,String(t));const Y=q[h[0]];return Y(s,h,a.localize,d)}).join("")}function te(t){const e=t.match(Vt);return e?e[1].replace(Jt,"'"):t}function B(t,e){const r=ae(t);let a;if(r.date){const u=ie(r.date,2);a=oe(u.restDateString,u.year)}if(!a||isNaN(a.getTime()))return new Date(NaN);const i=a.getTime();let o=0,s;if(r.time&&(o=se(r.time),isNaN(o)))return new Date(NaN);if(r.timezone){if(s=ue(r.timezone),isNaN(s))return new Date(NaN)}else{const u=new Date(i+o),d=new Date(0);return d.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),d.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),d}return new Date(i+o+s)}const x={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},ee=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,ne=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,re=/^([+-])(\d{2})(?::?(\d{2}))?$/;function ae(t){const e={},n=t.split(x.dateTimeDelimiter);let r;if(n.length>2)return e;if(/:/.test(n[0])?r=n[0]:(e.date=n[0],r=n[1],x.timeZoneDelimiter.test(e.date)&&(e.date=t.split(x.timeZoneDelimiter)[0],r=t.substr(e.date.length,t.length))),r){const a=x.timezone.exec(r);a?(e.time=r.replace(a[1],""),e.timezone=a[1]):e.time=r}return e}function ie(t,e){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),r=t.match(n);if(!r)return{year:NaN,restDateString:""};const a=r[1]?parseInt(r[1]):null,i=r[2]?parseInt(r[2]):null;return{year:i===null?a:i*100,restDateString:t.slice((r[1]||r[2]).length)}}function oe(t,e){if(e===null)return new Date(NaN);const n=t.match(ee);if(!n)return new Date(NaN);const r=!!n[4],a=p(n[1]),i=p(n[2])-1,o=p(n[3]),s=p(n[4]),u=p(n[5])-1;if(r)return he(e,s,u)?ce(e,s,u):new Date(NaN);{const d=new Date(0);return!le(e,i,o)||!fe(e,a)?new Date(NaN):(d.setUTCFullYear(e,i,Math.max(a,o)),d)}}function p(t){return t?parseInt(t):1}function se(t){const e=t.match(ne);if(!e)return NaN;const n=C(e[1]),r=C(e[2]),a=C(e[3]);return me(n,r,a)?n*R+r*I+a*1e3:NaN}function C(t){return t&&parseFloat(t.replace(",","."))||0}function ue(t){if(t==="Z")return 0;const e=t.match(re);if(!e)return 0;const n=e[1]==="+"?-1:1,r=parseInt(e[2]),a=e[3]&&parseInt(e[3])||0;return ge(r,a)?n*(r*R+a*I):NaN}function ce(t,e,n){const r=new Date(0);r.setUTCFullYear(t,0,4);const a=r.getUTCDay()||7,i=(e-1)*7+n+1-a;return r.setUTCDate(r.getUTCDate()+i),r}const de=[31,null,31,30,31,30,31,31,30,31,30,31];function G(t){return t%400===0||t%4===0&&t%100!==0}function le(t,e,n){return e>=0&&e<=11&&n>=1&&n<=(de[e]||(G(t)?29:28))}function fe(t,e){return e>=1&&e<=(G(t)?366:365)}function he(t,e,n){return e>=1&&e<=53&&n>=0&&n<=6}function me(t,e,n){return t===24?e===0&&n===0:n>=0&&n<60&&e>=0&&e<60&&t>=0&&t<25}function ge(t,e){return e>=0&&e<=59}const we={model:"models",dataset:"datasets",space:"spaces"};function ye(t){const e=t.hf_artifact_summary;return!e||!e.best_kind||!e.best_url||e.best_count<=0?{hfKind:null,hfCount:0,hfUrl:null}:{hfKind:we[e.best_kind]??null,hfCount:e.best_count,hfUrl:e.best_url}}function be(t){if(!t||t.length===0)return{github:null,githubUrl:null,velocity24h:null};const e=t.filter(a=>a.is_official),r=[...e.length>0?e:t].sort((a,i)=>(i.num_stars||0)-(a.num_stars||0))[0];return{github:r&&r.num_stars>0?r.num_stars:null,githubUrl:(r==null?void 0:r.url)||null,velocity24h:(r==null?void 0:r.trending_score)??null}}function De(t){if(!t)return null;try{const e=typeof t=="string"?B(t):t;return Kt(e,"MMM d, yyyy")}catch{return null}}function Me(t){if(!t)return null;try{return B(t).getFullYear()}catch{return null}}function ke(t){return(t||[]).filter(e=>e.best_rank>=1&&e.best_rank<=3).map(e=>{let n=null;if(e.dataset_slug){const r=new URLSearchParams;e.task_slug&&r.set("task",e.task_slug),r.set("eval",e.evaluation_id),n=`/benchmark/${e.dataset_slug}?${r}`}return{name:e.dataset_name,href:n,rank:e.best_rank}})}function ve(t){var f,g;const{github:e,githubUrl:n,velocity24h:r}=be(t.repositories),{hfKind:a,hfCount:i,hfUrl:o}=ye(t),s=(t.tasks||[]).map(l=>l.slug||"").filter(Boolean),u=(t.methods||[]).map(l=>({id:l.id,name:l.name,slug:l.slug})),d=ke(t.leaderboard_ranks);return{id:t.arxiv_id||t.id,dbId:t.id,title:t.title,abstract:t.abstract||"",authors:t.authors||[],authorIds:(t.author_links||[]).map(l=>l.id??null),authorHfProfiles:(t.author_links||[]).map(l=>l.hf_username?{username:l.hf_username,avatarUrl:l.hf_avatar_url??null}:null),tags:s,methods:u,organizations:(t.organizations||[]).map(l=>({name:l.name,slug:l.slug,logoUrl:_(l.logo_url)||null})),citations:t.citation_count||0,github:e,githubUrl:n,project:((g=(f=t.project_pages)==null?void 0:f[0])==null?void 0:g.url)||null,date:De(t.published),publishedIso:t.published||null,year:Me(t.published),thumbnailUrl:_(t.thumbnail_url)||null,tldr:t.tldr||null,version:t.version||"v1",velocity24h:r,hfKind:a,hfCount:i,hfUrl:o,sotaRanks:d}}function Oe(t){const e=$.get(t.toLowerCase());if(e)return e;const n=t.toUpperCase();return T.has(n)?n:t.replace(/[-_]+/g," ").replace(/\b\w/g,r=>r.toUpperCase())}const T=new Set(["3D","AI","OCR"]),$=new Map([["3d-tracking","3D Tracking"],["point-tracking","2D Point Tracking"],["3d-generation","3D generation"],["3d-understanding","3D understanding"],["3d-semantic-segmentation","3D semantic segmentation"],["3d-instance-segmentation","3D instance segmentation"],["3d-object-detection","3D object detection"],["text-to-sql","Text-to-SQL"]]);function xe(t,e){const n=t||Oe(e||""),r=$.get((e==null?void 0:e.toLowerCase())||Pe(n));if(r)return r;const a=e==null?void 0:e.toUpperCase(),i=n.toUpperCase();return/^[A-Z0-9][A-Z0-9-]{1,}$/.test(n)||a&&T.has(a)||T.has(i)?i:n.replace(/\b[A-Za-z0-9]+\b/g,s=>/^[A-Z0-9]{2,}$/.test(s)||T.has(s.toUpperCase())?s.toUpperCase():s.charAt(0).toUpperCase()+s.slice(1).toLowerCase())}function Pe(t){return t.trim().toLowerCase().replace(/[\s_]+/g,"-")}export{ke as a,xe as d,Oe as h,be as s,ve as t}; +import{a3 as _}from"./index-BeSw2DVP.js";function w(t){const e=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&e==="[object Date]"?new t.constructor(+t):typeof t=="number"||e==="[object Number]"||typeof t=="string"||e==="[object String]"?new Date(t):new Date(NaN)}function D(t,e){return t instanceof Date?new t.constructor(e):new Date(e)}const A=6048e5,z=864e5,I=6e4,R=36e5;let V={};function W(){return V}function v(t,e){var s,u,d,f;const n=W(),r=(e==null?void 0:e.weekStartsOn)??((u=(s=e==null?void 0:e.locale)==null?void 0:s.options)==null?void 0:u.weekStartsOn)??n.weekStartsOn??((f=(d=n.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)??0,a=w(t),i=a.getDay(),o=(i=a.getTime()?n+1:e.getTime()>=o.getTime()?n:n-1}function F(t){const e=w(t);return e.setHours(0,0,0,0),e}function E(t){const e=w(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function J(t,e){const n=F(t),r=F(e),a=+n-E(n),i=+r-E(r);return Math.round((a-i)/z)}function Z(t){const e=j(t),n=D(t,0);return n.setFullYear(e,0,4),n.setHours(0,0,0,0),S(n)}function K(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function tt(t){if(!K(t)&&typeof t!="number")return!1;const e=w(t);return!isNaN(Number(e))}function et(t){const e=w(t),n=D(t,0);return n.setFullYear(e.getFullYear(),0,1),n.setHours(0,0,0,0),n}const nt={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},rt=(t,e,n)=>{let r;const a=nt[t];return typeof a=="string"?r=a:e===1?r=a.one:r=a.other.replace("{{count}}",e.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function N(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const at={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},it={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ot={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},st={date:N({formats:at,defaultWidth:"full"}),time:N({formats:it,defaultWidth:"full"}),dateTime:N({formats:ot,defaultWidth:"full"})},ut={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ct=(t,e,n,r)=>ut[t];function O(t){return(e,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let a;if(r==="formatting"&&t.formattingValues){const o=t.defaultFormattingWidth||t.defaultWidth,s=n!=null&&n.width?String(n.width):o;a=t.formattingValues[s]||t.formattingValues[o]}else{const o=t.defaultWidth,s=n!=null&&n.width?String(n.width):t.defaultWidth;a=t.values[s]||t.values[o]}const i=t.argumentCallback?t.argumentCallback(e):e;return a[i]}}const dt={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},lt={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ft={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ht={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},mt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},gt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},wt=(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},yt={ordinalNumber:wt,era:O({values:dt,defaultWidth:"wide"}),quarter:O({values:lt,defaultWidth:"wide",argumentCallback:t=>t-1}),month:O({values:ft,defaultWidth:"wide"}),day:O({values:ht,defaultWidth:"wide"}),dayPeriod:O({values:mt,defaultWidth:"wide",formattingValues:gt,defaultFormattingWidth:"wide"})};function P(t){return(e,n={})=>{const r=n.width,a=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],i=e.match(a);if(!i)return null;const o=i[0],s=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],u=Array.isArray(s)?Dt(s,g=>g.test(o)):bt(s,g=>g.test(o));let d;d=t.valueCallback?t.valueCallback(u):u,d=n.valueCallback?n.valueCallback(d):d;const f=e.slice(o.length);return{value:d,rest:f}}}function bt(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function Dt(t,e){for(let n=0;n{const r=e.match(t.matchPattern);if(!r)return null;const a=r[0],i=e.match(t.parsePattern);if(!i)return null;let o=t.valueCallback?t.valueCallback(i[0]):i[0];o=n.valueCallback?n.valueCallback(o):o;const s=e.slice(a.length);return{value:o,rest:s}}}const kt=/^(\d+)(th|st|nd|rd)?/i,Ot=/\d+/i,Pt={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},pt={any:[/^b/i,/^(a|c)/i]},vt={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},xt={any:[/1/i,/2/i,/3/i,/4/i]},Tt={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},St={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Wt={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Yt={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Nt={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Ct={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},_t={ordinalNumber:Mt({matchPattern:kt,parsePattern:Ot,valueCallback:t=>parseInt(t,10)}),era:P({matchPatterns:Pt,defaultMatchWidth:"wide",parsePatterns:pt,defaultParseWidth:"any"}),quarter:P({matchPatterns:vt,defaultMatchWidth:"wide",parsePatterns:xt,defaultParseWidth:"any",valueCallback:t=>t+1}),month:P({matchPatterns:Tt,defaultMatchWidth:"wide",parsePatterns:St,defaultParseWidth:"any"}),day:P({matchPatterns:Wt,defaultMatchWidth:"wide",parsePatterns:Yt,defaultParseWidth:"any"}),dayPeriod:P({matchPatterns:Nt,defaultMatchWidth:"any",parsePatterns:Ct,defaultParseWidth:"any"})},Ft={code:"en-US",formatDistance:rt,formatLong:st,formatRelative:ct,localize:yt,match:_t,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Et(t){const e=w(t);return J(e,et(e))+1}function qt(t){const e=w(t),n=+S(e)-+Z(e);return Math.round(n/A)+1}function Q(t,e){var f,g,l,k;const n=w(t),r=n.getFullYear(),a=W(),i=(e==null?void 0:e.firstWeekContainsDate)??((g=(f=e==null?void 0:e.locale)==null?void 0:f.options)==null?void 0:g.firstWeekContainsDate)??a.firstWeekContainsDate??((k=(l=a.locale)==null?void 0:l.options)==null?void 0:k.firstWeekContainsDate)??1,o=D(t,0);o.setFullYear(r+1,0,i),o.setHours(0,0,0,0);const s=v(o,e),u=D(t,0);u.setFullYear(r,0,i),u.setHours(0,0,0,0);const d=v(u,e);return n.getTime()>=s.getTime()?r+1:n.getTime()>=d.getTime()?r:r-1}function Ut(t,e){var s,u,d,f;const n=W(),r=(e==null?void 0:e.firstWeekContainsDate)??((u=(s=e==null?void 0:e.locale)==null?void 0:s.options)==null?void 0:u.firstWeekContainsDate)??n.firstWeekContainsDate??((f=(d=n.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??1,a=Q(t,e),i=D(t,0);return i.setFullYear(a,0,r),i.setHours(0,0,0,0),v(i,e)}function Lt(t,e){const n=w(t),r=+v(n,e)-+Ut(n,e);return Math.round(r/A)+1}function c(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const y={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return c(e==="yy"?r%100:r,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):c(n+1,2)},d(t,e){return c(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(t,e){return c(t.getHours()%12||12,e.length)},H(t,e){return c(t.getHours(),e.length)},m(t,e){return c(t.getMinutes(),e.length)},s(t,e){return c(t.getSeconds(),e.length)},S(t,e){const n=e.length,r=t.getMilliseconds(),a=Math.trunc(r*Math.pow(10,n-3));return c(a,e.length)}},M={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},q={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const r=t.getFullYear(),a=r>0?r:1-r;return n.ordinalNumber(a,{unit:"year"})}return y.y(t,e)},Y:function(t,e,n,r){const a=Q(t,r),i=a>0?a:1-a;if(e==="YY"){const o=i%100;return c(o,2)}return e==="Yo"?n.ordinalNumber(i,{unit:"year"}):c(i,e.length)},R:function(t,e){const n=j(t);return c(n,e.length)},u:function(t,e){const n=t.getFullYear();return c(n,e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return c(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return c(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return y.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return c(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const a=Lt(t,r);return e==="wo"?n.ordinalNumber(a,{unit:"week"}):c(a,e.length)},I:function(t,e,n){const r=qt(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):c(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):y.d(t,e)},D:function(t,e,n){const r=Et(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):c(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const a=t.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return c(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const a=t.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return c(i,e.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),a=r===0?7:r;switch(e){case"i":return String(a);case"ii":return c(a,e.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const a=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let a;switch(r===12?a=M.noon:r===0?a=M.midnight:a=r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let a;switch(r>=17?a=M.evening:r>=12?a=M.afternoon:r>=4?a=M.morning:a=M.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return y.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):y.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):c(r,e.length)},k:function(t,e,n){let r=t.getHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):c(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):y.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):y.s(t,e)},S:function(t,e){return y.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return L(r);case"XXXX":case"XX":return b(r);case"XXXXX":case"XXX":default:return b(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return L(r);case"xxxx":case"xx":return b(r);case"xxxxx":case"xxx":default:return b(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+U(r,":");case"OOOO":default:return"GMT"+b(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+U(r,":");case"zzzz":default:return"GMT"+b(r,":")}},t:function(t,e,n){const r=Math.trunc(t.getTime()/1e3);return c(r,e.length)},T:function(t,e,n){const r=t.getTime();return c(r,e.length)}};function U(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),a=Math.trunc(r/60),i=r%60;return i===0?n+String(a):n+String(a)+e+c(i,2)}function L(t,e){return t%60===0?(t>0?"-":"+")+c(Math.abs(t)/60,2):b(t,e)}function b(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),a=c(Math.trunc(r/60),2),i=c(r%60,2);return n+a+e+i}const H=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},X=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},Ht=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return H(t,e);let i;switch(r){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;case"PPPP":default:i=e.dateTime({width:"full"});break}return i.replace("{{date}}",H(r,e)).replace("{{time}}",X(a,e))},At={p:X,P:Ht},It=/^D+$/,Rt=/^Y+$/,jt=["D","DD","YY","YYYY"];function Qt(t){return It.test(t)}function Xt(t){return Rt.test(t)}function Bt(t,e,n){const r=Gt(t,e,n);if(console.warn(r),jt.includes(t))throw new RangeError(r)}function Gt(t,e,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const $t=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,zt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Vt=/^'([^]*?)'?$/,Jt=/''/g,Zt=/[a-zA-Z]/;function Kt(t,e,n){var f,g,l,k;const r=W(),a=r.locale??Ft,i=r.firstWeekContainsDate??((g=(f=r.locale)==null?void 0:f.options)==null?void 0:g.firstWeekContainsDate)??1,o=r.weekStartsOn??((k=(l=r.locale)==null?void 0:l.options)==null?void 0:k.weekStartsOn)??0,s=w(t);if(!tt(s))throw new RangeError("Invalid time value");let u=e.match(zt).map(m=>{const h=m[0];if(h==="p"||h==="P"){const Y=At[h];return Y(m,a.formatLong)}return m}).join("").match($t).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const h=m[0];if(h==="'")return{isToken:!1,value:te(m)};if(q[h])return{isToken:!0,value:m};if(h.match(Zt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+h+"`");return{isToken:!1,value:m}});a.localize.preprocessor&&(u=a.localize.preprocessor(s,u));const d={firstWeekContainsDate:i,weekStartsOn:o,locale:a};return u.map(m=>{if(!m.isToken)return m.value;const h=m.value;(Xt(h)||Qt(h))&&Bt(h,e,String(t));const Y=q[h[0]];return Y(s,h,a.localize,d)}).join("")}function te(t){const e=t.match(Vt);return e?e[1].replace(Jt,"'"):t}function B(t,e){const r=ae(t);let a;if(r.date){const u=ie(r.date,2);a=oe(u.restDateString,u.year)}if(!a||isNaN(a.getTime()))return new Date(NaN);const i=a.getTime();let o=0,s;if(r.time&&(o=se(r.time),isNaN(o)))return new Date(NaN);if(r.timezone){if(s=ue(r.timezone),isNaN(s))return new Date(NaN)}else{const u=new Date(i+o),d=new Date(0);return d.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),d.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),d}return new Date(i+o+s)}const x={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},ee=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,ne=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,re=/^([+-])(\d{2})(?::?(\d{2}))?$/;function ae(t){const e={},n=t.split(x.dateTimeDelimiter);let r;if(n.length>2)return e;if(/:/.test(n[0])?r=n[0]:(e.date=n[0],r=n[1],x.timeZoneDelimiter.test(e.date)&&(e.date=t.split(x.timeZoneDelimiter)[0],r=t.substr(e.date.length,t.length))),r){const a=x.timezone.exec(r);a?(e.time=r.replace(a[1],""),e.timezone=a[1]):e.time=r}return e}function ie(t,e){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),r=t.match(n);if(!r)return{year:NaN,restDateString:""};const a=r[1]?parseInt(r[1]):null,i=r[2]?parseInt(r[2]):null;return{year:i===null?a:i*100,restDateString:t.slice((r[1]||r[2]).length)}}function oe(t,e){if(e===null)return new Date(NaN);const n=t.match(ee);if(!n)return new Date(NaN);const r=!!n[4],a=p(n[1]),i=p(n[2])-1,o=p(n[3]),s=p(n[4]),u=p(n[5])-1;if(r)return he(e,s,u)?ce(e,s,u):new Date(NaN);{const d=new Date(0);return!le(e,i,o)||!fe(e,a)?new Date(NaN):(d.setUTCFullYear(e,i,Math.max(a,o)),d)}}function p(t){return t?parseInt(t):1}function se(t){const e=t.match(ne);if(!e)return NaN;const n=C(e[1]),r=C(e[2]),a=C(e[3]);return me(n,r,a)?n*R+r*I+a*1e3:NaN}function C(t){return t&&parseFloat(t.replace(",","."))||0}function ue(t){if(t==="Z")return 0;const e=t.match(re);if(!e)return 0;const n=e[1]==="+"?-1:1,r=parseInt(e[2]),a=e[3]&&parseInt(e[3])||0;return ge(r,a)?n*(r*R+a*I):NaN}function ce(t,e,n){const r=new Date(0);r.setUTCFullYear(t,0,4);const a=r.getUTCDay()||7,i=(e-1)*7+n+1-a;return r.setUTCDate(r.getUTCDate()+i),r}const de=[31,null,31,30,31,30,31,31,30,31,30,31];function G(t){return t%400===0||t%4===0&&t%100!==0}function le(t,e,n){return e>=0&&e<=11&&n>=1&&n<=(de[e]||(G(t)?29:28))}function fe(t,e){return e>=1&&e<=(G(t)?366:365)}function he(t,e,n){return e>=1&&e<=53&&n>=0&&n<=6}function me(t,e,n){return t===24?e===0&&n===0:n>=0&&n<60&&e>=0&&e<60&&t>=0&&t<25}function ge(t,e){return e>=0&&e<=59}const we={model:"models",dataset:"datasets",space:"spaces"};function ye(t){const e=t.hf_artifact_summary;return!e||!e.best_kind||!e.best_url||e.best_count<=0?{hfKind:null,hfCount:0,hfUrl:null}:{hfKind:we[e.best_kind]??null,hfCount:e.best_count,hfUrl:e.best_url}}function be(t){if(!t||t.length===0)return{github:null,githubUrl:null,velocity24h:null};const e=t.filter(a=>a.is_official),r=[...e.length>0?e:t].sort((a,i)=>(i.num_stars||0)-(a.num_stars||0))[0];return{github:r&&r.num_stars>0?r.num_stars:null,githubUrl:(r==null?void 0:r.url)||null,velocity24h:(r==null?void 0:r.trending_score)??null}}function De(t){if(!t)return null;try{const e=typeof t=="string"?B(t):t;return Kt(e,"MMM d, yyyy")}catch{return null}}function Me(t){if(!t)return null;try{return B(t).getFullYear()}catch{return null}}function ke(t){return(t||[]).filter(e=>e.best_rank>=1&&e.best_rank<=3).map(e=>{let n=null;if(e.dataset_slug){const r=new URLSearchParams;e.task_slug&&r.set("task",e.task_slug),r.set("eval",e.evaluation_id),n=`/benchmark/${e.dataset_slug}?${r}`}return{name:e.dataset_name,href:n,rank:e.best_rank}})}function ve(t){var f,g;const{github:e,githubUrl:n,velocity24h:r}=be(t.repositories),{hfKind:a,hfCount:i,hfUrl:o}=ye(t),s=(t.tasks||[]).map(l=>l.slug||"").filter(Boolean),u=(t.methods||[]).map(l=>({id:l.id,name:l.name,slug:l.slug})),d=ke(t.leaderboard_ranks);return{id:t.arxiv_id||t.id,dbId:t.id,title:t.title,abstract:t.abstract||"",authors:t.authors||[],authorIds:(t.author_links||[]).map(l=>l.id??null),authorHfProfiles:(t.author_links||[]).map(l=>l.hf_username?{username:l.hf_username,avatarUrl:l.hf_avatar_url??null}:null),tags:s,methods:u,organizations:(t.organizations||[]).map(l=>({name:l.name,slug:l.slug,logoUrl:_(l.logo_url)||null})),citations:t.citation_count||0,github:e,githubUrl:n,project:((g=(f=t.project_pages)==null?void 0:f[0])==null?void 0:g.url)||null,date:De(t.published),publishedIso:t.published||null,year:Me(t.published),thumbnailUrl:_(t.thumbnail_url)||null,tldr:t.tldr||null,version:t.version||"v1",velocity24h:r,hfKind:a,hfCount:i,hfUrl:o,sotaRanks:d}}function Oe(t){const e=$.get(t.toLowerCase());if(e)return e;const n=t.toUpperCase();return T.has(n)?n:t.replace(/[-_]+/g," ").replace(/\b\w/g,r=>r.toUpperCase())}const T=new Set(["3D","AI","OCR"]),$=new Map([["3d-tracking","3D Tracking"],["point-tracking","2D Point Tracking"],["3d-generation","3D generation"],["3d-understanding","3D understanding"],["3d-semantic-segmentation","3D semantic segmentation"],["3d-instance-segmentation","3D instance segmentation"],["3d-object-detection","3D object detection"],["text-to-sql","Text-to-SQL"]]);function xe(t,e){const n=t||Oe(e||""),r=$.get((e==null?void 0:e.toLowerCase())||Pe(n));if(r)return r;const a=e==null?void 0:e.toUpperCase(),i=n.toUpperCase();return/^[A-Z0-9][A-Z0-9-]{1,}$/.test(n)||a&&T.has(a)||T.has(i)?i:n.replace(/\b[A-Za-z0-9]+\b/g,s=>/^[A-Z0-9]{2,}$/.test(s)||T.has(s.toUpperCase())?s.toUpperCase():s.charAt(0).toUpperCase()+s.slice(1).toLowerCase())}function Pe(t){return t.trim().toLowerCase().replace(/[\s_]+/g,"-")}export{ke as a,xe as d,Oe as h,be as s,ve as t}; diff --git a/assets/trending-up-DFLWFJuY.js b/assets/trending-up-Bx9WuS-7.js similarity index 88% rename from assets/trending-up-DFLWFJuY.js rename to assets/trending-up-Bx9WuS-7.js index 896367ef4ef4a1fa83e95bb01e44b2e9a5fee1aa..eb39df0961af3e29be958e1a9d85c164aa62069d 100644 --- a/assets/trending-up-DFLWFJuY.js +++ b/assets/trending-up-Bx9WuS-7.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-D2fBL-s6.js";/** +import{c as e}from"./index-BeSw2DVP.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/triangle-alert-VQM9i8wl.js b/assets/triangle-alert-1tg5iDLg.js similarity index 94% rename from assets/triangle-alert-VQM9i8wl.js rename to assets/triangle-alert-1tg5iDLg.js index c2e8854e2e71678e5f8090b20f0c769f4c6f9a80..ed986b0858f7acb9d5392efd7afa5ceddc4d7c61 100644 --- a/assets/triangle-alert-VQM9i8wl.js +++ b/assets/triangle-alert-1tg5iDLg.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-D2fBL-s6.js";/** +import{c as e}from"./index-BeSw2DVP.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/trophy-DbAb1jY1.js b/assets/trophy-D44BVGMf.js similarity index 93% rename from assets/trophy-DbAb1jY1.js rename to assets/trophy-D44BVGMf.js index cff8c8ddd2a82e0218dcd68873658c9114aaa9ea..13ef02dae18db462012a3d0c1f3d604e5e02080e 100644 --- a/assets/trophy-DbAb1jY1.js +++ b/assets/trophy-D44BVGMf.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-D2fBL-s6.js";/** +import{c as a}from"./index-BeSw2DVP.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/useDebounce-BLmmIPYP.js b/assets/useDebounce-B-RrGVzu.js similarity index 66% rename from assets/useDebounce-BLmmIPYP.js rename to assets/useDebounce-B-RrGVzu.js index d76ffd899af53b6c5a7489ad444a654c3fb2ecb0..86a3e4ab019b9f3de036366df847bf7905d146dd 100644 --- a/assets/useDebounce-BLmmIPYP.js +++ b/assets/useDebounce-B-RrGVzu.js @@ -1 +1 @@ -import{f as o}from"./index-D2fBL-s6.js";function s(e,t=300){const[r,u]=o.useState(e);return o.useEffect(()=>{const c=setTimeout(()=>u(e),t);return()=>clearTimeout(c)},[e,t]),r}export{s as u}; +import{f as o}from"./index-BeSw2DVP.js";function s(e,t=300){const[r,u]=o.useState(e);return o.useEffect(()=>{const c=setTimeout(()=>u(e),t);return()=>clearTimeout(c)},[e,t]),r}export{s as u}; diff --git a/assets/useDocumentTitle-ibepJVy2.js b/assets/useDocumentTitle-BD_JtGPy.js similarity index 96% rename from assets/useDocumentTitle-ibepJVy2.js rename to assets/useDocumentTitle-BD_JtGPy.js index adb9fd9ea6d6877547001bdae1707fa53caf064f..29fff7f32fa7ea264abb43d39831236331ad407a 100644 --- a/assets/useDocumentTitle-ibepJVy2.js +++ b/assets/useDocumentTitle-BD_JtGPy.js @@ -1 +1 @@ -import{f as s}from"./index-D2fBL-s6.js";const E={a:"á",e:"é",i:"í",o:"ó",u:"ú",y:"ý",A:"Á",E:"É",I:"Í",O:"Ó",U:"Ú",Y:"Ý"},p={a:"à",e:"è",i:"ì",o:"ò",u:"ù",A:"À",E:"È",I:"Ì",O:"Ò",U:"Ù"},u={a:"â",e:"ê",i:"î",o:"ô",u:"û",A:"Â",E:"Ê",I:"Î",O:"Ô",U:"Û"},_={a:"ä",e:"ë",i:"ï",o:"ö",u:"ü",y:"ÿ",A:"Ä",E:"Ë",I:"Ï",O:"Ö",U:"Ü",Y:"Ÿ"},T={"'":E,"`":p,"^":u,'"':_,"~":{n:"ñ",N:"Ñ"}},i={ss:"ß",ae:"æ",AE:"Æ",oe:"œ",OE:"Œ",o:"ø",O:"Ø",l:"ł",L:"Ł"},m=[["varphi","φ"],["varepsilon","ε"],["vartheta","ϑ"],["Gamma","Γ"],["Delta","Δ"],["Theta","Θ"],["Lambda","Λ"],["Sigma","Σ"],["Omega","Ω"],["alpha","α"],["beta","β"],["gamma","γ"],["delta","δ"],["epsilon","ε"],["zeta","ζ"],["eta","η"],["theta","θ"],["kappa","κ"],["lambda","λ"],["mu","μ"],["nu","ν"],["xi","ξ"],["pi","π"],["rho","ρ"],["sigma","σ"],["tau","τ"],["phi","φ"],["chi","χ"],["psi","ψ"],["omega","ω"]],L=/\\(?:textbf|mathbf|emph|textit|textsl|texttt|color|textcolor)\{([^{}]*)\}/g,f=/\\(['"`^~])([A-Za-z])/g,C=/\\c\{([cCsS])\}/g,M=new RegExp(`\\\\(${Object.keys(i).join("|")})(?![A-Za-z])`,"g"),g=/\$\$([^$]+)\$\$/g,O=/\$([^$]+)\$/g,$=/\\([A-Za-z]+)/g;function o(e,t,a){return e.split(t).join(a)}function r(e){let t=e.trim();for(const[a,n]of m)t=o(t,`\\${a}`,n);return t=t.replace($,(a,n)=>n),o(t,"$","")}function h(e){let t=e.replace(g,(a,n)=>r(n));return t=t.replace(O,(a,n)=>r(n)),o(t,"$","")}function D(e){if(!e)return e;let t=e.replace(L,"$1");return t=t.replace(C,(a,n)=>({c:"ç",C:"Ç"})[n]??a),t=t.replace(f,(a,n,A)=>{var c;return((c=T[n])==null?void 0:c[A])??a}),t=t.replace(M,(a,n)=>i[n]??a),t=h(t),o(t,"~"," ")}const l="Papers with Code";function I(e,t=l){return`${D(e.trim())||"Paper"} | ${t}`}function R(e,{restorePrevious:t=!1}={}){s.useEffect(()=>{if(!e)return;const a=document.title;return document.title=e,()=>{document.title=t?a:l}},[e,t])}export{I as f,R as u}; +import{f as s}from"./index-BeSw2DVP.js";const E={a:"á",e:"é",i:"í",o:"ó",u:"ú",y:"ý",A:"Á",E:"É",I:"Í",O:"Ó",U:"Ú",Y:"Ý"},p={a:"à",e:"è",i:"ì",o:"ò",u:"ù",A:"À",E:"È",I:"Ì",O:"Ò",U:"Ù"},u={a:"â",e:"ê",i:"î",o:"ô",u:"û",A:"Â",E:"Ê",I:"Î",O:"Ô",U:"Û"},_={a:"ä",e:"ë",i:"ï",o:"ö",u:"ü",y:"ÿ",A:"Ä",E:"Ë",I:"Ï",O:"Ö",U:"Ü",Y:"Ÿ"},T={"'":E,"`":p,"^":u,'"':_,"~":{n:"ñ",N:"Ñ"}},i={ss:"ß",ae:"æ",AE:"Æ",oe:"œ",OE:"Œ",o:"ø",O:"Ø",l:"ł",L:"Ł"},m=[["varphi","φ"],["varepsilon","ε"],["vartheta","ϑ"],["Gamma","Γ"],["Delta","Δ"],["Theta","Θ"],["Lambda","Λ"],["Sigma","Σ"],["Omega","Ω"],["alpha","α"],["beta","β"],["gamma","γ"],["delta","δ"],["epsilon","ε"],["zeta","ζ"],["eta","η"],["theta","θ"],["kappa","κ"],["lambda","λ"],["mu","μ"],["nu","ν"],["xi","ξ"],["pi","π"],["rho","ρ"],["sigma","σ"],["tau","τ"],["phi","φ"],["chi","χ"],["psi","ψ"],["omega","ω"]],L=/\\(?:textbf|mathbf|emph|textit|textsl|texttt|color|textcolor)\{([^{}]*)\}/g,f=/\\(['"`^~])([A-Za-z])/g,C=/\\c\{([cCsS])\}/g,M=new RegExp(`\\\\(${Object.keys(i).join("|")})(?![A-Za-z])`,"g"),g=/\$\$([^$]+)\$\$/g,O=/\$([^$]+)\$/g,$=/\\([A-Za-z]+)/g;function o(e,t,a){return e.split(t).join(a)}function r(e){let t=e.trim();for(const[a,n]of m)t=o(t,`\\${a}`,n);return t=t.replace($,(a,n)=>n),o(t,"$","")}function h(e){let t=e.replace(g,(a,n)=>r(n));return t=t.replace(O,(a,n)=>r(n)),o(t,"$","")}function D(e){if(!e)return e;let t=e.replace(L,"$1");return t=t.replace(C,(a,n)=>({c:"ç",C:"Ç"})[n]??a),t=t.replace(f,(a,n,A)=>{var c;return((c=T[n])==null?void 0:c[A])??a}),t=t.replace(M,(a,n)=>i[n]??a),t=h(t),o(t,"~"," ")}const l="Papers with Code";function I(e,t=l){return`${D(e.trim())||"Paper"} | ${t}`}function R(e,{restorePrevious:t=!1}={}){s.useEffect(()=>{if(!e)return;const a=document.title;return document.title=e,()=>{document.title=t?a:l}},[e,t])}export{I as f,R as u}; diff --git a/assets/useHashScrollOnReady-C36cVkc9.js b/assets/useHashScrollOnReady-BpiOpyLB.js similarity index 90% rename from assets/useHashScrollOnReady-C36cVkc9.js rename to assets/useHashScrollOnReady-BpiOpyLB.js index d7f74de7e5040004eb10afdfee7f4ac7c44a77b6..6721085174ba84c6b5975bb9685e2677ef1e649a 100644 --- a/assets/useHashScrollOnReady-C36cVkc9.js +++ b/assets/useHashScrollOnReady-BpiOpyLB.js @@ -1 +1 @@ -import{j as s,L as h,f as x}from"./index-D2fBL-s6.js";import{S as p}from"./skeleton-BDwfco0_.js";import{A as j,a as m}from"./alert-PnePcfgX.js";import{T as d}from"./trending-up-DFLWFJuY.js";const y=({noun:n,items:e,recentDays:i=30,baselineDays:l=180,isLoading:o,error:t,mono:c})=>!o&&!t&&!(e!=null&&e.length)?null:s.jsxs("section",{id:"trending",className:"taxonomy-trending","aria-label":`Trending ${n}s`,children:[s.jsxs("div",{className:"taxonomy-trending-header",children:[s.jsxs("h2",{children:[s.jsx(d,{size:22,"aria-hidden":"true"}),"Trending"]}),s.jsxs("p",{className:"taxonomy-trending-note",children:[n==="task"?"Tasks":"Methods"," across all areas whose share of papers in the last ",i," days grew the most against the preceding ",l," days."]})]}),t?s.jsx(j,{variant:"destructive",children:s.jsxs(m,{children:["Failed to load trending ",n,"s."]})}):o?s.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((a,r)=>s.jsx(p,{className:"h-20"},r))}):s.jsx("div",{className:"tag-grid",children:e==null?void 0:e.map((a,r)=>s.jsxs(h,{to:a.href,className:"tag-cell",children:[s.jsxs("div",{className:"name",style:c?{fontFamily:"var(--mono)",fontSize:15}:void 0,children:[s.jsx("span",{className:"taxonomy-trending-rank",children:r+1}),a.icon&&s.jsx("span",{className:"task-icon",style:{color:a.iconColor},children:s.jsx(a.icon,{size:16,strokeWidth:2,"aria-hidden":"true"})}),a.name]}),s.jsxs("div",{className:"meta taxonomy-trending-meta",children:[a.areaName&&s.jsxs(s.Fragment,{children:[s.jsx("span",{children:a.areaName}),s.jsx("span",{children:"·"})]}),s.jsxs("span",{children:[a.recentPaperCount.toLocaleString()," papers / ",i,"d"]}),s.jsx("span",{children:"·"}),s.jsxs("span",{className:"method-trend-score taxonomy-trending-lift",title:`Share of recent papers is ${a.shareLift.toFixed(1)}× its baseline share`,children:[s.jsx(d,{size:12,"aria-hidden":"true"}),a.shareLift.toFixed(1),"×"]})]})]},a.id))})]});function v(n){x.useEffect(()=>{var e;!n||!window.location.hash||(e=document.getElementById(window.location.hash.slice(1)))==null||e.scrollIntoView({block:"start"})},[n])}export{y as T,v as u}; +import{j as s,L as h,f as x}from"./index-BeSw2DVP.js";import{S as p}from"./skeleton-BBv4iC5Z.js";import{A as j,a as m}from"./alert-uwP129N7.js";import{T as d}from"./trending-up-Bx9WuS-7.js";const y=({noun:n,items:e,recentDays:i=30,baselineDays:l=180,isLoading:o,error:t,mono:c})=>!o&&!t&&!(e!=null&&e.length)?null:s.jsxs("section",{id:"trending",className:"taxonomy-trending","aria-label":`Trending ${n}s`,children:[s.jsxs("div",{className:"taxonomy-trending-header",children:[s.jsxs("h2",{children:[s.jsx(d,{size:22,"aria-hidden":"true"}),"Trending"]}),s.jsxs("p",{className:"taxonomy-trending-note",children:[n==="task"?"Tasks":"Methods"," across all areas whose share of papers in the last ",i," days grew the most against the preceding ",l," days."]})]}),t?s.jsx(j,{variant:"destructive",children:s.jsxs(m,{children:["Failed to load trending ",n,"s."]})}):o?s.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((a,r)=>s.jsx(p,{className:"h-20"},r))}):s.jsx("div",{className:"tag-grid",children:e==null?void 0:e.map((a,r)=>s.jsxs(h,{to:a.href,className:"tag-cell",children:[s.jsxs("div",{className:"name",style:c?{fontFamily:"var(--mono)",fontSize:15}:void 0,children:[s.jsx("span",{className:"taxonomy-trending-rank",children:r+1}),a.icon&&s.jsx("span",{className:"task-icon",style:{color:a.iconColor},children:s.jsx(a.icon,{size:16,strokeWidth:2,"aria-hidden":"true"})}),a.name]}),s.jsxs("div",{className:"meta taxonomy-trending-meta",children:[a.areaName&&s.jsxs(s.Fragment,{children:[s.jsx("span",{children:a.areaName}),s.jsx("span",{children:"·"})]}),s.jsxs("span",{children:[a.recentPaperCount.toLocaleString()," papers / ",i,"d"]}),s.jsx("span",{children:"·"}),s.jsxs("span",{className:"method-trend-score taxonomy-trending-lift",title:`Share of recent papers is ${a.shareLift.toFixed(1)}× its baseline share`,children:[s.jsx(d,{size:12,"aria-hidden":"true"}),a.shareLift.toFixed(1),"×"]})]})]},a.id))})]});function v(n){x.useEffect(()=>{var e;!n||!window.location.hash||(e=document.getElementById(window.location.hash.slice(1)))==null||e.scrollIntoView({block:"start"})},[n])}export{y as T,v as u}; diff --git a/assets/useInfiniteQuery-CjJA-90e.js b/assets/useInfiniteQuery-C8JHYWz5.js similarity index 94% rename from assets/useInfiniteQuery-CjJA-90e.js rename to assets/useInfiniteQuery-C8JHYWz5.js index dda849c360c2455e498b81a14ad65f9d81fc06ba..d552bd692707facf029940a29bda099ed93a88d5 100644 --- a/assets/useInfiniteQuery-CjJA-90e.js +++ b/assets/useInfiniteQuery-C8JHYWz5.js @@ -1 +1 @@ -import{aN as v,aO as x,aP as p,aQ as N}from"./index-D2fBL-s6.js";var b=class extends v{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var f,P;const{state:s}=e,i=super.createResult(e,t),{isFetching:a,isRefetching:g,isError:c,isRefetchError:d}=i,r=(P=(f=s.fetchMeta)==null?void 0:f.fetchMore)==null?void 0:P.direction,h=c&&r==="forward",n=a&&r==="forward",o=c&&r==="backward",u=a&&r==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:p(t,s.data),hasPreviousPage:x(t,s.data),isFetchNextPageError:h,isFetchingNextPage:n,isFetchPreviousPageError:o,isFetchingPreviousPage:u,isRefetchError:d&&!h&&!o,isRefetching:g&&!n&&!u}}};function O(e,t){return N(e,b)}export{O as u}; +import{aN as v,aO as x,aP as p,aQ as N}from"./index-BeSw2DVP.js";var b=class extends v{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var f,P;const{state:s}=e,i=super.createResult(e,t),{isFetching:a,isRefetching:g,isError:c,isRefetchError:d}=i,r=(P=(f=s.fetchMeta)==null?void 0:f.fetchMore)==null?void 0:P.direction,h=c&&r==="forward",n=a&&r==="forward",o=c&&r==="backward",u=a&&r==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:p(t,s.data),hasPreviousPage:x(t,s.data),isFetchNextPageError:h,isFetchingNextPage:n,isFetchPreviousPageError:o,isFetchingPreviousPage:u,isRefetchError:d&&!h&&!o,isRefetching:g&&!n&&!u}}};function O(e,t){return N(e,b)}export{O as u}; diff --git a/assets/useIntersectionObserver-C0Rq0EXm.js b/assets/useIntersectionObserver-BBx3EHQ9.js similarity index 86% rename from assets/useIntersectionObserver-C0Rq0EXm.js rename to assets/useIntersectionObserver-BBx3EHQ9.js index 8818cfb116091409ddd097024e613234fd65f7a7..8d874e827d49ff1ebf3ac694f76d6ce3b6db5237 100644 --- a/assets/useIntersectionObserver-C0Rq0EXm.js +++ b/assets/useIntersectionObserver-BBx3EHQ9.js @@ -1 +1 @@ -import{f as r}from"./index-D2fBL-s6.js";function b(u={}){const{threshold:t=0,rootMargin:n="0px"}=u,[i,s]=r.useState(!1),e=r.useRef(null),f=r.useCallback(c=>{if(e.current&&(e.current.disconnect(),e.current=null),!c){s(!1);return}const o=new IntersectionObserver(([l])=>s(l.isIntersecting),{threshold:t,rootMargin:n});o.observe(c),e.current=o},[t,n]);return r.useEffect(()=>()=>{e.current&&(e.current.disconnect(),e.current=null)},[]),{targetRef:f,isIntersecting:i}}export{b as u}; +import{f as r}from"./index-BeSw2DVP.js";function b(u={}){const{threshold:t=0,rootMargin:n="0px"}=u,[i,s]=r.useState(!1),e=r.useRef(null),f=r.useCallback(c=>{if(e.current&&(e.current.disconnect(),e.current=null),!c){s(!1);return}const o=new IntersectionObserver(([l])=>s(l.isIntersecting),{threshold:t,rootMargin:n});o.observe(c),e.current=o},[t,n]);return r.useEffect(()=>()=>{e.current&&(e.current.disconnect(),e.current=null)},[]),{targetRef:f,isIntersecting:i}}export{b as u}; diff --git a/assets/useMutation-9dlTbuQj.js b/assets/useMutation-CsS-RfeE.js similarity index 97% rename from assets/useMutation-9dlTbuQj.js rename to assets/useMutation-CsS-RfeE.js index 97b6fe85551b7602f5bd04a1b9c831a815968c11..d60dbe7e952b560036d337c4088221a38019e212 100644 --- a/assets/useMutation-9dlTbuQj.js +++ b/assets/useMutation-CsS-RfeE.js @@ -1 +1 @@ -var R=i=>{throw TypeError(i)};var E=(i,t,s)=>t.has(i)||R("Cannot "+s);var e=(i,t,s)=>(E(i,t,"read from private field"),s?s.call(i):t.get(i)),b=(i,t,s)=>t.has(i)?R("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(i):t.set(i,s),p=(i,t,s,r)=>(E(i,t,"write to private field"),r?r.call(i,s):t.set(i,s),s),y=(i,t,s)=>(E(i,t,"access private method"),s);import{aB as U,aC as k,aD as j,aE as q,aF as P,l as D,f as v,aG as L,aH as A}from"./index-D2fBL-s6.js";var a,c,o,h,n,g,S,w,B=(w=class extends U{constructor(t,s){super();b(this,n);b(this,a);b(this,c);b(this,o);b(this,h);p(this,a,t),this.setOptions(s),this.bindMethods(),y(this,n,g).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var r;const s=this.options;this.options=e(this,a).defaultMutationOptions(t),k(this.options,s)||e(this,a).getMutationCache().notify({type:"observerOptionsUpdated",mutation:e(this,o),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&j(s.mutationKey)!==j(this.options.mutationKey)?this.reset():((r=e(this,o))==null?void 0:r.state.status)==="pending"&&e(this,o).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=e(this,o))==null||t.removeObserver(this)}onMutationUpdate(t){y(this,n,g).call(this),y(this,n,S).call(this,t)}getCurrentResult(){return e(this,c)}reset(){var t;(t=e(this,o))==null||t.removeObserver(this),p(this,o,void 0),y(this,n,g).call(this),y(this,n,S).call(this)}mutate(t,s){var r;return p(this,h,s),(r=e(this,o))==null||r.removeObserver(this),p(this,o,e(this,a).getMutationCache().build(e(this,a),this.options)),e(this,o).addObserver(this),e(this,o).execute(t)}},a=new WeakMap,c=new WeakMap,o=new WeakMap,h=new WeakMap,n=new WeakSet,g=function(){var s;const t=((s=e(this,o))==null?void 0:s.state)??q();p(this,c,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},S=function(t){P.batch(()=>{var s,r,u,f,d,O,x,K;if(e(this,h)&&this.hasListeners()){const m=e(this,c).variables,C=e(this,c).context,M={client:e(this,a),meta:this.options.meta,mutationKey:this.options.mutationKey};if((t==null?void 0:t.type)==="success"){try{(r=(s=e(this,h)).onSuccess)==null||r.call(s,t.data,m,C,M)}catch(l){Promise.reject(l)}try{(f=(u=e(this,h)).onSettled)==null||f.call(u,t.data,null,m,C,M)}catch(l){Promise.reject(l)}}else if((t==null?void 0:t.type)==="error"){try{(O=(d=e(this,h)).onError)==null||O.call(d,t.error,m,C,M)}catch(l){Promise.reject(l)}try{(K=(x=e(this,h)).onSettled)==null||K.call(x,void 0,t.error,m,C,M)}catch(l){Promise.reject(l)}}}this.listeners.forEach(m=>{m(e(this,c))})})},w);function H(i,t){const s=D(),[r]=v.useState(()=>new B(s,i));v.useEffect(()=>{r.setOptions(i)},[r,i]);const u=v.useSyncExternalStore(v.useCallback(d=>r.subscribe(P.batchCalls(d)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),f=v.useCallback((d,O)=>{r.mutate(d,O).catch(L)},[r]);if(u.error&&A(r.options.throwOnError,[u.error]))throw u.error;return{...u,mutate:f,mutateAsync:u.mutate}}export{H as u}; +var R=i=>{throw TypeError(i)};var E=(i,t,s)=>t.has(i)||R("Cannot "+s);var e=(i,t,s)=>(E(i,t,"read from private field"),s?s.call(i):t.get(i)),b=(i,t,s)=>t.has(i)?R("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(i):t.set(i,s),p=(i,t,s,r)=>(E(i,t,"write to private field"),r?r.call(i,s):t.set(i,s),s),y=(i,t,s)=>(E(i,t,"access private method"),s);import{aB as U,aC as k,aD as j,aE as q,aF as P,l as D,f as v,aG as L,aH as A}from"./index-BeSw2DVP.js";var a,c,o,h,n,g,S,w,B=(w=class extends U{constructor(t,s){super();b(this,n);b(this,a);b(this,c);b(this,o);b(this,h);p(this,a,t),this.setOptions(s),this.bindMethods(),y(this,n,g).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var r;const s=this.options;this.options=e(this,a).defaultMutationOptions(t),k(this.options,s)||e(this,a).getMutationCache().notify({type:"observerOptionsUpdated",mutation:e(this,o),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&j(s.mutationKey)!==j(this.options.mutationKey)?this.reset():((r=e(this,o))==null?void 0:r.state.status)==="pending"&&e(this,o).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=e(this,o))==null||t.removeObserver(this)}onMutationUpdate(t){y(this,n,g).call(this),y(this,n,S).call(this,t)}getCurrentResult(){return e(this,c)}reset(){var t;(t=e(this,o))==null||t.removeObserver(this),p(this,o,void 0),y(this,n,g).call(this),y(this,n,S).call(this)}mutate(t,s){var r;return p(this,h,s),(r=e(this,o))==null||r.removeObserver(this),p(this,o,e(this,a).getMutationCache().build(e(this,a),this.options)),e(this,o).addObserver(this),e(this,o).execute(t)}},a=new WeakMap,c=new WeakMap,o=new WeakMap,h=new WeakMap,n=new WeakSet,g=function(){var s;const t=((s=e(this,o))==null?void 0:s.state)??q();p(this,c,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},S=function(t){P.batch(()=>{var s,r,u,f,d,O,x,K;if(e(this,h)&&this.hasListeners()){const m=e(this,c).variables,C=e(this,c).context,M={client:e(this,a),meta:this.options.meta,mutationKey:this.options.mutationKey};if((t==null?void 0:t.type)==="success"){try{(r=(s=e(this,h)).onSuccess)==null||r.call(s,t.data,m,C,M)}catch(l){Promise.reject(l)}try{(f=(u=e(this,h)).onSettled)==null||f.call(u,t.data,null,m,C,M)}catch(l){Promise.reject(l)}}else if((t==null?void 0:t.type)==="error"){try{(O=(d=e(this,h)).onError)==null||O.call(d,t.error,m,C,M)}catch(l){Promise.reject(l)}try{(K=(x=e(this,h)).onSettled)==null||K.call(x,void 0,t.error,m,C,M)}catch(l){Promise.reject(l)}}}this.listeners.forEach(m=>{m(e(this,c))})})},w);function H(i,t){const s=D(),[r]=v.useState(()=>new B(s,i));v.useEffect(()=>{r.setOptions(i)},[r,i]);const u=v.useSyncExternalStore(v.useCallback(d=>r.subscribe(P.batchCalls(d)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),f=v.useCallback((d,O)=>{r.mutate(d,O).catch(L)},[r]);if(u.error&&A(r.options.throwOnError,[u.error]))throw u.error;return{...u,mutate:f,mutateAsync:u.mutate}}export{H as u}; diff --git a/assets/usePapers-CAjdcUuj.js b/assets/usePapers-Cj1tt_u6.js similarity index 63% rename from assets/usePapers-CAjdcUuj.js rename to assets/usePapers-Cj1tt_u6.js index 6155db184b9192d0fed3213cc29e8786d98bea41..1c60598ef4e17159f9a66bec2390b4feb304a008 100644 --- a/assets/usePapers-CAjdcUuj.js +++ b/assets/usePapers-Cj1tt_u6.js @@ -1 +1 @@ -import{b as s,T as u,p as i}from"./index-D2fBL-s6.js";import{u as m}from"./useInfiniteQuery-CjJA-90e.js";import{p as o}from"./papers-khuZaSFb.js";function g(e,t=!0){return s({queryKey:i.detail(e),queryFn:()=>o.get(e),enabled:t&&!!e,staleTime:u})}function y(e,t,{enabled:n=!0,initialPage:p=1}={}){return m({queryKey:e,queryFn:({pageParam:a})=>t(a),initialPageParam:p,getNextPageParam:a=>a.next_page??void 0,enabled:n,staleTime:5*60*1e3,placeholderData:(a,r)=>(r==null?void 0:r.queryKey[0])===e[0]?a:void 0})}export{g as a,y as u}; +import{b as s,T as u,p as i}from"./index-BeSw2DVP.js";import{u as m}from"./useInfiniteQuery-C8JHYWz5.js";import{p as o}from"./papers-B58HJw9r.js";function g(e,t=!0){return s({queryKey:i.detail(e),queryFn:()=>o.get(e),enabled:t&&!!e,staleTime:u})}function y(e,t,{enabled:n=!0,initialPage:p=1}={}){return m({queryKey:e,queryFn:({pageParam:a})=>t(a),initialPageParam:p,getNextPageParam:a=>a.next_page??void 0,enabled:n,staleTime:5*60*1e3,placeholderData:(a,r)=>(r==null?void 0:r.queryKey[0])===e[0]?a:void 0})}export{g as a,y as u}; diff --git a/index.html b/index.html index 3c3532b7429da03c1d6b78e875a732bd548c072f..11b64ad55ea886f4fc24d4e763ed3ce050d0769a 100644 --- a/index.html +++ b/index.html @@ -72,7 +72,7 @@ plausible.init(); })(); - +