diff --git a/assets/AgentLogos-CJgsqwCs.js b/assets/AgentLogos-C26IQbJ9.js similarity index 99% rename from assets/AgentLogos-CJgsqwCs.js rename to assets/AgentLogos-C26IQbJ9.js index 19b1ec028ca56c8b20cf8727e72bb61250d97735..fa93f7b8881616d1e8918531aca2c4a4322c069f 100644 --- a/assets/AgentLogos-CJgsqwCs.js +++ b/assets/AgentLogos-C26IQbJ9.js @@ -1 +1 @@ -import{j as e}from"./index-C1Xuuz1Y.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-DMjO_toh.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-DZKef9lV.js b/assets/AiDeadlinesView-BwYw1rSE.js similarity index 97% rename from assets/AiDeadlinesView-DZKef9lV.js rename to assets/AiDeadlinesView-BwYw1rSE.js index fb9a81952dce581fa4d79c4a6677fcc06fcee875..7991531fea1125dccbfd3f030b39d9536cf8447c 100644 --- a/assets/AiDeadlinesView-DZKef9lV.js +++ b/assets/AiDeadlinesView-BwYw1rSE.js @@ -1,3 +1,3 @@ -import{i as y,j as t,b as A,v as L}from"./index-C1Xuuz1Y.js";import{S as B}from"./switch-BrihALZS.js";import{S as W}from"./skeleton-D8hFkZOU.js";import{A as U,a as M}from"./alert-UfpiwFIJ.js";import{s as $}from"./safeExternalHref-CkBrsh84.js";import{D as O,a as V,c as P,b as G,d as H}from"./dialog-CCU_33Ju.js";import{s as Q,n as S,f as _,p as Y,u as N,l as k,a as E,c as b,D as K,i as z,b as R,d as q}from"./deadlines-BG5SWwEG.js";import"./index-CNkd3QcT.js";const w={fontFamily:"var(--mono)",fontSize:10,letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--ink-faint)"},J=(e,s)=>{const l=Math.ceil((e-s)/K);return l<=0?"passed":`${l} ${l===1?"day":"days"}`},F=(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{i as y,j as t,b as A,v as L}from"./index-DMjO_toh.js";import{S as B}from"./switch-t5rMaesI.js";import{S as W}from"./skeleton-DiGWALrs.js";import{A as U,a as M}from"./alert-B2i0PAyW.js";import{s as $}from"./safeExternalHref-CkBrsh84.js";import{D as O,a as V,c as P,b as G,d as H}from"./dialog-C-drkhvX.js";import{s as Q,n as S,f as _,p as Y,u as N,l as k,a as E,c as b,D as K,i as z,b as R,d as q}from"./deadlines-BG5SWwEG.js";import"./index-BgYoYvBg.js";const w={fontFamily:"var(--mono)",fontSize:10,letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--ink-faint)"},J=(e,s)=>{const l=Math.ceil((e-s)/K);return l<=0?"passed":`${l} ${l===1?"day":"days"}`},F=(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(` `)},C=e=>e.toISOString().replace(/[-:]/g,"").replace(/\.\d{3}/,""),X=(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(", "),a=`https://calendar.google.com/calendar/render?action=TEMPLATE&text=${encodeURIComponent(o)}&dates=${C(l)}/${C(r)}&details=${encodeURIComponent(F(e,s))}&location=${encodeURIComponent(h)}`,p=$(a);p&&window.open(p,"_blank","noopener,noreferrer")},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(", "),a=["BEGIN:VCALENDAR","VERSION:2.0","BEGIN:VEVENT",e.url?`URL:${e.url}`:null,`DTSTART:${C(l)}`,`DTEND:${C(r)}`,`SUMMARY:${o}`,`DESCRIPTION:${F(e,s).replace(/\n/g,"\\n")}`,h?`LOCATION:${h}`:null,"END:VEVENT","END:VCALENDAR"].filter(Boolean).join(` `),p=new Blob([a],{type:"text/calendar;charset=utf-8"}),d=document.createElement("a");d.href=URL.createObjectURL(p),d.download=`${(e.short_name||e.name).toLowerCase().replace(/\s+/g,"-")}-deadline.ics`,document.body.appendChild(d),d.click(),document.body.removeChild(d),URL.revokeObjectURL(d.href)},ee=({conf:e,open: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?Q(e):[],[e]),a=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=a?new Date(a.deadline_at).getTime():null;return t.jsx(O,{open:s,onOpenChange:l,children:t.jsx(V,{className:"max-w-xl",style:{background:"var(--bg-elevated)",maxHeight:"85vh",overflowY:"auto"},children:e&&t.jsxs(t.Fragment,{children:[t.jsxs(P,{children:[t.jsx(G,{asChild:!0,children:t.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.01em",margin:0},children:e.short_name?`${e.short_name} ${e.year??""}`.trim():e.name})}),e.short_name&&e.name||e.description?t.jsx(H,{asChild:!0,children:t.jsx("span",{style:{fontFamily:"var(--serif)",fontSize:14,color:"var(--ink-soft)"},children:e.short_name?e.name:e.description})}):null]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:20,marginTop:4},children:[t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:24},children:[p&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[t.jsx("span",{style:w,children:"Dates"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-soft)"},children:p})]}),d&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[t.jsx("span",{style:w,children:"Venue"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-soft)"},children:d})]})]}),m!=null&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,padding:"12px 14px",borderRadius:8,background:"var(--bg-subtle)",border:"1px solid var(--hairline)"},children:[t.jsx("span",{style:w,children:"Next deadline in"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:22,fontWeight:600,color:N(m,r)},children:Y(m,r)})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[t.jsx("span",{style:w,children:"Important deadlines"}),h.length===0?t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-faint)"},children:"Deadlines not announced yet"}):h.map((i,c)=>{const f=new Date(i.deadline_at).getTime(),n=a!=null&&i.deadline_at===a.deadline_at&&i.type===a.type,u=f<=r;return t.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12,padding:"8px 12px",borderRadius:6,background:n?"var(--accent-soft)":"transparent",border:n?"1px solid var(--hairline-strong)":"1px solid var(--hairline)",opacity:u&&!n?.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:n?600:400},children:[i.label||k(i.type||"deadline"),n&&t.jsx("span",{style:{...w,marginLeft:8},children:"Next"})]}),t.jsxs("span",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-faint)"},children:[E(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:J(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 ↗"}),a&&t.jsxs("div",{style:{display:"flex",gap:12,marginLeft:"auto"},children:[t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>X(e,a),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Google Calendar"}),t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>Z(e,a),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(B,{id:e,checked:l,onCheckedChange:r}),t.jsx("label",{htmlFor:e,style:{cursor:"pointer"},children:s})]}),te=({conf:e,now:s,selectedDomains:l,onToggleDomain:r,onOpen:o})=>{const h=S(e,s),a=h??R(e),p=a?new Date(a.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:(a==null?void 0:a.label)||(a==null?void 0:a.type)||"Deadlines"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:a?`${E(a.deadline_at)}${a.timezone?` · ${a.timezone}`:""}`:"Not announced yet"})]}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:14,fontWeight:600,color:d,whiteSpace:"nowrap"},children:p!=null?q(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:n=>{n.stopPropagation(),r(c)},style:{background:f?"var(--ink)":"var(--bg-subtle)",color:f?"var(--bg)":"var(--ink-soft)"},children:k(c)},c)})})]})},ce=()=>{const[e,s]=y.useState(!0),[l,r]=y.useState(!1),[o,h]=y.useState(new Set),[a,p]=y.useState(null),d=y.useMemo(()=>Date.now(),[]),m=A(L.conferenceDeadlines()),i=n=>{h(u=>{const x=new Set(u);return x.has(n)?x.delete(n):x.add(n),x})},c=y.useMemo(()=>{var u;const n=new Map;return(u=m.data)==null||u.results.forEach(x=>{b(x).forEach(j=>n.set(j,(n.get(j)??0)+1))}),Array.from(n.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&&!z(g)&&!S(g,d))),x=g=>{const D=S(g,d);if(D)return{group:0,time:new Date(D.deadline_at).getTime()};if(z(g))return{group:1,time:g.start_date?new Date(g.start_date).getTime():0};const v=R(g);return{group:2,time:-(v?new Date(v.deadline_at).getTime():0)}};return[...u].sort((g,D)=>{const v=x(g),T=x(D);return v.group!==T.group?v.group-T.group:v.time-T.time})},[m.data,e,l,o,d]);return m.error?t.jsx("div",{className:"page",children:t.jsx(U,{variant:"destructive",children:t.jsx(M,{children:"Failed to load conference deadlines. Please try again."})})}):t.jsxs("div",{className:"page",children:[t.jsx("div",{className:"feed-header",children:t.jsxs("div",{children:[t.jsxs("h1",{className:"feed-title",children:["AI Conference ",t.jsx("em",{children:"Deadlines"})]}),t.jsx("div",{className:"feed-subtitle",children:"Upcoming submission deadlines for major AI conferences, counting down."})]})}),t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:20,padding:"16px 0",borderBottom:"1px solid var(--hairline)",marginBottom:24},children:[t.jsx(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(n=>{const u=o.has(n);return t.jsx("button",{className:"tag-chip",onClick:()=>i(n),style:{background:u?"var(--ink)":"var(--bg-subtle)",color:u?"var(--bg)":"var(--ink-soft)"},children:k(n)},n)}),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((n,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(n=>t.jsx(te,{conf:n,now:d,selectedDomains:o,onToggleDomain:i,onOpen:p},n.id))}),t.jsx(ee,{conf:a,open:a!==null,onOpenChange:n=>{n||p(null)}})]})};export{ce as default}; diff --git a/assets/ApiDocsView-7qPalr9E.js b/assets/ApiDocsView-DyP_0MsP.js similarity index 98% rename from assets/ApiDocsView-7qPalr9E.js rename to assets/ApiDocsView-DyP_0MsP.js index 4b01c025c1ec4ca67593cb9820946c9fcd4161e1..6a101c354c21c03ef2d0be03ee3d1a16d759e876 100644 --- a/assets/ApiDocsView-7qPalr9E.js +++ b/assets/ApiDocsView-DyP_0MsP.js @@ -1,4 +1,4 @@ -import{av as m,b as f,i as h,j as e}from"./index-C1Xuuz1Y.js";import{u as g}from"./useDocumentTitle-DS68IpOJ.js";import{M as y}from"./index-SntObKrh.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{av as m,b as f,i as h,j as e}from"./index-DMjO_toh.js";import{u as g}from"./useDocumentTitle-DVQ2ceqw.js";import{M as y}from"./index-ruElXN5Q.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-CJqBHh3n.js b/assets/AreaSection-BdgwTHWx.js similarity index 88% rename from assets/AreaSection-CJqBHh3n.js rename to assets/AreaSection-BdgwTHWx.js index 07dd3541a6ae895e96b1c2358ce0042164ad463f..68df40d2da702bf6be544690381f4430d3189ca5 100644 --- a/assets/AreaSection-CJqBHh3n.js +++ b/assets/AreaSection-BdgwTHWx.js @@ -1 +1 @@ -import{j as s}from"./index-C1Xuuz1Y.js";import{S as l}from"./skeleton-D8hFkZOU.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-DMjO_toh.js";import{S as l}from"./skeleton-DiGWALrs.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-_difWBZx.js b/assets/AstraForRoboticsView-Csl6OWzU.js similarity index 90% rename from assets/AstraForRoboticsView-_difWBZx.js rename to assets/AstraForRoboticsView-Csl6OWzU.js index 2f9dd4be01f1d23fe36f8ab86069e6650076851a..5b75e858f85d9f97472be343f034b6f2104e0902 100644 --- a/assets/AstraForRoboticsView-_difWBZx.js +++ b/assets/AstraForRoboticsView-Csl6OWzU.js @@ -1 +1 @@ -import{w as p,i as u,j as a,L as o,B as g}from"./index-C1Xuuz1Y.js";import{b as x,u as b,c as f,P as j}from"./usePapers-DzSHAOm5.js";import{A as y,a as v}from"./alert-UfpiwFIJ.js";import{u as k,f as w}from"./useDocumentTitle-DS68IpOJ.js";import{t as A}from"./transform-btCQtWTl.js";import"./PaperCard-DjlN6X2v.js";import"./AuthorAvatar-DqCnji_B.js";import"./SotaBadges-B5MVNUr2.js";import"./colors-BkWRhvFI.js";import"./Icon-BADQ_q7j.js";import"./LatexTitle-B0RfzwYI.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-C1A8cBwB.js";import"./skeleton-D8hFkZOU.js";import"./useIntersectionObserver-CwCTFEhv.js";import"./useInfiniteQuery-D52ptoDl.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=x(),e=b(p.list({task:n,method:i,...s.filters}),r=>g.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(f,{feed:s,showDateFilter:!1}),e.error?a.jsx(y,{variant:"destructive",children:a.jsx(v,{children:"Failed to load the collection. Please try again."})}):a.jsx(j,{query:e,cards:t,empty:"No papers match this selection yet."})]})};export{B as default}; +import{w as p,i as u,j as a,L as o,B as g}from"./index-DMjO_toh.js";import{b as x,u as b,c as f,P as j}from"./usePapers-DCcqZCMM.js";import{A as y,a as v}from"./alert-B2i0PAyW.js";import{u as k,f as w}from"./useDocumentTitle-DVQ2ceqw.js";import{t as A}from"./transform-CXoeFMaW.js";import"./PaperCard-CUJXx9SW.js";import"./AuthorAvatar-DFoIK6Bc.js";import"./SotaBadges-CHGUskQn.js";import"./colors-BkWRhvFI.js";import"./Icon-D5cUFATZ.js";import"./LatexTitle-BRJTz_K0.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-MF6JD1Yi.js";import"./skeleton-DiGWALrs.js";import"./useIntersectionObserver-CU-1-_ok.js";import"./useInfiniteQuery-C91fE_fV.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=x(),e=b(p.list({task:n,method:i,...s.filters}),r=>g.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(f,{feed:s,showDateFilter:!1}),e.error?a.jsx(y,{variant:"destructive",children:a.jsx(v,{children:"Failed to load the collection. Please try again."})}):a.jsx(j,{query:e,cards:t,empty:"No papers match this selection yet."})]})};export{B as default}; diff --git a/assets/AuthorAvatar-DqCnji_B.js b/assets/AuthorAvatar-DFoIK6Bc.js similarity index 86% rename from assets/AuthorAvatar-DqCnji_B.js rename to assets/AuthorAvatar-DFoIK6Bc.js index 5736d1d7572fbd6e22c404c0551042f521452154..01177e0a2855cb814cd840210b6dcf682b576288 100644 --- a/assets/AuthorAvatar-DqCnji_B.js +++ b/assets/AuthorAvatar-DFoIK6Bc.js @@ -1 +1 @@ -import{i as c,j as r}from"./index-C1Xuuz1Y.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{i as c,j as r}from"./index-DMjO_toh.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-2OMsjKmR.js b/assets/AuthorDetailView-IWnDx7CU.js similarity index 78% rename from assets/AuthorDetailView-2OMsjKmR.js rename to assets/AuthorDetailView-IWnDx7CU.js index 2fe6f71dfa8df22c1a8913c144b59c1721b61ed6..5b3fd223acb3dbc95ca9ea0cd99464fa6fdbcfec 100644 --- a/assets/AuthorDetailView-2OMsjKmR.js +++ b/assets/AuthorDetailView-IWnDx7CU.js @@ -1 +1 @@ -import{u as _,j as a,b,w as N,i as v,m as F,aK as A,L as y,K as P,B as k}from"./index-C1Xuuz1Y.js";import{A as $}from"./AuthorAvatar-DqCnji_B.js";import{b as S,u as w,c as L,P as R}from"./usePapers-DzSHAOm5.js";import{R as z}from"./ResearchFollowButton-9sh3MNHN.js";import{A as C,a as H}from"./alert-UfpiwFIJ.js";import{S as B}from"./skeleton-D8hFkZOU.js";import{t as K}from"./transform-btCQtWTl.js";import m from"./NotFound-BVs_mdc4.js";import"./PaperCard-DjlN6X2v.js";import"./SotaBadges-B5MVNUr2.js";import"./colors-BkWRhvFI.js";import"./Icon-BADQ_q7j.js";import"./LatexTitle-B0RfzwYI.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-C1A8cBwB.js";import"./useIntersectionObserver-CwCTFEhv.js";import"./useInfiniteQuery-D52ptoDl.js";import"./researchTopic-BU8M-7Qo.js";import"./useMutation-Cb0wrKBq.js";import"./plus-VBQCmtt2.js";const Q=({authorId:r})=>{var n,i,l,c,p,d,h,u;const o=S(),{searchParams:g}=o,e=b(P.author(r)),s=w(N.list({author:r,...o.filters}),t=>k.list({...o.filters,author:r,page:t,page_size:12})),f=v.useMemo(()=>{var t;return(((t=s.data)==null?void 0:t.pages)??[]).flatMap(j=>j.results.map(K))},[s.data]),x=((i=(n=s.data)==null?void 0:n.pages[0])==null?void 0:i.count)??0;if(F(e.error))return a.jsx(m,{});if((l=e.data)!=null&&l.organization_slug){const t=g.toString();return a.jsx(A,{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(y,{to:"/",children:"Home"}),a.jsx("span",{children:" / "}),a.jsx("span",{children:"Authors"}),a.jsx("span",{children:" / "}),a.jsx("span",{children:((c=e.data)==null?void 0:c.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:[(p=e.data)!=null&&p.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($,{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(B,{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(z,{kind:"author",entityId:e.data.id})]}),a.jsx(L,{feed:o,style:{alignItems:"center",gap:16},children:a.jsxs("div",{className:"results-count",children:[x.toLocaleString()," papers"]})}),s.error?a.jsx(C,{variant:"destructive",children:a.jsxs(H,{children:["Failed to load papers."," ",a.jsx("button",{type:"button",onClick:()=>void s.refetch(),children:"Try again"})]})}):a.jsx(R,{query:s,cards:f,empty:((u=e.data)==null?void 0:u.paper_count)===0?"No public papers are available.":"No papers found for this selection."})]})},oa=()=>{const{authorId:r}=_();return r?a.jsx(Q,{authorId:r},r):a.jsx(m,{})};export{oa as default}; +import{u as _,j as a,b,w as N,i as v,m as F,aK as A,L as y,K as P,B as k}from"./index-DMjO_toh.js";import{A as $}from"./AuthorAvatar-DFoIK6Bc.js";import{b as S,u as w,c as L,P as R}from"./usePapers-DCcqZCMM.js";import{R as z}from"./ResearchFollowButton-BCRaiBQA.js";import{A as C,a as H}from"./alert-B2i0PAyW.js";import{S as B}from"./skeleton-DiGWALrs.js";import{t as K}from"./transform-CXoeFMaW.js";import m from"./NotFound-E4uwO9V5.js";import"./PaperCard-CUJXx9SW.js";import"./SotaBadges-CHGUskQn.js";import"./colors-BkWRhvFI.js";import"./Icon-D5cUFATZ.js";import"./LatexTitle-BRJTz_K0.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-MF6JD1Yi.js";import"./useIntersectionObserver-CU-1-_ok.js";import"./useInfiniteQuery-C91fE_fV.js";import"./researchTopic-hhMPs4g3.js";import"./useMutation-Db093XSk.js";import"./plus-B4ZP41Rg.js";const Q=({authorId:r})=>{var n,i,l,c,p,d,h,u;const o=S(),{searchParams:g}=o,e=b(P.author(r)),s=w(N.list({author:r,...o.filters}),t=>k.list({...o.filters,author:r,page:t,page_size:12})),f=v.useMemo(()=>{var t;return(((t=s.data)==null?void 0:t.pages)??[]).flatMap(j=>j.results.map(K))},[s.data]),x=((i=(n=s.data)==null?void 0:n.pages[0])==null?void 0:i.count)??0;if(F(e.error))return a.jsx(m,{});if((l=e.data)!=null&&l.organization_slug){const t=g.toString();return a.jsx(A,{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(y,{to:"/",children:"Home"}),a.jsx("span",{children:" / "}),a.jsx("span",{children:"Authors"}),a.jsx("span",{children:" / "}),a.jsx("span",{children:((c=e.data)==null?void 0:c.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:[(p=e.data)!=null&&p.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($,{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(B,{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(z,{kind:"author",entityId:e.data.id})]}),a.jsx(L,{feed:o,style:{alignItems:"center",gap:16},children:a.jsxs("div",{className:"results-count",children:[x.toLocaleString()," papers"]})}),s.error?a.jsx(C,{variant:"destructive",children:a.jsxs(H,{children:["Failed to load papers."," ",a.jsx("button",{type:"button",onClick:()=>void s.refetch(),children:"Try again"})]})}):a.jsx(R,{query:s,cards:f,empty:((u=e.data)==null?void 0:u.paper_count)===0?"No public papers are available.":"No papers found for this selection."})]})},oa=()=>{const{authorId:r}=_();return r?a.jsx(Q,{authorId:r},r):a.jsx(m,{})};export{oa as default}; diff --git a/assets/AuthorizePaperEditView-BFjGjwg0.js b/assets/AuthorizePaperEditView-BOFahK60.js similarity index 93% rename from assets/AuthorizePaperEditView-BFjGjwg0.js rename to assets/AuthorizePaperEditView-BOFahK60.js index 62a2d56b607428b67089888859533569c42a61d7..77fcfabbd690ba1cce5f5faccb8467b91f08ac18 100644 --- a/assets/AuthorizePaperEditView-BFjGjwg0.js +++ b/assets/AuthorizePaperEditView-BOFahK60.js @@ -1 +1 @@ -import{u as o,a as u,b as d,p as l,j as e,L as p,H as c,c as h}from"./index-C1Xuuz1Y.js";import{u as g}from"./useMutation-Cb0wrKBq.js";import{B as m}from"./button-DMLWlhJJ.js";function f(){const{authorizationId:i=""}=o(),{user:s,isLoading:n}=u(),t=d({...l.authorization(i),retry:!1}),r=g({mutationFn:()=>h.approve(i)}),a=t.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"}),(t.isLoading||n)&&e.jsx("p",{children:"Loading authorization…"}),t.error&&e.jsx("p",{role:"alert",children:t.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(m,{disabled:r.isPending||!s.can_directly_edit_catalog,onClick:()=>r.mutate(),children:r.isPending?"Authorizing…":"Authorize for one hour"}),!s.can_directly_edit_catalog&&e.jsx("p",{children:"Direct editing is unavailable for this session."})]}):e.jsx(c,{returnTo:`/authorize-paper-edit/${i}`,label:"Sign in with Hugging Face"}),r.error&&e.jsx("p",{role:"alert",children:r.error.message})]})]})}export{f as default}; +import{u as o,a as u,b as d,p as l,j as e,L as p,H as c,c as h}from"./index-DMjO_toh.js";import{u as g}from"./useMutation-Db093XSk.js";import{B as m}from"./button-BGphIht2.js";function f(){const{authorizationId:i=""}=o(),{user:s,isLoading:n}=u(),t=d({...l.authorization(i),retry:!1}),r=g({mutationFn:()=>h.approve(i)}),a=t.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"}),(t.isLoading||n)&&e.jsx("p",{children:"Loading authorization…"}),t.error&&e.jsx("p",{role:"alert",children:t.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(m,{disabled:r.isPending||!s.can_directly_edit_catalog,onClick:()=>r.mutate(),children:r.isPending?"Authorizing…":"Authorize for one hour"}),!s.can_directly_edit_catalog&&e.jsx("p",{children:"Direct editing is unavailable for this session."})]}):e.jsx(c,{returnTo:`/authorize-paper-edit/${i}`,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-B6I2GPOQ.js b/assets/AutonomousOperations-Dh-ifubq.js similarity index 95% rename from assets/AutonomousOperations-B6I2GPOQ.js rename to assets/AutonomousOperations-Dh-ifubq.js index 092b903e0e6272276b5c1f960a3fdf2790e825b5..ae003a54d3abf0f41ee8d50e39df66749e64856e 100644 --- a/assets/AutonomousOperations-B6I2GPOQ.js +++ b/assets/AutonomousOperations-Dh-ifubq.js @@ -1 +1 @@ -import{o as R,i as d,b as B,_ as A,j as e,L as q,aV as _}from"./index-C1Xuuz1Y.js";import{u as Q}from"./useMutation-Cb0wrKBq.js";import{C as i,e as n,S as H,b as l,c as r,t as E,f as m}from"./CronDashboard-BtUcBsc0.js";import{B as I}from"./badge-_8Y6CJzv.js";import{B as x}from"./button-DMLWlhJJ.js";import{I as h}from"./input-DJqx9Wtu.js";import{A as P}from"./activity-BCn9520W.js";import{A as D}from"./arrow-left-B9GmgZLS.js";const u={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"},J=()=>{var C;const M=R(),[j,T]=d.useState(""),[p,g]=d.useState(""),[f,v]=d.useState({}),[b,N]=d.useState(""),c=B({...A.autonomousOperations(),refetchInterval:3e4,retry:!1}),t=Q({mutationFn:s=>s(),onSuccess:s=>{M.setQueryData(A.autonomousOperations().queryKey,s),g(""),v({}),N("")}}),a=c.data,y=t.error instanceof Error?t.error.message:null;if(c.isLoading)return e.jsx("div",{className:"page","aria-busy":"true",children:"Loading autonomous operations…"});if(c.error||!a)return e.jsxs("div",{className:"page",children:[e.jsx("h1",{children:"Autonomous operations unavailable"}),e.jsx("p",{children:c.error instanceof Error?c.error.message:"No status was returned."})]});const O=()=>t.mutate(()=>_.setAutonomousManualMode(!a.manual_mode,a.revision,p)),k=(s,o)=>t.mutate(()=>_.setAutonomousOperator(s,o,a.revision,f[s]??"")),w=()=>{var o;const s=((o=a.baseline)==null?void 0:o.revision)??0;t.mutate(()=>_.qualifyAutonomousChatBaseline(j,s,b))};return e.jsx("div",{className:"cron-dashboard","data-shadcn":!0,children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8 space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between gap-4 flex-wrap",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"text-3xl font-bold flex items-center gap-3",children:[e.jsx(P,{className:"h-8 w-8"}),"Autonomous operations"]}),e.jsx("p",{className:"mt-2 cron-muted",children:"Content-free supervision, remote controls, and bounded audit history."})]}),e.jsx(x,{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(i,{className:"cron-status--degraded",role:"status",children:e.jsxs(n,{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(i,{className:E(S[a.display_state]),children:[e.jsx(l,{children:e.jsx(r,{className:"text-sm",children:"Overall state"})}),e.jsxs(n,{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(i,{children:[e.jsx(l,{children:e.jsx(r,{className:"text-sm",children:"Codex cost"})}),e.jsxs(n,{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(i,{children:[e.jsx(l,{children:e.jsx(r,{className:"text-sm",children:"Repair lease"})}),e.jsxs(n,{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(i,{children:[e.jsx(l,{children:e.jsx(r,{className:"text-sm",children:"Global control"})}),e.jsxs(n,{className:"space-y-2",children:[e.jsx(h,{"aria-label":"Manual mode confirmation",value:p,onChange:s=>g(s.target.value),placeholder:"Type SET_MANUAL_MODE"}),e.jsx(x,{disabled:t.isPending||p!=="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(i,{className:E(S[s.status]),children:[e.jsx(l,{children:e.jsxs(r,{className:"flex justify-between gap-2",children:[e.jsx("span",{children:u[s.operator]}),e.jsx(I,{children:s.status})]})}),e.jsxs(n,{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(h,{"aria-label":`${u[s.operator]} confirmation`,value:f[s.operator]??"",onChange:o=>v(L=>({...L,[s.operator]:o.target.value})),placeholder:"Type SET_OPERATOR_STATE"}),e.jsx(x,{disabled:t.isPending||a.manual_mode&&!s.enabled||f[s.operator]!=="SET_OPERATOR_STATE",onClick:()=>k(s.operator,!s.enabled),children:s.enabled?"Disable":"Enable"})]})]},s.operator))}),e.jsxs(i,{children:[e.jsx(l,{children:e.jsx(r,{children:"Qualified scalable-chat baseline"})}),e.jsxs(n,{className:"space-y-3",children:[e.jsx("p",{className:"font-mono break-all",children:((C=a.baseline)==null?void 0:C.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(h,{"aria-label":"Exact baseline SHA",value:j,onChange:s=>T(s.target.value),placeholder:"40-character lowercase commit SHA"}),e.jsx(h,{"aria-label":"Baseline confirmation",value:b,onChange:s=>N(s.target.value),placeholder:"Type QUALIFY_CHAT_BASELINE"}),e.jsx(x,{disabled:t.isPending||!/^[0-9a-f]{40}$/.test(j)||b!=="QUALIFY_CHAT_BASELINE",onClick:w,children:"Qualify exact SHA"})]})]})]}),e.jsxs(i,{children:[e.jsx(l,{children:e.jsx(r,{children:"Provider and fallback state"})}),e.jsx(n,{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(i,{children:[e.jsx(l,{children:e.jsx(r,{children:"Recent runs"})}),e.jsx(n,{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:u[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(i,{children:[e.jsx(l,{children:e.jsx(r,{children:"Recent actions"})}),e.jsx(n,{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:u[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(i,{children:[e.jsx(l,{children:e.jsx(r,{children:"Hard exclusions"})}),e.jsx(n,{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{J as default}; +import{o as R,i as d,b as B,_ as A,j as e,L as q,aV as _}from"./index-DMjO_toh.js";import{u as Q}from"./useMutation-Db093XSk.js";import{C as i,e as n,S as H,b as l,c as r,t as E,f as m}from"./CronDashboard-DI0D1T-u.js";import{B as I}from"./badge-CARHLO4T.js";import{B as x}from"./button-BGphIht2.js";import{I as h}from"./input-BzpOTl46.js";import{A as P}from"./activity-CJ9AQ3mn.js";import{A as D}from"./arrow-left-BSWED_nt.js";const u={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"},J=()=>{var C;const M=R(),[j,T]=d.useState(""),[p,g]=d.useState(""),[f,v]=d.useState({}),[b,N]=d.useState(""),c=B({...A.autonomousOperations(),refetchInterval:3e4,retry:!1}),t=Q({mutationFn:s=>s(),onSuccess:s=>{M.setQueryData(A.autonomousOperations().queryKey,s),g(""),v({}),N("")}}),a=c.data,y=t.error instanceof Error?t.error.message:null;if(c.isLoading)return e.jsx("div",{className:"page","aria-busy":"true",children:"Loading autonomous operations…"});if(c.error||!a)return e.jsxs("div",{className:"page",children:[e.jsx("h1",{children:"Autonomous operations unavailable"}),e.jsx("p",{children:c.error instanceof Error?c.error.message:"No status was returned."})]});const O=()=>t.mutate(()=>_.setAutonomousManualMode(!a.manual_mode,a.revision,p)),k=(s,o)=>t.mutate(()=>_.setAutonomousOperator(s,o,a.revision,f[s]??"")),w=()=>{var o;const s=((o=a.baseline)==null?void 0:o.revision)??0;t.mutate(()=>_.qualifyAutonomousChatBaseline(j,s,b))};return e.jsx("div",{className:"cron-dashboard","data-shadcn":!0,children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8 space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between gap-4 flex-wrap",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"text-3xl font-bold flex items-center gap-3",children:[e.jsx(P,{className:"h-8 w-8"}),"Autonomous operations"]}),e.jsx("p",{className:"mt-2 cron-muted",children:"Content-free supervision, remote controls, and bounded audit history."})]}),e.jsx(x,{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(i,{className:"cron-status--degraded",role:"status",children:e.jsxs(n,{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(i,{className:E(S[a.display_state]),children:[e.jsx(l,{children:e.jsx(r,{className:"text-sm",children:"Overall state"})}),e.jsxs(n,{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(i,{children:[e.jsx(l,{children:e.jsx(r,{className:"text-sm",children:"Codex cost"})}),e.jsxs(n,{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(i,{children:[e.jsx(l,{children:e.jsx(r,{className:"text-sm",children:"Repair lease"})}),e.jsxs(n,{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(i,{children:[e.jsx(l,{children:e.jsx(r,{className:"text-sm",children:"Global control"})}),e.jsxs(n,{className:"space-y-2",children:[e.jsx(h,{"aria-label":"Manual mode confirmation",value:p,onChange:s=>g(s.target.value),placeholder:"Type SET_MANUAL_MODE"}),e.jsx(x,{disabled:t.isPending||p!=="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(i,{className:E(S[s.status]),children:[e.jsx(l,{children:e.jsxs(r,{className:"flex justify-between gap-2",children:[e.jsx("span",{children:u[s.operator]}),e.jsx(I,{children:s.status})]})}),e.jsxs(n,{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(h,{"aria-label":`${u[s.operator]} confirmation`,value:f[s.operator]??"",onChange:o=>v(L=>({...L,[s.operator]:o.target.value})),placeholder:"Type SET_OPERATOR_STATE"}),e.jsx(x,{disabled:t.isPending||a.manual_mode&&!s.enabled||f[s.operator]!=="SET_OPERATOR_STATE",onClick:()=>k(s.operator,!s.enabled),children:s.enabled?"Disable":"Enable"})]})]},s.operator))}),e.jsxs(i,{children:[e.jsx(l,{children:e.jsx(r,{children:"Qualified scalable-chat baseline"})}),e.jsxs(n,{className:"space-y-3",children:[e.jsx("p",{className:"font-mono break-all",children:((C=a.baseline)==null?void 0:C.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(h,{"aria-label":"Exact baseline SHA",value:j,onChange:s=>T(s.target.value),placeholder:"40-character lowercase commit SHA"}),e.jsx(h,{"aria-label":"Baseline confirmation",value:b,onChange:s=>N(s.target.value),placeholder:"Type QUALIFY_CHAT_BASELINE"}),e.jsx(x,{disabled:t.isPending||!/^[0-9a-f]{40}$/.test(j)||b!=="QUALIFY_CHAT_BASELINE",onClick:w,children:"Qualify exact SHA"})]})]})]}),e.jsxs(i,{children:[e.jsx(l,{children:e.jsx(r,{children:"Provider and fallback state"})}),e.jsx(n,{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(i,{children:[e.jsx(l,{children:e.jsx(r,{children:"Recent runs"})}),e.jsx(n,{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:u[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(i,{children:[e.jsx(l,{children:e.jsx(r,{children:"Recent actions"})}),e.jsx(n,{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:u[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(i,{children:[e.jsx(l,{children:e.jsx(r,{children:"Hard exclusions"})}),e.jsx(n,{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{J as default}; diff --git a/assets/BenchmarkDetailView-NDBfhlkv.js b/assets/BenchmarkDetailView-vHps8p5Q.js similarity index 98% rename from assets/BenchmarkDetailView-NDBfhlkv.js rename to assets/BenchmarkDetailView-vHps8p5Q.js index 8c61a3794669ee4e7e74bc7873c166204e15965e..cf5c3a772b8d4d3239c78d86d2da281149682074 100644 --- a/assets/BenchmarkDetailView-NDBfhlkv.js +++ b/assets/BenchmarkDetailView-vHps8p5Q.js @@ -1,2 +1,2 @@ -import{i as T,j as a,a2 as le,L as ne,n as nt,I as it,u as lt,f as ot,b as te,v as re,J as ct}from"./index-C1Xuuz1Y.js";import{R as dt}from"./ResearchFollowButton-9sh3MNHN.js";import{u as mt}from"./preferences-zpJ52tLe.js";import{L as oe}from"./LatexTitle-B0RfzwYI.js";import{C as ut,E as ht}from"./ExternalSourceEvalBadge-CttojFFk.js";import{S as Ue}from"./switch-BrihALZS.js";import{I as ft}from"./Icon-BADQ_q7j.js";import{S as ce}from"./skeleton-D8hFkZOU.js";import{B as pt}from"./BenchmarkTrendSparkline-Gf-WHpzB.js";import{s as gt}from"./safeExternalHref-CkBrsh84.js";import{s as xt}from"./slug-BpH-Nkvz.js";import bt from"./NotFound-BVs_mdc4.js";import{l as yt}from"./LoadFailurePage-qL80B4Za.js";import"./researchTopic-BU8M-7Qo.js";import"./useMutation-Cb0wrKBq.js";import"./plus-VBQCmtt2.js";import"./hover-card-BSWfQepz.js";import"./index-CNkd3QcT.js";import"./alert-UfpiwFIJ.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 ze=[{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 wt(e){const t=e===null?void 0:Number(e);return ze.some(r=>r.maxParametersExclusive===t)?t:void 0}function vt(e){return new Intl.NumberFormat("en",{notation:"compact",maximumSignificantDigits:3}).format(e)}function jt(e){return[e.paper_id,e.task_id,e.dataset_id,e.model_name,e.harness??""].join("|")}function _t(e){const t=new Map;for(const r of e){const s=jt(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 Me(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 Et(e,t){const r=e.evaluated_on;return r&&r!==t&&r!==kt(e.updated_at)?r:e.paper_published_date||""}function Nt(e,t,r){if(e.length===0)return{points:[],sota:0,sotaModel:""};const s=Ct(e),n=e.map(m=>{var N;const h=ie((N=m.metrics)==null?void 0:N[t]);return{eval:m,value:h,date:Et(m,s)}}).filter(m=>m.value!==null&&!!m.date).sort((m,h)=>m.date.localeCompare(h.date)),i=[];let l=null;for(const m of n){const h=l==null?!0:r==="↓"?m.valuel;h&&(l=m.value),i.push({value:m.value,date:m.date,dateLabel:m.date.slice(0,7),modelName:m.eval.model_name||"",paperTitle:m.eval.paper_title||"",paperRouteId:m.eval.paper_arxiv_id||m.eval.paper_id||null,isSota:h})}const d=e.map(m=>{var h;return{eval:m,value:ie((h=m.metrics)==null?void 0:h[t])}}).filter(m=>m.value!==null).sort((m,h)=>r==="↓"?m.value-h.value:h.value-m.value)[0],f=(d==null?void 0:d.value)??0,g=(d==null?void 0:d.eval.model_name)||(d==null?void 0:d.eval.paper_title)||"";return{points:i,sota:f,sotaModel:g}}function Pt(e,t,r){const s=t?(e??[]).filter(l=>l.task_id===t):e??[],n=s.filter(l=>l.is_open===!1),i=n.reduce((l,c)=>l?(c.best_rank??Number.POSITIVE_INFINITY)<(l.best_rank??Number.POSITIVE_INFINITY)?c:l:c,null);return{visible:r?s.filter(l=>l.is_open!==!1):s,hiddenClosed:n,topHiddenClosed:i}}function qe(e,t,r,s){const n=t.find(i=>i.id===s);if(e.length===0)return null;if(n!=null&&n.task_id&&e.some(i=>i.id===n.task_id))return n.task_id;if(r){const i=e.find(l=>l.slug===r);if(i)return i.id}if(e.length===1)return e[0].id;if(t.length>0){const i=new Map;for(const d of t)i.set(d.task_id,(i.get(d.task_id)||0)+1);let l=null,c=-1;for(const d of e){const f=i.get(d.id)||0;f>c&&(c=f,l=d.id)}if(l)return l}return e[0].id}function Rt(e){var _,Y,J;const{evaluations:t,tasks:r,taskSlug:s,highlightEvalId:n,parameterBound:i,showMoreMetrics:l,fittingMetricCount:c=1}=e,d=qe(r,t,s,n),f=r.find(o=>o.id===d)||r[0]||null,g=t.find(o=>o.id===n),m=Pt(t,d,e.hideClosed),h=_t(m.visible),N=Me(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,v=new Map;for(const o of h){const u=o.best_metric;!u||ie(o.metrics[u])===null||C.length&&!S.includes(u)||v.set(u,(v.get(u)||0)+1)}const k=((_=[...v].sort((o,u)=>u[1]-o[1])[0])==null?void 0:_[0])||S[0]||"",j=S.find(o=>{var u;return o.toLocaleLowerCase()===((u=e.metric)==null?void 0:u.trim().toLocaleLowerCase())})||(g==null?void 0:g.best_metric)||k,U=((Y=e.directions)==null?void 0:Y.directions[j])==="lower_is_better"?"↓":"↑",V=j&&S.includes(j)?[j,...S.filter(o=>o!==j)]:S,y=V.length?l?V:V.slice(0,Math.max(1,c)):j?[j]:[],z=N.slice().sort((o,u)=>{const p=ie(o.metrics[j]),b=ie(u.metrics[j]);return p!==null&&b!==null?U==="↓"?p-b:b-p:p!==null?-1:b!==null?1:Le(o,j)-Le(u,j)});let F=null,B=0;const X=z.map((o,u)=>{const p=ie(o.metrics[j]);return p!==null&&p!==F&&(F=p,B=u+1),{evaluation:o,rank:p===null?null:B,isHighlighted:St(o,n)}}),{points:q,sota:ee,sotaModel:W}=Nt(N,j,U),$=i===void 0?e.initialSummary:void 0,O=e.ready.evaluations&&e.ready.tasks&&e.ready.directions&&(!d||e.ready.metrics),Q={parameter_coverage_known:h.filter(o=>o.parameterCount!==null).length,parameter_coverage_total:h.length};return{currentTaskId:d,primaryTask:f,activeMetric:j,arrow:U,allowedMetrics:S,orderedMetrics:V,visibleMetrics:y,rows:X,chartPoints:q,highlightedEval:((J=X.find(o=>o.isHighlighted))==null?void 0:J.evaluation)||null,hiddenClosedEvals:m.hiddenClosed,hiddenClosedTopEval:m.topHiddenClosed,parameterBound:i,parameterCoverage:Q,hasParameterMetadata:Q.parameter_coverage_known>0,parameterFilters:ze.map(o=>({...o,selected:i===o.maxParametersExclusive,disabled:i!==o.maxParametersExclusive&&Me(h,o.maxParametersExclusive).length===0})),displayedMetric:O?j:$==null?void 0:$.metric,displayedSota:O?ee:$==null?void 0:$.value,displayedSotaModel:O?W:$==null?void 0:$.model_name,isSummaryLoading:!O&&!$,isInitialFilteredViewLoading:i!==void 0&&!O}}function $t(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+he(t,s),0),harness:he(t,"--bm-harness-width"),metric:he(t,"--bm-metric-width")}}const Lt=20;function Te(e,t){return e?a.jsx(oe,{title:e}):t||"—"}function Tt({model:e,showHarness:t,setMetric:r,highlightRowRef:s,onFittingMetricCountChange:n}){const{rows:i,visibleMetrics:l,activeMetric:c,arrow:d}=e,[f,g]=T.useState(null);return T.useEffect(()=>{if(!f)return;const m=()=>{f.classList.toggle("has-horizontal-overflow",f.scrollWidth>f.clientWidth);const N=f.firstElementChild;if(!N)return;const C=f.clientWidth,P=Mt(N);f.classList.toggle("unpins-trailing-columns",CS.clientHeight?0:Lt;n(k=>$t(C,P,t,k,v))},h=new ResizeObserver(m);return h.observe(f),f.firstElementChild&&h.observe(f.firstElementChild),m(),()=>h.disconnect()},[f,t,n]),a.jsx("div",{ref:g,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(m=>a.jsx("col",{className:"bm-width-metric"},m)),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(m=>{const h=m===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(m),"aria-pressed":h,title:`Sort by ${m}`,children:[m,h?` ${d}`:""]})},m)}),a.jsx("th",{className:"col-paper",children:"Paper"}),a.jsx("th",{className:"col-year",children:"Year"})]})}),a.jsx("tbody",{children:i.map(({evaluation:m,rank:h,isHighlighted:N})=>{var S;const C=m.paper_arxiv_id||m.paper_id,P=m.paper_title||(m.paper_arxiv_id?`arXiv:${m.paper_arxiv_id}`:null);return a.jsxs("tr",{ref:N?s:void 0,className:N?"is-highlighted":void 0,children:[a.jsx("td",{className:"col-rank",children:h??"—"}),a.jsxs("td",{className:"col-model",children:[N&&a.jsx("span",{className:"bm-row-marker","aria-hidden":"true"}),m.hf_model_url?a.jsx("a",{href:m.hf_model_url,target:"_blank",rel:"noopener noreferrer",className:"bm-model-link",title:`Open ${m.model_name||"model"} on Hugging Face`,children:m.model_name||"—"}):m.model_name||"—",m.is_open===!1&&a.jsx(ut,{}),(m.external??m.is_external)&&a.jsx(ht,{sourceUrl:m.source_url||m.external_source_url||m.result_url})]}),a.jsx("td",{className:"col-parameters",title:m.parameterCount===null?void 0:m.parameterCount.toLocaleString("en-US"),"aria-label":m.parameterCount===null?"Parameters unknown":`${m.parameterCount.toLocaleString("en-US")} parameters`,children:m.parameterCount===null?"—":vt(m.parameterCount)}),t&&a.jsx("td",{className:"col-harness",children:m.harness||"—"}),l.map(v=>{var j;const k=v===c,A=(j=m.metrics)==null?void 0:j[v];return a.jsx("td",{className:`col-value${k?" is-active":""}${k&&h===1?" is-best":""}`,children:A!=null&&A!==""?le(A):"—"},v)}),a.jsx("td",{className:"col-paper",children:C?a.jsx(ne,{to:`/paper/${C}`,title:m.paper_title||P||void 0,children:Te(m.paper_title,P)}):Te(m.paper_title,P)}),a.jsx("td",{className:"col-year",children:((S=m.evaluated_on||m.paper_published_date)==null?void 0:S.slice(0,4))||"—"})]},m.id)})})]})})}function Fe(e){const t=e.length===7?`${e}-01`:e,r=new Date(t).getTime();return Number.isFinite(r)?r:0}const fe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function pe(e){const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()}}function Ft(e,t){if(e===t){const{year:d,month:f}=pe(e);return[{timestamp:new Date(d,f,1).getTime(),key:`${d}-${f}`,label:`${fe[f]} ${d}`}]}const r=pe(e),s=pe(t);if(r.year===s.year){const d=s.month-r.month+1;let f=1;const g=12;d>g&&(f=Math.ceil(d/g));const m=[];for(let h=r.month;h<=s.month;h+=f)m.push({timestamp:new Date(r.year,h,1).getTime(),key:`${r.year}-${h}`,label:d<=3?`${fe[h]} ${r.year}`:fe[h]});return m}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 It=({points:e,metric:t})=>{const r=nt(),[s,n]=T.useState(null),i=880,l=320,c=60,d=30,f=40,g=50,m=e.map(o=>o.value),h=Math.min(...m),C=Math.max(...m)-h||1,P=i-c-d,S=l-f-g,v=e.map(o=>Fe(o.date)),k=Math.min(...v),A=Math.max(...v),j=A-k||1,U=o=>k===A?c+P/2:c+(o-k)/j*P,V=e.map((o,u)=>{const p=U(Fe(o.date)),b=(o.value-h)/C,R=f+S*(1-b);return{x:p,y:R,data:o,idx:u}}),y=V.filter(o=>o.data.isSota);let z="";if(y.length>=2){z=`M${y[0].x},${y[0].y}`;for(let o=1;o{const u=o.data.modelName||o.data.paperTitle||"";if(!u)return null;const p=u.length>22?u.slice(0,21)+"…":u,b=p.length*F;let R=o.x-b/2,E=o.x+b/2,w="middle";return Ri-d&&(E=i-d,R=E-b,w="end"),{x:w==="start"?c:w==="end"?i-d:o.x,y:o.y-X,text:p,anchor:w,left:R,right:E}},ee=[],W=y.length>0?q(y[y.length-1]):null;let $=-1/0;for(let o=0;oW.left-B||($=u.right,ee.push({x:u.x,y:u.y,text:u.text,anchor:u.anchor})))}W&&ee.push({x:W.x,y:W.y,text:W.text,anchor:W.anchor});const O=Ft(k,A),Q=5,_=o=>n(u=>u===o?null:u),Y=o=>{o&&r(`/paper/${o}`)},J=(o,u)=>{const b=`${o.data.modelName||o.data.paperTitle||"Unknown model"}: ${le(o.data.value)} on ${o.data.dateLabel}`,R=!!o.data.paperRouteId;return a.jsxs("g",{children:[u,a.jsx("circle",{cx:o.x,cy:o.y,r:"10",fill:"transparent",style:{cursor:R?"pointer":"default",outline:"none"},tabIndex:0,role:R?"link":"img","aria-label":b,onMouseEnter:()=>n(o.idx),onMouseLeave:()=>_(o.idx),onFocus:()=>n(o.idx),onBlur:()=>_(o.idx),onClick:()=>Y(o.data.paperRouteId),onKeyDown:E=>{R&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),Y(o.data.paperRouteId))},children:a.jsx("title",{children:b})})]},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:Q}).map((o,u)=>{const p=u/(Q-1),b=f+S*(1-p),R=h+C*p;return a.jsxs("g",{children:[a.jsx("line",{x1:c,y1:b,x2:i-d,y2:b,stroke:"var(--hairline)",strokeWidth:"1"}),a.jsx("text",{x:c-10,y:b+4,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"end",children:le(R)})]},u)}),O.map(o=>{const u=U(o.timestamp);return a.jsx("text",{x:u,y:l-g+18,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:"middle",children:o.label},o.key)}),V.filter(o=>!o.data.isSota).map(o=>{const u=s===o.idx;return J(o,a.jsx("circle",{cx:o.x,cy:o.y,r:u?3:2,fill:"var(--ink-faint)",opacity:u?1:.45,style:{transition:"r 0.12s ease, opacity 0.12s ease"}}))}),z&&a.jsx("path",{d:z,stroke:"var(--accent)",strokeWidth:"2",fill:"none",strokeLinejoin:"round",strokeLinecap:"round"}),y.map(o=>{const u=s===o.idx;return J(o,a.jsx("circle",{cx:o.x,cy:o.y,r:u?4.5:3,fill:u?"var(--accent)":"var(--bg-elevated)",stroke:"var(--accent)",strokeWidth:"1.5",style:{transition:"r 0.12s ease, fill 0.12s ease"}}))}),ee.map((o,u)=>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-${u}`)),s!==null&&V[s]&&(()=>{const o=V[s],u=o.data.modelName||o.data.paperTitle||"Unknown model",b=`${u.length>40?u.slice(0,39)+"…":u}: ${le(o.data.value)}`,E=Math.max(120,Math.min(340,b.length*6.6+24)),w=30;let D=o.x-E/2;Di-d&&(D=i-d-E);const G=o.y-w-14>=f?o.y-w-12:o.y+12;return a.jsxs("g",{pointerEvents:"none",children:[a.jsx("rect",{x:D,y:G,width:E,height:w,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:D+12,y:G+19,fontSize:"12",fontFamily:"var(--sans)",fill:"var(--ink)",fontWeight:500,children:b})]})})()]})};function At(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 Bt=(()=>{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;rH||e.height>H)&&(e.width>H&&e.height>H?e.width>e.height?(e.height*=H/e.width,e.width=H):(e.width*=H/e.height,e.height=H):e.width>H?(e.height*=H/e.width,e.width=H):(e.width*=H/e.height,e.height=H))}function Ot(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 Ut(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),Ut(n)}const I=(e,t)=>{if(e instanceof t)return!0;const r=Object.getPrototypeOf(e);return r===null?!1:r.constructor.name===t.name||I(r,t)};function qt(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function Qt(e,t){return Qe(t).map(r=>{const s=e.getPropertyValue(r),n=e.getPropertyPriority(r);return`${r}: ${s}${n?" !important":""};`}).join(" ")}function Gt(e,t,r,s){const n=`.${e}:${t}`,i=r.cssText?qt(r):Qt(r,s);return document.createTextNode(`${n}{${i}}`)}function Ie(e,t,r,s){const n=window.getComputedStyle(e,r),i=n.getPropertyValue("content");if(i===""||i==="none")return;const l=Bt();try{t.className=`${t.className} ${l}`}catch{return}const c=document.createElement("style");c.appendChild(Gt(l,r,n,s)),t.appendChild(c)}function Xt(e,t,r){Ie(e,t,":before",r),Ie(e,t,":after",r)}const Ae="application/font-woff",Be="image/jpeg",Yt={woff:Ae,woff2:Ae,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:Be,jpeg:Be,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function Jt(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function ye(e){const t=Jt(e).toLowerCase();return Yt[t]||""}function Kt(e){return e.split(/,/)[1]}function xe(e){return e.search(/^(data:)/)!==-1}function Zt(e,t){return`data:${t};base64,${e}`}async function Xe(e,t,r){const s=await fetch(e,t);if(s.status===404)throw new Error(`Resource "${s.url}" not found`);const n=await s.blob();return new Promise((i,l)=>{const c=new FileReader;c.onerror=l,c.onloadend=()=>{try{i(r({res:s,result:c.result}))}catch(d){l(d)}},c.readAsDataURL(n)})}const ge={};function er(e,t,r){let s=e.replace(/\?.*/,"");return r&&(s=e),/ttf|otf|eot|woff2?/i.test(s)&&(s=s.replace(/.*\//,"")),t?`[${t}]${s}`:s}async function we(e,t,r){const s=er(e,t,r.includeQueryParams);if(ge[s]!=null)return ge[s];r.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let n;try{const i=await Xe(e,r.fetchRequestInit,({res:l,result:c})=>(t||(t=l.headers.get("Content-Type")||""),Kt(c)));n=Zt(i,t)}catch(i){n=r.imagePlaceholder||"";let l=`Failed to fetch resource: ${e}`;i&&(l=typeof i=="string"?i:i.message),l&&console.warn(l)}return ge[s]=n,n}async function tr(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):me(t)}async function rr(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 me(c)}const r=e.poster,s=ye(r),n=await we(r,s,t);return me(n)}async function ar(e,t){var r;try{if(!((r=e==null?void 0:e.contentDocument)===null||r===void 0)&&r.body)return await ue(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function sr(e,t){return I(e,HTMLCanvasElement)?tr(e):I(e,HTMLVideoElement)?rr(e,t):I(e,HTMLIFrameElement)?ar(e,t):e.cloneNode(Ye(e))}const nr=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",Ye=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function ir(e,t,r){var s,n;if(Ye(t))return t;let i=[];return nr(e)&&e.assignedNodes?i=Z(e.assignedNodes()):I(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||I(e,HTMLVideoElement)||await i.reduce((l,c)=>l.then(()=>ue(c,r)).then(d=>{d&&t.appendChild(d)}),Promise.resolve()),t}function lr(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):Qe(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`),I(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 or(e,t){I(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),I(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function cr(e,t){if(I(e,HTMLSelectElement)){const r=t,s=Array.from(r.children).find(n=>e.value===n.getAttribute("value"));s&&s.setAttribute("selected","")}}function dr(e,t,r){return I(t,Element)&&(lr(e,t,r),Xt(e,t,r),or(e,t),cr(e,t)),t}async function mr(e,t){const r=e.querySelectorAll?e.querySelectorAll("use"):[];if(r.length===0)return e;const s={};for(let i=0;isr(s,t)).then(s=>ir(e,s,t)).then(s=>dr(e,s,t)).then(s=>mr(s,t))}const Je=/url\((['"]?)([^'"]+?)\1\)/g,ur=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,hr=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function fr(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function pr(e){const t=[];return e.replace(Je,(r,s,n)=>(t.push(n),r)),t.filter(r=>!xe(r))}async function gr(e,t,r,s,n){try{const i=r?At(t,r):t,l=ye(t);let c;return n||(c=await we(i,l,s)),e.replace(fr(t),`$1${c}$3`)}catch{}return e}function xr(e,{preferredFontFormat:t}){return t?e.replace(hr,r=>{for(;;){const[s,,n]=ur.exec(r)||[];if(!n)return"";if(n===t)return`src: ${s};`}}):e}function Ke(e){return e.search(Je)!==-1}async function Ze(e,t,r){if(!Ke(e))return e;const s=xr(e,r);return pr(s).reduce((i,l)=>i.then(c=>gr(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 Ze(n,null,r);return t.style.setProperty(e,i,t.style.getPropertyPriority(e)),!0}return!1}async function br(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 yr(e,t){const r=I(e,HTMLImageElement);if(!(r&&!xe(e.src))&&!(I(e,SVGImageElement)&&!xe(e.href.baseVal)))return;const s=r?e.src:e.href.baseVal,n=await we(s,ye(s),t);await new Promise((i,l)=>{e.onload=i,e.onerror=t.onImageErrorHandler?(...d)=>{try{i(t.onImageErrorHandler(...d))}catch(f){l(f)}}:l;const c=e;c.decode&&(c.decode=i),c.loading==="lazy"&&(c.loading="eager"),r?(e.srcset="",e.src=n):e.href.baseVal=n})}async function wr(e,t){const s=Z(e.childNodes).map(n=>et(n,t));await Promise.all(s).then(()=>e)}async function et(e,t){I(e,Element)&&(await br(e,t),await yr(e,t),await wr(e,t))}function vr(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 De={};async function He(e){let t=De[e];if(t!=null)return t;const s=await(await fetch(e)).text();return t={url:e,cssText:s},De[e]=t,t}async function Ve(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),Xe(c,t.fetchRequestInit,({result:d})=>(r=r.replace(l,`url(${d})`),[l,d]))});return Promise.all(i).then(()=>r)}function We(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 jr(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=He(d).then(g=>Ve(g,t)).then(g=>We(g).forEach(m=>{try{n.insertRule(m,m.startsWith("@import")?c+=1:n.cssRules.length)}catch(h){console.error("Error inserting rule from remote css",{rule:m,error:h})}})).catch(g=>{console.error("Error loading remote css",g.toString())});s.push(f)}})}catch(i){const l=e.find(c=>c.href==null)||document.styleSheets[0];n.href!=null&&s.push(He(n.href).then(c=>Ve(c,t)).then(c=>We(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 _r(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>Ke(t.style.getPropertyValue("src")))}async function Sr(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=Z(e.ownerDocument.styleSheets),s=await jr(r,t);return _r(s)}function tt(e){return e.trim().replace(/["']/g,"")}function kr(e){const t=new Set;function r(s){(s.style.fontFamily||getComputedStyle(s).fontFamily).split(",").forEach(i=>{t.add(tt(i))}),Array.from(s.children).forEach(i=>{i instanceof HTMLElement&&r(i)})}return r(e),t}async function Cr(e,t){const r=await Sr(e,t),s=kr(e);return(await Promise.all(r.filter(i=>s.has(tt(i.style.fontFamily))).map(i=>{const l=i.parentStyleSheet?i.parentStyleSheet.href:null;return Ze(i.cssText,l,t)}))).join(` +import{i as T,j as a,a2 as le,L as ne,n as nt,I as it,u as lt,f as ot,b as te,v as re,J as ct}from"./index-DMjO_toh.js";import{R as dt}from"./ResearchFollowButton-BCRaiBQA.js";import{u as mt}from"./preferences-B1gzdJ4J.js";import{L as oe}from"./LatexTitle-BRJTz_K0.js";import{C as ut,E as ht}from"./ExternalSourceEvalBadge-DYcvJrz-.js";import{S as Ue}from"./switch-t5rMaesI.js";import{I as ft}from"./Icon-D5cUFATZ.js";import{S as ce}from"./skeleton-DiGWALrs.js";import{B as pt}from"./BenchmarkTrendSparkline-BuEjY1OI.js";import{s as gt}from"./safeExternalHref-CkBrsh84.js";import{s as xt}from"./slug-BpH-Nkvz.js";import bt from"./NotFound-E4uwO9V5.js";import{l as yt}from"./LoadFailurePage-BIYmxtFy.js";import"./researchTopic-hhMPs4g3.js";import"./useMutation-Db093XSk.js";import"./plus-B4ZP41Rg.js";import"./hover-card-D4j7S6P3.js";import"./index-BgYoYvBg.js";import"./alert-B2i0PAyW.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 ze=[{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 wt(e){const t=e===null?void 0:Number(e);return ze.some(r=>r.maxParametersExclusive===t)?t:void 0}function vt(e){return new Intl.NumberFormat("en",{notation:"compact",maximumSignificantDigits:3}).format(e)}function jt(e){return[e.paper_id,e.task_id,e.dataset_id,e.model_name,e.harness??""].join("|")}function _t(e){const t=new Map;for(const r of e){const s=jt(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 Me(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 Et(e,t){const r=e.evaluated_on;return r&&r!==t&&r!==kt(e.updated_at)?r:e.paper_published_date||""}function Nt(e,t,r){if(e.length===0)return{points:[],sota:0,sotaModel:""};const s=Ct(e),n=e.map(m=>{var N;const h=ie((N=m.metrics)==null?void 0:N[t]);return{eval:m,value:h,date:Et(m,s)}}).filter(m=>m.value!==null&&!!m.date).sort((m,h)=>m.date.localeCompare(h.date)),i=[];let l=null;for(const m of n){const h=l==null?!0:r==="↓"?m.valuel;h&&(l=m.value),i.push({value:m.value,date:m.date,dateLabel:m.date.slice(0,7),modelName:m.eval.model_name||"",paperTitle:m.eval.paper_title||"",paperRouteId:m.eval.paper_arxiv_id||m.eval.paper_id||null,isSota:h})}const d=e.map(m=>{var h;return{eval:m,value:ie((h=m.metrics)==null?void 0:h[t])}}).filter(m=>m.value!==null).sort((m,h)=>r==="↓"?m.value-h.value:h.value-m.value)[0],f=(d==null?void 0:d.value)??0,g=(d==null?void 0:d.eval.model_name)||(d==null?void 0:d.eval.paper_title)||"";return{points:i,sota:f,sotaModel:g}}function Pt(e,t,r){const s=t?(e??[]).filter(l=>l.task_id===t):e??[],n=s.filter(l=>l.is_open===!1),i=n.reduce((l,c)=>l?(c.best_rank??Number.POSITIVE_INFINITY)<(l.best_rank??Number.POSITIVE_INFINITY)?c:l:c,null);return{visible:r?s.filter(l=>l.is_open!==!1):s,hiddenClosed:n,topHiddenClosed:i}}function qe(e,t,r,s){const n=t.find(i=>i.id===s);if(e.length===0)return null;if(n!=null&&n.task_id&&e.some(i=>i.id===n.task_id))return n.task_id;if(r){const i=e.find(l=>l.slug===r);if(i)return i.id}if(e.length===1)return e[0].id;if(t.length>0){const i=new Map;for(const d of t)i.set(d.task_id,(i.get(d.task_id)||0)+1);let l=null,c=-1;for(const d of e){const f=i.get(d.id)||0;f>c&&(c=f,l=d.id)}if(l)return l}return e[0].id}function Rt(e){var _,Y,J;const{evaluations:t,tasks:r,taskSlug:s,highlightEvalId:n,parameterBound:i,showMoreMetrics:l,fittingMetricCount:c=1}=e,d=qe(r,t,s,n),f=r.find(o=>o.id===d)||r[0]||null,g=t.find(o=>o.id===n),m=Pt(t,d,e.hideClosed),h=_t(m.visible),N=Me(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,v=new Map;for(const o of h){const u=o.best_metric;!u||ie(o.metrics[u])===null||C.length&&!S.includes(u)||v.set(u,(v.get(u)||0)+1)}const k=((_=[...v].sort((o,u)=>u[1]-o[1])[0])==null?void 0:_[0])||S[0]||"",j=S.find(o=>{var u;return o.toLocaleLowerCase()===((u=e.metric)==null?void 0:u.trim().toLocaleLowerCase())})||(g==null?void 0:g.best_metric)||k,U=((Y=e.directions)==null?void 0:Y.directions[j])==="lower_is_better"?"↓":"↑",V=j&&S.includes(j)?[j,...S.filter(o=>o!==j)]:S,y=V.length?l?V:V.slice(0,Math.max(1,c)):j?[j]:[],z=N.slice().sort((o,u)=>{const p=ie(o.metrics[j]),b=ie(u.metrics[j]);return p!==null&&b!==null?U==="↓"?p-b:b-p:p!==null?-1:b!==null?1:Le(o,j)-Le(u,j)});let F=null,B=0;const X=z.map((o,u)=>{const p=ie(o.metrics[j]);return p!==null&&p!==F&&(F=p,B=u+1),{evaluation:o,rank:p===null?null:B,isHighlighted:St(o,n)}}),{points:q,sota:ee,sotaModel:W}=Nt(N,j,U),$=i===void 0?e.initialSummary:void 0,O=e.ready.evaluations&&e.ready.tasks&&e.ready.directions&&(!d||e.ready.metrics),Q={parameter_coverage_known:h.filter(o=>o.parameterCount!==null).length,parameter_coverage_total:h.length};return{currentTaskId:d,primaryTask:f,activeMetric:j,arrow:U,allowedMetrics:S,orderedMetrics:V,visibleMetrics:y,rows:X,chartPoints:q,highlightedEval:((J=X.find(o=>o.isHighlighted))==null?void 0:J.evaluation)||null,hiddenClosedEvals:m.hiddenClosed,hiddenClosedTopEval:m.topHiddenClosed,parameterBound:i,parameterCoverage:Q,hasParameterMetadata:Q.parameter_coverage_known>0,parameterFilters:ze.map(o=>({...o,selected:i===o.maxParametersExclusive,disabled:i!==o.maxParametersExclusive&&Me(h,o.maxParametersExclusive).length===0})),displayedMetric:O?j:$==null?void 0:$.metric,displayedSota:O?ee:$==null?void 0:$.value,displayedSotaModel:O?W:$==null?void 0:$.model_name,isSummaryLoading:!O&&!$,isInitialFilteredViewLoading:i!==void 0&&!O}}function $t(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+he(t,s),0),harness:he(t,"--bm-harness-width"),metric:he(t,"--bm-metric-width")}}const Lt=20;function Te(e,t){return e?a.jsx(oe,{title:e}):t||"—"}function Tt({model:e,showHarness:t,setMetric:r,highlightRowRef:s,onFittingMetricCountChange:n}){const{rows:i,visibleMetrics:l,activeMetric:c,arrow:d}=e,[f,g]=T.useState(null);return T.useEffect(()=>{if(!f)return;const m=()=>{f.classList.toggle("has-horizontal-overflow",f.scrollWidth>f.clientWidth);const N=f.firstElementChild;if(!N)return;const C=f.clientWidth,P=Mt(N);f.classList.toggle("unpins-trailing-columns",CS.clientHeight?0:Lt;n(k=>$t(C,P,t,k,v))},h=new ResizeObserver(m);return h.observe(f),f.firstElementChild&&h.observe(f.firstElementChild),m(),()=>h.disconnect()},[f,t,n]),a.jsx("div",{ref:g,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(m=>a.jsx("col",{className:"bm-width-metric"},m)),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(m=>{const h=m===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(m),"aria-pressed":h,title:`Sort by ${m}`,children:[m,h?` ${d}`:""]})},m)}),a.jsx("th",{className:"col-paper",children:"Paper"}),a.jsx("th",{className:"col-year",children:"Year"})]})}),a.jsx("tbody",{children:i.map(({evaluation:m,rank:h,isHighlighted:N})=>{var S;const C=m.paper_arxiv_id||m.paper_id,P=m.paper_title||(m.paper_arxiv_id?`arXiv:${m.paper_arxiv_id}`:null);return a.jsxs("tr",{ref:N?s:void 0,className:N?"is-highlighted":void 0,children:[a.jsx("td",{className:"col-rank",children:h??"—"}),a.jsxs("td",{className:"col-model",children:[N&&a.jsx("span",{className:"bm-row-marker","aria-hidden":"true"}),m.hf_model_url?a.jsx("a",{href:m.hf_model_url,target:"_blank",rel:"noopener noreferrer",className:"bm-model-link",title:`Open ${m.model_name||"model"} on Hugging Face`,children:m.model_name||"—"}):m.model_name||"—",m.is_open===!1&&a.jsx(ut,{}),(m.external??m.is_external)&&a.jsx(ht,{sourceUrl:m.source_url||m.external_source_url||m.result_url})]}),a.jsx("td",{className:"col-parameters",title:m.parameterCount===null?void 0:m.parameterCount.toLocaleString("en-US"),"aria-label":m.parameterCount===null?"Parameters unknown":`${m.parameterCount.toLocaleString("en-US")} parameters`,children:m.parameterCount===null?"—":vt(m.parameterCount)}),t&&a.jsx("td",{className:"col-harness",children:m.harness||"—"}),l.map(v=>{var j;const k=v===c,A=(j=m.metrics)==null?void 0:j[v];return a.jsx("td",{className:`col-value${k?" is-active":""}${k&&h===1?" is-best":""}`,children:A!=null&&A!==""?le(A):"—"},v)}),a.jsx("td",{className:"col-paper",children:C?a.jsx(ne,{to:`/paper/${C}`,title:m.paper_title||P||void 0,children:Te(m.paper_title,P)}):Te(m.paper_title,P)}),a.jsx("td",{className:"col-year",children:((S=m.evaluated_on||m.paper_published_date)==null?void 0:S.slice(0,4))||"—"})]},m.id)})})]})})}function Fe(e){const t=e.length===7?`${e}-01`:e,r=new Date(t).getTime();return Number.isFinite(r)?r:0}const fe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function pe(e){const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()}}function Ft(e,t){if(e===t){const{year:d,month:f}=pe(e);return[{timestamp:new Date(d,f,1).getTime(),key:`${d}-${f}`,label:`${fe[f]} ${d}`}]}const r=pe(e),s=pe(t);if(r.year===s.year){const d=s.month-r.month+1;let f=1;const g=12;d>g&&(f=Math.ceil(d/g));const m=[];for(let h=r.month;h<=s.month;h+=f)m.push({timestamp:new Date(r.year,h,1).getTime(),key:`${r.year}-${h}`,label:d<=3?`${fe[h]} ${r.year}`:fe[h]});return m}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 It=({points:e,metric:t})=>{const r=nt(),[s,n]=T.useState(null),i=880,l=320,c=60,d=30,f=40,g=50,m=e.map(o=>o.value),h=Math.min(...m),C=Math.max(...m)-h||1,P=i-c-d,S=l-f-g,v=e.map(o=>Fe(o.date)),k=Math.min(...v),A=Math.max(...v),j=A-k||1,U=o=>k===A?c+P/2:c+(o-k)/j*P,V=e.map((o,u)=>{const p=U(Fe(o.date)),b=(o.value-h)/C,R=f+S*(1-b);return{x:p,y:R,data:o,idx:u}}),y=V.filter(o=>o.data.isSota);let z="";if(y.length>=2){z=`M${y[0].x},${y[0].y}`;for(let o=1;o{const u=o.data.modelName||o.data.paperTitle||"";if(!u)return null;const p=u.length>22?u.slice(0,21)+"…":u,b=p.length*F;let R=o.x-b/2,E=o.x+b/2,w="middle";return Ri-d&&(E=i-d,R=E-b,w="end"),{x:w==="start"?c:w==="end"?i-d:o.x,y:o.y-X,text:p,anchor:w,left:R,right:E}},ee=[],W=y.length>0?q(y[y.length-1]):null;let $=-1/0;for(let o=0;oW.left-B||($=u.right,ee.push({x:u.x,y:u.y,text:u.text,anchor:u.anchor})))}W&&ee.push({x:W.x,y:W.y,text:W.text,anchor:W.anchor});const O=Ft(k,A),Q=5,_=o=>n(u=>u===o?null:u),Y=o=>{o&&r(`/paper/${o}`)},J=(o,u)=>{const b=`${o.data.modelName||o.data.paperTitle||"Unknown model"}: ${le(o.data.value)} on ${o.data.dateLabel}`,R=!!o.data.paperRouteId;return a.jsxs("g",{children:[u,a.jsx("circle",{cx:o.x,cy:o.y,r:"10",fill:"transparent",style:{cursor:R?"pointer":"default",outline:"none"},tabIndex:0,role:R?"link":"img","aria-label":b,onMouseEnter:()=>n(o.idx),onMouseLeave:()=>_(o.idx),onFocus:()=>n(o.idx),onBlur:()=>_(o.idx),onClick:()=>Y(o.data.paperRouteId),onKeyDown:E=>{R&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),Y(o.data.paperRouteId))},children:a.jsx("title",{children:b})})]},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:Q}).map((o,u)=>{const p=u/(Q-1),b=f+S*(1-p),R=h+C*p;return a.jsxs("g",{children:[a.jsx("line",{x1:c,y1:b,x2:i-d,y2:b,stroke:"var(--hairline)",strokeWidth:"1"}),a.jsx("text",{x:c-10,y:b+4,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"end",children:le(R)})]},u)}),O.map(o=>{const u=U(o.timestamp);return a.jsx("text",{x:u,y:l-g+18,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:"middle",children:o.label},o.key)}),V.filter(o=>!o.data.isSota).map(o=>{const u=s===o.idx;return J(o,a.jsx("circle",{cx:o.x,cy:o.y,r:u?3:2,fill:"var(--ink-faint)",opacity:u?1:.45,style:{transition:"r 0.12s ease, opacity 0.12s ease"}}))}),z&&a.jsx("path",{d:z,stroke:"var(--accent)",strokeWidth:"2",fill:"none",strokeLinejoin:"round",strokeLinecap:"round"}),y.map(o=>{const u=s===o.idx;return J(o,a.jsx("circle",{cx:o.x,cy:o.y,r:u?4.5:3,fill:u?"var(--accent)":"var(--bg-elevated)",stroke:"var(--accent)",strokeWidth:"1.5",style:{transition:"r 0.12s ease, fill 0.12s ease"}}))}),ee.map((o,u)=>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-${u}`)),s!==null&&V[s]&&(()=>{const o=V[s],u=o.data.modelName||o.data.paperTitle||"Unknown model",b=`${u.length>40?u.slice(0,39)+"…":u}: ${le(o.data.value)}`,E=Math.max(120,Math.min(340,b.length*6.6+24)),w=30;let D=o.x-E/2;Di-d&&(D=i-d-E);const G=o.y-w-14>=f?o.y-w-12:o.y+12;return a.jsxs("g",{pointerEvents:"none",children:[a.jsx("rect",{x:D,y:G,width:E,height:w,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:D+12,y:G+19,fontSize:"12",fontFamily:"var(--sans)",fill:"var(--ink)",fontWeight:500,children:b})]})})()]})};function At(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 Bt=(()=>{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;rH||e.height>H)&&(e.width>H&&e.height>H?e.width>e.height?(e.height*=H/e.width,e.width=H):(e.width*=H/e.height,e.height=H):e.width>H?(e.height*=H/e.width,e.width=H):(e.width*=H/e.height,e.height=H))}function Ot(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 Ut(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),Ut(n)}const I=(e,t)=>{if(e instanceof t)return!0;const r=Object.getPrototypeOf(e);return r===null?!1:r.constructor.name===t.name||I(r,t)};function qt(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function Qt(e,t){return Qe(t).map(r=>{const s=e.getPropertyValue(r),n=e.getPropertyPriority(r);return`${r}: ${s}${n?" !important":""};`}).join(" ")}function Gt(e,t,r,s){const n=`.${e}:${t}`,i=r.cssText?qt(r):Qt(r,s);return document.createTextNode(`${n}{${i}}`)}function Ie(e,t,r,s){const n=window.getComputedStyle(e,r),i=n.getPropertyValue("content");if(i===""||i==="none")return;const l=Bt();try{t.className=`${t.className} ${l}`}catch{return}const c=document.createElement("style");c.appendChild(Gt(l,r,n,s)),t.appendChild(c)}function Xt(e,t,r){Ie(e,t,":before",r),Ie(e,t,":after",r)}const Ae="application/font-woff",Be="image/jpeg",Yt={woff:Ae,woff2:Ae,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:Be,jpeg:Be,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function Jt(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function ye(e){const t=Jt(e).toLowerCase();return Yt[t]||""}function Kt(e){return e.split(/,/)[1]}function xe(e){return e.search(/^(data:)/)!==-1}function Zt(e,t){return`data:${t};base64,${e}`}async function Xe(e,t,r){const s=await fetch(e,t);if(s.status===404)throw new Error(`Resource "${s.url}" not found`);const n=await s.blob();return new Promise((i,l)=>{const c=new FileReader;c.onerror=l,c.onloadend=()=>{try{i(r({res:s,result:c.result}))}catch(d){l(d)}},c.readAsDataURL(n)})}const ge={};function er(e,t,r){let s=e.replace(/\?.*/,"");return r&&(s=e),/ttf|otf|eot|woff2?/i.test(s)&&(s=s.replace(/.*\//,"")),t?`[${t}]${s}`:s}async function we(e,t,r){const s=er(e,t,r.includeQueryParams);if(ge[s]!=null)return ge[s];r.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let n;try{const i=await Xe(e,r.fetchRequestInit,({res:l,result:c})=>(t||(t=l.headers.get("Content-Type")||""),Kt(c)));n=Zt(i,t)}catch(i){n=r.imagePlaceholder||"";let l=`Failed to fetch resource: ${e}`;i&&(l=typeof i=="string"?i:i.message),l&&console.warn(l)}return ge[s]=n,n}async function tr(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):me(t)}async function rr(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 me(c)}const r=e.poster,s=ye(r),n=await we(r,s,t);return me(n)}async function ar(e,t){var r;try{if(!((r=e==null?void 0:e.contentDocument)===null||r===void 0)&&r.body)return await ue(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function sr(e,t){return I(e,HTMLCanvasElement)?tr(e):I(e,HTMLVideoElement)?rr(e,t):I(e,HTMLIFrameElement)?ar(e,t):e.cloneNode(Ye(e))}const nr=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",Ye=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function ir(e,t,r){var s,n;if(Ye(t))return t;let i=[];return nr(e)&&e.assignedNodes?i=Z(e.assignedNodes()):I(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||I(e,HTMLVideoElement)||await i.reduce((l,c)=>l.then(()=>ue(c,r)).then(d=>{d&&t.appendChild(d)}),Promise.resolve()),t}function lr(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):Qe(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`),I(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 or(e,t){I(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),I(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function cr(e,t){if(I(e,HTMLSelectElement)){const r=t,s=Array.from(r.children).find(n=>e.value===n.getAttribute("value"));s&&s.setAttribute("selected","")}}function dr(e,t,r){return I(t,Element)&&(lr(e,t,r),Xt(e,t,r),or(e,t),cr(e,t)),t}async function mr(e,t){const r=e.querySelectorAll?e.querySelectorAll("use"):[];if(r.length===0)return e;const s={};for(let i=0;isr(s,t)).then(s=>ir(e,s,t)).then(s=>dr(e,s,t)).then(s=>mr(s,t))}const Je=/url\((['"]?)([^'"]+?)\1\)/g,ur=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,hr=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function fr(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function pr(e){const t=[];return e.replace(Je,(r,s,n)=>(t.push(n),r)),t.filter(r=>!xe(r))}async function gr(e,t,r,s,n){try{const i=r?At(t,r):t,l=ye(t);let c;return n||(c=await we(i,l,s)),e.replace(fr(t),`$1${c}$3`)}catch{}return e}function xr(e,{preferredFontFormat:t}){return t?e.replace(hr,r=>{for(;;){const[s,,n]=ur.exec(r)||[];if(!n)return"";if(n===t)return`src: ${s};`}}):e}function Ke(e){return e.search(Je)!==-1}async function Ze(e,t,r){if(!Ke(e))return e;const s=xr(e,r);return pr(s).reduce((i,l)=>i.then(c=>gr(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 Ze(n,null,r);return t.style.setProperty(e,i,t.style.getPropertyPriority(e)),!0}return!1}async function br(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 yr(e,t){const r=I(e,HTMLImageElement);if(!(r&&!xe(e.src))&&!(I(e,SVGImageElement)&&!xe(e.href.baseVal)))return;const s=r?e.src:e.href.baseVal,n=await we(s,ye(s),t);await new Promise((i,l)=>{e.onload=i,e.onerror=t.onImageErrorHandler?(...d)=>{try{i(t.onImageErrorHandler(...d))}catch(f){l(f)}}:l;const c=e;c.decode&&(c.decode=i),c.loading==="lazy"&&(c.loading="eager"),r?(e.srcset="",e.src=n):e.href.baseVal=n})}async function wr(e,t){const s=Z(e.childNodes).map(n=>et(n,t));await Promise.all(s).then(()=>e)}async function et(e,t){I(e,Element)&&(await br(e,t),await yr(e,t),await wr(e,t))}function vr(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 De={};async function He(e){let t=De[e];if(t!=null)return t;const s=await(await fetch(e)).text();return t={url:e,cssText:s},De[e]=t,t}async function Ve(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),Xe(c,t.fetchRequestInit,({result:d})=>(r=r.replace(l,`url(${d})`),[l,d]))});return Promise.all(i).then(()=>r)}function We(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 jr(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=He(d).then(g=>Ve(g,t)).then(g=>We(g).forEach(m=>{try{n.insertRule(m,m.startsWith("@import")?c+=1:n.cssRules.length)}catch(h){console.error("Error inserting rule from remote css",{rule:m,error:h})}})).catch(g=>{console.error("Error loading remote css",g.toString())});s.push(f)}})}catch(i){const l=e.find(c=>c.href==null)||document.styleSheets[0];n.href!=null&&s.push(He(n.href).then(c=>Ve(c,t)).then(c=>We(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 _r(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>Ke(t.style.getPropertyValue("src")))}async function Sr(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=Z(e.ownerDocument.styleSheets),s=await jr(r,t);return _r(s)}function tt(e){return e.trim().replace(/["']/g,"")}function kr(e){const t=new Set;function r(s){(s.style.fontFamily||getComputedStyle(s).fontFamily).split(",").forEach(i=>{t.add(tt(i))}),Array.from(s.children).forEach(i=>{i instanceof HTMLElement&&r(i)})}return r(e),t}async function Cr(e,t){const r=await Sr(e,t),s=kr(e);return(await Promise.all(r.filter(i=>s.has(tt(i.style.fontFamily))).map(i=>{const l=i.parentStyleSheet?i.parentStyleSheet.href:null;return Ze(i.cssText,l,t)}))).join(` `)}async function Er(e,t){const r=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await Cr(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 Nr(e,t={}){const{width:r,height:s}=Ge(e,t),n=await ue(e,t,!0);return await Er(n,t),await et(n,t),vr(n,t),await zt(n,r,s)}async function Pr(e,t={}){const{width:r,height:s}=Ge(e,t),n=await Nr(e,t),i=await me(n),l=document.createElement("canvas"),c=l.getContext("2d"),d=t.pixelRatio||Vt(),f=t.canvasWidth||r,g=t.canvasHeight||s;return l.width=f*d,l.height=g*d,t.skipAutoScale||Wt(l),l.style.width=`${f}`,l.style.height=`${g}`,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 Rr(e,t={}){const r=await Pr(e,t);return await Ot(r)}const be="#ffffff";function $r(){return typeof window>"u"?be:window.getComputedStyle(document.documentElement).getPropertyValue("--bg-elevated").trim()||be}function Mr(e){if(typeof window>"u")return be;const t=window.getComputedStyle(e).backgroundColor;return!t||t==="rgba(0, 0, 0, 0)"||t==="transparent"?$r():t}async function Lr(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 Rr(e,{pixelRatio:2,cacheBust:!0,backgroundColor:Mr(e)});if(!t)throw new Error("Failed to render screenshot.");await window.navigator.clipboard.write([new window.ClipboardItem({"image/png":t})])}const rt=({targetRef:e,label:t})=>{const{toast:r}=it(),[s,n]=T.useState("idle"),i=T.useRef(null);T.useEffect(()=>()=>{i.current!==null&&window.clearTimeout(i.current)},[]);const l=T.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 Lr(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(ft,{name:"copy",size:11}),c]})};function Tr({model:e,datasetName:t,hideClosed:r,setHideClosed:s,setMetric:n}){const i=T.useRef(null),{isInitialFilteredViewLoading:l,chartPoints:c,activeMetric:d,allowedMetrics:f,orderedMetrics:g,parameterBound:m}=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:g.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(Ue,{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(rt,{targetRef:i,label:"SOTA chart"})]})]}),a.jsx("div",{className:"bm-chart-wrap",children:a.jsx(It,{points:c,metric:d})}),a.jsxs("div",{className:"bm-chart-foot",children:[a.jsx("span",{className:"legend-dot"}),m===void 0?"All models":"Filtered models"," over time · highlighted dots track the running best · hover for the model · click to open the paper"]})]})}function Fr(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 Oe(e,t){return e?a.jsx(oe,{title:e}):t||"—"}const ta=()=>{var ve,je,_e,Se,ke,Ce,Ee,Ne;const{datasetSlug:e}=lt(),[t,r]=ot(),s=t.get("task")||void 0,n=t.get("eval")||void 0,i=wt(t.get("max_parameters_exclusive")),{preferences:l,setHideClosedSourceEvals:c}=mt(),d=T.useRef(null),f=T.useRef(!1),g=T.useRef(null),[m,h]=T.useState(null),N=`${e}:${s||""}`,C=m===N,[P,S]=T.useState(1),v=te(re.datasetPage(e,{include_paper:!0,task:s,is_open:l.hide_closed_source_evals?!0:void 0})),k=te(ct.byDataset((ve=v.data)==null?void 0:ve.id)),A=te(re.datasetTasks((je=v.data)==null?void 0:je.id)),j=te(re.metricDirections()),U=qe(A.data||[],k.data||[],s,n),V=te({...re.taskBenchmarkTrends(U??void 0,{limit:100,min_recent_papers:0,is_open:l.hide_closed_source_evals?!0:void 0}),enabled:!!((_e=v.data)!=null&&_e.id)}),y=T.useMemo(()=>{var x;return(((x=V.data)==null?void 0:x.results)||[]).find(M=>{var L;return M.id===((L=v.data)==null?void 0:L.id)})||null},[V.data,(Se=v.data)==null?void 0:Se.id]),z=te(re.leaderboardMetrics((ke=v.data)==null?void 0:ke.id,U??void 0)),F=Rt({evaluations:k.data||[],tasks:A.data||[],configuredMetrics:z.data||[],directions:j.data,initialSummary:(Ce=v.data)==null?void 0:Ce.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:A.isSuccess,directions:j.isSuccess,metrics:z.isSuccess}}),{primaryTask:B,hiddenClosedEvals:X,hiddenClosedTopEval:q,isSummaryLoading:ee,displayedMetric:W,displayedSota:$,displayedSotaModel:O,isInitialFilteredViewLoading:Q,highlightedEval:_,hasParameterMetadata:Y,parameterCoverage:J,orderedMetrics:o}=F;T.useEffect(()=>{if(f.current||!n||!k.data||k.data.length===0)return;const x=d.current;x&&(f.current=!0,x.scrollIntoView({behavior:"smooth",block:"start"}))},[n,k.data]);const u=te(re.area(B==null?void 0:B.area_id));if(v.isLoading)return a.jsxs("div",{className:"page",children:[a.jsx(ce,{className:"h-12 w-1/2 mb-6"}),a.jsx(ce,{className:"h-64 w-full"})]});if(!v.data)return yt([v.error],"Failed to load this benchmark. Please try again.")??a.jsx(bt,{});const p=v.data,b=!!p.supports_harness,R=x=>{r(M=>{const L=new URLSearchParams(M);return x===void 0?L.delete("max_parameters_exclusive"):L.set("max_parameters_exclusive",String(x)),L})},E=x=>{r(M=>{const L=new URLSearchParams(M);return L.set("metric",x),L})},w=p.introducing_paper??void 0,D=(w==null?void 0:w.arxiv_id)||(w==null?void 0:w.id)||Fr(p.paper_url),K=(w==null?void 0:w.title)||p.introducing_paper_title||null,G=((Ee=w==null?void 0:w.published)==null?void 0:Ee.slice(0,4))||p.introduced_year||null,at=!!D||!!p.paper_url||!!K,st=w!=null&&w.arxiv_id||(Ne=p.paper_url)!=null&&Ne.match(/^https?:\/\/(?:www\.)?arxiv\.org\//i)?`arXiv:${D}`:`Paper ${D}`;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"}),u.data&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"sep",children:"/"}),a.jsx(ne,{to:`/tasks#area-${xt(u.data.name)}`,children:u.data.name})]}),B&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"sep",children:"/"}),a.jsx(ne,{to:`/tasks/${B.slug||B.id}`,children:B.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}),y&&a.jsxs("div",{className:"bm-title-trend","aria-label":`${p.name} reporting trend`,children:[a.jsx(pt,{history:y.history,benchmarkName:y.name}),a.jsxs("span",{className:"bm-title-trend-summary",children:[a.jsx("strong",{children:y.recent_paper_count})," ",y.recent_paper_count===1?"paper":"papers",y.rate_change==null?y.recent_paper_count>0&&a.jsx("span",{className:"benchmark-trend-change is-new",children:"new"}):a.jsxs("span",{className:`benchmark-trend-change ${y.rate_change>=1?"is-up":"is-down"}`,children:[y.rate_change>=1?"↑":"↓"," ",y.rate_change.toFixed(1),"×"]})]})]})]}),a.jsx(dt,{kind:"benchmark",entityId:p.id}),a.jsxs("div",{className:"bm-subtitle",children:[ee?a.jsx(ce,{className:"h-5 w-64 bm-summary-skeleton","aria-label":"Loading benchmark summary"}):a.jsxs("span",{children:[W&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"metric-tag",children:W}),a.jsx("span",{style:{color:"var(--hairline-strong)",margin:"0 8px"},children:"·"})]}),O?a.jsxs("span",{children:["Best: ",a.jsx("span",{className:"best-name",children:le($)})," by ",a.jsx("span",{className:"best-name",style:{fontStyle:"normal"},children:O})]}):a.jsxs("span",{children:[F.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&&X.length>0&&a.jsxs("div",{className:"bm-hidden-closed-notice",children:[a.jsxs("span",{children:[X.length," closed-source ",X.length===1?"row is":"rows are"," hidden",q!=null&&q.model_name?a.jsxs(a.Fragment,{children:[", including ",a.jsx("strong",{children:q.model_name})]}):null,"."]}),a.jsx("button",{type:"button",className:"bm-hidden-closed-action",onClick:()=>{c(!1)},children:"Show closed-source"})]}),at&&a.jsxs("div",{className:"method-source",style:{marginTop:0,marginBottom:18},children:[a.jsx("span",{className:"method-source-label",children:"Source"}),D?a.jsxs(ne,{to:`/paper/${D}`,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[a.jsx("span",{className:"method-source-title",children:K?a.jsx(oe,{title:K}):st}),G&&a.jsx("span",{className:"method-source-meta",children:G})]}):p.paper_url?a.jsxs("a",{href:gt(p.paper_url)??void 0,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[a.jsx("span",{className:"method-source-title",children:K?a.jsx(oe,{title:K}):p.paper_url}),G&&a.jsx("span",{className:"method-source-meta",children:G})]}):a.jsxs("div",{className:"method-source-link is-static",children:[a.jsx("span",{className:"method-source-title",children:K?a.jsx(oe,{title:K}):null}),G&&a.jsx("span",{className:"method-source-meta",children:G})]})]}),a.jsx(Tr,{model:F,datasetName:p.name,hideClosed:l.hide_closed_source_evals,setHideClosed:c,setMetric:E}),_&&(()=>{var Re,$e;const x=_.paper_arxiv_id||_.paper_id,M=_.paper_title||(_.paper_arxiv_id?`arXiv:${_.paper_arxiv_id}`:null),L=_.best_metric&&((Re=_.metrics)==null?void 0:Re[_.best_metric])!==void 0?_.best_metric:F.activeMetric,Pe=($e=_.metrics)==null?void 0:$e[L];return a.jsxs("div",{className:"bm-highlight-banner",role:"status",children:[a.jsx("span",{className:"bm-highlight-dot","aria-hidden":"true"}),a.jsxs("div",{className:"bm-highlight-text",children:[a.jsx("span",{className:"bm-highlight-label",children:"Comparing result"}),a.jsxs("span",{className:"bm-highlight-paper",children:[_.model_name||M||"—",_.harness?` · ${_.harness}`:""]}),a.jsxs("span",{className:"bm-highlight-meta",children:[Pe!==void 0&&L?a.jsxs(a.Fragment,{children:[L,": ",le(Pe),M?" · ":""]}):null,x?a.jsx(ne,{to:`/paper/${x}`,children:Oe(_.paper_title,M)}):Oe(_.paper_title,M)]})]})]})})(),a.jsxs("div",{className:"bm-card",ref:g,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:[F.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:F.activeMetric,onChange:x=>E(x.target.value),children:o.map(x=>a.jsx("option",{value:x,children:x},x))})]}),a.jsxs("label",{className:"bm-closed-toggle",title:"Show or hide evaluations of closed-source models",children:[a.jsx(Ue,{className:"bm-closed-toggle-switch",checked:!l.hide_closed_source_evals,onCheckedChange:x=>{c(!x)},"aria-label":"Show closed-source models"}),a.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),!Q&&!Y&&k.isSuccess?a.jsx("span",{className:"bm-parameter-unavailable",children:"Parameter metadata unavailable"}):null,a.jsx(rt,{targetRef:g,label:"leaderboard"})]})]}),!Q&&Y&&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:F.parameterFilters.map(x=>{const{selected:M,disabled:L}=x;return a.jsx("button",{type:"button",className:`bm-parameter-filter-option${M?" is-active":""}`,"aria-pressed":M,disabled:L,onClick:()=>R(x.maxParametersExclusive),children:x.label},x.label)})}),a.jsxs("span",{className:"bm-parameter-coverage",children:["Parameters known for ",J.parameter_coverage_known," of ",J.parameter_coverage_total," entries"]})]}),k.isLoading||Q?a.jsx("div",{style:{padding:16},children:Array.from({length:5}).map((x,M)=>a.jsx(ce,{className:"h-10 w-full mb-2"},M))}):F.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:()=>R(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:N),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(Tt,{model:F,showHarness:b,setMetric:E,highlightRowRef:d,onFittingMetricCountChange:S})]})]})]})})};export{ta as default}; diff --git a/assets/BenchmarkTrendSparkline-Gf-WHpzB.js b/assets/BenchmarkTrendSparkline-BuEjY1OI.js similarity index 97% rename from assets/BenchmarkTrendSparkline-Gf-WHpzB.js rename to assets/BenchmarkTrendSparkline-BuEjY1OI.js index 783c2ee61c82f9ef604267fd56d5d0928085c77b..9b9298e178825130c091179d0667ac1080616905 100644 --- a/assets/BenchmarkTrendSparkline-Gf-WHpzB.js +++ b/assets/BenchmarkTrendSparkline-BuEjY1OI.js @@ -1 +1 @@ -import{i as C,j as t}from"./index-C1Xuuz1Y.js";const g=112,p=42,o=5,i=5,b=new Intl.DateTimeFormat("en",{month:"short",timeZone:"UTC"}),y=(e,d)=>{const r=new Date(`${e}T00:00:00Z`),n=new Date(`${d}T00:00:00Z`);return r.getUTCMonth()===n.getUTCMonth()?`${b.format(r)} ${r.getUTCDate()}–${n.getUTCDate()}`:`${b.format(r)} ${r.getUTCDate()}–${b.format(n)} ${n.getUTCDate()}`},I=({history:e,benchmarkName:d,interactive:r=!1})=>{const[n,x]=C.useState(null),h=e.map(s=>s.paper_count),M=Math.max(1,...h),f=g-o*2,T=p-i*2,v=h.length>1?f/(h.length-1):0,a=h.map((s,c)=>({x:o+v*c,y:i+T-s/M*T})),$=a.map(({x:s,y:c})=>`${s},${c}`).join(" "),_=a.length?`${o},${p-i} ${$} ${a[a.length-1].x},${p-i}`:"",D=h.reduce((s,c)=>s+c,0),u=49,N=14,m=n==null?null:a[n],j=m?Math.min(g-o-u,Math.max(o,m.x-u/2)):0,k=m?m.y>p/2?m.y-N-3:m.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-i,x2:g-o,y2:p-i}),t.jsx("line",{className:"benchmark-trend-axis",x1:o,y1:i,x2:o,y2:p-i}),_&&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"}),m&&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{i as C,j as t}from"./index-DMjO_toh.js";const g=112,p=42,o=5,i=5,b=new Intl.DateTimeFormat("en",{month:"short",timeZone:"UTC"}),y=(e,d)=>{const r=new Date(`${e}T00:00:00Z`),n=new Date(`${d}T00:00:00Z`);return r.getUTCMonth()===n.getUTCMonth()?`${b.format(r)} ${r.getUTCDate()}–${n.getUTCDate()}`:`${b.format(r)} ${r.getUTCDate()}–${b.format(n)} ${n.getUTCDate()}`},I=({history:e,benchmarkName:d,interactive:r=!1})=>{const[n,x]=C.useState(null),h=e.map(s=>s.paper_count),M=Math.max(1,...h),f=g-o*2,T=p-i*2,v=h.length>1?f/(h.length-1):0,a=h.map((s,c)=>({x:o+v*c,y:i+T-s/M*T})),$=a.map(({x:s,y:c})=>`${s},${c}`).join(" "),_=a.length?`${o},${p-i} ${$} ${a[a.length-1].x},${p-i}`:"",D=h.reduce((s,c)=>s+c,0),u=49,N=14,m=n==null?null:a[n],j=m?Math.min(g-o-u,Math.max(o,m.x-u/2)):0,k=m?m.y>p/2?m.y-N-3:m.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-i,x2:g-o,y2:p-i}),t.jsx("line",{className:"benchmark-trend-axis",x1:o,y1:i,x2:o,y2:p-i}),_&&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"}),m&&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-DxTQ9Cxu.js b/assets/CatalogEntityPreviewLink-BirlAu9e.js similarity index 98% rename from assets/CatalogEntityPreviewLink-DxTQ9Cxu.js rename to assets/CatalogEntityPreviewLink-BirlAu9e.js index 2c005560a2084dd35338f494f496b94688eec304..4ae19d64336d80cfa106f3af8bddb5e26bb31e66 100644 --- a/assets/CatalogEntityPreviewLink-DxTQ9Cxu.js +++ b/assets/CatalogEntityPreviewLink-BirlAu9e.js @@ -1,4 +1,4 @@ -import{d,ao as m,aa as u,b as h,j as s,L as g,al as f,N as l}from"./index-C1Xuuz1Y.js";import{H as k,a as w,b as y}from"./hover-card-BSWfQepz.js";/** +import{d,ao as m,aa as u,b as h,j as s,L as g,al as f,N as l}from"./index-DMjO_toh.js";import{H as k,a as w,b as y}from"./hover-card-D4j7S6P3.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/ChatView-BVQ4YUnD.js b/assets/ChatView-C_8EJWxW.js similarity index 98% rename from assets/ChatView-BVQ4YUnD.js rename to assets/ChatView-C_8EJWxW.js index 20fd0b7b70ed0c951ba18bf8ffbcf040ed7bb9e8..402d063becedfbdb611a339207f1007d77ecabdb 100644 --- a/assets/ChatView-BVQ4YUnD.js +++ b/assets/ChatView-C_8EJWxW.js @@ -1,4 +1,4 @@ -var Tt=Object.defineProperty;var Nt=(t,e,r)=>e in t?Tt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var z=(t,e,r)=>Nt(t,typeof e!="symbol"?e+"":e,r);import{d as Dt,i as c,j as s,X as yt,I as bt,b as ke,L as wt,ag as Lt,ah as Ft,ai as Bt,aj as rt,aa as Fe,f as vt,n as St,D as xt,o as _t,l as Ot,a as Et,u as Pt,A as qt}from"./index-C1Xuuz1Y.js";import{C as Ut,U as it,b as Ht,f as je,A as Vt,a as Kt,c as Wt,g as zt,h as Qt,i as De,j as $t,k as at,t as Yt,l as Gt,E as Xt,m as Jt,n as Zt,o as ot}from"./chatLifecycle-CbrXR8Sy.js";import{k as Me,l as es,m as ts,n as Ct,T as ct,h as jt,o as Ae,r as qe,s as ss,t as ns,v as oe,D as Ue,w as rs,x as is,y as as,z as os,B as cs,C as ls,E as us,F as ds,G as hs,H as $e,I as ps,J as lt,K as kt,L as ut,M as He,j as fs,N as ms,O as gs,Q as Rt,R as ys,U as bs,V as ws,W as vs,S as Ss}from"./chatSessions-DFoCf0pS.js";import{M as xs}from"./McpShowcase-CwUcSruT.js";import{c as le}from"./chat-CiW-DJRi.js";import{S as _s}from"./share-2-Zzb236oj.js";import{u as Be}from"./useMutation-Cb0wrKBq.js";import{I as Es}from"./Icon-BADQ_q7j.js";import{m as Cs}from"./mlIntern-BRf6eT1x.js";import{u as js,O as ks}from"./openrouter-B1BP_cUi.js";/* empty css */import"./hover-card-BSWfQepz.js";import"./CatalogEntityPreviewLink-DxTQ9Cxu.js";import"./github-DYMnkwxi.js";import"./file-text-BlXclTHj.js";import"./PaperPreviewLink-CTwxrQQW.js";import"./index-SntObKrh.js";import"./index-B8mUud-W.js";import"./katex-DkKDou_j.js";import"./thumbs-up-Ys3ImX4j.js";import"./copy-DN4cM864.js";import"./arrow-left-B9GmgZLS.js";import"./external-link-BwpBZl45.js";import"./plus-VBQCmtt2.js";import"./search-YolWz-tq.js";import"./chevron-up-zZuEVcHx.js";import"./AuthorAvatar-DqCnji_B.js";import"./AgentLogos-CJgsqwCs.js";/** +var Tt=Object.defineProperty;var Nt=(t,e,r)=>e in t?Tt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var z=(t,e,r)=>Nt(t,typeof e!="symbol"?e+"":e,r);import{d as Dt,i as c,j as s,X as yt,I as bt,b as ke,L as wt,ag as Lt,ah as Ft,ai as Bt,aj as rt,aa as Fe,f as vt,n as St,D as xt,o as _t,l as Ot,a as Et,u as Pt,A as qt}from"./index-DMjO_toh.js";import{C as Ut,U as it,b as Ht,f as je,A as Vt,a as Kt,c as Wt,g as zt,h as Qt,i as De,j as $t,k as at,t as Yt,l as Gt,E as Xt,m as Jt,n as Zt,o as ot}from"./chatLifecycle-CkvR6Xsi.js";import{k as Me,l as es,m as ts,n as Ct,T as ct,h as jt,o as Ae,r as qe,s as ss,t as ns,v as oe,D as Ue,w as rs,x as is,y as as,z as os,B as cs,C as ls,E as us,F as ds,G as hs,H as $e,I as ps,J as lt,K as kt,L as ut,M as He,j as fs,N as ms,O as gs,Q as Rt,R as ys,U as bs,V as ws,W as vs,S as Ss}from"./chatSessions-CtEVszLf.js";import{M as xs}from"./McpShowcase-fiJIUUiM.js";import{c as le}from"./chat-B4elm0RV.js";import{S as _s}from"./share-2-BO6l1rLC.js";import{u as Be}from"./useMutation-Db093XSk.js";import{I as Es}from"./Icon-D5cUFATZ.js";import{m as Cs}from"./mlIntern-DaNPa3iB.js";import{u as js,O as ks}from"./openrouter-bfrcMxtX.js";/* empty css */import"./hover-card-D4j7S6P3.js";import"./CatalogEntityPreviewLink-BirlAu9e.js";import"./github-3dJEQTDr.js";import"./file-text-D6OyOvvT.js";import"./PaperPreviewLink-DvyVialT.js";import"./index-ruElXN5Q.js";import"./index-BCW47Vvr.js";import"./katex-DkKDou_j.js";import"./thumbs-up-CZ7BdM1B.js";import"./copy-DXTYKY8f.js";import"./arrow-left-BSWED_nt.js";import"./external-link-Bt4eibsp.js";import"./plus-B4ZP41Rg.js";import"./search-D6uSAb1U.js";import"./chevron-up-5Y7cB_yq.js";import"./AuthorAvatar-DFoIK6Bc.js";import"./AgentLogos-C26IQbJ9.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/ConferenceDetailView-B8HyemPf.js b/assets/ConferenceDetailView-CY8QPPd0.js similarity index 85% rename from assets/ConferenceDetailView-B8HyemPf.js rename to assets/ConferenceDetailView-CY8QPPd0.js index 5263af2000e5def60d4254f555abace10ac88fd4..e52493d9cee49cc66c83d35b7d86e3a3a907d61a 100644 --- a/assets/ConferenceDetailView-B8HyemPf.js +++ b/assets/ConferenceDetailView-CY8QPPd0.js @@ -1 +1 @@ -import{u as y,b as _,i as S,j as e,L as f,v as b}from"./index-C1Xuuz1Y.js";import{a as j,A as C,b as E}from"./AreaSection-CJqBHh3n.js";import{M as N}from"./MarkdownText-Dv3hoeZl.js";import{s as F}from"./areas-Dvi8w2dp.js";import{c as L,h as $}from"./colors-BkWRhvFI.js";import{C as A}from"./conferenceListings-BnmhBx-_.js";import{f as T}from"./deadlines-BG5SWwEG.js";import{d as w}from"./transform-btCQtWTl.js";import{S as P}from"./skeleton-D8hFkZOU.js";import{s as D}from"./safeExternalHref-CkBrsh84.js";import{l as R}from"./LoadFailurePage-qL80B4Za.js";/* empty css */import"./PaperPreviewLink-CTwxrQQW.js";import"./index-SntObKrh.js";import"./index-B8mUud-W.js";import"./katex-DkKDou_j.js";import"./hover-card-BSWfQepz.js";import"./useMutation-Cb0wrKBq.js";import"./alert-UfpiwFIJ.js";import"./NotFound-BVs_mdc4.js";const re=()=>{var x,h;const{confSlug:c}=y(),t=_(b.conferenceAreasWithTasks(c)),m=S.useMemo(()=>{var a;return F(((a=t.data)==null?void 0:a.results)??[])},[t.data]),s=(x=t.data)==null?void 0:x.conference,d=((h=t.data)==null?void 0:h.total_paper_count)??0,v=A.filter(a=>{var r;return(((r=t.data)==null?void 0:r[a.countKey])??0)>0}),p=R([t.error],"Failed to load conference. Please try again.");if(p)return p;const u=s?T(s.start_date,s.end_date):null,g=s?[s.venue,s.location].filter(Boolean).join(", "):null,l=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:l??e.jsx(P,{className:"h-10 w-64 inline-block"})}),e.jsxs("div",{className:"feed-subtitle",style:{display:"flex",flexDirection:"column",gap:4},children:[u&&e.jsx("span",{children:u}),g&&e.jsx("span",{children:g}),(s==null?void 0:s.url)&&e.jsx("a",{href:D(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(N,{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:l?`${l} visual`:"Conference visual",onError:a=>{var r,n;(n=(r=a.currentTarget.parentElement)==null?void 0:r.parentElement)==null||n.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",l??"Conference",s.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(N,{className:"task-image-credit",text:s.image_credit})]})]})]})]}),!t.isLoading&&d>0&&e.jsx(j,{title:"Browse papers",description:"All accepted papers, plus oral, spotlight, outstanding, and best paper finalists.",meta:`${d.toLocaleString()} papers`,style:{marginTop:48},children:v.map(a=>{var r;return e.jsxs(f,{to:`/conferences/${c}/${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(C,{tiles:6,tileClassName:"h-24"}):m.map(a=>{const r=a.tasks;if(r.length===0)return null;const n=r.reduce((i,o)=>i+(o.paper_count||0),0);return e.jsx(j,{title:a.name,description:a.description,meta:`${r.length} ${r.length===1?"task":"tasks"} · ${n.toLocaleString()} papers`,children:r.map(i=>{const o=i.slug||"",k=L($(o));return e.jsxs(f,{to:`/conferences/${c}/${o}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:k.dot}}),w(i.name,o)]}),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{re as default}; +import{u as y,b as _,i as S,j as e,L as f,v as b}from"./index-DMjO_toh.js";import{a as j,A as C,b as E}from"./AreaSection-BdgwTHWx.js";import{M as N}from"./MarkdownText-PyDBRK4a.js";import{s as F}from"./areas-Dvi8w2dp.js";import{c as L,h as $}from"./colors-BkWRhvFI.js";import{C as A}from"./conferenceListings-BnmhBx-_.js";import{f as T}from"./deadlines-BG5SWwEG.js";import{d as w}from"./transform-CXoeFMaW.js";import{S as P}from"./skeleton-DiGWALrs.js";import{s as D}from"./safeExternalHref-CkBrsh84.js";import{l as R}from"./LoadFailurePage-BIYmxtFy.js";/* empty css */import"./PaperPreviewLink-DvyVialT.js";import"./index-ruElXN5Q.js";import"./index-BCW47Vvr.js";import"./katex-DkKDou_j.js";import"./hover-card-D4j7S6P3.js";import"./useMutation-Db093XSk.js";import"./alert-B2i0PAyW.js";import"./NotFound-E4uwO9V5.js";const re=()=>{var x,h;const{confSlug:c}=y(),t=_(b.conferenceAreasWithTasks(c)),m=S.useMemo(()=>{var a;return F(((a=t.data)==null?void 0:a.results)??[])},[t.data]),s=(x=t.data)==null?void 0:x.conference,d=((h=t.data)==null?void 0:h.total_paper_count)??0,v=A.filter(a=>{var r;return(((r=t.data)==null?void 0:r[a.countKey])??0)>0}),p=R([t.error],"Failed to load conference. Please try again.");if(p)return p;const u=s?T(s.start_date,s.end_date):null,g=s?[s.venue,s.location].filter(Boolean).join(", "):null,l=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:l??e.jsx(P,{className:"h-10 w-64 inline-block"})}),e.jsxs("div",{className:"feed-subtitle",style:{display:"flex",flexDirection:"column",gap:4},children:[u&&e.jsx("span",{children:u}),g&&e.jsx("span",{children:g}),(s==null?void 0:s.url)&&e.jsx("a",{href:D(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(N,{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:l?`${l} visual`:"Conference visual",onError:a=>{var r,n;(n=(r=a.currentTarget.parentElement)==null?void 0:r.parentElement)==null||n.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",l??"Conference",s.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(N,{className:"task-image-credit",text:s.image_credit})]})]})]})]}),!t.isLoading&&d>0&&e.jsx(j,{title:"Browse papers",description:"All accepted papers, plus oral, spotlight, outstanding, and best paper finalists.",meta:`${d.toLocaleString()} papers`,style:{marginTop:48},children:v.map(a=>{var r;return e.jsxs(f,{to:`/conferences/${c}/${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(C,{tiles:6,tileClassName:"h-24"}):m.map(a=>{const r=a.tasks;if(r.length===0)return null;const n=r.reduce((i,o)=>i+(o.paper_count||0),0);return e.jsx(j,{title:a.name,description:a.description,meta:`${r.length} ${r.length===1?"task":"tasks"} · ${n.toLocaleString()} papers`,children:r.map(i=>{const o=i.slug||"",k=L($(o));return e.jsxs(f,{to:`/conferences/${c}/${o}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:k.dot}}),w(i.name,o)]}),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{re as default}; diff --git a/assets/ConferenceTaskView-C7TsDxKx.js b/assets/ConferenceTaskView-Dy6qzWoe.js similarity index 80% rename from assets/ConferenceTaskView-C7TsDxKx.js rename to assets/ConferenceTaskView-Dy6qzWoe.js index c2f225baa5feb5d62f67b25c6f2782ef1f547bf8..f5e90f8143cccb2733752350dadfeff2d7aa788f 100644 --- a/assets/ConferenceTaskView-C7TsDxKx.js +++ b/assets/ConferenceTaskView-Dy6qzWoe.js @@ -1 +1 @@ -import{u as R,b as E,v as F,B as A,w as L,i as S,j as e,L as x}from"./index-C1Xuuz1Y.js";import{b as M,u as T,c as B,P as O}from"./usePapers-DzSHAOm5.js";import{M as f}from"./MarkdownText-Dv3hoeZl.js";import{C as Q}from"./conferenceListings-BnmhBx-_.js";import{t as z,d as H}from"./transform-btCQtWTl.js";import{l as I}from"./LoadFailurePage-qL80B4Za.js";import"./PaperCard-DjlN6X2v.js";import"./AuthorAvatar-DqCnji_B.js";import"./SotaBadges-B5MVNUr2.js";import"./colors-BkWRhvFI.js";import"./Icon-BADQ_q7j.js";import"./LatexTitle-B0RfzwYI.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-C1A8cBwB.js";import"./skeleton-D8hFkZOU.js";import"./useIntersectionObserver-CwCTFEhv.js";import"./useInfiniteQuery-D52ptoDl.js";/* empty css */import"./PaperPreviewLink-CTwxrQQW.js";import"./index-SntObKrh.js";import"./index-B8mUud-W.js";import"./katex-DkKDou_j.js";import"./hover-card-BSWfQepz.js";import"./useMutation-Cb0wrKBq.js";import"./alert-UfpiwFIJ.js";import"./NotFound-BVs_mdc4.js";const $={"iclr-2026/outstanding":"ICLR 2026 recognized two Outstanding Papers and one Honorable Mention. [Read the announcement](https://blog.iclr.cc/2026/04/23/announcing-the-iclr-2026-outstanding-papers/).","icml-2026/outstanding":"ICML 2026 recognized two Outstanding Papers and five Honorable Mentions. [Read the announcement](https://blog.icml.cc/2026/07/05/announcing-the-icml-2026-awards/).","cvpr-2026/best-paper-finalists":"CVPR 2026 recognized fifteen Best Paper Award finalists, including the winners. [Read the announcement](https://x.com/CVPR/status/2062912519522717978)."},xe=()=>{var P,v,w,k,y,_;const{confSlug:t,taskSlug:o}=R(),m=M(),a=Q.find(r=>r.slug===o),u=!!(a!=null&&a.award),i=E(F.conference(t)),p=E({...F.task(o),enabled:!a}),c=T(L.conference(t,o,m.filters),r=>A.forConference(t,{...m.filters,task:a?void 0:o,presentation:a==null?void 0:a.presentation,page:r,page_size:12}),{enabled:!!t}),g=S.useMemo(()=>{var r;return((r=c.data)==null?void 0:r.pages.flatMap(n=>n.results))??[]},[c.data]),h=S.useMemo(()=>g.map(z),[g]),l=(a==null?void 0:a.label)??H(((P=p.data)==null?void 0:P.name)||o||"",((v=p.data)==null?void 0:v.slug)||o),j=$[`${t}/${o}`],N=((k=(w=c.data)==null?void 0:w.pages[0])==null?void 0:k.count)??((y=i.data)==null?void 0:y.paper_count)??0,s=p.data,b=I([i.error,p.error,c.error],"Failed to load conference papers. Please try again.");return b||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:((_=i.data)==null?void 0:_.name)??t}),e.jsx("span",{children:" / "}),e.jsx("span",{children:l})]}),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:l}),j&&e.jsx(f,{className:"task-explainer",text:j}),!a&&(s==null?void 0:s.description)&&e.jsx(f,{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:`${l} schematic`,onError:r=>{var n,d;(d=(n=r.currentTarget.parentElement)==null?void 0:n.parentElement)==null||d.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",l,s.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(f,{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(B,{feed:m,sorts:u?null:void 0,children:!u&&e.jsxs("div",{className:"results-count",children:[h.length," loaded in ",e.jsx("span",{children:l})]})}),e.jsx(O,{query:c,cards:h,empty:"No papers found for this selection.",cardHeader:r=>{var C;const n=(C=g[r])==null?void 0:C.conference_award,d=n==="outstanding"?"Outstanding Paper":n==="honorable_mention"?"Honorable Mention":n==="best_paper_finalist"&&(a==null?void 0:a.presentation)!=="best_paper_finalist"?"Best Paper Finalist":null;return d&&e.jsx("div",{className:"conference-award-label",children:d})}})]})};export{xe as default}; +import{u as R,b as E,v as F,B as A,w as L,i as S,j as e,L as x}from"./index-DMjO_toh.js";import{b as M,u as T,c as B,P as O}from"./usePapers-DCcqZCMM.js";import{M as f}from"./MarkdownText-PyDBRK4a.js";import{C as Q}from"./conferenceListings-BnmhBx-_.js";import{t as z,d as H}from"./transform-CXoeFMaW.js";import{l as I}from"./LoadFailurePage-BIYmxtFy.js";import"./PaperCard-CUJXx9SW.js";import"./AuthorAvatar-DFoIK6Bc.js";import"./SotaBadges-CHGUskQn.js";import"./colors-BkWRhvFI.js";import"./Icon-D5cUFATZ.js";import"./LatexTitle-BRJTz_K0.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-MF6JD1Yi.js";import"./skeleton-DiGWALrs.js";import"./useIntersectionObserver-CU-1-_ok.js";import"./useInfiniteQuery-C91fE_fV.js";/* empty css */import"./PaperPreviewLink-DvyVialT.js";import"./index-ruElXN5Q.js";import"./index-BCW47Vvr.js";import"./katex-DkKDou_j.js";import"./hover-card-D4j7S6P3.js";import"./useMutation-Db093XSk.js";import"./alert-B2i0PAyW.js";import"./NotFound-E4uwO9V5.js";const $={"iclr-2026/outstanding":"ICLR 2026 recognized two Outstanding Papers and one Honorable Mention. [Read the announcement](https://blog.iclr.cc/2026/04/23/announcing-the-iclr-2026-outstanding-papers/).","icml-2026/outstanding":"ICML 2026 recognized two Outstanding Papers and five Honorable Mentions. [Read the announcement](https://blog.icml.cc/2026/07/05/announcing-the-icml-2026-awards/).","cvpr-2026/best-paper-finalists":"CVPR 2026 recognized fifteen Best Paper Award finalists, including the winners. [Read the announcement](https://x.com/CVPR/status/2062912519522717978)."},xe=()=>{var P,v,w,k,y,_;const{confSlug:t,taskSlug:o}=R(),m=M(),a=Q.find(r=>r.slug===o),u=!!(a!=null&&a.award),i=E(F.conference(t)),p=E({...F.task(o),enabled:!a}),c=T(L.conference(t,o,m.filters),r=>A.forConference(t,{...m.filters,task:a?void 0:o,presentation:a==null?void 0:a.presentation,page:r,page_size:12}),{enabled:!!t}),g=S.useMemo(()=>{var r;return((r=c.data)==null?void 0:r.pages.flatMap(n=>n.results))??[]},[c.data]),h=S.useMemo(()=>g.map(z),[g]),l=(a==null?void 0:a.label)??H(((P=p.data)==null?void 0:P.name)||o||"",((v=p.data)==null?void 0:v.slug)||o),j=$[`${t}/${o}`],N=((k=(w=c.data)==null?void 0:w.pages[0])==null?void 0:k.count)??((y=i.data)==null?void 0:y.paper_count)??0,s=p.data,b=I([i.error,p.error,c.error],"Failed to load conference papers. Please try again.");return b||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:((_=i.data)==null?void 0:_.name)??t}),e.jsx("span",{children:" / "}),e.jsx("span",{children:l})]}),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:l}),j&&e.jsx(f,{className:"task-explainer",text:j}),!a&&(s==null?void 0:s.description)&&e.jsx(f,{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:`${l} schematic`,onError:r=>{var n,d;(d=(n=r.currentTarget.parentElement)==null?void 0:n.parentElement)==null||d.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",l,s.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(f,{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(B,{feed:m,sorts:u?null:void 0,children:!u&&e.jsxs("div",{className:"results-count",children:[h.length," loaded in ",e.jsx("span",{children:l})]})}),e.jsx(O,{query:c,cards:h,empty:"No papers found for this selection.",cardHeader:r=>{var C;const n=(C=g[r])==null?void 0:C.conference_award,d=n==="outstanding"?"Outstanding Paper":n==="honorable_mention"?"Honorable Mention":n==="best_paper_finalist"&&(a==null?void 0:a.presentation)!=="best_paper_finalist"?"Best Paper Finalist":null;return d&&e.jsx("div",{className:"conference-award-label",children:d})}})]})};export{xe as default}; diff --git a/assets/ConferencesIndexView-BAr9KGLJ.js b/assets/ConferencesIndexView-Gq6pPaBT.js similarity index 79% rename from assets/ConferencesIndexView-BAr9KGLJ.js rename to assets/ConferencesIndexView-Gq6pPaBT.js index cef2decd840914ad7bdcf5718641696cb94ac584..e1714786253ee56aa63aa8824ab8237b1fe90140 100644 --- a/assets/ConferencesIndexView-BAr9KGLJ.js +++ b/assets/ConferencesIndexView-Gq6pPaBT.js @@ -1 +1 @@ -import{b as d,i as m,j as e,L as c,v as p}from"./index-C1Xuuz1Y.js";import{f as u}from"./deadlines-BG5SWwEG.js";import{A as f,a as h}from"./alert-UfpiwFIJ.js";import{A as x,a as g}from"./AreaSection-CJqBHh3n.js";import{T as j}from"./TaxonomySuggestionTile-BjF2aVUk.js";import"./skeleton-D8hFkZOU.js";import"./SignInToEditDialog-DkoRRdng.js";import"./button-DMLWlhJJ.js";import"./input-DJqx9Wtu.js";import"./textarea--CThIdhF.js";import"./searchable-select-DPAXOMOd.js";import"./popover-C1A8cBwB.js";import"./dialog-CCU_33Ju.js";import"./search-YolWz-tq.js";import"./loader-circle-tzO1dF92.js";import"./useMutation-Cb0wrKBq.js";import"./submissions-DcU5ZqyQ.js";import"./plus-VBQCmtt2.js";const v=r=>{var t;if(r.year!=null)return r.year;if(r.start_date)return Number(r.start_date.slice(0,4));const a=(t=r.slug.match(/-(\d{4})$/))==null?void 0:t[1];return a?Number(a):0},N=(r,a)=>{if(r.start_date&&a.start_date){const t=r.start_date.localeCompare(a.start_date);if(t!==0)return t}else{if(r.start_date)return-1;if(a.start_date)return 1}return r.name.localeCompare(a.name)},P=()=>{const r=d(p.conferences()),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(N)),Object.keys(t).map(Number).sort((n,s)=>s-n).map(n=>({year:n,conferences:t[n]}))},[r.data]);return r.error?e.jsx("div",{className:"page",children:e.jsx(f,{variant:"destructive",children:e.jsx(h,{children:"Failed to load conferences. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["All ",e.jsx("em",{children:"Conferences"})]}),e.jsx("div",{className:"feed-subtitle",children:"Browse accepted papers from major AI conferences, grouped by research area and task."}),e.jsxs("div",{className:"conference-deadlines-link",children:["Find deadlines for upcoming conferences"," ",e.jsx(c,{to:"/ai-deadlines",className:"underline underline-offset-2 hover:text-foreground",children:"here"}),". Conference information is based on"," ",e.jsx("a",{href:"https://huggingface.co/ai-conferences",target:"_blank",rel:"noreferrer",className:"underline underline-offset-2 hover:text-foreground",children:"Hugging Face AI Conferences"}),"."]})]})}),r.isLoading?e.jsx(x,{sections:2,tiles:3,tileClassName:"h-32"}):a==null?void 0:a.map(({year:t,conferences:i})=>{const n=i.reduce((s,o)=>s+(o.paper_count??0),0);return e.jsxs(g,{title:t>0?String(t):"Unknown year",meta:`${i.length} ${i.length===1?"conference":"conferences"} · ${n.toLocaleString()} papers`,children:[i.map(s=>{const o=u(s.start_date,s.end_date),l=[s.venue,s.location].filter(Boolean).join(", ");return e.jsxs(c,{to:`/conferences/${s.slug}`,className:"tag-cell",children:[e.jsx("div",{className:"name",children:s.name}),e.jsxs("div",{className:"meta",style:{display:"flex",flexDirection:"column",gap:4},children:[o&&e.jsx("span",{children:o}),l&&e.jsx("span",{children:l}),e.jsxs("span",{children:[(s.paper_count??0).toLocaleString()," papers"]})]})]},s.id)}),e.jsx(j,{kind:"conference"})]},t)})]})};export{P as default}; +import{b as d,i as m,j as e,L as c,v as p}from"./index-DMjO_toh.js";import{f as u}from"./deadlines-BG5SWwEG.js";import{A as f,a as h}from"./alert-B2i0PAyW.js";import{A as x,a as g}from"./AreaSection-BdgwTHWx.js";import{T as j}from"./TaxonomySuggestionTile-CU-KualO.js";import"./skeleton-DiGWALrs.js";import"./SignInToEditDialog-BIKQbaVj.js";import"./button-BGphIht2.js";import"./input-BzpOTl46.js";import"./textarea-nRN8oSDz.js";import"./searchable-select-DscHfpAa.js";import"./popover-MF6JD1Yi.js";import"./dialog-C-drkhvX.js";import"./search-D6uSAb1U.js";import"./loader-circle-gyMLnt4Y.js";import"./useMutation-Db093XSk.js";import"./submissions-C02Zu9zt.js";import"./plus-B4ZP41Rg.js";const v=r=>{var t;if(r.year!=null)return r.year;if(r.start_date)return Number(r.start_date.slice(0,4));const a=(t=r.slug.match(/-(\d{4})$/))==null?void 0:t[1];return a?Number(a):0},N=(r,a)=>{if(r.start_date&&a.start_date){const t=r.start_date.localeCompare(a.start_date);if(t!==0)return t}else{if(r.start_date)return-1;if(a.start_date)return 1}return r.name.localeCompare(a.name)},P=()=>{const r=d(p.conferences()),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(N)),Object.keys(t).map(Number).sort((n,s)=>s-n).map(n=>({year:n,conferences:t[n]}))},[r.data]);return r.error?e.jsx("div",{className:"page",children:e.jsx(f,{variant:"destructive",children:e.jsx(h,{children:"Failed to load conferences. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["All ",e.jsx("em",{children:"Conferences"})]}),e.jsx("div",{className:"feed-subtitle",children:"Browse accepted papers from major AI conferences, grouped by research area and task."}),e.jsxs("div",{className:"conference-deadlines-link",children:["Find deadlines for upcoming conferences"," ",e.jsx(c,{to:"/ai-deadlines",className:"underline underline-offset-2 hover:text-foreground",children:"here"}),". Conference information is based on"," ",e.jsx("a",{href:"https://huggingface.co/ai-conferences",target:"_blank",rel:"noreferrer",className:"underline underline-offset-2 hover:text-foreground",children:"Hugging Face AI Conferences"}),"."]})]})}),r.isLoading?e.jsx(x,{sections:2,tiles:3,tileClassName:"h-32"}):a==null?void 0:a.map(({year:t,conferences:i})=>{const n=i.reduce((s,o)=>s+(o.paper_count??0),0);return e.jsxs(g,{title:t>0?String(t):"Unknown year",meta:`${i.length} ${i.length===1?"conference":"conferences"} · ${n.toLocaleString()} papers`,children:[i.map(s=>{const o=u(s.start_date,s.end_date),l=[s.venue,s.location].filter(Boolean).join(", ");return e.jsxs(c,{to:`/conferences/${s.slug}`,className:"tag-cell",children:[e.jsx("div",{className:"name",children:s.name}),e.jsxs("div",{className:"meta",style:{display:"flex",flexDirection:"column",gap:4},children:[o&&e.jsx("span",{children:o}),l&&e.jsx("span",{children:l}),e.jsxs("span",{children:[(s.paper_count??0).toLocaleString()," papers"]})]})]},s.id)}),e.jsx(j,{kind:"conference"})]},t)})]})};export{P as default}; diff --git a/assets/CronDashboard-Xj6HXS6e.js b/assets/CronDashboard-B8-bAbmS.js similarity index 98% rename from assets/CronDashboard-Xj6HXS6e.js rename to assets/CronDashboard-B8-bAbmS.js index 8fa34028ab3114c721b77839a52e82c302f932b0..00718f749b7074dce0eeee30d20f52e9f6078a72 100644 --- a/assets/CronDashboard-Xj6HXS6e.js +++ b/assets/CronDashboard-B8-bAbmS.js @@ -1,4 +1,4 @@ -import{d as q,i as h,a3 as ts,S as is,j as e,R as ie,aB as cs,a4 as ls,a5 as ds,V as oe,Q as os,Y as ms,a6 as Ae,Z as $,b as Q,_ as he,o as xe,$ as I,A as Te,L as pe,aU as E,a0 as us,p as hs,N as me,c as xs,a as ps,aV as gs,D as js}from"./index-C1Xuuz1Y.js";import{u as L}from"./useMutation-Cb0wrKBq.js";import{t as ge,f as v,a as S,S as Fe,C as g,b as N,c as b,d as P,e as j,g as C}from"./CronDashboard-BtUcBsc0.js";import{B as O}from"./badge-_8Y6CJzv.js";import{B as y}from"./button-DMLWlhJJ.js";import{C as vs,a as _s}from"./chevron-up-zZuEVcHx.js";import{D as fe}from"./database-rIkpN7y5.js";import{T as fs}from"./trending-up-Dmgkbga2.js";import{A as ne}from"./activity-BCn9520W.js";import{F as Ne}from"./file-text-BlXclTHj.js";import{T as Ee,I as Ns}from"./triangle-alert-DGQdZ5Fh.js";import{E as Y}from"./external-link-BwpBZl45.js";import{C as Z,R as be}from"./refresh-cw-Cq-FpYrg.js";import{L as A}from"./loader-circle-tzO1dF92.js";import{C as je}from"./circle-check-Btq6l2JE.js";import{u as bs}from"./useInfiniteQuery-D52ptoDl.js";import{c as ye}from"./chat-CiW-DJRi.js";/** +import{d as q,i as h,a3 as ts,S as is,j as e,R as ie,aB as cs,a4 as ls,a5 as ds,V as oe,Q as os,Y as ms,a6 as Ae,Z as $,b as Q,_ as he,o as xe,$ as I,A as Te,L as pe,aU as E,a0 as us,p as hs,N as me,c as xs,a as ps,aV as gs,D as js}from"./index-DMjO_toh.js";import{u as L}from"./useMutation-Db093XSk.js";import{t as ge,f as v,a as S,S as Fe,C as g,b as N,c as b,d as P,e as j,g as C}from"./CronDashboard-DI0D1T-u.js";import{B as O}from"./badge-CARHLO4T.js";import{B as y}from"./button-BGphIht2.js";import{C as vs,a as _s}from"./chevron-up-5Y7cB_yq.js";import{D as fe}from"./database-UPYeEFxO.js";import{T as fs}from"./trending-up-DRI2hJAf.js";import{A as ne}from"./activity-CJ9AQ3mn.js";import{F as Ne}from"./file-text-D6OyOvvT.js";import{T as Ee,I as Ns}from"./triangle-alert-CcBqLaPP.js";import{E as Y}from"./external-link-Bt4eibsp.js";import{C as Z,R as be}from"./refresh-cw-CeolKVxs.js";import{L as A}from"./loader-circle-gyMLnt4Y.js";import{C as je}from"./circle-check-KHLmL3jb.js";import{u as bs}from"./useInfiniteQuery-C91fE_fV.js";import{c as ye}from"./chat-B4elm0RV.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/CronDashboard-BtUcBsc0.js b/assets/CronDashboard-DI0D1T-u.js similarity index 96% rename from assets/CronDashboard-BtUcBsc0.js rename to assets/CronDashboard-DI0D1T-u.js index 409385106fa75551076186e02097c0609ac35132..12cd93d061689a8bacad976f840b827d1f0a8471 100644 --- a/assets/CronDashboard-BtUcBsc0.js +++ b/assets/CronDashboard-DI0D1T-u.js @@ -1,4 +1,4 @@ -import{d as c,i as r,j as s,Z as o}from"./index-C1Xuuz1Y.js";/** +import{d as c,i as r,j as s,Z as o}from"./index-DMjO_toh.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/ExternalSourceEvalBadge-CttojFFk.js b/assets/ExternalSourceEvalBadge-DYcvJrz-.js similarity index 93% rename from assets/ExternalSourceEvalBadge-CttojFFk.js rename to assets/ExternalSourceEvalBadge-DYcvJrz-.js index 4d25b45e897ebc7e5a83ab07e357566e03606c95..5e53791120a4151cd0420215d39f53f07e00c251 100644 --- a/assets/ExternalSourceEvalBadge-CttojFFk.js +++ b/assets/ExternalSourceEvalBadge-DYcvJrz-.js @@ -1 +1 @@ -import{j as e,L as n}from"./index-C1Xuuz1Y.js";import{H as o,a as l,b as i}from"./hover-card-BSWfQepz.js";import{s as c}from"./safeExternalHref-CkBrsh84.js";const h=()=>e.jsxs(o,{openDelay:120,closeDelay:120,children:[e.jsx(l,{asChild:!0,children:e.jsx("button",{type:"button",className:"bm-closed-source-tag","aria-label":"Closed-source model",children:"closed"})}),e.jsxs(i,{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"," ",e.jsx(n,{to:"/settings",className:"closed-eval-tooltip-link",children:"settings"}),"."]})]});function d(a){if(!a)return"Evaluation sourced outside this paper";const r=a.toLowerCase();if(r.includes("open-asr-leaderboard"))return"Open ASR Leaderboard";if(r.includes("arcprize.org"))return"ARC Prize Leaderboard";if(r.includes("frontierswe.com"))return"FrontierSWE";if(r.includes("deepswe.datacurve.ai"))return"DeepSWE";try{const s=new URL(a,"https://paperswithcode.co");return s.pathname.startsWith("/paper/")?"Source paper":s.hostname.replace(/^www\./,"")}catch{return a}}const m=({sourceUrl:a})=>{const r=c(a),s=typeof a=="string"&&a.startsWith("/paper/")?a:null,t=d(a);return e.jsxs(o,{openDelay:120,closeDelay:120,children:[e.jsx(l,{asChild:!0,children:e.jsx("button",{type:"button",className:"bm-external-source-tag","aria-label":`Externally sourced evaluation: ${t}`,children:"External"})}),e.jsxs(i,{side:"top",align:"start",className:"w-auto max-w-[280px] p-3 text-sm leading-snug",children:["This score was sourced outside this paper.",s?e.jsxs(e.Fragment,{children:[" ",e.jsx(n,{to:s,target:"_blank",rel:"noopener noreferrer",className:"external-eval-tooltip-link",children:t}),"."]}):r?e.jsxs(e.Fragment,{children:[" ",e.jsx("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"external-eval-tooltip-link",children:t}),"."]}):e.jsxs(e.Fragment,{children:[" ",t,"."]})]})]})};export{h as C,m as E}; +import{j as e,L as n}from"./index-DMjO_toh.js";import{H as o,a as l,b as i}from"./hover-card-D4j7S6P3.js";import{s as c}from"./safeExternalHref-CkBrsh84.js";const h=()=>e.jsxs(o,{openDelay:120,closeDelay:120,children:[e.jsx(l,{asChild:!0,children:e.jsx("button",{type:"button",className:"bm-closed-source-tag","aria-label":"Closed-source model",children:"closed"})}),e.jsxs(i,{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"," ",e.jsx(n,{to:"/settings",className:"closed-eval-tooltip-link",children:"settings"}),"."]})]});function d(a){if(!a)return"Evaluation sourced outside this paper";const r=a.toLowerCase();if(r.includes("open-asr-leaderboard"))return"Open ASR Leaderboard";if(r.includes("arcprize.org"))return"ARC Prize Leaderboard";if(r.includes("frontierswe.com"))return"FrontierSWE";if(r.includes("deepswe.datacurve.ai"))return"DeepSWE";try{const s=new URL(a,"https://paperswithcode.co");return s.pathname.startsWith("/paper/")?"Source paper":s.hostname.replace(/^www\./,"")}catch{return a}}const m=({sourceUrl:a})=>{const r=c(a),s=typeof a=="string"&&a.startsWith("/paper/")?a:null,t=d(a);return e.jsxs(o,{openDelay:120,closeDelay:120,children:[e.jsx(l,{asChild:!0,children:e.jsx("button",{type:"button",className:"bm-external-source-tag","aria-label":`Externally sourced evaluation: ${t}`,children:"External"})}),e.jsxs(i,{side:"top",align:"start",className:"w-auto max-w-[280px] p-3 text-sm leading-snug",children:["This score was sourced outside this paper.",s?e.jsxs(e.Fragment,{children:[" ",e.jsx(n,{to:s,target:"_blank",rel:"noopener noreferrer",className:"external-eval-tooltip-link",children:t}),"."]}):r?e.jsxs(e.Fragment,{children:[" ",e.jsx("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"external-eval-tooltip-link",children:t}),"."]}):e.jsxs(e.Fragment,{children:[" ",t,"."]})]})]})};export{h as C,m as E}; diff --git a/assets/FeedView-CEndb4QE.js b/assets/FeedView-BHFMyhM7.js similarity index 65% rename from assets/FeedView-CEndb4QE.js rename to assets/FeedView-BHFMyhM7.js index f3e321cb09843cd3426054d581eeaee1844b0a1c..3556640d0ffa8b5b95c1de3ffaba087b031c1e53 100644 --- a/assets/FeedView-CEndb4QE.js +++ b/assets/FeedView-BHFMyhM7.js @@ -1,4 +1,4 @@ -import{d as Ze,j as e,L as ee,e as xt,n as ze,b as te,o as Je,i as l,X as Ft,l as wt,r as oe,a as Lt,q as It,s as st,t as ot,C as Re,v as Be,f as Dt,w as Ue,k as At,x as Ye,y as bt,z as Rt,g as Mt,B as $t}from"./index-C1Xuuz1Y.js";import{S as yt,t as Ot}from"./taskIcons-DurKAT-u.js";import{c as jt,t as J,d as vt,e as kt,f as Nt,g as St,b as Bt,h as Tt,u as zt,i as Ht,j as qt,k as We,a as nt,l as Ut,m as Kt,n as Gt,o as at,p as it,q as Ke,v as Qt}from"./researchTopic-BU8M-7Qo.js";import{P as Ee}from"./plus-VBQCmtt2.js";import{D as Yt,a as Wt,b as Vt}from"./dialog-CCU_33Ju.js";import{S as Xt}from"./switch-BrihALZS.js";import{u as Zt}from"./useDebounce-lFex_Aum.js";import{d as Ve,t as Jt}from"./transform-btCQtWTl.js";import{P as Ct,u as es,a as ts,b as ss,D as Ge,q as os,c as ns,d as as,i as is,e as rs,A as ls,f as cs,S as pe,g as ds}from"./chatSessions-DFoCf0pS.js";import{A as us}from"./arrow-up-right-gHB4zR82.js";import{A as ps}from"./arrow-right-BUEjhpSy.js";import{c as hs,h as ms}from"./colors-BkWRhvFI.js";import{r as gs,u as fs,a as xs,w as ws,P as bs}from"./usePapers-DzSHAOm5.js";import{M as ys}from"./McpShowcase-CwUcSruT.js";import{c as js}from"./chat-CiW-DJRi.js";import{S as rt}from"./skeleton-D8hFkZOU.js";import{A as Me,a as $e}from"./alert-UfpiwFIJ.js";import"./search-YolWz-tq.js";import"./triangle-alert-DGQdZ5Fh.js";import"./share-2-Zzb236oj.js";import"./trending-up-Dmgkbga2.js";import"./moon-DB_mnxXr.js";import"./thumbs-up-Ys3ImX4j.js";import"./database-rIkpN7y5.js";import"./link-2-D52PZ3mH.js";import"./trophy-B0LpQA62.js";import"./file-text-BlXclTHj.js";import"./activity-BCn9520W.js";import"./globe-D69lYFoB.js";import"./useMutation-Cb0wrKBq.js";import"./index-CNkd3QcT.js";import"./PaperCard-DjlN6X2v.js";import"./AuthorAvatar-DqCnji_B.js";import"./SotaBadges-B5MVNUr2.js";import"./Icon-BADQ_q7j.js";import"./LatexTitle-B0RfzwYI.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-C1A8cBwB.js";import"./useIntersectionObserver-CwCTFEhv.js";import"./useInfiniteQuery-D52ptoDl.js";import"./AgentLogos-CJgsqwCs.js";/** +import{d as Ze,j as e,L as ee,e as xt,n as ze,b as te,o as Je,i as l,X as Ft,l as wt,r as oe,a as Lt,q as It,s as st,t as ot,C as Re,v as Be,f as Dt,w as Ue,k as At,x as Ye,y as bt,z as Rt,g as Mt,B as $t}from"./index-DMjO_toh.js";import{S as yt,t as Ot}from"./taskIcons-BeSRODUD.js";import{c as jt,t as J,d as vt,e as kt,f as Nt,g as St,b as Bt,h as Tt,u as zt,i as Ht,j as qt,k as We,a as nt,l as Ut,m as Kt,n as Gt,o as at,p as it,q as Ke,v as Qt}from"./researchTopic-hhMPs4g3.js";import{P as Ee}from"./plus-B4ZP41Rg.js";import{D as Yt,a as Wt,b as Vt}from"./dialog-C-drkhvX.js";import{S as Xt}from"./switch-t5rMaesI.js";import{u as Zt}from"./useDebounce-_5_VjYb0.js";import{d as Ve,t as Jt}from"./transform-CXoeFMaW.js";import{P as Ct,u as es,a as ts,b as ss,D as Ge,q as os,c as ns,d as as,i as is,e as rs,A as ls,f as cs,S as pe,g as ds}from"./chatSessions-CtEVszLf.js";import{A as us}from"./arrow-up-right-Dcycbt3C.js";import{A as ps}from"./arrow-right-Tu8hJpdM.js";import{c as hs,h as ms}from"./colors-BkWRhvFI.js";import{r as gs,u as fs,a as xs,w as ws,P as bs}from"./usePapers-DCcqZCMM.js";import{M as ys}from"./McpShowcase-fiJIUUiM.js";import{c as js}from"./chat-B4elm0RV.js";import{S as rt}from"./skeleton-DiGWALrs.js";import{A as Me,a as $e}from"./alert-B2i0PAyW.js";import"./search-D6uSAb1U.js";import"./triangle-alert-CcBqLaPP.js";import"./share-2-BO6l1rLC.js";import"./trending-up-DRI2hJAf.js";import"./moon-CIGKI3Uq.js";import"./thumbs-up-CZ7BdM1B.js";import"./database-UPYeEFxO.js";import"./link-2-n6VIX0kb.js";import"./trophy-C75hq_xI.js";import"./file-text-D6OyOvvT.js";import"./activity-CJ9AQ3mn.js";import"./globe-C6Up_LzV.js";import"./useMutation-Db093XSk.js";import"./index-BgYoYvBg.js";import"./PaperCard-CUJXx9SW.js";import"./AuthorAvatar-DFoIK6Bc.js";import"./SotaBadges-CHGUskQn.js";import"./Icon-D5cUFATZ.js";import"./LatexTitle-BRJTz_K0.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-MF6JD1Yi.js";import"./useIntersectionObserver-CU-1-_ok.js";import"./useInfiniteQuery-C91fE_fV.js";import"./AgentLogos-C26IQbJ9.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. @@ -13,4 +13,4 @@ import{d as Ze,j as e,L as ee,e as xt,n as ze,b as te,o as Je,i as l,X as Ft,l a * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Ns=Ze("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);function Ss({onBuild:o}){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."}),o&&e.jsxs("button",{type:"button",className:"research-topic-save following-intro-topic",onClick:o,children:[e.jsx(yt,{"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(ee,{to:"/settings",children:"Settings"}),"."]})]})}const Pt="pwc:home-follow-card:dismissed",Ts=5;function Cs(){try{return localStorage.getItem(Pt)==="1"}catch{return!1}}function Ps({onBuild:o}){var p;const s=(p=xt())==null?void 0:p.user,c=ze(),h=te(oe.featuredTopics()),i=Je(),b=jt(),[T,u]=l.useState(!1),[k,E]=l.useState(Cs);if(k)return null;const A=j=>{if(!s){vt([j]),window.location.href=wt("/following");return}u(!0),b.mutateAsync([j]).then(()=>Promise.all([i.refetchQueries({queryKey:oe.topics(s.hf_subject).queryKey}),i.refetchQueries({queryKey:oe.follows(s.hf_subject).queryKey})])).then(()=>c(`/following?topic=${j}`),()=>u(!1))},F=()=>{try{localStorage.setItem(Pt,"1")}catch{}E(!0)},_=(h.data??[]).slice(0,Ts);return e.jsxs("section",{className:"home-follow-card","aria-labelledby":"home-follow-card-title",children:[e.jsx("button",{type:"button",className:"home-follow-card-close","aria-label":"Dismiss",onClick:F,children:e.jsx(Ft,{"aria-hidden":"true"})}),e.jsx("h2",{id:"home-follow-card-title",children:"Get a feed for your research"}),e.jsx("p",{children:"Follow topics, tasks, authors and labs, and their new papers collect on your following page and in a weekly email."}),_.length>0&&e.jsx("div",{className:"topic-dialog-chips home-follow-card-topics",children:_.map(j=>e.jsxs("button",{type:"button",className:"topic-dialog-chip","aria-pressed":"false",disabled:T,onClick:()=>A(j.id),children:[e.jsx(Ee,{"aria-hidden":"true"}),J(j)]},j.id))}),b.isError&&e.jsx("p",{className:"home-follow-card-error",role:"alert",children:"Could not follow that topic. Please try again."}),e.jsxs("button",{type:"button",className:"research-topic-save",onClick:o,children:[e.jsx(yt,{"aria-hidden":"true"}),"Build your feed"]})]})}const Xe=180,lt=`transform ${Xe}ms cubic-bezier(0.2, 0, 0, 1), box-shadow ${Xe}ms ease`,ct=()=>{var o;return((o=window.matchMedia)==null?void 0:o.call(window,"(prefers-reduced-motion: reduce)").matches)??!1};function _s(o){const s=getComputedStyle(o).transform.match(/matrix(3d)?\(([^)]+)\)/);if(!s)return 0;const c=s[2].split(",").map(Number);return(s[1]?c[13]:c[5])||0}function Es({items:o,itemKey:s,itemLabel:c,onReorder:h,renderItem:i,className:b,disabled:T=!1}){const[u,k]=l.useState(null),[E,A]=l.useState(null),[F,_]=l.useState(null),p=l.useRef(new Map),j=l.useRef(new Map),$=l.useRef({y:0,grab:0}),f=(u==null?void 0:u.order)??((F==null?void 0:F.from)===o?F.order:o),G=(N,m)=>N.length===m.length&&N.every((S,P)=>s(S)===s(m[P])),z=N=>{N.style.transition="none",N.style.transform=`translateY(${$.current.y-$.current.grab-N.offsetTop}px)`};l.useLayoutEffect(()=>{const N=!ct();p.current.forEach((m,S)=>{const P=m.offsetTop,a=j.current.get(S);if(j.current.set(S,P),S===(u==null?void 0:u.key))return z(m);if(!N||a===void 0||a===P)return;const r=a+_s(m)-P;m.style.transition="none",m.style.transform=`translateY(${r}px)`,m.offsetHeight,m.style.transition=lt,m.style.transform=""})});const R=l.useRef({items:o,onReorder:h,drag:u});R.current={items:o,onReorder:h,drag:u};const w=u!==null;l.useEffect(()=>{if(!w)return;const N=a=>{var U;const r=a.clientY;$.current.y=r;const y=(U=R.current.drag)==null?void 0:U.key,L=y===void 0?void 0:p.current.get(y);L&&z(L);const M=r-$.current.grab+((L==null?void 0:L.offsetHeight)??0)/2;k(I=>{if(!I)return I;const Y=I.order.find(W=>s(W)===I.key),O=I.order.filter(W=>s(W)!==I.key),x=O.filter(W=>{const ae=p.current.get(s(W));return ae?ae.offsetTop+ae.offsetHeight/2{const{drag:r,items:y,onReorder:L}=R.current,M=r?p.current.get(r.key):void 0;if(M&&r){const U=!ct();M.style.transition=U?lt:"none",M.style.transform="",U&&(A(r.key),window.setTimeout(()=>A(I=>I===r.key?null:I),Xe))}a&&r&&!G(r.order,y)&&(_({from:y,order:r.order}),L(r.order)),k(null)},S=()=>m(!0),P=()=>m(!1);return window.addEventListener("pointermove",N),window.addEventListener("pointerup",S),window.addEventListener("pointercancel",P),()=>{window.removeEventListener("pointermove",N),window.removeEventListener("pointerup",S),window.removeEventListener("pointercancel",P)}},[w]);const Q=(N,m)=>{const S=o.findIndex(r=>s(r)===N),P=S+m;if(P<0||P>=o.length)return;const a=[...o];a.splice(P,0,...a.splice(S,1)),_({from:o,order:a}),h(a)};return e.jsx("ul",{className:["sortable-list",b].filter(Boolean).join(" "),children:f.map(N=>{const m=s(N),S=(u==null?void 0:u.key)===m,P=S||E===m,a=e.jsx("button",{type:"button",className:"sortable-handle",disabled:T||o.length<2,"aria-label":`Reorder ${c(N)}. Use the up and down arrow keys to move it.`,onPointerDown:r=>{if(r.button!==0)return;r.preventDefault();const y=p.current.get(m);$.current={y:r.clientY,grab:r.clientY-((y==null?void 0:y.offsetTop)??0)},k({key:m,order:o})},onKeyDown:r=>{r.key!=="ArrowUp"&&r.key!=="ArrowDown"||(r.preventDefault(),Q(m,r.key==="ArrowUp"?-1:1))},children:e.jsx(ks,{"aria-hidden":"true"})});return e.jsx("li",{className:P?"sortable-item is-dragging":"sortable-item",ref:r=>{r?p.current.set(m,r):p.current.delete(m)},children:i(N,a,S)},m)})})}const dt=16,Fs=5;function Ls({open:o,topicId:s=null,afterSavePath:c,onOpenChange:h}){return e.jsx(Yt,{open:o,onOpenChange:h,children:e.jsx(Wt,{className:"topic-dialog","aria-describedby":void 0,children:e.jsx(Is,{topicId:s,afterSavePath:c,onDone:()=>h(!1)},s??"new")})})}function Oe({to:o,name:s}){return e.jsx("a",{className:"topic-dialog-chip-open",href:o,target:"_blank",rel:"noopener noreferrer","aria-label":`Open the ${s} page`,title:"Open its page in a new tab",children:e.jsx(us,{"aria-hidden":"true"})})}function Is({topicId:o,afterSavePath:s,onDone:c}){var Ce,Pe,_e,n,g,B,le,et;const{user:h}=Lt(),i=It(),b=ze(),T=Je(),u=kt(),k=Nt(),E=te(Be.trendingTasks({limit:dt,level:0})),A=te(Be.trendingMethods({limit:dt})),F=te(oe.followSuggestions()),_=te(oe.featuredTopics()),p=(t=[])=>t.map(d=>({id:String(d.entity_id),name:d.name,image:d.image_url,url:d.url})),[j,$]=l.useState(o),[f,G]=l.useState(null),[z,R]=l.useState([]),[w,Q]=l.useState([]),[N,m]=l.useState([]),[S,P]=l.useState(null),[a,r]=l.useState({}),y=St(),L=Bt(),M=Tt(),U=zt(),I=Ht(),Y=qt(),O=u.data??[],x=O.find(t=>t.id===j),ne=Zt(ut(f??(x==null?void 0:x.text)??"").toLowerCase()),W=te({...oe.topicMatches(ne),enabled:ne.length>=3}),ae=(S==null?void 0:S.length)===O.length&&S.every(t=>O.some(d=>d.id===t.id)),he=S&&ae?S:O,be=he.some((t,d)=>{var v;return t.id!==((v=O[d])==null?void 0:v.id)}),V=w.filter(t=>O.some(d=>d.id===t)),ye=Object.entries(a).map(([t,d])=>({id:Number(t),isPublic:d})).filter(({id:t,isPublic:d})=>!V.includes(t)&&O.some(v=>v.id===t&&v.is_creator&&v.is_public!==d)),je=(_.data??[]).filter(t=>!O.some(d=>d.id===t.id)).slice(0,Fs),H=N.filter(t=>je.some(d=>d.id===t)),ce=(x==null?void 0:x.text)??"",me=f??ce,q=ut(me),se=ne===q.toLowerCase()&&!W.isFetching?W.data??[]:[],ie=We(y.error)&&((Ce=y.variables)==null?void 0:Ce.text)===q?y.error:null,Le=(x==null?void 0:x.status)==="failed"&&q===ce,de=O.length-V.length+H.length>=st,ge=q.length>=3&&(q!==ce||Le)&&!se.length&&(x?!V.includes(x.id):!de),[qe,Ie]=l.useState(!1),fe=l.useRef(!0);l.useEffect(()=>(fe.current=!0,()=>{fe.current=!1}),[]);const K=y.isPending||L.isPending||M.isPending||U.isPending||I.isPending||Y.isPending||qe,xe=(t,d)=>{var v;return((v=k.data)==null?void 0:v.some(D=>D.kind===t&&String(D.entity_id)===d))??!1},we=(t,d)=>{var v;return((v=z.find(D=>D.kind===t&&D.id===d))==null?void 0:v.follow)??xe(t,d)},X=z.filter(t=>t.follow!==xe(t.kind,t.id)),De=V.length+H.length+ye.length+(be?1:0),ve=!K&&(ge||X.length>0||De>0),ke=(t,d,v)=>R(D=>[...D.filter(ue=>ue.kind!==t||ue.id!==d),{kind:t,id:d,name:v,follow:!we(t,d)}]),Ne=t=>{$(t),G(null)},Se=()=>{if(!ve)return;if(!h){ge&&Ut(q),X.length&&Kt(X),H.length&&vt(H),window.location.href=wt(s??`${i.pathname}${i.search}`);return}const t=V.length?L.mutateAsync(V):Promise.resolve(),d=he.filter(Z=>!V.includes(Z.id)),v=t.catch(()=>{}).then(()=>be?I.mutateAsync(d):void 0),D=v.catch(()=>{}),ue=[...X.length?[M.mutateAsync(X)]:[],t,v,...ye.map(Z=>Y.mutateAsync(Z)),...ge?[D.then(()=>y.mutateAsync({id:x==null?void 0:x.id,text:q}))]:[],...H.map(Z=>D.then(()=>U.mutateAsync(Z)))];Promise.allSettled(ue).then(async Z=>{if(Z.every(C=>C.status==="fulfilled")){if(s){if(Ie(!0),await Promise.all([T.refetchQueries({queryKey:oe.follows(h.hf_subject).queryKey}),T.refetchQueries({queryKey:oe.topics(h.hf_subject).queryKey})]),!fe.current)return;c(),b(s);return}c()}})},re=(t,d,v,D)=>{const Z=[...(k.data??[]).filter(C=>C.kind===d).map(C=>({id:String(C.entity_id),name:C.name,slug:C.url.split("/").pop(),image:C.image_url,url:C.url})),...v.filter(C=>!xe(d,C.id)).map(C=>({...C,suggested:!0}))];return Z.length>0&&e.jsxs("div",{className:"topic-dialog-group",children:[e.jsx("h3",{children:t}),e.jsxs(Ds,{children:[Z.map(C=>{const tt=we(d,C.id),Ae=d==="task"?Ve(C.name,C.slug??void 0):C.name,Et=C.url??`/${d==="task"?"tasks":"methods"}/${C.slug??C.id}`;return e.jsxs("span",{className:"topic-dialog-chip-wrap","data-suggested":"suggested"in C||void 0,children:[e.jsxs("button",{type:"button",className:"topic-dialog-chip","aria-pressed":tt,disabled:K,onClick:()=>ke(d,C.id,Ae),children:[tt?e.jsx(Re,{"aria-hidden":"true"}):e.jsx(Ee,{"aria-hidden":"true"}),(d==="author"||d==="organization")&&e.jsx(As,{kind:d,name:Ae,src:C.image}),Ae]}),e.jsx(Oe,{to:Et,name:Ae})]},C.id)}),D&&e.jsxs(ee,{to:D.to,className:"topic-dialog-browse",children:[D.label,e.jsx(ps,{"aria-hidden":"true"})]})]})]})},Te=x?a[x.id]??x.is_public:!0;return e.jsxs("form",{className:"topic-dialog-form",onSubmit:t=>{t.preventDefault(),Se()},children:[e.jsx(Vt,{className:"topic-dialog-title",children:(Pe=u.data)!=null&&Pe.length||(_e=k.data)!=null&&_e.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:x?`Reword “${J(x)}”`:(n=u.data)!=null&&n.length?"Add a topic in your own words":"Describe a topic in your own words"})}),e.jsx("p",{className:"topic-dialog-hint",children:!x&&de?`You follow ${st} 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 from its ✎ button below."}),e.jsx("textarea",{id:"topic-dialog-input",className:"research-topic-input",rows:4,maxLength:ot,"aria-label":"Research topic",placeholder:"e.g. diffusion policies for robot manipulation, or speculative decoding for LLM inference",value:me,onChange:t=>G(t.target.value),onKeyDown:t=>{t.key==="Enter"&&!t.shiftKey&&!t.nativeEvent.isComposing&&(t.preventDefault(),Se())}}),e.jsxs("span",{className:"research-topic-count",children:[me.length,"/",ot]}),se.length>0&&e.jsxs("div",{className:"topic-dialog-duplicate",role:"status",children:[e.jsxs("p",{children:["Papers with Code already has ",se.length>1?"pages":`a ${se[0].kind} page`," for “",q,"”. Follow ",se.length>1?"one":"it"," instead of adding a topic:"]}),e.jsx("div",{className:"topic-dialog-chips",children:se.map(t=>{const d=String(t.entity_id),v=we(t.kind,d);return e.jsxs("span",{className:"topic-dialog-chip-wrap",children:[e.jsxs("button",{type:"button",className:"topic-dialog-chip","aria-pressed":v,disabled:K,onClick:()=>ke(t.kind,d,t.name),children:[v?e.jsx(Re,{"aria-hidden":"true"}):e.jsx(Ee,{"aria-hidden":"true"}),t.name]}),e.jsx(Oe,{to:t.url,name:t.name})]},`${t.kind}:${d}`)})})]}),x&&e.jsxs("div",{className:"topic-dialog-editing",children:[x.is_creator&&e.jsxs("label",{className:"topic-dialog-privacy",children:[e.jsx(Xt,{checked:Te,disabled:K,"aria-label":"Public topic",onCheckedChange:t=>r(d=>({...d,[x.id]:t}))}),Te?"Public: anyone can find and follow it":"Private: only you see it"]}),e.jsx("button",{type:"button",className:"link-button",disabled:K,onClick:()=>Ne(null),children:"Add a new topic instead"})]})]}),O.length>0&&e.jsxs("div",{className:"topic-dialog-group",children:[e.jsx("h3",{children:"Your topics"}),e.jsx(Es,{className:"topic-dialog-topic-list",items:he,itemKey:t=>t.id,itemLabel:t=>J(t),disabled:K,onReorder:P,renderItem:(t,d)=>{const v=!w.includes(t.id);return e.jsxs("div",{className:`topic-dialog-topic ${t.id===j?"is-editing":""}`,children:[d,e.jsxs("span",{className:"topic-dialog-chip-wrap",children:[e.jsxs("button",{type:"button",className:"topic-dialog-chip","aria-pressed":v,disabled:K,title:t.text,onClick:()=>Q(D=>v?[...D,t.id]:D.filter(ue=>ue!==t.id)),children:[v?e.jsx(Re,{"aria-hidden":"true"}):e.jsx(Ee,{"aria-hidden":"true"}),J(t),t.creator&&e.jsxs("span",{className:"topic-dialog-chip-creator",children:["@",t.creator.username]})]}),e.jsx("button",{type:"button",className:"topic-dialog-chip-open",disabled:K||t.id===j,"aria-label":`Reword ${J(t)}`,title:"Reword this topic",onClick:()=>Ne(t.id),children:e.jsx(Ct,{"aria-hidden":"true"})}),e.jsx(Oe,{to:nt(t),name:J(t)})]})]})}})]}),je.length>0&&e.jsxs("div",{className:"topic-dialog-group",children:[e.jsx("h3",{children:"Popular topics"}),e.jsx("div",{className:"topic-dialog-chips",children:je.map(t=>{const d=N.includes(t.id);return e.jsxs("span",{className:"topic-dialog-chip-wrap",children:[e.jsxs("button",{type:"button",className:"topic-dialog-chip","aria-pressed":d,disabled:K||!d&&de,title:t.text,onClick:()=>m(v=>d?v.filter(D=>D!==t.id):[...v,t.id]),children:[d?e.jsx(Re,{"aria-hidden":"true"}):e.jsx(Ee,{"aria-hidden":"true"}),J(t),t.creator&&e.jsxs("span",{className:"topic-dialog-chip-creator",children:["@",t.creator.username]})]}),e.jsx(Oe,{to:nt(t),name:J(t)})]},t.id)})})]}),re("Trending tasks","task",((g=E.data)==null?void 0:g.results)??[],{to:"/tasks",label:"Browse tasks"}),re("Trending methods","method",((B=A.data)==null?void 0:B.results)??[],{to:"/methods",label:"Browse methods"}),re("Benchmarks","benchmark",[],{to:"/tasks",label:"Browse benchmarks"}),re("Popular authors","author",p((le=F.data)==null?void 0:le.authors)),re("Popular organizations","organization",p((et=F.data)==null?void 0:et.organizations),{to:"/organizations",label:"Browse organizations"}),ie&&e.jsxs("p",{className:"settings-token-error",role:"alert",children:[ie.message,"."]}),(y.error&&!We(y.error)||L.error||M.error||U.error||I.error||Y.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:[e.jsx("button",{type:"button",className:"research-follow-action",disabled:K,onClick:c,children:"Cancel"}),e.jsx("button",{type:"submit",className:"research-topic-save",disabled:!ve,children:X.some(t=>t.follow===!1)||V.length||be||ye.length?"Save":X.length||H.length?"Follow":Le?"Retry":x?"Update topic":"Follow"})]})]})}function Ds({children:o}){const s=l.useRef(null);return l.useLayoutEffect(()=>{const c=s.current;if(!c)return;const h=()=>{const i=[...c.children],b=i.filter(u=>u.dataset.suggested);b.forEach(u=>{u.hidden=!1});const T=()=>new Set(i.filter(u=>!u.hidden).map(u=>u.offsetTop)).size;for(let u=b.length-1;u>=0&&T()>2;u--)b[u].hidden=!0};return h(),window.addEventListener("resize",h),()=>window.removeEventListener("resize",h)}),e.jsx("div",{ref:s,className:"topic-dialog-chips",children:o})}function As({kind:o,name:s,src:c}){const[h,i]=l.useState(!1);if(c&&!h)return e.jsx("img",{className:`topic-dialog-chip-image is-${o}`,src:c,alt:"",loading:"lazy",onError:()=>i(!0)});if(o!=="author")return null;const b=s.split(/\s+/).filter(Boolean).map(T=>T[0]).slice(0,2).join("").toUpperCase();return e.jsx("span",{className:"topic-dialog-chip-image is-author is-initials","aria-hidden":"true",children:b})}const ut=o=>o.trim().replace(/\s+/g," "),pt=12,ht=["organization","author","task","method","benchmark"],Rs={task:"Task",method:"Method",benchmark:"Benchmark",author:"Author",organization:"Organization"},Ms={topicIds:[],follows:[]},Qe=o=>`${o.kind}:${o.entity_id}`;function $s(o){return[...o].sort((s,c)=>ht.indexOf(s.kind)-ht.indexOf(c.kind)||c.created_at.localeCompare(s.created_at))}function Os({follow:o}){if(o.kind==="task"){const s=o.url.split("/").pop()??"",c=Ot(s,o.parent_slug??void 0);return e.jsx(c,{size:14,strokeWidth:2,"aria-hidden":"true",style:{color:hs(ms(s)).dot}})}if(o.kind==="author"||o.kind==="organization"){if(o.image_url)return e.jsx("img",{src:o.image_url,alt:"",width:18,height:18,loading:"lazy"});const s=o.kind==="author"?Ns:vs;return e.jsx(s,{size:14,"aria-hidden":"true"})}return null}const mt=(o,s)=>o.includes(s)?o.filter(c=>c!==s):[...o,s];function Bs({topics:o,follows:s,active:c,hrefFor:h,onEdit:i,editLabel:b}){const[T,u]=l.useState(!1),k=[...o.map(p=>({key:`topic:${p.id}`,filter:{...c,topicIds:mt(c.topicIds,p.id)},name:J(p),title:p.text,mark:null,on:c.topicIds.includes(p.id)})),...$s(s).map(p=>({key:Qe(p),filter:{...c,follows:mt(c.follows,Qe(p))},name:p.name,title:`${Rs[p.kind]} · ${p.name}`,mark:e.jsx(Os,{follow:p}),on:c.follows.includes(Qe(p))}))],E=c.topicIds.length===0&&c.follows.length===0,F=!T&&k.length>pt+1?k.filter((p,j)=>j0&&e.jsx(ee,{className:`topic-bubble ${E?"active":""}`,to:h(Ms),"aria-current":E?"true":void 0,children:e.jsx("span",{className:"topic-bubble-name",children:"All"})}),F.map(p=>e.jsxs(ee,{className:`topic-bubble ${p.on?"active":""}`,to:h(p.filter),title:p.title,"aria-current":p.on?"true":void 0,children:[p.mark,e.jsx("span",{className:"topic-bubble-name",children:p.name})]},p.key)),_>0&&e.jsx("button",{type:"button",className:"topic-bubble topic-bubble-more",onClick:()=>u(!0),children:e.jsxs("span",{className:"topic-bubble-name",children:["+",_," more"]})}),i&&e.jsxs("button",{type:"button",className:"topic-bubble topic-bubble-add",onClick:i,children:[e.jsx(Ct,{size:13,"aria-hidden":"true"}),e.jsx("span",{className:"topic-bubble-name",children:b})]})]})}const gt=45,zs=1800,Hs=25,qs=350,Us=o=>{const[s,c]=l.useState(pe[0].slice(0,1)),[h,i]=l.useState(0);return l.useEffect(()=>{var A,F;if(!o)return;if((F=(A=window.matchMedia)==null?void 0:A.call(window,"(prefers-reduced-motion: reduce)"))!=null&&F.matches){c(pe[0]),i(0);return}let b=0,T=1,u=!1,k;c(pe[0].slice(0,T)),i(0);const E=()=>{const _=pe[b];if(!u){if(T+=1,c(_.slice(0,T)),T===_.length){u=!0,k=window.setTimeout(E,zs);return}k=window.setTimeout(E,gt);return}if(T-=1,c(_.slice(0,T)),T===0){u=!1,b=(b+1)%pe.length,i(b),k=window.setTimeout(E,qs);return}k=window.setTimeout(E,Hs)};return k=window.setTimeout(E,gt),()=>window.clearTimeout(k)},[o]),{placeholder:s,prompt:pe[h]}},Ks=()=>{var P;const o=ze(),s=bt(),[c,h]=l.useState({text:"",paperMentions:[]}),i=c.text,[b,T]=l.useState(0),[u,k]=l.useState(!1),[E,A]=l.useState(null),{placeholder:F,prompt:_}=Us(!i),p=l.useRef(null),j=te({queryKey:["chatAvailability"],queryFn:()=>js.getAvailability(),retry:!1,enabled:Ye()}),$=Ye()&&((P=j.data)==null?void 0:P.paper_mentions_enabled)!==!1,f=es({draft:c,onChange:h,enabled:$,textareaRef:p}),G=l.useRef(!1),[z,R]=l.useState(!1),w=ts({draft:c,onChange:h,textareaRef:p,onEnd:a=>{G.current&&!a&&R(!0),G.current=!1}}),Q=()=>{G.current=!0,w.finish()},N=ss(c,f.open),m=i?N.completion:_;l.useLayoutEffect(()=>{const a=p.current;if(!a)return;const r=()=>{if(a.style.height="auto",i){a.style.height=`${Math.min(ds(a),160)}px`;return}const y=a.placeholder,L=pe.reduce((M,U)=>(a.placeholder=U,Math.max(M,a.scrollHeight)),0);a.placeholder=y,a.style.height=`${Math.min(L,160)}px`};return r(),window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[i,m]),l.useEffect(()=>{z&&(R(!1),S())},[z]);const S=async(a=c)=>{const r=a.text.trim();if(!(!r||u)){if(s){const y=new URLSearchParams({q:r,model:Ge}),L=`${Rt}?${y}`,M=window.open(L,"_blank");if(!M){A(L);return}M.opener=null,A(null),h({text:"",paperMentions:[]});return}k(!0),os(a,Ge);try{const y=await ns(Ge);o(`/chat/${y.id}`)}catch{o("/chat")}}};return e.jsxs(e.Fragment,{children:[!s&&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(as,{text:c.text,mentions:c.paperMentions,scrollTop:b,variant:"home",completion:i?m:""}),e.jsx("textarea",{ref:p,rows:1,value:i,placeholder:F,"aria-label":"Ask the assistant",disabled:u,readOnly:w.active,onChange:a=>{f.updateText(a.target.value,a.target.selectionStart),N.trackCaret(a.target)},onSelect:a=>{f.refresh(a.currentTarget.selectionStart),N.trackCaret(a.currentTarget)},onClick:a=>{f.refresh(a.currentTarget.selectionStart),N.trackCaret(a.currentTarget)},onScroll:a=>T(a.currentTarget.scrollTop),onBlur:a=>{var r,y;(y=(r=a.relatedTarget)==null?void 0:r.closest)!=null&&y.call(r,".chat-paper-picker")||window.setTimeout(f.close,0)},onKeyDown:a=>{if(w.active){a.key==="Enter"&&!a.shiftKey&&(a.preventDefault(),w.phase==="recording"&&Q());return}if(!f.keyDown(a)){if(is(a)&&m){a.preventDefault();const r=i+m;f.updateText(r,r.length),window.requestAnimationFrame(()=>{var y;return(y=p.current)==null?void 0:y.setSelectionRange(r.length,r.length)});return}a.key==="Enter"&&!a.shiftKey&&(a.preventDefault(),S())}},role:$?"combobox":void 0,"aria-expanded":$?f.open:void 0,"aria-controls":f.open?f.pickerId:void 0,"aria-activedescendant":f.open&&f.results.length?`${f.optionIdPrefix}-${f.activeIndex}`:void 0,"aria-autocomplete":$?"list":void 0,"aria-describedby":f.message?"ask-home-paper-mention-message":void 0})]}),!s&&e.jsx(rs,{dictation:w,disabled:u}),e.jsx("button",{type:"button",className:`chat-send${i.trim()||w.phase==="recording"?" chat-send-on":""}`,onClick:()=>w.active?Q():void S(),disabled:u||(w.active?w.phase!=="recording":!i.trim()),"aria-label":"Ask the assistant",children:e.jsx(ls,{})})]}),E&&e.jsx("div",{className:"chat-paper-mention-message",role:"alert",children:e.jsx("a",{href:E,target:"_blank",rel:"noreferrer",children:"Open this question on paperswithcode.co"})}),w.error&&e.jsx("div",{className:"chat-paper-mention-message",role:"alert",children:w.error}),f.message&&e.jsx("div",{id:"ask-home-paper-mention-message",className:"chat-paper-mention-message",role:"alert",children:f.message}),e.jsx(cs,{open:f.open,query:f.query,results:f.results,activeIndex:f.activeIndex,loading:f.loading,error:f.error,onSelect:f.select,id:f.pickerId,optionIdPrefix:f.optionIdPrefix})]})]})},Gs=30,Qs=6,_t="pwc:following-last-seen";function Ys(){try{return localStorage.getItem(_t)}catch{return null}}function Ws(){try{localStorage.setItem(_t,new Date().toISOString())}catch{}}const ft=40,Vs=async o=>{const s=await o;return{results:s.results.map(c=>({paper:c})),next_page:s.next_page}},Xs=({mode:o})=>{var fe,K,xe,we,X,De,ve,ke,Ne,Se,re,Te,Ce,Pe,_e;const s=o==="following",c=ze(),h=xt(),i=h==null?void 0:h.user,[b,T]=Dt(),u=gs(b,void 0,o==="trending"?"week":"month"),k=n=>{const g=new URLSearchParams(b);g.delete("order_by"),g.delete("only"),g.delete("topic"),g.delete("follow");const B=g.toString();c(B?`${n}?${B}`:n)},E={topicIds:[],follows:[]},A=n=>{const g=new URLSearchParams(b);g.delete("only"),g.delete("topic"),g.delete("follow"),n.topicIds.forEach(le=>g.append("topic",String(le))),n.follows.forEach(le=>g.append("follow",le));const B=g.toString();return B?`/following?${B}`:"/following"},F=te(Be.topTasks(8)),_=te(Be.trendingTasks({limit:8,min_recent_papers:10})),p=s&&b.get("only")==="topic",j=s?{topicIds:[...new Set(b.getAll("topic").map(Number).filter(Number.isInteger))],follows:[...new Set(b.getAll("follow").filter(n=>/^(task|method|benchmark|author|organization):\d+$/.test(n)))]}:E,$=j.topicIds.length>0||j.follows.length>0,f={start_date:u.startDate,end_date:u.endDate},G={...u,topicOnly:p,...j},z=fs(s?Ue.following(i==null?void 0:i.hf_subject,G):Ue.trending(f),async n=>{if(s){const B=await Mt.following(n,G),le=B.length===ft?n+ft:null;return{results:B,next_page:le}}const g={...f,page:n,page_size:Gs,include_resources:!0};return Vs($t.list({...g,order_by:"trending",order_dir:"desc",latest_only:!0}))},{enabled:!s||!!i,initialPage:s?0:1}),R=Nt(),w=kt(!0,1e4),Q=!!((fe=R.data)!=null&&fe.length)||!!((K=w.data)!=null&&K.length),N=J,m=((xe=w.data)==null?void 0:xe.filter(Gt))??[],S=m.length>0,P=j.topicIds.length===1&&!j.follows.length?(we=w.data)==null?void 0:we.find(n=>n.id===j.topicIds[0]):void 0,[a,r]=l.useState(()=>s&&b.get("edit")==="1"?null:void 0),y=Je(),L=m.map(n=>n.id).join(","),M=l.useRef([]);l.useEffect(()=>{const n=L?L.split(","):[];M.current.some(g=>!n.includes(g))&&y.invalidateQueries({queryKey:Ue.following(i==null?void 0:i.hf_subject)}),M.current=n},[L,y,i==null?void 0:i.hf_subject]);const U=s&&!!i&&((X=R.data)==null?void 0:X.length)===0&&w.isSuccess&&w.data.length===0,I=s&&!(h!=null&&h.isLoading)&&!i||U,Y=!!i||!At(),O=!s&&Y&&!(h!=null&&h.isLoading)&&(!i||R.isSuccess&&w.isSuccess&&!Q),[x]=l.useState(Ys);l.useEffect(()=>{i&&(s||Q&&!x)&&Ws()},[i,s,Q,x]);const ne=te({...oe.followingNewCount(i==null?void 0:i.hf_subject,x??""),enabled:!s&&!!i&&Q&&!!x}),W=s?0:((De=ne.data)==null?void 0:De.count)??0,ae=s&&x?Date.parse(x):NaN,[he,be]=l.useState(!1),[V]=l.useState(()=>!!at()||it().length>0||Ke().length>0),[ye,je]=l.useState(!1);!he&&((ve=w.data)!=null&&ve.length||(ke=R.data)!=null&&ke.length)&&be(!0),I&&!ye&&(je(!0),Y&&!he&&!V&&r(null));const H=St(),{mutate:ce}=H,me=l.useRef(!1);l.useEffect(()=>{const n=at();!i||!w.isSuccess||!n||me.current||(me.current=!0,w.data.some(g=>g.text===n)?Qt():ce({text:n}))},[i,w.isSuccess,w.data,ce]);const q=Tt(),{mutate:Fe}=q,se=l.useRef(!1);l.useEffect(()=>{const n=it();!i||!n.length||se.current||(se.current=!0,Fe(n))},[i,Fe]);const ie=$&&w.isSuccess&&R.isSuccess?{topicIds:j.topicIds.filter(n=>w.data.some(g=>g.id===n)),follows:j.follows.filter(n=>R.data.some(g=>`${g.kind}:${g.entity_id}`===n))}:void 0,Le=!!ie&&(ie.topicIds.length{Le&&ie&&c(A(ie),{replace:!0})});const He=jt(),{mutate:de}=He,ge=l.useRef(!1);l.useEffect(()=>{const n=Ke();!i||!n.length||ge.current||(ge.current=!0,de(n))},[i,de]);const qe=l.useMemo(()=>{var n;return((n=z.data)==null?void 0:n.pages.flatMap(g=>g.results.map(B=>({...Jt(B.paper),followReasons:B.reasons,isNew:!!B.added_at&&Date.parse(B.added_at)>ae}))))??[]},[z.data,ae]),Ie=z.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:[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"}),F.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((n,g)=>e.jsx(rt,{className:"h-5 w-full"},g))}),e.jsxs("div",{className:"sidebar-links",children:[(Ne=F.data)==null?void 0:Ne.map(n=>e.jsxs(ee,{to:`/tasks/${n.slug}`,className:"sidebar-link",children:[Ve(n.name,n.slug),n.paper_count!=null&&e.jsx("span",{className:"count",children:n.paper_count})]},n.id)),e.jsx(ee,{to:"/tasks",className:"sidebar-link sidebar-link-more",children:"all domains →"})]})]}),e.jsxs("div",{className:"sidebar-section sidebar-section-trending-domains",children:[e.jsx("div",{className:"sidebar-label",children:"Trending Domains"}),_.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((n,g)=>e.jsx(rt,{className:"h-5 w-full"},g))}),((re=(Se=_.data)==null?void 0:Se.results)==null?void 0:re.length)===0&&!_.isLoading&&e.jsx("div",{style:{fontSize:12,color:"var(--ink-faint)"},children:"No domains gaining momentum right now."}),e.jsx("div",{className:"sidebar-links",children:(Ce=(Te=_.data)==null?void 0:Te.results)==null?void 0:Ce.map(n=>e.jsxs(ee,{to:`/tasks/${n.slug}`,className:"sidebar-link",children:[Ve(n.name,n.slug),e.jsxs("span",{className:"count",children:[n.share_lift.toFixed(1),"x"]})]},n.id))})]})]}),e.jsx(ys,{})]}),e.jsxs("div",{className:"feed-main",children:[(Ye()||bt())&&e.jsx("div",{className:"feed-chat",children:e.jsx(Ks,{})}),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 ${o==="trending"?"active":""}`,onClick:()=>k("/"),children:"trending"}),e.jsxs("button",{className:`sort-btn ${s?"active":""}`,onClick:()=>k("/following"),children:["following",W>0&&e.jsx("span",{className:"nav-new-badge feed-tab-new",title:"New papers since your last visit",children:"New"})]})]})}),e.jsx(xs,{startDate:u.startDate,endDate:u.endDate,onChange:n=>T(ws(b,n))})]}),s&&(!!i||!(h!=null&&h.isLoading))&&e.jsx(Bs,{topics:w.data??[],follows:R.data??[],active:j,hrefFor:A,onEdit:Y?()=>r(null):void 0,editLabel:(Pe=w.data)!=null&&Pe.length||(_e=R.data)!=null&&_e.length?"Edit feed":"Build feed"}),Ie&&e.jsx(Me,{variant:"destructive",className:"mb-4",children:e.jsxs($e,{children:["Failed to load papers. ",e.jsx("button",{type:"button",onClick:()=>void z.refetch(),children:"Try again"})]})}),H.isError&&H.variables&&e.jsx(Me,{variant:"destructive",className:"mb-4",children:e.jsx($e,{children:We(H.error)?e.jsxs(e.Fragment,{children:["Could not follow “",H.variables.text,"”: ",H.error.message,"."]}):e.jsxs(e.Fragment,{children:["Could not follow “",H.variables.text,"”. ",e.jsx("button",{type:"button",onClick:()=>ce(H.variables),children:"Try again"})]})})}),q.isError&&q.variables&&e.jsx(Me,{variant:"destructive",className:"mb-4",children:e.jsxs($e,{children:["Could not follow ",q.variables.map(n=>n.name).join(", "),". ",e.jsx("button",{type:"button",onClick:()=>Fe(q.variables),children:"Try again"})]})}),He.isError&&e.jsx(Me,{variant:"destructive",className:"mb-4",children:e.jsxs($e,{children:["Could not follow the popular topics you picked. ",e.jsx("button",{type:"button",onClick:()=>de(Ke()),children:"Try again"})]})}),s&&S&&e.jsxs("div",{className:"following-topic-note",role:"status",children:["Showing the closest papers about ",m.map(n=>`“${N(n)}”`).join(" and ")," now. A model is reading papers to refine these matches, which takes a few minutes."]}),Y&&e.jsx(Ls,{open:a!==void 0,topicId:a??null,afterSavePath:s?void 0:"/following",onOpenChange:n=>{if(!n&&(r(void 0),b.has("edit"))){const g=new URLSearchParams(b);g.delete("edit"),T(g,{replace:!0})}}}),p&&!$&&e.jsxs("div",{className:"following-topic-note following-topic-filter",role:"status",children:["Showing only papers about your topics. ",e.jsx(ee,{to:A(E),children:"Show everything you follow"})]}),I?e.jsx(Ss,{onBuild:Y?()=>r(null):void 0}):e.jsx(bs,{query:z,isLoading:z.isLoading||s&&!!(h!=null&&h.isLoading),cards:qe,skeleton:"card",rootMargin:"400px",cardHeader:O?n=>n===Qs&&e.jsx(Ps,{onBuild:()=>r(null)}):void 0,empty:Ie?null:P?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:()=>r(P.id),children:"edit the topic"}),"."]}):$?e.jsx(e.Fragment,{children:"No papers match the selected bubbles in this window. Widen the date range or pick more bubbles."}):p?e.jsx(e.Fragment,{children:"No papers about your topics match these filters. Widen the date range or follow more topics."}):s?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(ee,{to:"/tasks",children:"tasks"}),", ",e.jsx(ee,{to:"/methods",children:"methods"}),", benchmark, author, or organization pages."]}):"No papers in this window."})]})]})]})]})},Bo=()=>e.jsx(Xs,{mode:"trending"});export{Ks as AskAssistant,Xs as HomeFeed,Bo as default}; + */const Ns=Ze("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);function Ss({onBuild:o}){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."}),o&&e.jsxs("button",{type:"button",className:"research-topic-save following-intro-topic",onClick:o,children:[e.jsx(yt,{"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(ee,{to:"/settings",children:"Settings"}),"."]})]})}const Pt="pwc:home-follow-card:dismissed",Ts=5;function Cs(){try{return localStorage.getItem(Pt)==="1"}catch{return!1}}function Ps({onBuild:o}){var p;const s=(p=xt())==null?void 0:p.user,c=ze(),h=te(oe.featuredTopics()),i=Je(),y=jt(),[T,u]=l.useState(!1),[N,E]=l.useState(Cs);if(N)return null;const A=w=>{if(!s){vt([w]),window.location.href=wt("/following");return}u(!0),y.mutateAsync([w]).then(()=>Promise.all([i.refetchQueries({queryKey:oe.topics(s.hf_subject).queryKey}),i.refetchQueries({queryKey:oe.follows(s.hf_subject).queryKey})])).then(()=>c(`/following?topic=${w}`),()=>u(!1))},F=()=>{try{localStorage.setItem(Pt,"1")}catch{}E(!0)},_=(h.data??[]).slice(0,Ts);return e.jsxs("section",{className:"home-follow-card","aria-labelledby":"home-follow-card-title",children:[e.jsx("button",{type:"button",className:"home-follow-card-close","aria-label":"Dismiss",onClick:F,children:e.jsx(Ft,{"aria-hidden":"true"})}),e.jsx("h2",{id:"home-follow-card-title",children:"Get a feed for your research"}),e.jsx("p",{children:"Follow topics, tasks, authors and labs, and their new papers collect on your following page and in a weekly email."}),_.length>0&&e.jsx("div",{className:"topic-dialog-chips home-follow-card-topics",children:_.map(w=>e.jsxs("button",{type:"button",className:"topic-dialog-chip","aria-pressed":"false",disabled:T,onClick:()=>A(w.id),children:[e.jsx(Ee,{"aria-hidden":"true"}),J(w)]},w.id))}),y.isError&&e.jsx("p",{className:"home-follow-card-error",role:"alert",children:"Could not follow that topic. Please try again."}),e.jsxs("button",{type:"button",className:"research-topic-save",onClick:o,children:[e.jsx(yt,{"aria-hidden":"true"}),"Build your feed"]})]})}const Xe=180,lt=`transform ${Xe}ms cubic-bezier(0.2, 0, 0, 1), box-shadow ${Xe}ms ease`,ct=()=>{var o;return((o=window.matchMedia)==null?void 0:o.call(window,"(prefers-reduced-motion: reduce)").matches)??!1};function _s(o){const s=getComputedStyle(o).transform.match(/matrix(3d)?\(([^)]+)\)/);if(!s)return 0;const c=s[2].split(",").map(Number);return(s[1]?c[13]:c[5])||0}function Es({items:o,itemKey:s,itemLabel:c,onReorder:h,renderItem:i,className:y,disabled:T=!1}){const[u,N]=l.useState(null),[E,A]=l.useState(null),[F,_]=l.useState(null),p=l.useRef(new Map),w=l.useRef(new Map),$=l.useRef({y:0,grab:0}),f=(u==null?void 0:u.order)??((F==null?void 0:F.from)===o?F.order:o),G=(S,m)=>S.length===m.length&&S.every((k,P)=>s(k)===s(m[P])),z=S=>{S.style.transition="none",S.style.transform=`translateY(${$.current.y-$.current.grab-S.offsetTop}px)`};l.useLayoutEffect(()=>{const S=!ct();p.current.forEach((m,k)=>{const P=m.offsetTop,a=w.current.get(k);if(w.current.set(k,P),k===(u==null?void 0:u.key))return z(m);if(!S||a===void 0||a===P)return;const r=a+_s(m)-P;m.style.transition="none",m.style.transform=`translateY(${r}px)`,m.offsetHeight,m.style.transition=lt,m.style.transform=""})});const R=l.useRef({items:o,onReorder:h,drag:u});R.current={items:o,onReorder:h,drag:u};const b=u!==null;l.useEffect(()=>{if(!b)return;const S=a=>{var U;const r=a.clientY;$.current.y=r;const j=(U=R.current.drag)==null?void 0:U.key,L=j===void 0?void 0:p.current.get(j);L&&z(L);const M=r-$.current.grab+((L==null?void 0:L.offsetHeight)??0)/2;N(I=>{if(!I)return I;const Y=I.order.find(W=>s(W)===I.key),O=I.order.filter(W=>s(W)!==I.key),x=O.filter(W=>{const ae=p.current.get(s(W));return ae?ae.offsetTop+ae.offsetHeight/2{const{drag:r,items:j,onReorder:L}=R.current,M=r?p.current.get(r.key):void 0;if(M&&r){const U=!ct();M.style.transition=U?lt:"none",M.style.transform="",U&&(A(r.key),window.setTimeout(()=>A(I=>I===r.key?null:I),Xe))}a&&r&&!G(r.order,j)&&(_({from:j,order:r.order}),L(r.order)),N(null)},k=()=>m(!0),P=()=>m(!1);return window.addEventListener("pointermove",S),window.addEventListener("pointerup",k),window.addEventListener("pointercancel",P),()=>{window.removeEventListener("pointermove",S),window.removeEventListener("pointerup",k),window.removeEventListener("pointercancel",P)}},[b]);const Q=(S,m)=>{const k=o.findIndex(r=>s(r)===S),P=k+m;if(P<0||P>=o.length)return;const a=[...o];a.splice(P,0,...a.splice(k,1)),_({from:o,order:a}),h(a)};return e.jsx("ul",{className:["sortable-list",y].filter(Boolean).join(" "),children:f.map(S=>{const m=s(S),k=(u==null?void 0:u.key)===m,P=k||E===m,a=e.jsx("button",{type:"button",className:"sortable-handle",disabled:T||o.length<2,"aria-label":`Reorder ${c(S)}. Use the up and down arrow keys to move it.`,onPointerDown:r=>{if(r.button!==0)return;r.preventDefault();const j=p.current.get(m);$.current={y:r.clientY,grab:r.clientY-((j==null?void 0:j.offsetTop)??0)},N({key:m,order:o})},onKeyDown:r=>{r.key!=="ArrowUp"&&r.key!=="ArrowDown"||(r.preventDefault(),Q(m,r.key==="ArrowUp"?-1:1))},children:e.jsx(ks,{"aria-hidden":"true"})});return e.jsx("li",{className:P?"sortable-item is-dragging":"sortable-item",ref:r=>{r?p.current.set(m,r):p.current.delete(m)},children:i(S,a,k)},m)})})}const dt=16,Fs=5;function Ls({open:o,topicId:s=null,afterSavePath:c,onOpenChange:h}){return e.jsx(Yt,{open:o,onOpenChange:h,children:e.jsx(Wt,{className:"topic-dialog","aria-describedby":void 0,children:e.jsx(Is,{topicId:s,afterSavePath:c,onDone:()=>h(!1)},s??"new")})})}function Oe({to:o,name:s}){return e.jsx("a",{className:"topic-dialog-chip-open",href:o,target:"_blank",rel:"noopener noreferrer","aria-label":`Open the ${s} page`,title:"Open its page in a new tab",children:e.jsx(us,{"aria-hidden":"true"})})}function Is({topicId:o,afterSavePath:s,onDone:c}){var Ce,Pe,_e,n,g,B,le,et;const{user:h}=Lt(),i=It(),y=ze(),T=Je(),u=kt(),N=Nt(),E=te(Be.trendingTasks({limit:dt,level:0})),A=te(Be.trendingMethods({limit:dt})),F=te(oe.followSuggestions()),_=te(oe.featuredTopics()),p=(t=[])=>t.map(d=>({id:String(d.entity_id),name:d.name,image:d.image_url,url:d.url})),[w,$]=l.useState(o),[f,G]=l.useState(null),[z,R]=l.useState([]),[b,Q]=l.useState([]),[S,m]=l.useState([]),[k,P]=l.useState(null),[a,r]=l.useState({}),j=St(),L=Bt(),M=Tt(),U=zt(),I=Ht(),Y=qt(),O=u.data??[],x=O.find(t=>t.id===w),ne=Zt(ut(f??(x==null?void 0:x.text)??"").toLowerCase()),W=te({...oe.topicMatches(ne),enabled:ne.length>=3}),ae=(k==null?void 0:k.length)===O.length&&k.every(t=>O.some(d=>d.id===t.id)),he=k&&ae?k:O,be=he.some((t,d)=>{var v;return t.id!==((v=O[d])==null?void 0:v.id)}),V=b.filter(t=>O.some(d=>d.id===t)),ye=Object.entries(a).map(([t,d])=>({id:Number(t),isPublic:d})).filter(({id:t,isPublic:d})=>!V.includes(t)&&O.some(v=>v.id===t&&v.is_creator&&v.is_public!==d)),je=(_.data??[]).filter(t=>!O.some(d=>d.id===t.id)).slice(0,Fs),H=S.filter(t=>je.some(d=>d.id===t)),ce=(x==null?void 0:x.text)??"",me=f??ce,q=ut(me),se=ne===q.toLowerCase()&&!W.isFetching?W.data??[]:[],ie=We(j.error)&&((Ce=j.variables)==null?void 0:Ce.text)===q?j.error:null,Le=(x==null?void 0:x.status)==="failed"&&q===ce,de=O.length-V.length+H.length>=st,ge=q.length>=3&&(q!==ce||Le)&&!se.length&&(x?!V.includes(x.id):!de),[qe,Ie]=l.useState(!1),fe=l.useRef(!0);l.useEffect(()=>(fe.current=!0,()=>{fe.current=!1}),[]);const K=j.isPending||L.isPending||M.isPending||U.isPending||I.isPending||Y.isPending||qe,xe=(t,d)=>{var v;return((v=N.data)==null?void 0:v.some(D=>D.kind===t&&String(D.entity_id)===d))??!1},we=(t,d)=>{var v;return((v=z.find(D=>D.kind===t&&D.id===d))==null?void 0:v.follow)??xe(t,d)},X=z.filter(t=>t.follow!==xe(t.kind,t.id)),De=V.length+H.length+ye.length+(be?1:0),ve=!K&&(ge||X.length>0||De>0),ke=(t,d,v)=>R(D=>[...D.filter(ue=>ue.kind!==t||ue.id!==d),{kind:t,id:d,name:v,follow:!we(t,d)}]),Ne=t=>{$(t),G(null)},Se=()=>{if(!ve)return;if(!h){ge&&Ut(q),X.length&&Kt(X),H.length&&vt(H),window.location.href=wt(s??`${i.pathname}${i.search}`);return}const t=V.length?L.mutateAsync(V):Promise.resolve(),d=he.filter(Z=>!V.includes(Z.id)),v=t.catch(()=>{}).then(()=>be?I.mutateAsync(d):void 0),D=v.catch(()=>{}),ue=[...X.length?[M.mutateAsync(X)]:[],t,v,...ye.map(Z=>Y.mutateAsync(Z)),...ge?[D.then(()=>j.mutateAsync({id:x==null?void 0:x.id,text:q}))]:[],...H.map(Z=>D.then(()=>U.mutateAsync(Z)))];Promise.allSettled(ue).then(async Z=>{if(Z.every(C=>C.status==="fulfilled")){if(s){if(Ie(!0),await Promise.all([T.refetchQueries({queryKey:oe.follows(h.hf_subject).queryKey}),T.refetchQueries({queryKey:oe.topics(h.hf_subject).queryKey})]),!fe.current)return;c(),y(s);return}c()}})},re=(t,d,v,D)=>{const Z=[...(N.data??[]).filter(C=>C.kind===d).map(C=>({id:String(C.entity_id),name:C.name,slug:C.url.split("/").pop(),image:C.image_url,url:C.url})),...v.filter(C=>!xe(d,C.id)).map(C=>({...C,suggested:!0}))];return Z.length>0&&e.jsxs("div",{className:"topic-dialog-group",children:[e.jsx("h3",{children:t}),e.jsxs(Ds,{children:[Z.map(C=>{const tt=we(d,C.id),Ae=d==="task"?Ve(C.name,C.slug??void 0):C.name,Et=C.url??`/${d==="task"?"tasks":"methods"}/${C.slug??C.id}`;return e.jsxs("span",{className:"topic-dialog-chip-wrap","data-suggested":"suggested"in C||void 0,children:[e.jsxs("button",{type:"button",className:"topic-dialog-chip","aria-pressed":tt,disabled:K,onClick:()=>ke(d,C.id,Ae),children:[tt?e.jsx(Re,{"aria-hidden":"true"}):e.jsx(Ee,{"aria-hidden":"true"}),(d==="author"||d==="organization")&&e.jsx(As,{kind:d,name:Ae,src:C.image}),Ae]}),e.jsx(Oe,{to:Et,name:Ae})]},C.id)}),D&&e.jsxs(ee,{to:D.to,className:"topic-dialog-browse",children:[D.label,e.jsx(ps,{"aria-hidden":"true"})]})]})]})},Te=x?a[x.id]??x.is_public:!0;return e.jsxs("form",{className:"topic-dialog-form",onSubmit:t=>{t.preventDefault(),Se()},children:[e.jsx(Vt,{className:"topic-dialog-title",children:(Pe=u.data)!=null&&Pe.length||(_e=N.data)!=null&&_e.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:x?`Reword “${J(x)}”`:(n=u.data)!=null&&n.length?"Add a topic in your own words":"Describe a topic in your own words"})}),e.jsx("p",{className:"topic-dialog-hint",children:!x&&de?`You follow ${st} 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 from its ✎ button below."}),e.jsx("textarea",{id:"topic-dialog-input",className:"research-topic-input",rows:4,maxLength:ot,"aria-label":"Research topic",placeholder:"e.g. diffusion policies for robot manipulation, or speculative decoding for LLM inference",value:me,onChange:t=>G(t.target.value),onKeyDown:t=>{t.key==="Enter"&&!t.shiftKey&&!t.nativeEvent.isComposing&&(t.preventDefault(),Se())}}),e.jsxs("span",{className:"research-topic-count",children:[me.length,"/",ot]}),se.length>0&&e.jsxs("div",{className:"topic-dialog-duplicate",role:"status",children:[e.jsxs("p",{children:["Papers with Code already has ",se.length>1?"pages":`a ${se[0].kind} page`," for “",q,"”. Follow ",se.length>1?"one":"it"," instead of adding a topic:"]}),e.jsx("div",{className:"topic-dialog-chips",children:se.map(t=>{const d=String(t.entity_id),v=we(t.kind,d);return e.jsxs("span",{className:"topic-dialog-chip-wrap",children:[e.jsxs("button",{type:"button",className:"topic-dialog-chip","aria-pressed":v,disabled:K,onClick:()=>ke(t.kind,d,t.name),children:[v?e.jsx(Re,{"aria-hidden":"true"}):e.jsx(Ee,{"aria-hidden":"true"}),t.name]}),e.jsx(Oe,{to:t.url,name:t.name})]},`${t.kind}:${d}`)})})]}),x&&e.jsxs("div",{className:"topic-dialog-editing",children:[x.is_creator&&e.jsxs("label",{className:"topic-dialog-privacy",children:[e.jsx(Xt,{checked:Te,disabled:K,"aria-label":"Public topic",onCheckedChange:t=>r(d=>({...d,[x.id]:t}))}),Te?"Public: anyone can find and follow it":"Private: only you see it"]}),e.jsx("button",{type:"button",className:"link-button",disabled:K,onClick:()=>Ne(null),children:"Add a new topic instead"})]})]}),O.length>0&&e.jsxs("div",{className:"topic-dialog-group",children:[e.jsx("h3",{children:"Your topics"}),e.jsx(Es,{className:"topic-dialog-topic-list",items:he,itemKey:t=>t.id,itemLabel:t=>J(t),disabled:K,onReorder:P,renderItem:(t,d)=>{const v=!b.includes(t.id);return e.jsxs("div",{className:`topic-dialog-topic ${t.id===w?"is-editing":""}`,children:[d,e.jsxs("span",{className:"topic-dialog-chip-wrap",children:[e.jsxs("button",{type:"button",className:"topic-dialog-chip","aria-pressed":v,disabled:K,title:t.text,onClick:()=>Q(D=>v?[...D,t.id]:D.filter(ue=>ue!==t.id)),children:[v?e.jsx(Re,{"aria-hidden":"true"}):e.jsx(Ee,{"aria-hidden":"true"}),J(t),t.creator&&e.jsxs("span",{className:"topic-dialog-chip-creator",children:["@",t.creator.username]})]}),e.jsx("button",{type:"button",className:"topic-dialog-chip-open",disabled:K||t.id===w,"aria-label":`Reword ${J(t)}`,title:"Reword this topic",onClick:()=>Ne(t.id),children:e.jsx(Ct,{"aria-hidden":"true"})}),e.jsx(Oe,{to:nt(t),name:J(t)})]})]})}})]}),je.length>0&&e.jsxs("div",{className:"topic-dialog-group",children:[e.jsx("h3",{children:"Popular topics"}),e.jsx("div",{className:"topic-dialog-chips",children:je.map(t=>{const d=S.includes(t.id);return e.jsxs("span",{className:"topic-dialog-chip-wrap",children:[e.jsxs("button",{type:"button",className:"topic-dialog-chip","aria-pressed":d,disabled:K||!d&&de,title:t.text,onClick:()=>m(v=>d?v.filter(D=>D!==t.id):[...v,t.id]),children:[d?e.jsx(Re,{"aria-hidden":"true"}):e.jsx(Ee,{"aria-hidden":"true"}),J(t),t.creator&&e.jsxs("span",{className:"topic-dialog-chip-creator",children:["@",t.creator.username]})]}),e.jsx(Oe,{to:nt(t),name:J(t)})]},t.id)})})]}),re("Trending tasks","task",((g=E.data)==null?void 0:g.results)??[],{to:"/tasks",label:"Browse tasks"}),re("Trending methods","method",((B=A.data)==null?void 0:B.results)??[],{to:"/methods",label:"Browse methods"}),re("Benchmarks","benchmark",[],{to:"/tasks",label:"Browse benchmarks"}),re("Popular authors","author",p((le=F.data)==null?void 0:le.authors)),re("Popular organizations","organization",p((et=F.data)==null?void 0:et.organizations),{to:"/organizations",label:"Browse organizations"}),ie&&e.jsxs("p",{className:"settings-token-error",role:"alert",children:[ie.message,"."]}),(j.error&&!We(j.error)||L.error||M.error||U.error||I.error||Y.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:[e.jsx("button",{type:"button",className:"research-follow-action",disabled:K,onClick:c,children:"Cancel"}),e.jsx("button",{type:"submit",className:"research-topic-save",disabled:!ve,children:X.some(t=>t.follow===!1)||V.length||be||ye.length?"Save":X.length||H.length?"Follow":Le?"Retry":x?"Update topic":"Follow"})]})]})}function Ds({children:o}){const s=l.useRef(null);return l.useLayoutEffect(()=>{const c=s.current;if(!c)return;const h=()=>{const i=[...c.children],y=i.filter(u=>u.dataset.suggested);y.forEach(u=>{u.hidden=!1});const T=()=>new Set(i.filter(u=>!u.hidden).map(u=>u.offsetTop)).size;for(let u=y.length-1;u>=0&&T()>2;u--)y[u].hidden=!0};return h(),window.addEventListener("resize",h),()=>window.removeEventListener("resize",h)}),e.jsx("div",{ref:s,className:"topic-dialog-chips",children:o})}function As({kind:o,name:s,src:c}){const[h,i]=l.useState(!1);if(c&&!h)return e.jsx("img",{className:`topic-dialog-chip-image is-${o}`,src:c,alt:"",loading:"lazy",onError:()=>i(!0)});if(o!=="author")return null;const y=s.split(/\s+/).filter(Boolean).map(T=>T[0]).slice(0,2).join("").toUpperCase();return e.jsx("span",{className:"topic-dialog-chip-image is-author is-initials","aria-hidden":"true",children:y})}const ut=o=>o.trim().replace(/\s+/g," "),pt=12,ht=["organization","author","task","method","benchmark"],Rs={task:"Task",method:"Method",benchmark:"Benchmark",author:"Author",organization:"Organization"},Ms={topicIds:[],follows:[]},Qe=o=>`${o.kind}:${o.entity_id}`;function $s(o){return[...o].sort((s,c)=>ht.indexOf(s.kind)-ht.indexOf(c.kind)||c.created_at.localeCompare(s.created_at))}function Os({follow:o}){if(o.kind==="task"){const s=o.url.split("/").pop()??"",c=Ot(s,o.parent_slug??void 0);return e.jsx(c,{size:14,strokeWidth:2,"aria-hidden":"true",style:{color:hs(ms(s)).dot}})}if(o.kind==="author"||o.kind==="organization"){if(o.image_url)return e.jsx("img",{src:o.image_url,alt:"",width:18,height:18,loading:"lazy"});const s=o.kind==="author"?Ns:vs;return e.jsx(s,{size:14,"aria-hidden":"true"})}return null}const mt=(o,s)=>o.includes(s)?o.filter(c=>c!==s):[...o,s];function Bs({topics:o,follows:s,active:c,hrefFor:h,onEdit:i,editLabel:y}){const[T,u]=l.useState(!1),N=[...o.map(p=>({key:`topic:${p.id}`,filter:{...c,topicIds:mt(c.topicIds,p.id)},name:J(p),title:p.text,mark:null,on:c.topicIds.includes(p.id)})),...$s(s).map(p=>({key:Qe(p),filter:{...c,follows:mt(c.follows,Qe(p))},name:p.name,title:`${Rs[p.kind]} · ${p.name}`,mark:e.jsx(Os,{follow:p}),on:c.follows.includes(Qe(p))}))],E=c.topicIds.length===0&&c.follows.length===0,F=!T&&N.length>pt+1?N.filter((p,w)=>w0&&e.jsx(ee,{className:`topic-bubble ${E?"active":""}`,to:h(Ms),"aria-current":E?"true":void 0,children:e.jsx("span",{className:"topic-bubble-name",children:"All"})}),F.map(p=>e.jsxs(ee,{className:`topic-bubble ${p.on?"active":""}`,to:h(p.filter),title:p.title,"aria-current":p.on?"true":void 0,children:[p.mark,e.jsx("span",{className:"topic-bubble-name",children:p.name})]},p.key)),_>0&&e.jsx("button",{type:"button",className:"topic-bubble topic-bubble-more",onClick:()=>u(!0),children:e.jsxs("span",{className:"topic-bubble-name",children:["+",_," more"]})}),i&&e.jsxs("button",{type:"button",className:"topic-bubble topic-bubble-add",onClick:i,children:[e.jsx(Ct,{size:13,"aria-hidden":"true"}),e.jsx("span",{className:"topic-bubble-name",children:y})]})]})}const gt=45,zs=1800,Hs=25,qs=350,Us=o=>{const[s,c]=l.useState(pe[0].slice(0,1)),[h,i]=l.useState(0);return l.useEffect(()=>{var A,F;if(!o)return;if((F=(A=window.matchMedia)==null?void 0:A.call(window,"(prefers-reduced-motion: reduce)"))!=null&&F.matches){c(pe[0]),i(0);return}let y=0,T=1,u=!1,N;c(pe[0].slice(0,T)),i(0);const E=()=>{const _=pe[y];if(!u){if(T+=1,c(_.slice(0,T)),T===_.length){u=!0,N=window.setTimeout(E,zs);return}N=window.setTimeout(E,gt);return}if(T-=1,c(_.slice(0,T)),T===0){u=!1,y=(y+1)%pe.length,i(y),N=window.setTimeout(E,qs);return}N=window.setTimeout(E,Hs)};return N=window.setTimeout(E,gt),()=>window.clearTimeout(N)},[o]),{placeholder:s,prompt:pe[h]}},Ks=()=>{var P;const o=ze(),s=bt(),[c,h]=l.useState({text:"",paperMentions:[]}),i=c.text,[y,T]=l.useState(0),[u,N]=l.useState(!1),[E,A]=l.useState(null),{placeholder:F,prompt:_}=Us(!i),p=l.useRef(null),w=te({queryKey:["chatAvailability"],queryFn:()=>js.getAvailability(),retry:!1,enabled:Ye()}),$=Ye()&&((P=w.data)==null?void 0:P.paper_mentions_enabled)!==!1,f=es({draft:c,onChange:h,enabled:$,textareaRef:p}),G=l.useRef(!1),[z,R]=l.useState(!1),b=ts({draft:c,onChange:h,textareaRef:p,onEnd:a=>{G.current&&!a&&R(!0),G.current=!1}}),Q=()=>{G.current=!0,b.finish()},S=ss(c,f.open),m=i?S.completion:_;l.useLayoutEffect(()=>{const a=p.current;if(!a)return;const r=()=>{if(a.style.height="auto",i){a.style.height=`${Math.min(ds(a),160)}px`;return}const j=a.placeholder,L=pe.reduce((M,U)=>(a.placeholder=U,Math.max(M,a.scrollHeight)),0);a.placeholder=j,a.style.height=`${Math.min(L,160)}px`};return r(),window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[i,m]),l.useEffect(()=>{z&&(R(!1),k())},[z]);const k=async(a=c)=>{const r=a.text.trim();if(!(!r||u)){if(s){const j=new URLSearchParams({q:r,model:Ge}),L=`${Rt}?${j}`,M=window.open(L,"_blank");if(!M){A(L);return}M.opener=null,A(null),h({text:"",paperMentions:[]});return}N(!0),os(a,Ge);try{const j=await ns(Ge);o(`/chat/${j.id}`)}catch{o("/chat")}}};return e.jsxs(e.Fragment,{children:[!s&&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(as,{text:c.text,mentions:c.paperMentions,scrollTop:y,variant:"home",completion:i?m:""}),e.jsx("textarea",{ref:p,rows:1,value:i,placeholder:F,"aria-label":"Ask the assistant",disabled:u,readOnly:b.active,onChange:a=>{f.updateText(a.target.value,a.target.selectionStart),S.trackCaret(a.target)},onSelect:a=>{f.refresh(a.currentTarget.selectionStart),S.trackCaret(a.currentTarget)},onClick:a=>{f.refresh(a.currentTarget.selectionStart),S.trackCaret(a.currentTarget)},onScroll:a=>T(a.currentTarget.scrollTop),onBlur:a=>{var r,j;(j=(r=a.relatedTarget)==null?void 0:r.closest)!=null&&j.call(r,".chat-paper-picker")||window.setTimeout(f.close,0)},onKeyDown:a=>{if(b.active){a.key==="Enter"&&!a.shiftKey&&(a.preventDefault(),b.phase==="recording"&&Q());return}if(!f.keyDown(a)){if(is(a)&&m){a.preventDefault();const r=i+m;f.updateText(r,r.length),window.requestAnimationFrame(()=>{var j;return(j=p.current)==null?void 0:j.setSelectionRange(r.length,r.length)});return}a.key==="Enter"&&!a.shiftKey&&(a.preventDefault(),k())}},role:$?"combobox":void 0,"aria-expanded":$?f.open:void 0,"aria-controls":f.open?f.pickerId:void 0,"aria-activedescendant":f.open&&f.results.length?`${f.optionIdPrefix}-${f.activeIndex}`:void 0,"aria-autocomplete":$?"list":void 0,"aria-describedby":f.message?"ask-home-paper-mention-message":void 0})]}),!s&&e.jsx(rs,{dictation:b,disabled:u}),e.jsx("button",{type:"button",className:`chat-send${i.trim()||b.phase==="recording"?" chat-send-on":""}`,onClick:()=>b.active?Q():void k(),disabled:u||(b.active?b.phase!=="recording":!i.trim()),"aria-label":"Ask the assistant",children:e.jsx(ls,{})})]}),E&&e.jsx("div",{className:"chat-paper-mention-message",role:"alert",children:e.jsx("a",{href:E,target:"_blank",rel:"noreferrer",children:"Open this question on paperswithcode.co"})}),b.error&&e.jsx("div",{className:"chat-paper-mention-message",role:"alert",children:b.error}),f.message&&e.jsx("div",{id:"ask-home-paper-mention-message",className:"chat-paper-mention-message",role:"alert",children:f.message}),e.jsx(cs,{open:f.open,query:f.query,results:f.results,activeIndex:f.activeIndex,loading:f.loading,error:f.error,onSelect:f.select,id:f.pickerId,optionIdPrefix:f.optionIdPrefix})]})]})},Gs=30,Qs=6,_t="pwc:following-last-seen";function Ys(){try{return localStorage.getItem(_t)}catch{return null}}function Ws(){try{localStorage.setItem(_t,new Date().toISOString())}catch{}}const ft=40,Vs=async o=>{const s=await o;return{results:s.results.map(c=>({paper:c})),next_page:s.next_page}},Xs=({mode:o})=>{var fe,K,xe,we,X,De,ve,ke,Ne,Se,re,Te,Ce,Pe,_e;const s=o==="following",c=ze(),h=xt(),i=h==null?void 0:h.user,[y,T]=Dt(),u=gs(y,void 0,o==="trending"?"week":"month"),N=n=>{const g=new URLSearchParams(y);g.delete("order_by"),g.delete("only"),g.delete("topic"),g.delete("follow");const B=g.toString();c(B?`${n}?${B}`:n)},E={topicIds:[],follows:[]},A=n=>{const g=new URLSearchParams(y);g.delete("only"),g.delete("topic"),g.delete("follow"),n.topicIds.forEach(le=>g.append("topic",String(le))),n.follows.forEach(le=>g.append("follow",le));const B=g.toString();return B?`/following?${B}`:"/following"},F=te(Be.topTasks(8)),_=te(Be.trendingTasks({limit:8,min_recent_papers:10})),p=s&&y.get("only")==="topic",w=s?{topicIds:[...new Set(y.getAll("topic").map(Number).filter(Number.isInteger))],follows:[...new Set(y.getAll("follow").filter(n=>/^(task|method|benchmark|author|organization):\d+$/.test(n)))]}:E,$=w.topicIds.length>0||w.follows.length>0,f={start_date:u.startDate,end_date:u.endDate},G={...u,topicOnly:p,...w},z=fs(s?Ue.following(i==null?void 0:i.hf_subject,G):Ue.trending(f),async n=>{if(s){const B=await Mt.following(n,G),le=B.length===ft?n+ft:null;return{results:B,next_page:le}}const g={...f,page:n,page_size:Gs,include_resources:!0};return Vs($t.list({...g,order_by:"trending",order_dir:"desc",latest_only:!0}))},{enabled:!s||!!i,initialPage:s?0:1}),R=Nt(),b=kt(!0,1e4),Q=!!((fe=R.data)!=null&&fe.length)||!!((K=b.data)!=null&&K.length),S=J,m=((xe=b.data)==null?void 0:xe.filter(Gt))??[],k=m.filter(n=>w.topicIds.length?w.topicIds.includes(n.id):!w.follows.length),P=w.topicIds.length===1&&!w.follows.length?(we=b.data)==null?void 0:we.find(n=>n.id===w.topicIds[0]):void 0,[a,r]=l.useState(()=>s&&y.get("edit")==="1"?null:void 0),j=Je(),L=m.map(n=>n.id).join(","),M=l.useRef([]);l.useEffect(()=>{const n=L?L.split(","):[];M.current.some(g=>!n.includes(g))&&j.invalidateQueries({queryKey:Ue.following(i==null?void 0:i.hf_subject)}),M.current=n},[L,j,i==null?void 0:i.hf_subject]);const U=s&&!!i&&((X=R.data)==null?void 0:X.length)===0&&b.isSuccess&&b.data.length===0,I=s&&!(h!=null&&h.isLoading)&&!i||U,Y=!!i||!At(),O=!s&&Y&&!(h!=null&&h.isLoading)&&(!i||R.isSuccess&&b.isSuccess&&!Q),[x]=l.useState(Ys);l.useEffect(()=>{i&&(s||Q&&!x)&&Ws()},[i,s,Q,x]);const ne=te({...oe.followingNewCount(i==null?void 0:i.hf_subject,x??""),enabled:!s&&!!i&&Q&&!!x}),W=s?0:((De=ne.data)==null?void 0:De.count)??0,ae=s&&x?Date.parse(x):NaN,[he,be]=l.useState(!1),[V]=l.useState(()=>!!at()||it().length>0||Ke().length>0),[ye,je]=l.useState(!1);!he&&((ve=b.data)!=null&&ve.length||(ke=R.data)!=null&&ke.length)&&be(!0),I&&!ye&&(je(!0),Y&&!he&&!V&&r(null));const H=St(),{mutate:ce}=H,me=l.useRef(!1);l.useEffect(()=>{const n=at();!i||!b.isSuccess||!n||me.current||(me.current=!0,b.data.some(g=>g.text===n)?Qt():ce({text:n}))},[i,b.isSuccess,b.data,ce]);const q=Tt(),{mutate:Fe}=q,se=l.useRef(!1);l.useEffect(()=>{const n=it();!i||!n.length||se.current||(se.current=!0,Fe(n))},[i,Fe]);const ie=$&&b.isSuccess&&R.isSuccess?{topicIds:w.topicIds.filter(n=>b.data.some(g=>g.id===n)),follows:w.follows.filter(n=>R.data.some(g=>`${g.kind}:${g.entity_id}`===n))}:void 0,Le=!!ie&&(ie.topicIds.length{Le&&ie&&c(A(ie),{replace:!0})});const He=jt(),{mutate:de}=He,ge=l.useRef(!1);l.useEffect(()=>{const n=Ke();!i||!n.length||ge.current||(ge.current=!0,de(n))},[i,de]);const qe=l.useMemo(()=>{var n;return((n=z.data)==null?void 0:n.pages.flatMap(g=>g.results.map(B=>({...Jt(B.paper),followReasons:B.reasons,isNew:!!B.added_at&&Date.parse(B.added_at)>ae}))))??[]},[z.data,ae]),Ie=z.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:[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"}),F.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((n,g)=>e.jsx(rt,{className:"h-5 w-full"},g))}),e.jsxs("div",{className:"sidebar-links",children:[(Ne=F.data)==null?void 0:Ne.map(n=>e.jsxs(ee,{to:`/tasks/${n.slug}`,className:"sidebar-link",children:[Ve(n.name,n.slug),n.paper_count!=null&&e.jsx("span",{className:"count",children:n.paper_count})]},n.id)),e.jsx(ee,{to:"/tasks",className:"sidebar-link sidebar-link-more",children:"all domains →"})]})]}),e.jsxs("div",{className:"sidebar-section sidebar-section-trending-domains",children:[e.jsx("div",{className:"sidebar-label",children:"Trending Domains"}),_.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((n,g)=>e.jsx(rt,{className:"h-5 w-full"},g))}),((re=(Se=_.data)==null?void 0:Se.results)==null?void 0:re.length)===0&&!_.isLoading&&e.jsx("div",{style:{fontSize:12,color:"var(--ink-faint)"},children:"No domains gaining momentum right now."}),e.jsx("div",{className:"sidebar-links",children:(Ce=(Te=_.data)==null?void 0:Te.results)==null?void 0:Ce.map(n=>e.jsxs(ee,{to:`/tasks/${n.slug}`,className:"sidebar-link",children:[Ve(n.name,n.slug),e.jsxs("span",{className:"count",children:[n.share_lift.toFixed(1),"x"]})]},n.id))})]})]}),e.jsx(ys,{})]}),e.jsxs("div",{className:"feed-main",children:[(Ye()||bt())&&e.jsx("div",{className:"feed-chat",children:e.jsx(Ks,{})}),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 ${o==="trending"?"active":""}`,onClick:()=>N("/"),children:"trending"}),e.jsxs("button",{className:`sort-btn ${s?"active":""}`,onClick:()=>N("/following"),children:["following",W>0&&e.jsx("span",{className:"nav-new-badge feed-tab-new",title:"New papers since your last visit",children:"New"})]})]})}),e.jsx(xs,{startDate:u.startDate,endDate:u.endDate,onChange:n=>T(ws(y,n))})]}),s&&(!!i||!(h!=null&&h.isLoading))&&e.jsx(Bs,{topics:b.data??[],follows:R.data??[],active:w,hrefFor:A,onEdit:Y?()=>r(null):void 0,editLabel:(Pe=b.data)!=null&&Pe.length||(_e=R.data)!=null&&_e.length?"Edit feed":"Build feed"}),Ie&&e.jsx(Me,{variant:"destructive",className:"mb-4",children:e.jsxs($e,{children:["Failed to load papers. ",e.jsx("button",{type:"button",onClick:()=>void z.refetch(),children:"Try again"})]})}),H.isError&&H.variables&&e.jsx(Me,{variant:"destructive",className:"mb-4",children:e.jsx($e,{children:We(H.error)?e.jsxs(e.Fragment,{children:["Could not follow “",H.variables.text,"”: ",H.error.message,"."]}):e.jsxs(e.Fragment,{children:["Could not follow “",H.variables.text,"”. ",e.jsx("button",{type:"button",onClick:()=>ce(H.variables),children:"Try again"})]})})}),q.isError&&q.variables&&e.jsx(Me,{variant:"destructive",className:"mb-4",children:e.jsxs($e,{children:["Could not follow ",q.variables.map(n=>n.name).join(", "),". ",e.jsx("button",{type:"button",onClick:()=>Fe(q.variables),children:"Try again"})]})}),He.isError&&e.jsx(Me,{variant:"destructive",className:"mb-4",children:e.jsxs($e,{children:["Could not follow the popular topics you picked. ",e.jsx("button",{type:"button",onClick:()=>de(Ke()),children:"Try again"})]})}),s&&k.length>0&&e.jsxs("div",{className:"following-topic-note",role:"status",children:["Showing the closest papers about ",k.map(n=>`“${S(n)}”`).join(" and ")," now. A model is reading papers to refine these matches, which takes a few minutes."]}),Y&&e.jsx(Ls,{open:a!==void 0,topicId:a??null,afterSavePath:s?void 0:"/following",onOpenChange:n=>{if(!n&&(r(void 0),y.has("edit"))){const g=new URLSearchParams(y);g.delete("edit"),T(g,{replace:!0})}}}),p&&!$&&e.jsxs("div",{className:"following-topic-note following-topic-filter",role:"status",children:["Showing only papers about your topics. ",e.jsx(ee,{to:A(E),children:"Show everything you follow"})]}),I?e.jsx(Ss,{onBuild:Y?()=>r(null):void 0}):e.jsx(bs,{query:z,isLoading:z.isLoading||s&&!!(h!=null&&h.isLoading),cards:qe,skeleton:"card",rootMargin:"400px",cardHeader:O?n=>n===Qs&&e.jsx(Ps,{onBuild:()=>r(null)}):void 0,empty:Ie?null:P?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:()=>r(P.id),children:"edit the topic"}),"."]}):$?e.jsx(e.Fragment,{children:"No papers match the selected bubbles in this window. Widen the date range or pick more bubbles."}):p?e.jsx(e.Fragment,{children:"No papers about your topics match these filters. Widen the date range or follow more topics."}):s?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(ee,{to:"/tasks",children:"tasks"}),", ",e.jsx(ee,{to:"/methods",children:"methods"}),", benchmark, author, or organization pages."]}):"No papers in this window."})]})]})]})]})},Bo=()=>e.jsx(Xs,{mode:"trending"});export{Ks as AskAssistant,Xs as HomeFeed,Bo as default}; diff --git a/assets/FollowingView-C3WQTFyb.js b/assets/FollowingView-C3WQTFyb.js deleted file mode 100644 index f4d85cfc2e9da6b3b0dbc3ced38e1b9f80a12922..0000000000000000000000000000000000000000 --- a/assets/FollowingView-C3WQTFyb.js +++ /dev/null @@ -1 +0,0 @@ -import{j as o}from"./index-C1Xuuz1Y.js";import{HomeFeed as r}from"./FeedView-CEndb4QE.js";import"./taskIcons-DurKAT-u.js";import"./search-YolWz-tq.js";import"./triangle-alert-DGQdZ5Fh.js";import"./share-2-Zzb236oj.js";import"./trending-up-Dmgkbga2.js";import"./moon-DB_mnxXr.js";import"./thumbs-up-Ys3ImX4j.js";import"./database-rIkpN7y5.js";import"./link-2-D52PZ3mH.js";import"./trophy-B0LpQA62.js";import"./file-text-BlXclTHj.js";import"./activity-BCn9520W.js";import"./globe-D69lYFoB.js";import"./researchTopic-BU8M-7Qo.js";import"./useMutation-Cb0wrKBq.js";import"./plus-VBQCmtt2.js";import"./dialog-CCU_33Ju.js";import"./switch-BrihALZS.js";import"./index-CNkd3QcT.js";import"./useDebounce-lFex_Aum.js";import"./transform-btCQtWTl.js";import"./chatSessions-DFoCf0pS.js";import"./chat-CiW-DJRi.js";import"./arrow-up-right-gHB4zR82.js";import"./arrow-right-BUEjhpSy.js";import"./colors-BkWRhvFI.js";import"./usePapers-DzSHAOm5.js";import"./PaperCard-DjlN6X2v.js";import"./AuthorAvatar-DqCnji_B.js";import"./SotaBadges-B5MVNUr2.js";import"./Icon-BADQ_q7j.js";import"./LatexTitle-B0RfzwYI.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-C1A8cBwB.js";import"./skeleton-D8hFkZOU.js";import"./useIntersectionObserver-CwCTFEhv.js";import"./useInfiniteQuery-D52ptoDl.js";import"./McpShowcase-CwUcSruT.js";import"./AgentLogos-CJgsqwCs.js";import"./alert-UfpiwFIJ.js";function Q(){return o.jsx(r,{mode:"following"})}export{Q as default}; diff --git a/assets/FollowingView-Cxa7B_EK.js b/assets/FollowingView-Cxa7B_EK.js new file mode 100644 index 0000000000000000000000000000000000000000..d3e7c2206ed4495810f17227f38fbcc80d38adc7 --- /dev/null +++ b/assets/FollowingView-Cxa7B_EK.js @@ -0,0 +1 @@ +import{j as o}from"./index-DMjO_toh.js";import{HomeFeed as r}from"./FeedView-BHFMyhM7.js";import"./taskIcons-BeSRODUD.js";import"./search-D6uSAb1U.js";import"./triangle-alert-CcBqLaPP.js";import"./share-2-BO6l1rLC.js";import"./trending-up-DRI2hJAf.js";import"./moon-CIGKI3Uq.js";import"./thumbs-up-CZ7BdM1B.js";import"./database-UPYeEFxO.js";import"./link-2-n6VIX0kb.js";import"./trophy-C75hq_xI.js";import"./file-text-D6OyOvvT.js";import"./activity-CJ9AQ3mn.js";import"./globe-C6Up_LzV.js";import"./researchTopic-hhMPs4g3.js";import"./useMutation-Db093XSk.js";import"./plus-B4ZP41Rg.js";import"./dialog-C-drkhvX.js";import"./switch-t5rMaesI.js";import"./index-BgYoYvBg.js";import"./useDebounce-_5_VjYb0.js";import"./transform-CXoeFMaW.js";import"./chatSessions-CtEVszLf.js";import"./chat-B4elm0RV.js";import"./arrow-up-right-Dcycbt3C.js";import"./arrow-right-Tu8hJpdM.js";import"./colors-BkWRhvFI.js";import"./usePapers-DCcqZCMM.js";import"./PaperCard-CUJXx9SW.js";import"./AuthorAvatar-DFoIK6Bc.js";import"./SotaBadges-CHGUskQn.js";import"./Icon-D5cUFATZ.js";import"./LatexTitle-BRJTz_K0.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-MF6JD1Yi.js";import"./skeleton-DiGWALrs.js";import"./useIntersectionObserver-CU-1-_ok.js";import"./useInfiniteQuery-C91fE_fV.js";import"./McpShowcase-fiJIUUiM.js";import"./AgentLogos-C26IQbJ9.js";import"./alert-B2i0PAyW.js";function Q(){return o.jsx(r,{mode:"following"})}export{Q as default}; diff --git a/assets/FrameworksIndexView-C6nlEkCA.js b/assets/FrameworksIndexView-BudvANNm.js similarity index 97% rename from assets/FrameworksIndexView-C6nlEkCA.js rename to assets/FrameworksIndexView-BudvANNm.js index 26434558506f053738b10c0f230da4a6590e61fa..73aa2d6d2e341b1debd854e2c02891f87eb935bd 100644 --- a/assets/FrameworksIndexView-C6nlEkCA.js +++ b/assets/FrameworksIndexView-BudvANNm.js @@ -1 +1 @@ -import{n as d,j as e,L as c,b as m,aa as h,v as p}from"./index-C1Xuuz1Y.js";import{I as u}from"./Icon-BADQ_q7j.js";import{c as g,h as x}from"./colors-BkWRhvFI.js";import{P as j}from"./frameworks-DDA0P4Tf.js";const f={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:j[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:r=>{r.target.closest("a, button")||n(t)},onKeyDown:r=>{r.target===r.currentTarget&&(r.key==="Enter"||r.key===" ")&&(r.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(r=>e.jsx(k,{platform:r},r))})]}),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(u,{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"})]})]})},y=()=>{var r;const s=m(p.frameworkCatalog()),n=((r=s.data)==null?void 0:r.domains)??[],t=n.reduce((i,a)=>i+a.categories.reduce((l,o)=>l+o.frameworks.length,0),0);return h.useEffect(()=>{var a;const i=window.location.hash.slice(1);i&&((a=document.getElementById(i))==null||a.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((a,l)=>a+l.frameworks.length,0)," frameworks"]})]}),i.categories.map(a=>e.jsxs("div",{className:"framework-category",children:[e.jsxs("div",{className:"framework-category-head",children:[e.jsxs("div",{children:[e.jsx("h3",{style:f,children:a.name}),a.description&&e.jsx("p",{className:"framework-category-blurb",children:a.description}),a.guide_url&&e.jsxs("a",{href:a.guide_url,target:"_blank",rel:"noopener noreferrer",className:"framework-guide-link",children:[a.guide_label??"Read guide"," →"]})]}),e.jsxs("div",{className:"framework-category-meta",children:[a.frameworks.length," ",a.frameworks.length===1?"framework":"frameworks"]})]}),e.jsx("div",{className:"framework-grid",children:a.frameworks.map(l=>e.jsx(_,{framework:l},l.slug))})]},a.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,y as default}; +import{n as d,j as e,L as c,b as m,aa as h,v as p}from"./index-DMjO_toh.js";import{I as u}from"./Icon-D5cUFATZ.js";import{c as g,h as x}from"./colors-BkWRhvFI.js";import{P as j}from"./frameworks-DDA0P4Tf.js";const f={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:j[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:r=>{r.target.closest("a, button")||n(t)},onKeyDown:r=>{r.target===r.currentTarget&&(r.key==="Enter"||r.key===" ")&&(r.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(r=>e.jsx(k,{platform:r},r))})]}),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(u,{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"})]})]})},y=()=>{var r;const s=m(p.frameworkCatalog()),n=((r=s.data)==null?void 0:r.domains)??[],t=n.reduce((i,a)=>i+a.categories.reduce((l,o)=>l+o.frameworks.length,0),0);return h.useEffect(()=>{var a;const i=window.location.hash.slice(1);i&&((a=document.getElementById(i))==null||a.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((a,l)=>a+l.frameworks.length,0)," frameworks"]})]}),i.categories.map(a=>e.jsxs("div",{className:"framework-category",children:[e.jsxs("div",{className:"framework-category-head",children:[e.jsxs("div",{children:[e.jsx("h3",{style:f,children:a.name}),a.description&&e.jsx("p",{className:"framework-category-blurb",children:a.description}),a.guide_url&&e.jsxs("a",{href:a.guide_url,target:"_blank",rel:"noopener noreferrer",className:"framework-guide-link",children:[a.guide_label??"Read guide"," →"]})]}),e.jsxs("div",{className:"framework-category-meta",children:[a.frameworks.length," ",a.frameworks.length===1?"framework":"frameworks"]})]}),e.jsx("div",{className:"framework-grid",children:a.frameworks.map(l=>e.jsx(_,{framework:l},l.slug))})]},a.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,y as default}; diff --git a/assets/Icon-BADQ_q7j.js b/assets/Icon-D5cUFATZ.js similarity index 98% rename from assets/Icon-BADQ_q7j.js rename to assets/Icon-D5cUFATZ.js index e3d738639be99f847669fcde73248e21c239d0ca..cf31ed27ac5e123ab196a23dbb54181218b4de8e 100644 --- a/assets/Icon-BADQ_q7j.js +++ b/assets/Icon-D5cUFATZ.js @@ -1 +1 @@ -import{j as o}from"./index-C1Xuuz1Y.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-DMjO_toh.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-B0RfzwYI.js b/assets/LatexTitle-BRJTz_K0.js similarity index 98% rename from assets/LatexTitle-B0RfzwYI.js rename to assets/LatexTitle-BRJTz_K0.js index 815ff3aa73135865bbf9086cf486b744c7fdcc62..1758b99d8b1c953d3cec40e533cad1764153b008 100644 --- a/assets/LatexTitle-B0RfzwYI.js +++ b/assets/LatexTitle-BRJTz_K0.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 l,i as A,ar as $}from"./index-C1Xuuz1Y.js";let g=null,L=null;function M(){return L??(L=Promise.all([$(()=>import("./katex-DkKDou_j.js"),[]),$(()=>Promise.resolve({}),__vite__mapDeps([0]))]).then(([n])=>(g=n.default,g))),L}const O=new Set([",",";",":","!"," ","quad","qquad","enspace","thinspace"]),S={a:"á",e:"é",i:"í",o:"ó",u:"ú",y:"ý",A:"Á",E:"É",I:"Í",O:"Ó",U:"Ú",Y:"Ý"},w={a:"à",e:"è",i:"ì",o:"ò",u:"ù",A:"À",E:"È",I:"Ì",O:"Ò",U:"Ù"},b={a:"â",e:"ê",i:"î",o:"ô",u:"û",A:"Â",E:"Ê",I:"Î",O:"Ô",U:"Û"},N={a:"ä",e:"ë",i:"ï",o:"ö",u:"ü",y:"ÿ",A:"Ä",E:"Ë",I:"Ï",O:"Ö",U:"Ü",Y:"Ÿ"},k={"'":S,"`":w,"^":b,'"':N,"~":{n:"ñ",N:"Ñ"}},T={ss:"ß",ae:"æ",AE:"Æ",oe:"œ",OE:"Œ",o:"ø",O:"Ø",l:"ł",L:"Ł"};function I(n,i){var e;return((e=k[n])==null?void 0:e[i])??null}function v(n,i){const e=n.indexOf("$",i+1);if(e===-1||!/\d/.test(n[i+1]??""))return e;for(let t=e;t!==-1;t=n.indexOf("$",t+1)){if(/\s/.test(n[t-1]))return-1;if(!/\d/.test(n[t+1]??""))return t}return-1}function U(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 D(n,i,e){const t=X(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(h=>h.toLocaleLowerCase()===s.toLocaleLowerCase())?l.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=(h,f)=>h==="strong"?l.jsx("strong",{children:f},s()):l.jsx("em",{children:f},s());for(;rr&&t.push(...D(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?l.jsx(l.Fragment,{children:n}):r?l.jsx("span",{className:i?"katex-display":void 0,dangerouslySetInnerHTML:{__html:r}}):l.jsx(l.Fragment,{children:i?`$$${n}$$`:`$${n}$`})}function P(n,i){const e=U(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(l.jsx(A.Fragment,{children:a},s));return}if(r.type==="display"){t.push(l.jsx(_,{latex:r.content,display:!0},s));return}t.push(l.jsx(_,{latex:r.content,display:!1},s))}),t.length===1?t[0]:l.jsx(l.Fragment,{children:t})}const R=({text:n,className:i="",highlight:e})=>{const t=A.useMemo(()=>P(n,e),[n,e]);return l.jsx("span",{className:i,children:t})},F=({title:n,className:i="",highlight:e})=>l.jsx(R,{text:n,className:i,highlight:e});export{F as L,R as a}; +import{j as l,i as A,ar as $}from"./index-DMjO_toh.js";let g=null,L=null;function M(){return L??(L=Promise.all([$(()=>import("./katex-DkKDou_j.js"),[]),$(()=>Promise.resolve({}),__vite__mapDeps([0]))]).then(([n])=>(g=n.default,g))),L}const O=new Set([",",";",":","!"," ","quad","qquad","enspace","thinspace"]),S={a:"á",e:"é",i:"í",o:"ó",u:"ú",y:"ý",A:"Á",E:"É",I:"Í",O:"Ó",U:"Ú",Y:"Ý"},w={a:"à",e:"è",i:"ì",o:"ò",u:"ù",A:"À",E:"È",I:"Ì",O:"Ò",U:"Ù"},b={a:"â",e:"ê",i:"î",o:"ô",u:"û",A:"Â",E:"Ê",I:"Î",O:"Ô",U:"Û"},N={a:"ä",e:"ë",i:"ï",o:"ö",u:"ü",y:"ÿ",A:"Ä",E:"Ë",I:"Ï",O:"Ö",U:"Ü",Y:"Ÿ"},k={"'":S,"`":w,"^":b,'"':N,"~":{n:"ñ",N:"Ñ"}},T={ss:"ß",ae:"æ",AE:"Æ",oe:"œ",OE:"Œ",o:"ø",O:"Ø",l:"ł",L:"Ł"};function I(n,i){var e;return((e=k[n])==null?void 0:e[i])??null}function v(n,i){const e=n.indexOf("$",i+1);if(e===-1||!/\d/.test(n[i+1]??""))return e;for(let t=e;t!==-1;t=n.indexOf("$",t+1)){if(/\s/.test(n[t-1]))return-1;if(!/\d/.test(n[t+1]??""))return t}return-1}function U(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 D(n,i,e){const t=X(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(h=>h.toLocaleLowerCase()===s.toLocaleLowerCase())?l.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=(h,f)=>h==="strong"?l.jsx("strong",{children:f},s()):l.jsx("em",{children:f},s());for(;rr&&t.push(...D(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?l.jsx(l.Fragment,{children:n}):r?l.jsx("span",{className:i?"katex-display":void 0,dangerouslySetInnerHTML:{__html:r}}):l.jsx(l.Fragment,{children:i?`$$${n}$$`:`$${n}$`})}function P(n,i){const e=U(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(l.jsx(A.Fragment,{children:a},s));return}if(r.type==="display"){t.push(l.jsx(_,{latex:r.content,display:!0},s));return}t.push(l.jsx(_,{latex:r.content,display:!1},s))}),t.length===1?t[0]:l.jsx(l.Fragment,{children:t})}const R=({text:n,className:i="",highlight:e})=>{const t=A.useMemo(()=>P(n,e),[n,e]);return l.jsx("span",{className:i,children:t})},F=({title:n,className:i="",highlight:e})=>l.jsx(R,{text:n,className:i,highlight:e});export{F as L,R as a}; diff --git a/assets/LoadFailurePage-qL80B4Za.js b/assets/LoadFailurePage-BIYmxtFy.js similarity index 59% rename from assets/LoadFailurePage-qL80B4Za.js rename to assets/LoadFailurePage-BIYmxtFy.js index c6636680695cea8787fa308bcaae3eb3a8a723ef..2eccfb499a010537586ed4a91184ac7cecfd6327 100644 --- a/assets/LoadFailurePage-qL80B4Za.js +++ b/assets/LoadFailurePage-BIYmxtFy.js @@ -1 +1 @@ -import{m as t,j as r}from"./index-C1Xuuz1Y.js";import{A as i,a as s}from"./alert-UfpiwFIJ.js";import a from"./NotFound-BVs_mdc4.js";function u(e,o){return e.some(t)?r.jsx(a,{}):e.some(Boolean)?r.jsx("div",{className:"page",children:r.jsx(i,{variant:"destructive",children:r.jsx(s,{children:o})})}):null}export{u as l}; +import{m as t,j as r}from"./index-DMjO_toh.js";import{A as i,a as s}from"./alert-B2i0PAyW.js";import a from"./NotFound-E4uwO9V5.js";function u(e,o){return e.some(t)?r.jsx(a,{}):e.some(Boolean)?r.jsx("div",{className:"page",children:r.jsx(i,{variant:"destructive",children:r.jsx(s,{children:o})})}):null}export{u as l}; diff --git a/assets/MarkdownText-Dv3hoeZl.js b/assets/MarkdownText-PyDBRK4a.js similarity index 86% rename from assets/MarkdownText-Dv3hoeZl.js rename to assets/MarkdownText-PyDBRK4a.js index db697a660c63de4e359d2e3f1900acf699e68e21..061baf6dbd2be50ddcbc1127f4f3345f0616b2be 100644 --- a/assets/MarkdownText-Dv3hoeZl.js +++ b/assets/MarkdownText-PyDBRK4a.js @@ -1 +1 @@ -import{G as c,j as o,L as u}from"./index-C1Xuuz1Y.js";/* empty css */import{r as p,a as m,P as d}from"./PaperPreviewLink-CTwxrQQW.js";import{M as h}from"./index-SntObKrh.js";import{r as f}from"./index-B8mUud-W.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{G as c,j as o,L as u}from"./index-DMjO_toh.js";/* empty css */import{r as p,a as m,P as d}from"./PaperPreviewLink-DvyVialT.js";import{M as h}from"./index-ruElXN5Q.js";import{r as f}from"./index-BCW47Vvr.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-CwUcSruT.js b/assets/McpShowcase-fiJIUUiM.js similarity index 84% rename from assets/McpShowcase-CwUcSruT.js rename to assets/McpShowcase-fiJIUUiM.js index 840ce8fc93be339db74c021e2342159e4d22b0e1..9c049340a83a057738560602e9a93f0c1feb160a 100644 --- a/assets/McpShowcase-CwUcSruT.js +++ b/assets/McpShowcase-fiJIUUiM.js @@ -1 +1 @@ -import{j as e,L as t}from"./index-C1Xuuz1Y.js";import{A as a}from"./AgentLogos-CJgsqwCs.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-DMjO_toh.js";import{A as a}from"./AgentLogos-C26IQbJ9.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-D5Q-Ca7m.js b/assets/McpView-_zMii-R1.js similarity index 97% rename from assets/McpView-D5Q-Ca7m.js rename to assets/McpView-_zMii-R1.js index a7d75fdafb3f81ac4f92304573dd2926bd166a68..3b1e4ef84025257298670e00eb316f9381fd63a0 100644 --- a/assets/McpView-D5Q-Ca7m.js +++ b/assets/McpView-_zMii-R1.js @@ -1 +1 @@ -import{ap as b,b as x,aa as m,j as e,C as j}from"./index-C1Xuuz1Y.js";import{u as g,f}from"./useDocumentTitle-DS68IpOJ.js";import{G as y}from"./github-DYMnkwxi.js";import{A as v}from"./arrow-up-right-gHB4zR82.js";import{E as o}from"./external-link-BwpBZl45.js";import{C as w}from"./copy-DN4cM864.js";const h="https://paperswithcode.co/mcp",k="https://staging.paperswithcode.co/mcp";function u(s){const a=typeof window>"u"?void 0:window.location;return a?a.hostname==="staging.paperswithcode.co"?k:a.hostname==="paperswithcode.co"||a.hostname==="www.paperswithcode.co"?h:`${a.origin.replace(/\/$/,"")}/mcp`:h}function C(s){if(!s||typeof s!="object"||s.status!=="ok"||s.service!=="pwc-mcp"||typeof s.version!="string"||typeof s.protocol!="string")throw new Error("MCP health response is invalid");return s}async function N(s){const a=new AbortController,c=()=>a.abort();s==null||s.addEventListener("abort",c,{once:!0});const n=window.setTimeout(c,5e3);try{const t=await fetch(`${u()}/health`,{headers:{Accept:"application/json"},signal:a.signal,credentials:"omit"});if(!t.ok)throw new Error("MCP service is unavailable");return C(await t.json())}finally{window.clearTimeout(n),s==null||s.removeEventListener("abort",c)}}const P=()=>b({queryKey:["mcp","health"],queryFn:({signal:s})=>N(s),retry:!1,staleTime:3e4,refetchInterval:6e4}),_=[["search_papers","Search by topic, title, author, or arXiv ID."],["list_papers","Filter and order papers by taxonomy, venue, date, or organization."],["get_paper_info","Read canonical metadata, authors, abstract, links, and resources."],["read_paper","Read stored paper Markdown with safe continuation for long papers."],["list_recent_papers","Browse the most recently indexed research."],["get_related_papers","Find related work already indexed in the catalogue."],["list_trending_papers","Discover papers with recent repository momentum."],["get_paper_evaluations","Inspect benchmark results reported by one paper."],["get_paper_lineage","Follow explicit predecessor and successor relationships."],["list_tasks","Search tasks and retrieve stable slugs for exact lookup."],["get_task","Inspect a research task and its benchmark coverage."],["list_methods","Search methods and retrieve stable slugs for exact lookup."],["get_method","Inspect a method, its source paper, and catalogue metadata."],["list_conferences","Browse conferences with imported papers."],["get_conference","Inspect one exact conference edition."],["list_organizations","Browse research organizations."],["get_organization","Inspect one exact research organization."],["list_frameworks","Browse frameworks by domain, category, or platform."],["get_framework","Inspect one exact research framework."],["list_benchmarks","Browse and filter benchmark leaderboards."],["get_benchmark","Read one benchmark, metrics, datasets, and leading results."]],S=["pwc://papers/{paper}","pwc://papers/{paper}/markdown","pwc://tasks/{task}","pwc://benchmarks/{benchmark}"],T=["Find recent papers on test-time compute and summarize the main approaches.","Compare the methods and reported benchmarks in these three arXiv papers.","What are the leading benchmarks for text-to-video generation?","Trace the predecessor and successor papers for Mamba."],d=[{key:"chatgpt",label:"ChatGPT",summary:"In workspace developer settings, add a custom MCP app and paste the server URL. Availability and admin approval vary by plan."},{key:"claude",label:"Claude",summary:"Open Settings → Connectors → Add custom connector, paste the URL, then enable Papers With Code from Search and tools."},{key:"claude-code",label:"Claude Code",summary:"Add the anonymous Streamable HTTP server from a terminal.",code:s=>`claude mcp add --transport http paperswithcode ${s}`},{key:"cursor",label:"Cursor",summary:"Add this entry to your project or user MCP configuration.",code:s=>JSON.stringify({mcpServers:{paperswithcode:{url:s}}},null,2)},{key:"vscode",label:"VS Code",summary:"Add this Streamable HTTP server to .vscode/mcp.json.",code:s=>JSON.stringify({servers:{paperswithcode:{type:"http",url:s}}},null,2)},{key:"generic",label:"Generic",summary:"Configure an anonymous, stateless Streamable HTTP server using the URL below. No API key or OAuth flow is required."}],l=({value:s,label:a})=>{const[c,n]=m.useState(!1),t=async()=>{var i;(i=navigator.clipboard)!=null&&i.writeText&&(await navigator.clipboard.writeText(s),n(!0),window.setTimeout(()=>n(!1),1500))};return e.jsxs("button",{className:"action-btn mcp-copy",type:"button",onClick:()=>void t(),"aria-label":a,children:[c?e.jsx(j,{size:16,"aria-hidden":!0}):e.jsx(w,{size:16,"aria-hidden":!0}),c?"Copied":"Copy"]})},O=()=>{var i;const s=u(),a=x(P()),[c,n]=m.useState("chatgpt"),t=d.find(r=>r.key===c)??d[0];return g(f("MCP Server")),e.jsxs("article",{className:"page mcp-page",children:[e.jsxs("a",{className:"mcp-repo-banner",href:"https://github.com/huggingface/pwc-cli",target:"_blank",rel:"noreferrer",children:[e.jsx(y,{size:20,"aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("strong",{children:"huggingface/pwc-cli"}),e.jsxs("span",{children:["Open-source MCP server and ",e.jsx("code",{children:"pwc"})," command-line client"]})]}),e.jsxs("span",{className:"mcp-repo-cta",children:["View on GitHub ",e.jsx(v,{size:14,"aria-hidden":!0})]})]}),e.jsxs("header",{className:"mcp-hero",children:[e.jsxs("div",{children:[e.jsx("p",{className:"sidebar-label mcp-kicker",children:"Model Context Protocol"}),e.jsx("h1",{className:"feed-title",children:"Use Papers With Code in your AI assistant"}),e.jsx("p",{className:"mcp-lede",children:"Search research, inspect methods and benchmarks, and read complete papers through one anonymous, read-only MCP connection."}),e.jsxs("div",{className:"mcp-status","aria-live":"polite",children:[e.jsx("span",{className:a.isSuccess?"is-up":"is-unknown","aria-hidden":!0}),a.isSuccess?"Operational":"Status unavailable",a.data?` · v${a.data.version}`:""]})]}),e.jsxs("div",{className:"mcp-endpoint-card",children:[e.jsx("span",{children:"Remote MCP URL"}),e.jsx("code",{children:s}),e.jsx(l,{value:s,label:"Copy MCP server URL"})]})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-connect",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Connect"}),e.jsx("h2",{id:"mcp-connect",children:"One URL, your preferred client"}),e.jsx("span",{children:"Setup matrix reviewed September 13, 2026; staging qualification pending."})]}),e.jsx("div",{className:"mcp-client-tabs",role:"tablist","aria-label":"MCP client setup",children:d.map(r=>e.jsx("button",{type:"button",role:"tab","aria-selected":c===r.key,onClick:()=>n(r.key),children:r.label},r.key))}),e.jsxs("div",{className:"mcp-setup",role:"tabpanel",children:[e.jsx("p",{children:t.summary}),t.code?e.jsxs("div",{className:"mcp-code-row",children:[e.jsx("pre",{children:e.jsx("code",{children:t.code(s)})}),e.jsx(l,{value:t.code(s),label:`Copy ${t.label} setup`})]}):e.jsxs("div",{className:"mcp-code-row",children:[e.jsx("pre",{children:e.jsx("code",{children:s})}),e.jsx(l,{value:s,label:`Copy ${t.label} endpoint`})]})]})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-capabilities",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Capabilities"}),e.jsx("h2",{id:"mcp-capabilities",children:"Research context, structured for assistants"})]}),e.jsx("div",{className:"mcp-capability-grid",children:[["Discover","Search recent and established work with catalogue filters."],["Read","Continue through long stored papers without presenting a partial document as complete."],["Connect","Explore related work, paper lineage, tasks, and methods."],["Compare","Inspect benchmarks, datasets, metrics, and reported evaluations."]].map(([r,p])=>e.jsxs("div",{children:[e.jsx("h3",{children:r}),e.jsx("p",{children:p})]},r))})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-tools",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Catalogue"}),e.jsx("h2",{id:"mcp-tools",children:"Twenty-one focused, read-only tools"})]}),e.jsx("div",{className:"mcp-tool-grid",children:_.map(([r,p])=>e.jsxs("div",{className:"mcp-tool",children:[e.jsx("code",{children:r}),e.jsx("p",{children:p})]},r))}),e.jsx("h3",{className:"mcp-subheading",children:"Resource templates"}),e.jsx("div",{className:"mcp-resource-list",children:S.map(r=>e.jsx("code",{children:r},r))})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-prompts",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Try asking"}),e.jsx("h2",{id:"mcp-prompts",children:"Prompts that start useful research"})]}),e.jsx("div",{className:"mcp-prompt-list",children:T.map(r=>e.jsxs("div",{children:[e.jsx("p",{children:r}),e.jsx(l,{value:r,label:"Copy example prompt"})]},r))})]}),e.jsxs("section",{className:"mcp-section mcp-notes","aria-labelledby":"mcp-limits",children:[e.jsxs("div",{children:[e.jsx("p",{className:"sidebar-label mcp-kicker",children:"Limits & privacy"}),e.jsx("h2",{id:"mcp-limits",children:"Public by design"}),e.jsx("p",{children:"No account, API key, or write access. Fair-use limits are 60 total requests per minute, 10 semantic searches per minute, four concurrent requests per client, and 25 list results per call."}),e.jsx("p",{children:"MCP telemetry retains tool name, status, latency, response size, protocol, and server version—not prompts, paper IDs, cursors, resource URIs, raw IPs, authorization values, or bodies. Catalogue infrastructure has its own operational logging policy."})]}),e.jsxs("div",{children:[e.jsx("p",{className:"sidebar-label mcp-kicker",children:"Protocol & troubleshooting"}),e.jsx("h2",{children:"Streamable HTTP"}),e.jsxs("p",{children:["Primary protocol: ",((i=a.data)==null?void 0:i.protocol)??"verified during connection setup",". If setup fails, confirm your client supports remote Streamable HTTP, that custom servers are enabled by your workspace administrator, and that you pasted the URL exactly."]}),e.jsxs("nav",{className:"mcp-links","aria-label":"MCP documentation links",children:[e.jsxs("a",{href:"https://github.com/huggingface/pwc-cli",target:"_blank",rel:"noreferrer",children:["CLI repository ",e.jsx(o,{size:13})]}),e.jsxs("a",{href:"https://modelcontextprotocol.io/docs/2026-07-28/learn/server-concepts",target:"_blank",rel:"noreferrer",children:["MCP specification ",e.jsx(o,{size:13})]}),e.jsxs("a",{href:"/docs",target:"_blank",rel:"noreferrer",children:["Public API ",e.jsx(o,{size:13})]}),e.jsxs("a",{href:"/mcp/schema",target:"_blank",rel:"noreferrer",children:["MCP tool schema ",e.jsx(o,{size:13})]}),e.jsxs("a",{href:"/llms.txt",target:"_blank",rel:"noreferrer",children:["llms.txt ",e.jsx(o,{size:13})]})]})]})]})]})};export{O as default}; +import{ap as b,b as x,aa as m,j as e,C as j}from"./index-DMjO_toh.js";import{u as g,f}from"./useDocumentTitle-DVQ2ceqw.js";import{G as y}from"./github-3dJEQTDr.js";import{A as v}from"./arrow-up-right-Dcycbt3C.js";import{E as o}from"./external-link-Bt4eibsp.js";import{C as w}from"./copy-DXTYKY8f.js";const h="https://paperswithcode.co/mcp",k="https://staging.paperswithcode.co/mcp";function u(s){const a=typeof window>"u"?void 0:window.location;return a?a.hostname==="staging.paperswithcode.co"?k:a.hostname==="paperswithcode.co"||a.hostname==="www.paperswithcode.co"?h:`${a.origin.replace(/\/$/,"")}/mcp`:h}function C(s){if(!s||typeof s!="object"||s.status!=="ok"||s.service!=="pwc-mcp"||typeof s.version!="string"||typeof s.protocol!="string")throw new Error("MCP health response is invalid");return s}async function N(s){const a=new AbortController,c=()=>a.abort();s==null||s.addEventListener("abort",c,{once:!0});const n=window.setTimeout(c,5e3);try{const t=await fetch(`${u()}/health`,{headers:{Accept:"application/json"},signal:a.signal,credentials:"omit"});if(!t.ok)throw new Error("MCP service is unavailable");return C(await t.json())}finally{window.clearTimeout(n),s==null||s.removeEventListener("abort",c)}}const P=()=>b({queryKey:["mcp","health"],queryFn:({signal:s})=>N(s),retry:!1,staleTime:3e4,refetchInterval:6e4}),_=[["search_papers","Search by topic, title, author, or arXiv ID."],["list_papers","Filter and order papers by taxonomy, venue, date, or organization."],["get_paper_info","Read canonical metadata, authors, abstract, links, and resources."],["read_paper","Read stored paper Markdown with safe continuation for long papers."],["list_recent_papers","Browse the most recently indexed research."],["get_related_papers","Find related work already indexed in the catalogue."],["list_trending_papers","Discover papers with recent repository momentum."],["get_paper_evaluations","Inspect benchmark results reported by one paper."],["get_paper_lineage","Follow explicit predecessor and successor relationships."],["list_tasks","Search tasks and retrieve stable slugs for exact lookup."],["get_task","Inspect a research task and its benchmark coverage."],["list_methods","Search methods and retrieve stable slugs for exact lookup."],["get_method","Inspect a method, its source paper, and catalogue metadata."],["list_conferences","Browse conferences with imported papers."],["get_conference","Inspect one exact conference edition."],["list_organizations","Browse research organizations."],["get_organization","Inspect one exact research organization."],["list_frameworks","Browse frameworks by domain, category, or platform."],["get_framework","Inspect one exact research framework."],["list_benchmarks","Browse and filter benchmark leaderboards."],["get_benchmark","Read one benchmark, metrics, datasets, and leading results."]],S=["pwc://papers/{paper}","pwc://papers/{paper}/markdown","pwc://tasks/{task}","pwc://benchmarks/{benchmark}"],T=["Find recent papers on test-time compute and summarize the main approaches.","Compare the methods and reported benchmarks in these three arXiv papers.","What are the leading benchmarks for text-to-video generation?","Trace the predecessor and successor papers for Mamba."],d=[{key:"chatgpt",label:"ChatGPT",summary:"In workspace developer settings, add a custom MCP app and paste the server URL. Availability and admin approval vary by plan."},{key:"claude",label:"Claude",summary:"Open Settings → Connectors → Add custom connector, paste the URL, then enable Papers With Code from Search and tools."},{key:"claude-code",label:"Claude Code",summary:"Add the anonymous Streamable HTTP server from a terminal.",code:s=>`claude mcp add --transport http paperswithcode ${s}`},{key:"cursor",label:"Cursor",summary:"Add this entry to your project or user MCP configuration.",code:s=>JSON.stringify({mcpServers:{paperswithcode:{url:s}}},null,2)},{key:"vscode",label:"VS Code",summary:"Add this Streamable HTTP server to .vscode/mcp.json.",code:s=>JSON.stringify({servers:{paperswithcode:{type:"http",url:s}}},null,2)},{key:"generic",label:"Generic",summary:"Configure an anonymous, stateless Streamable HTTP server using the URL below. No API key or OAuth flow is required."}],l=({value:s,label:a})=>{const[c,n]=m.useState(!1),t=async()=>{var i;(i=navigator.clipboard)!=null&&i.writeText&&(await navigator.clipboard.writeText(s),n(!0),window.setTimeout(()=>n(!1),1500))};return e.jsxs("button",{className:"action-btn mcp-copy",type:"button",onClick:()=>void t(),"aria-label":a,children:[c?e.jsx(j,{size:16,"aria-hidden":!0}):e.jsx(w,{size:16,"aria-hidden":!0}),c?"Copied":"Copy"]})},O=()=>{var i;const s=u(),a=x(P()),[c,n]=m.useState("chatgpt"),t=d.find(r=>r.key===c)??d[0];return g(f("MCP Server")),e.jsxs("article",{className:"page mcp-page",children:[e.jsxs("a",{className:"mcp-repo-banner",href:"https://github.com/huggingface/pwc-cli",target:"_blank",rel:"noreferrer",children:[e.jsx(y,{size:20,"aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("strong",{children:"huggingface/pwc-cli"}),e.jsxs("span",{children:["Open-source MCP server and ",e.jsx("code",{children:"pwc"})," command-line client"]})]}),e.jsxs("span",{className:"mcp-repo-cta",children:["View on GitHub ",e.jsx(v,{size:14,"aria-hidden":!0})]})]}),e.jsxs("header",{className:"mcp-hero",children:[e.jsxs("div",{children:[e.jsx("p",{className:"sidebar-label mcp-kicker",children:"Model Context Protocol"}),e.jsx("h1",{className:"feed-title",children:"Use Papers With Code in your AI assistant"}),e.jsx("p",{className:"mcp-lede",children:"Search research, inspect methods and benchmarks, and read complete papers through one anonymous, read-only MCP connection."}),e.jsxs("div",{className:"mcp-status","aria-live":"polite",children:[e.jsx("span",{className:a.isSuccess?"is-up":"is-unknown","aria-hidden":!0}),a.isSuccess?"Operational":"Status unavailable",a.data?` · v${a.data.version}`:""]})]}),e.jsxs("div",{className:"mcp-endpoint-card",children:[e.jsx("span",{children:"Remote MCP URL"}),e.jsx("code",{children:s}),e.jsx(l,{value:s,label:"Copy MCP server URL"})]})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-connect",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Connect"}),e.jsx("h2",{id:"mcp-connect",children:"One URL, your preferred client"}),e.jsx("span",{children:"Setup matrix reviewed September 13, 2026; staging qualification pending."})]}),e.jsx("div",{className:"mcp-client-tabs",role:"tablist","aria-label":"MCP client setup",children:d.map(r=>e.jsx("button",{type:"button",role:"tab","aria-selected":c===r.key,onClick:()=>n(r.key),children:r.label},r.key))}),e.jsxs("div",{className:"mcp-setup",role:"tabpanel",children:[e.jsx("p",{children:t.summary}),t.code?e.jsxs("div",{className:"mcp-code-row",children:[e.jsx("pre",{children:e.jsx("code",{children:t.code(s)})}),e.jsx(l,{value:t.code(s),label:`Copy ${t.label} setup`})]}):e.jsxs("div",{className:"mcp-code-row",children:[e.jsx("pre",{children:e.jsx("code",{children:s})}),e.jsx(l,{value:s,label:`Copy ${t.label} endpoint`})]})]})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-capabilities",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Capabilities"}),e.jsx("h2",{id:"mcp-capabilities",children:"Research context, structured for assistants"})]}),e.jsx("div",{className:"mcp-capability-grid",children:[["Discover","Search recent and established work with catalogue filters."],["Read","Continue through long stored papers without presenting a partial document as complete."],["Connect","Explore related work, paper lineage, tasks, and methods."],["Compare","Inspect benchmarks, datasets, metrics, and reported evaluations."]].map(([r,p])=>e.jsxs("div",{children:[e.jsx("h3",{children:r}),e.jsx("p",{children:p})]},r))})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-tools",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Catalogue"}),e.jsx("h2",{id:"mcp-tools",children:"Twenty-one focused, read-only tools"})]}),e.jsx("div",{className:"mcp-tool-grid",children:_.map(([r,p])=>e.jsxs("div",{className:"mcp-tool",children:[e.jsx("code",{children:r}),e.jsx("p",{children:p})]},r))}),e.jsx("h3",{className:"mcp-subheading",children:"Resource templates"}),e.jsx("div",{className:"mcp-resource-list",children:S.map(r=>e.jsx("code",{children:r},r))})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-prompts",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Try asking"}),e.jsx("h2",{id:"mcp-prompts",children:"Prompts that start useful research"})]}),e.jsx("div",{className:"mcp-prompt-list",children:T.map(r=>e.jsxs("div",{children:[e.jsx("p",{children:r}),e.jsx(l,{value:r,label:"Copy example prompt"})]},r))})]}),e.jsxs("section",{className:"mcp-section mcp-notes","aria-labelledby":"mcp-limits",children:[e.jsxs("div",{children:[e.jsx("p",{className:"sidebar-label mcp-kicker",children:"Limits & privacy"}),e.jsx("h2",{id:"mcp-limits",children:"Public by design"}),e.jsx("p",{children:"No account, API key, or write access. Fair-use limits are 60 total requests per minute, 10 semantic searches per minute, four concurrent requests per client, and 25 list results per call."}),e.jsx("p",{children:"MCP telemetry retains tool name, status, latency, response size, protocol, and server version—not prompts, paper IDs, cursors, resource URIs, raw IPs, authorization values, or bodies. Catalogue infrastructure has its own operational logging policy."})]}),e.jsxs("div",{children:[e.jsx("p",{className:"sidebar-label mcp-kicker",children:"Protocol & troubleshooting"}),e.jsx("h2",{children:"Streamable HTTP"}),e.jsxs("p",{children:["Primary protocol: ",((i=a.data)==null?void 0:i.protocol)??"verified during connection setup",". If setup fails, confirm your client supports remote Streamable HTTP, that custom servers are enabled by your workspace administrator, and that you pasted the URL exactly."]}),e.jsxs("nav",{className:"mcp-links","aria-label":"MCP documentation links",children:[e.jsxs("a",{href:"https://github.com/huggingface/pwc-cli",target:"_blank",rel:"noreferrer",children:["CLI repository ",e.jsx(o,{size:13})]}),e.jsxs("a",{href:"https://modelcontextprotocol.io/docs/2026-07-28/learn/server-concepts",target:"_blank",rel:"noreferrer",children:["MCP specification ",e.jsx(o,{size:13})]}),e.jsxs("a",{href:"/docs",target:"_blank",rel:"noreferrer",children:["Public API ",e.jsx(o,{size:13})]}),e.jsxs("a",{href:"/mcp/schema",target:"_blank",rel:"noreferrer",children:["MCP tool schema ",e.jsx(o,{size:13})]}),e.jsxs("a",{href:"/llms.txt",target:"_blank",rel:"noreferrer",children:["llms.txt ",e.jsx(o,{size:13})]})]})]})]})]})};export{O as default}; diff --git a/assets/MethodDetailView-DGKWIGN2.js b/assets/MethodDetailView-B8HdpGV0.js similarity index 93% rename from assets/MethodDetailView-DGKWIGN2.js rename to assets/MethodDetailView-B8HdpGV0.js index 31bc3a21c2ec164d8d63714025b79ad51a216dda..5847b86e6956709593e1e4221d538580ef1c5e27 100644 --- a/assets/MethodDetailView-DGKWIGN2.js +++ b/assets/MethodDetailView-B8HdpGV0.js @@ -1 +1 @@ -import{j as e,i as E,u as P,b as k,v,B as T,w as $,L as _}from"./index-C1Xuuz1Y.js";import{R as H}from"./ResearchFollowButton-9sh3MNHN.js";import{M as R}from"./SotaBadges-B5MVNUr2.js";import{b as V,u as Q,c as G,P as O}from"./usePapers-DzSHAOm5.js";import{r as U,M as z}from"./MarkdownText-Dv3hoeZl.js";import{s as W}from"./slug-BpH-Nkvz.js";import{t as K}from"./transform-btCQtWTl.js";import{S as b}from"./skeleton-D8hFkZOU.js";import{s as Z}from"./safeExternalHref-CkBrsh84.js";import q from"./NotFound-BVs_mdc4.js";import{l as X}from"./LoadFailurePage-qL80B4Za.js";import"./researchTopic-BU8M-7Qo.js";import"./useMutation-Cb0wrKBq.js";import"./plus-VBQCmtt2.js";import"./colors-BkWRhvFI.js";import"./PaperCard-DjlN6X2v.js";import"./AuthorAvatar-DqCnji_B.js";import"./Icon-BADQ_q7j.js";import"./LatexTitle-B0RfzwYI.js";import"./popover-C1A8cBwB.js";import"./useIntersectionObserver-CwCTFEhv.js";import"./useInfiniteQuery-D52ptoDl.js";/* empty css */import"./PaperPreviewLink-CTwxrQQW.js";import"./index-SntObKrh.js";import"./index-B8mUud-W.js";import"./katex-DkKDou_j.js";import"./hover-card-BSWfQepz.js";import"./alert-UfpiwFIJ.js";const t={pink:"#F8D7D9",pinkS:"#D9B0B3",yellow:"#FBEFC2",yellowS:"#C9B97D",orange:"#F8D7B3",orangeS:"#C99466",blue:"#CDE2EE",blueS:"#7FA4BA",purple:"#D4D2EA",purpleS:"#8E8AC0",green:"#CCE2C5",greenS:"#7DA475",ink:"#1A1814",faint:"#8E8678"},n=({x:s,y:r,w:l,h:d,fill:o,stroke:p,label:h,fontSize:c=10})=>e.jsxs("g",{children:[e.jsx("rect",{x:s,y:r,width:l,height:d,rx:"3",ry:"3",fill:o,stroke:p,strokeWidth:"1"}),e.jsx("text",{x:s+l/2,y:r+d/2,fontSize:c,fontFamily:"var(--sans)",fill:t.ink,textAnchor:"middle",dominantBaseline:"middle",children:h})]}),Y=()=>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"]})]}),J=()=>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₂) / τ"})]}),ee=[["my-skill/",""],["├── SKILL.md","# Required: metadata + instructions"],["├── scripts/","# Optional: executable code"],["├── references/","# Optional: documentation"],["├── assets/","# Optional: templates, resources"],["└── ...","# Any additional files or directories"]],te=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Skill package layout"}),e.jsx("rect",{x:"28",y:"48",width:"304",height:"318",rx:"8",fill:"#FFFDF8",stroke:t.faint,strokeWidth:"1"}),ee.map(([s,r],l)=>{const d=92+l*44;return e.jsxs("g",{children:[e.jsx("text",{x:"44",y:d,fontSize:"11",fontFamily:"var(--mono)",fill:t.ink,dominantBaseline:"middle",children:s}),r?e.jsx("text",{x:"138",y:d,fontSize:"8.5",fontFamily:"var(--mono)",fill:t.faint,dominantBaseline:"middle",children:r}):null]},s)})]}),se={attention:Y,"contrastive-learning":J,"agent-skills":te},ae=({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})]}),re=({method:s})=>{const r=(s.slug||"").toLowerCase(),l=se[r];if(l)return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(l,{})});if(s.image_url){const d=r==="transformer"||r==="gpt-4"||r==="gpt-4o"||r==="multi-head-attention"?" method-figure-svg--compact":r==="rpn"?" method-figure-svg--scaled-80":"";return e.jsx("div",{className:`method-figure-svg method-figure-svg--image${d}`,children:e.jsx("img",{className:"method-figure-img",src:s.image_url,alt:`${s.name} figure`})})}return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(ae,{method:s})})},w=720,N=138,x={top:8,right:10,bottom:25,left:36},A=56,le=new Intl.DateTimeFormat("en",{month:"short",year:"2-digit",timeZone:"UTC"}),ie=new Intl.DateTimeFormat("en",{year:"numeric",timeZone:"UTC"}),M=s=>le.format(new Date(`${s}T00:00:00Z`)),ne=(s,r)=>{if(s===0)return new Set;const l=s>48?12:s>36?6:s>18?3:2,d=Math.max(1,Math.ceil(A/r)),o=Math.max(l,d),p=s-1,h=new Set([0,p]);for(let c=o;c=A&&h.add(c);return h},L=s=>{if(s.coverage_status===void 0||["complete","not_applicable"].includes(s.coverage_status))return null;const r=s.processed_paper_count!==void 0&&s.eligible_paper_count!==void 0?`; ${s.processed_paper_count.toLocaleString()} of ${s.eligible_paper_count.toLocaleString()} eligible papers processed`:"";return`Historical tagging ${s.coverage_status==="failed"?"needs retry":"in progress"}${r}`},oe=({history:s,methodName:r})=>{const[l,d]=E.useState(null),o=Math.max(1,...s.map(i=>i.paper_count)),p=w-x.left-x.right,h=N-x.top-x.bottom,c=s.length?p/s.length:p,a=Math.max(2,c*.68),g=ne(s.length,c),j=Array.from(new Set([0,Math.ceil(o/2),o])),f=l==null?null:s[l],y=f?L(f):null;return e.jsxs("div",{className:"method-usage-chart-wrap",children:[e.jsxs("svg",{className:"method-usage-chart",viewBox:`0 0 ${w} ${N}`,role:"group","aria-label":`${r}: papers mentioning this method by publication month`,children:[e.jsxs("title",{children:[r,": papers mentioning this method by publication month"]}),j.map(i=>{const m=x.top+h-i/o*h;return e.jsxs("g",{children:[e.jsx("line",{className:"method-usage-gridline",x1:x.left,x2:w-x.right,y1:m,y2:m}),e.jsx("text",{className:"method-usage-y-label",x:x.left-8,y:m+3,textAnchor:"end",children:i})]},i)}),s.map((i,m)=>{const u=i.paper_count/o*h,S=i.paper_count>0?Math.max(1,u):0,D=x.left+c*m+(c-a)/2,I=x.top+h-S,C=l===m,B=m===s.length-1,F=L(i);return e.jsxs("g",{className:`method-usage-bar${C?" is-active":""}${B?" is-current":""}`,tabIndex:0,role:"img","aria-label":`${M(i.start_date)}: ${i.paper_count} ${i.paper_count===1?"paper":"papers"}${F?`. ${F}`:""}`,onMouseEnter:()=>d(m),onMouseLeave:()=>d(null),onFocus:()=>d(m),onBlur:()=>d(null),children:[e.jsx("rect",{className:"method-usage-bar-hit",x:x.left+c*m,y:x.top,width:c,height:h}),e.jsx("rect",{className:"method-usage-bar-mark",x:D,y:I,width:a,height:S,rx:"1.5"})]},i.start_date)}),s.map((i,m)=>g.has(m)?e.jsx("text",{className:"method-usage-x-label",x:x.left+c*(m+.5),y:N-11,textAnchor:"middle",children:s.length>48?ie.format(new Date(`${i.start_date}T00:00:00Z`)):M(i.start_date)},i.start_date):null)]}),f&&e.jsxs("div",{className:"method-usage-tooltip",role:"status",children:[e.jsx("strong",{children:M(f.start_date)}),e.jsxs("span",{children:[f.paper_count," ",f.paper_count===1?"paper":"papers",l===s.length-1?" · month to date":""]}),e.jsxs("span",{children:[(f.catalog_share??0).toFixed(2),"% of"," ",(f.catalog_paper_count??0).toLocaleString()," catalog papers"]}),y&&e.jsx("span",{children:y})]})]})},ce=new Set(["grokking","latent-reasoning","world-action-models","continuous-language-model"]),$e=()=>{var y,i,m;const{methodSlug:s}=P(),r=V({defaultToLastMonth:!0}),l=k(v.method(s)),d=k({...v.areas(),enabled:!!((y=l.data)!=null&&y.area_id)}),o=k(v.methodTrend(s)),p=Q($.method(s,r.filters),u=>T.forMethod(s,{...r.filters,page:u,page_size:20,repository_limit:1}),{enabled:!!s}),h=k(v.relatedMethods(s)),c=E.useMemo(()=>{var u;return((u=p.data)==null?void 0:u.pages.flatMap(S=>S.results.map(K)))??[]},[p.data]);if(l.isLoading)return e.jsxs("div",{className:"page",children:[e.jsx(b,{className:"h-12 w-1/2 mb-4"}),e.jsx(b,{className:"h-64 w-full"})]});if(!l.data)return X([l.error],"Failed to load this method. Please try again.")??e.jsx(q,{});const a=l.data,g=(i=d.data)==null?void 0:i.results.find(u=>u.id===a.area_id),j=U(a.source_url),f=j?null:Z(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${ce.has(a.slug)?" method-hero-grid--wide-figure":""}`,children:[e.jsxs("div",{children:[e.jsx("div",{className:"tag-hero-eyebrow",children:"METHOD"}),e.jsx("h1",{className:"tag-hero-title method-hero-title",children:a.name}),e.jsx(H,{kind:"method",entityId:a.id}),a.full_name&&!a.name.includes(a.full_name)&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontSize:16,fontStyle:"italic",color:"var(--ink-soft)",marginTop:8},children:a.full_name}),a.description&&e.jsx(z,{className:"method-description",text:a.description}),a.source_url&&a.source_title&&e.jsxs("div",{className:"method-source",children:[e.jsx("span",{className:"method-source-label",children:"Source"}),j?e.jsxs(_,{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(b,{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(oe,{history:o.data.history,methodName:a.name})]}):null]}),e.jsxs("figure",{className:"method-figure-card",children:[e.jsx(re,{method:a}),a.image_credit&&e.jsx("figcaption",{children:e.jsx(z,{className:"method-image-credit",text:a.image_credit})})]})]}),(((m=h.data)==null?void 0:m.results.length)??0)>0&&e.jsxs("div",{className:"filter-row",children:[e.jsx("span",{className:"label",children:"Related methods"}),h.data.results.map(u=>e.jsx(R,{method:{slug:u.slug,name:u.name}},u.id))]}),e.jsx(G,{feed:r,children:e.jsxs("div",{className:"results-count",children:[c.length," papers mentioning ",a.name]})}),e.jsx(O,{query:p,cards:c,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{$e as default}; +import{j as e,i as E,u as P,b as k,v,B as T,w as $,L as _}from"./index-DMjO_toh.js";import{R as H}from"./ResearchFollowButton-BCRaiBQA.js";import{M as R}from"./SotaBadges-CHGUskQn.js";import{b as V,u as Q,c as G,P as O}from"./usePapers-DCcqZCMM.js";import{r as U,M as z}from"./MarkdownText-PyDBRK4a.js";import{s as W}from"./slug-BpH-Nkvz.js";import{t as K}from"./transform-CXoeFMaW.js";import{S as b}from"./skeleton-DiGWALrs.js";import{s as Z}from"./safeExternalHref-CkBrsh84.js";import q from"./NotFound-E4uwO9V5.js";import{l as X}from"./LoadFailurePage-BIYmxtFy.js";import"./researchTopic-hhMPs4g3.js";import"./useMutation-Db093XSk.js";import"./plus-B4ZP41Rg.js";import"./colors-BkWRhvFI.js";import"./PaperCard-CUJXx9SW.js";import"./AuthorAvatar-DFoIK6Bc.js";import"./Icon-D5cUFATZ.js";import"./LatexTitle-BRJTz_K0.js";import"./popover-MF6JD1Yi.js";import"./useIntersectionObserver-CU-1-_ok.js";import"./useInfiniteQuery-C91fE_fV.js";/* empty css */import"./PaperPreviewLink-DvyVialT.js";import"./index-ruElXN5Q.js";import"./index-BCW47Vvr.js";import"./katex-DkKDou_j.js";import"./hover-card-D4j7S6P3.js";import"./alert-B2i0PAyW.js";const t={pink:"#F8D7D9",pinkS:"#D9B0B3",yellow:"#FBEFC2",yellowS:"#C9B97D",orange:"#F8D7B3",orangeS:"#C99466",blue:"#CDE2EE",blueS:"#7FA4BA",purple:"#D4D2EA",purpleS:"#8E8AC0",green:"#CCE2C5",greenS:"#7DA475",ink:"#1A1814",faint:"#8E8678"},n=({x:s,y:r,w:l,h:d,fill:o,stroke:p,label:h,fontSize:c=10})=>e.jsxs("g",{children:[e.jsx("rect",{x:s,y:r,width:l,height:d,rx:"3",ry:"3",fill:o,stroke:p,strokeWidth:"1"}),e.jsx("text",{x:s+l/2,y:r+d/2,fontSize:c,fontFamily:"var(--sans)",fill:t.ink,textAnchor:"middle",dominantBaseline:"middle",children:h})]}),Y=()=>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"]})]}),J=()=>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₂) / τ"})]}),ee=[["my-skill/",""],["├── SKILL.md","# Required: metadata + instructions"],["├── scripts/","# Optional: executable code"],["├── references/","# Optional: documentation"],["├── assets/","# Optional: templates, resources"],["└── ...","# Any additional files or directories"]],te=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Skill package layout"}),e.jsx("rect",{x:"28",y:"48",width:"304",height:"318",rx:"8",fill:"#FFFDF8",stroke:t.faint,strokeWidth:"1"}),ee.map(([s,r],l)=>{const d=92+l*44;return e.jsxs("g",{children:[e.jsx("text",{x:"44",y:d,fontSize:"11",fontFamily:"var(--mono)",fill:t.ink,dominantBaseline:"middle",children:s}),r?e.jsx("text",{x:"138",y:d,fontSize:"8.5",fontFamily:"var(--mono)",fill:t.faint,dominantBaseline:"middle",children:r}):null]},s)})]}),se={attention:Y,"contrastive-learning":J,"agent-skills":te},ae=({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})]}),re=({method:s})=>{const r=(s.slug||"").toLowerCase(),l=se[r];if(l)return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(l,{})});if(s.image_url){const d=r==="transformer"||r==="gpt-4"||r==="gpt-4o"||r==="multi-head-attention"?" method-figure-svg--compact":r==="rpn"?" method-figure-svg--scaled-80":"";return e.jsx("div",{className:`method-figure-svg method-figure-svg--image${d}`,children:e.jsx("img",{className:"method-figure-img",src:s.image_url,alt:`${s.name} figure`})})}return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(ae,{method:s})})},w=720,N=138,x={top:8,right:10,bottom:25,left:36},A=56,le=new Intl.DateTimeFormat("en",{month:"short",year:"2-digit",timeZone:"UTC"}),ie=new Intl.DateTimeFormat("en",{year:"numeric",timeZone:"UTC"}),M=s=>le.format(new Date(`${s}T00:00:00Z`)),ne=(s,r)=>{if(s===0)return new Set;const l=s>48?12:s>36?6:s>18?3:2,d=Math.max(1,Math.ceil(A/r)),o=Math.max(l,d),p=s-1,h=new Set([0,p]);for(let c=o;c=A&&h.add(c);return h},L=s=>{if(s.coverage_status===void 0||["complete","not_applicable"].includes(s.coverage_status))return null;const r=s.processed_paper_count!==void 0&&s.eligible_paper_count!==void 0?`; ${s.processed_paper_count.toLocaleString()} of ${s.eligible_paper_count.toLocaleString()} eligible papers processed`:"";return`Historical tagging ${s.coverage_status==="failed"?"needs retry":"in progress"}${r}`},oe=({history:s,methodName:r})=>{const[l,d]=E.useState(null),o=Math.max(1,...s.map(i=>i.paper_count)),p=w-x.left-x.right,h=N-x.top-x.bottom,c=s.length?p/s.length:p,a=Math.max(2,c*.68),g=ne(s.length,c),j=Array.from(new Set([0,Math.ceil(o/2),o])),f=l==null?null:s[l],y=f?L(f):null;return e.jsxs("div",{className:"method-usage-chart-wrap",children:[e.jsxs("svg",{className:"method-usage-chart",viewBox:`0 0 ${w} ${N}`,role:"group","aria-label":`${r}: papers mentioning this method by publication month`,children:[e.jsxs("title",{children:[r,": papers mentioning this method by publication month"]}),j.map(i=>{const m=x.top+h-i/o*h;return e.jsxs("g",{children:[e.jsx("line",{className:"method-usage-gridline",x1:x.left,x2:w-x.right,y1:m,y2:m}),e.jsx("text",{className:"method-usage-y-label",x:x.left-8,y:m+3,textAnchor:"end",children:i})]},i)}),s.map((i,m)=>{const u=i.paper_count/o*h,S=i.paper_count>0?Math.max(1,u):0,D=x.left+c*m+(c-a)/2,I=x.top+h-S,C=l===m,B=m===s.length-1,F=L(i);return e.jsxs("g",{className:`method-usage-bar${C?" is-active":""}${B?" is-current":""}`,tabIndex:0,role:"img","aria-label":`${M(i.start_date)}: ${i.paper_count} ${i.paper_count===1?"paper":"papers"}${F?`. ${F}`:""}`,onMouseEnter:()=>d(m),onMouseLeave:()=>d(null),onFocus:()=>d(m),onBlur:()=>d(null),children:[e.jsx("rect",{className:"method-usage-bar-hit",x:x.left+c*m,y:x.top,width:c,height:h}),e.jsx("rect",{className:"method-usage-bar-mark",x:D,y:I,width:a,height:S,rx:"1.5"})]},i.start_date)}),s.map((i,m)=>g.has(m)?e.jsx("text",{className:"method-usage-x-label",x:x.left+c*(m+.5),y:N-11,textAnchor:"middle",children:s.length>48?ie.format(new Date(`${i.start_date}T00:00:00Z`)):M(i.start_date)},i.start_date):null)]}),f&&e.jsxs("div",{className:"method-usage-tooltip",role:"status",children:[e.jsx("strong",{children:M(f.start_date)}),e.jsxs("span",{children:[f.paper_count," ",f.paper_count===1?"paper":"papers",l===s.length-1?" · month to date":""]}),e.jsxs("span",{children:[(f.catalog_share??0).toFixed(2),"% of"," ",(f.catalog_paper_count??0).toLocaleString()," catalog papers"]}),y&&e.jsx("span",{children:y})]})]})},ce=new Set(["grokking","latent-reasoning","world-action-models","continuous-language-model"]),$e=()=>{var y,i,m;const{methodSlug:s}=P(),r=V({defaultToLastMonth:!0}),l=k(v.method(s)),d=k({...v.areas(),enabled:!!((y=l.data)!=null&&y.area_id)}),o=k(v.methodTrend(s)),p=Q($.method(s,r.filters),u=>T.forMethod(s,{...r.filters,page:u,page_size:20,repository_limit:1}),{enabled:!!s}),h=k(v.relatedMethods(s)),c=E.useMemo(()=>{var u;return((u=p.data)==null?void 0:u.pages.flatMap(S=>S.results.map(K)))??[]},[p.data]);if(l.isLoading)return e.jsxs("div",{className:"page",children:[e.jsx(b,{className:"h-12 w-1/2 mb-4"}),e.jsx(b,{className:"h-64 w-full"})]});if(!l.data)return X([l.error],"Failed to load this method. Please try again.")??e.jsx(q,{});const a=l.data,g=(i=d.data)==null?void 0:i.results.find(u=>u.id===a.area_id),j=U(a.source_url),f=j?null:Z(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${ce.has(a.slug)?" method-hero-grid--wide-figure":""}`,children:[e.jsxs("div",{children:[e.jsx("div",{className:"tag-hero-eyebrow",children:"METHOD"}),e.jsx("h1",{className:"tag-hero-title method-hero-title",children:a.name}),e.jsx(H,{kind:"method",entityId:a.id}),a.full_name&&!a.name.includes(a.full_name)&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontSize:16,fontStyle:"italic",color:"var(--ink-soft)",marginTop:8},children:a.full_name}),a.description&&e.jsx(z,{className:"method-description",text:a.description}),a.source_url&&a.source_title&&e.jsxs("div",{className:"method-source",children:[e.jsx("span",{className:"method-source-label",children:"Source"}),j?e.jsxs(_,{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(b,{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(oe,{history:o.data.history,methodName:a.name})]}):null]}),e.jsxs("figure",{className:"method-figure-card",children:[e.jsx(re,{method:a}),a.image_credit&&e.jsx("figcaption",{children:e.jsx(z,{className:"method-image-credit",text:a.image_credit})})]})]}),(((m=h.data)==null?void 0:m.results.length)??0)>0&&e.jsxs("div",{className:"filter-row",children:[e.jsx("span",{className:"label",children:"Related methods"}),h.data.results.map(u=>e.jsx(R,{method:{slug:u.slug,name:u.name}},u.id))]}),e.jsx(G,{feed:r,children:e.jsxs("div",{className:"results-count",children:[c.length," papers mentioning ",a.name]})}),e.jsx(O,{query:p,cards:c,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{$e as default}; diff --git a/assets/MethodsIndexView-CKdiTTbz.js b/assets/MethodsIndexView-oQRuQvC5.js similarity index 79% rename from assets/MethodsIndexView-CKdiTTbz.js rename to assets/MethodsIndexView-oQRuQvC5.js index 5a11e94db14191239853644b472635fc3a0578db..2a0777252c351133d8c570f1740acf2b4384349b 100644 --- a/assets/MethodsIndexView-CKdiTTbz.js +++ b/assets/MethodsIndexView-oQRuQvC5.js @@ -1,4 +1,4 @@ -import{d as f,b as c,v as l,i as m,j as s,L as _}from"./index-C1Xuuz1Y.js";import{s as y}from"./areas-Dvi8w2dp.js";import{s as v}from"./slug-BpH-Nkvz.js";import{A as N,a as L}from"./alert-UfpiwFIJ.js";import{A as M,a as A}from"./AreaSection-CJqBHh3n.js";import{T as S}from"./TaxonomySuggestionTile-BjF2aVUk.js";import{u as T,T as F}from"./useHashScrollOnReady-DmDIxpQA.js";import"./skeleton-D8hFkZOU.js";import"./SignInToEditDialog-DkoRRdng.js";import"./button-DMLWlhJJ.js";import"./input-DJqx9Wtu.js";import"./textarea--CThIdhF.js";import"./searchable-select-DPAXOMOd.js";import"./popover-C1A8cBwB.js";import"./dialog-CCU_33Ju.js";import"./search-YolWz-tq.js";import"./loader-circle-tzO1dF92.js";import"./useMutation-Cb0wrKBq.js";import"./submissions-DcU5ZqyQ.js";import"./plus-VBQCmtt2.js";import"./trending-up-Dmgkbga2.js";/** +import{d as f,b as c,v as l,i as m,j as s,L as _}from"./index-DMjO_toh.js";import{s as y}from"./areas-Dvi8w2dp.js";import{s as v}from"./slug-BpH-Nkvz.js";import{A as N,a as L}from"./alert-B2i0PAyW.js";import{A as M,a as A}from"./AreaSection-BdgwTHWx.js";import{T as S}from"./TaxonomySuggestionTile-CU-KualO.js";import{u as T,T as F}from"./useHashScrollOnReady-C5GDmlDb.js";import"./skeleton-DiGWALrs.js";import"./SignInToEditDialog-BIKQbaVj.js";import"./button-BGphIht2.js";import"./input-BzpOTl46.js";import"./textarea-nRN8oSDz.js";import"./searchable-select-DscHfpAa.js";import"./popover-MF6JD1Yi.js";import"./dialog-C-drkhvX.js";import"./search-D6uSAb1U.js";import"./loader-circle-gyMLnt4Y.js";import"./useMutation-Db093XSk.js";import"./submissions-C02Zu9zt.js";import"./plus-B4ZP41Rg.js";import"./trending-up-DRI2hJAf.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/NotFound-BVs_mdc4.js b/assets/NotFound-E4uwO9V5.js similarity index 89% rename from assets/NotFound-BVs_mdc4.js rename to assets/NotFound-E4uwO9V5.js index b3d3e0082f6f1409da7e5cee4fcc99e3183054c3..cee5b2b154404c7aa3ced1875c27b1119a5cb706 100644 --- a/assets/NotFound-BVs_mdc4.js +++ b/assets/NotFound-E4uwO9V5.js @@ -1 +1 @@ -import{q as o,i as s,j as t,L as a}from"./index-C1Xuuz1Y.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{q as o,i as s,j as t,L as a}from"./index-DMjO_toh.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-IO2x3ESF.js b/assets/OrganizationContributionGraph-RQt-m7Ns.js similarity index 96% rename from assets/OrganizationContributionGraph-IO2x3ESF.js rename to assets/OrganizationContributionGraph-RQt-m7Ns.js index 097b70cd40abf6d8ad3fdb3dd06f47a5250bdfcb..01feaf2f26b6a526166e90783db4197a21bc117a 100644 --- a/assets/OrganizationContributionGraph-IO2x3ESF.js +++ b/assets/OrganizationContributionGraph-RQt-m7Ns.js @@ -1 +1 @@ -import{i as b,j as o,b as z,v as T}from"./index-C1Xuuz1Y.js";import{S as v}from"./skeleton-D8hFkZOU.js";const x=24*60*60*1e3,f=12,w=3,N=new Map([[1,"Mon"],[3,"Wed"],[5,"Fri"]]),$=n=>new Date(`${n}T00:00:00Z`),S=n=>n.toISOString().slice(0,10),_=(n,a)=>{if(n===0)return 0;const i=a.findIndex(s=>n<=s);return i===-1?4:i+1},y=n=>{const a=$(n.start_date),i=$(n.end_date),s=new Date(a.getTime()-a.getUTCDay()*x),m=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<=m.getTime();e+=x){const g=new Date(e),d=S(g),h=e>=a.getTime()&&e<=i.getTime(),C=h?p.get(d)??0:0;l.push({key:d,date:g,count:C,inRange:h,level:_(C,c)})}const t=l.length/7,r=[];let j=-1;for(let e=0;eh.inRange&&(e===0||h.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 m=b.useRef(null),{days:p,months:u,weekCount:c}=b.useMemo(()=>y(n),[n]),l=c*f+(c-1)*w;return b.useEffect(()=>{const t=m.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:m,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:N.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"})]})]})},E=({organizationSlug:n,organizationName:a})=>{const i=z(T.organizationContributions(n));return i.isLoading?o.jsx(v,{className:"organization-contributions-skeleton"}):i.data?o.jsx(D,{data:i.data,organizationName:a}):null};export{D as C,E as O}; +import{i as b,j as o,b as z,v as T}from"./index-DMjO_toh.js";import{S as v}from"./skeleton-DiGWALrs.js";const x=24*60*60*1e3,f=12,w=3,N=new Map([[1,"Mon"],[3,"Wed"],[5,"Fri"]]),$=n=>new Date(`${n}T00:00:00Z`),S=n=>n.toISOString().slice(0,10),_=(n,a)=>{if(n===0)return 0;const i=a.findIndex(s=>n<=s);return i===-1?4:i+1},y=n=>{const a=$(n.start_date),i=$(n.end_date),s=new Date(a.getTime()-a.getUTCDay()*x),m=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<=m.getTime();e+=x){const g=new Date(e),d=S(g),h=e>=a.getTime()&&e<=i.getTime(),C=h?p.get(d)??0:0;l.push({key:d,date:g,count:C,inRange:h,level:_(C,c)})}const t=l.length/7,r=[];let j=-1;for(let e=0;eh.inRange&&(e===0||h.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 m=b.useRef(null),{days:p,months:u,weekCount:c}=b.useMemo(()=>y(n),[n]),l=c*f+(c-1)*w;return b.useEffect(()=>{const t=m.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:m,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:N.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"})]})]})},E=({organizationSlug:n,organizationName:a})=>{const i=z(T.organizationContributions(n));return i.isLoading?o.jsx(v,{className:"organization-contributions-skeleton"}):i.data?o.jsx(D,{data:i.data,organizationName:a}):null};export{D as C,E as O}; diff --git a/assets/OrganizationDetailView-3jQLAskn.js b/assets/OrganizationDetailView-D7onRyJK.js similarity index 77% rename from assets/OrganizationDetailView-3jQLAskn.js rename to assets/OrganizationDetailView-D7onRyJK.js index 318346926fd3a6a20d07cf2a8e98c64908183316..3a2435b1ed9a204769b19ef9df214d0fe9a33a09 100644 --- a/assets/OrganizationDetailView-3jQLAskn.js +++ b/assets/OrganizationDetailView-D7onRyJK.js @@ -1 +1 @@ -import{n as C,i as d,b as y,B as z,w as Q,m as I,j as a,L as F,v as L,u as E}from"./index-C1Xuuz1Y.js";import{R}from"./ResearchFollowButton-9sh3MNHN.js";import{M as q}from"./MarkdownText-Dv3hoeZl.js";import{O as B}from"./OrganizationContributionGraph-IO2x3ESF.js";import{b as G,u as H,c as S,P as W}from"./usePapers-DzSHAOm5.js";import{S as K}from"./searchable-select-DPAXOMOd.js";import{S as D}from"./skeleton-D8hFkZOU.js";import{d as v,t as U}from"./transform-btCQtWTl.js";import{o as V,i as Z}from"./organizationNames-BVKzYEBp.js";import k from"./NotFound-BVs_mdc4.js";import{l as J}from"./LoadFailurePage-qL80B4Za.js";import"./researchTopic-BU8M-7Qo.js";import"./useMutation-Cb0wrKBq.js";import"./plus-VBQCmtt2.js";/* empty css */import"./PaperPreviewLink-CTwxrQQW.js";import"./index-SntObKrh.js";import"./index-B8mUud-W.js";import"./katex-DkKDou_j.js";import"./hover-card-BSWfQepz.js";import"./PaperCard-DjlN6X2v.js";import"./AuthorAvatar-DqCnji_B.js";import"./SotaBadges-B5MVNUr2.js";import"./colors-BkWRhvFI.js";import"./Icon-BADQ_q7j.js";import"./LatexTitle-B0RfzwYI.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-C1A8cBwB.js";import"./useIntersectionObserver-CwCTFEhv.js";import"./useInfiniteQuery-D52ptoDl.js";import"./button-DMLWlhJJ.js";import"./dialog-CCU_33Ju.js";import"./search-YolWz-tq.js";import"./loader-circle-tzO1dF92.js";import"./alert-UfpiwFIJ.js";const X=({organizationSlug:t,taskSlug:n})=>{var x,_,j,b,N;const P=C(),c=G({defaultToLastMonth:!0}),{searchParams:$}=c,[w,h]=d.useState(!1),u=y(L.organization(t)),l=y(L.organizationAreasWithTasks(t)),p=H(Q.organization(t,n,c.filters),s=>z.forOrganization(t,{...c.filters,task:n,page:s,page_size:12}),{enabled:!!t});d.useEffect(()=>{h(!1)},[t,n]);const g=d.useMemo(()=>{var s;return(((s=l.data)==null?void 0:s.results)??[]).flatMap(o=>o.tasks.filter(r=>!!r.slug).map(r=>({...r,slug:r.slug,label:v(r.name,r.slug)})))},[l.data]),i=g.find(s=>s.slug===n),O=d.useMemo(()=>{var s;return(((s=p.data)==null?void 0:s.pages)??[]).flatMap(o=>o.results.map(U))},[p.data]),e=u.data??((x=l.data)==null?void 0:x.organization),m=e?V(e):null,M=((j=(_=p.data)==null?void 0:_.pages[0])==null?void 0:j.count)??0;if(I(u.error))return a.jsx(k,{});const f=J([l.error,p.error],"Failed to load organization papers. Please try again.");if(f)return f;const T=s=>{const o=s.trim().toLocaleLowerCase();return g.filter(r=>`${r.label} ${r.slug}`.toLocaleLowerCase().includes(o)).map(r=>({value:r.slug,label:r.label,description:`${r.paper_count.toLocaleString()} ${r.paper_count===1?"paper":"papers"}`}))},A=s=>{const o=s==="__all__"?`/orgs/${t}`:`/orgs/${t}/${s}`,r=$.toString();P({pathname:o,search:r?`?${r}`:""})};return a.jsxs("div",{className:"page",children:[a.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[a.jsx(F,{to:"/",children:"Home"}),a.jsx("span",{children:" / "}),a.jsx(F,{to:"/organizations",children:"Organizations"}),a.jsx("span",{children:" / "}),a.jsx("span",{children:(e==null?void 0:e.name)??t}),i&&a.jsxs(a.Fragment,{children:[a.jsx("span",{children:" / "}),a.jsx("span",{children:v(i.name,i.slug)})]})]}),a.jsxs("header",{className:"organization-hero",children:[a.jsxs("div",{className:"organization-hero-profile",children:[a.jsx("div",{className:"organizations-eyebrow",children:"ORGANIZATION"}),a.jsxs("h1",{className:`feed-title organization-hero-title${e&&!m&&Z(e.name)?" organization-hero-title--long":""}`,children:[e!=null&&e.logo_url&&!w?a.jsx("img",{src:e.logo_url,alt:"",width:58,height:58,onError:()=>h(!0)}):e?a.jsx("span",{className:"organization-hero-monogram","aria-hidden":"true",children:(m??e.name).slice(0,1).toUpperCase()}):null,e?a.jsxs("span",{className:"organization-hero-name",children:[m??e.name,m&&a.jsx("span",{className:"organization-hero-full-name",children:e.name})]}):a.jsx(D,{className:"h-12 w-64"})]}),e&&a.jsx(R,{kind:"organization",entityId:e.id}),e&&a.jsxs("div",{className:"feed-subtitle",children:[((b=e.paper_count)==null?void 0:b.toLocaleString())??0," papers",(e.organization_trending_score??0)>0&&e.trending_rank&&a.jsxs(a.Fragment,{children:[" · #",e.trending_rank," trending this month"]})]}),(e==null?void 0:e.description)&&a.jsx(q,{className:"method-description",text:e.description}),e&&a.jsxs("div",{className:"organization-hero-links",children:[e.website_url&&a.jsx("a",{href:e.website_url,target:"_blank",rel:"noreferrer",children:"Website ↗"}),e.hf_url&&a.jsx("a",{href:e.hf_url,target:"_blank",rel:"noreferrer",children:"Hugging Face ↗"}),e.github_url&&a.jsx("a",{href:e.github_url,target:"_blank",rel:"noreferrer",children:"GitHub ↗"})]})]}),a.jsx(B,{organizationSlug:t,organizationName:(e==null?void 0:e.name)??t})]}),a.jsx(S,{feed:c,style:{alignItems:"center",gap:16},leading:a.jsx("div",{style:{minWidth:260},children:a.jsx(K,{value:n??"__all__",onChange:A,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:`${((N=e==null?void 0:e.paper_count)==null?void 0:N.toLocaleString())??0} papers`},queryKey:["organization-task-options",t],queryFn:async s=>{var o;return[{value:"__all__",label:"All tasks",description:`${((o=e==null?void 0:e.paper_count)==null?void 0:o.toLocaleString())??0} papers`},...T(s)]},enabled:!l.isLoading,className:"h-[38px]"})}),children:a.jsxs("div",{className:"results-count",children:[M.toLocaleString()," papers"]})}),a.jsx(W,{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."})]})},Ce=()=>{const{orgSlug:t,taskSlug:n}=E();return t?a.jsx(X,{organizationSlug:t,taskSlug:n}):a.jsx(k,{})};export{Ce as default}; +import{n as C,i as d,b as y,B as z,w as Q,m as I,j as a,L as F,v as L,u as E}from"./index-DMjO_toh.js";import{R}from"./ResearchFollowButton-BCRaiBQA.js";import{M as q}from"./MarkdownText-PyDBRK4a.js";import{O as B}from"./OrganizationContributionGraph-RQt-m7Ns.js";import{b as G,u as H,c as S,P as W}from"./usePapers-DCcqZCMM.js";import{S as K}from"./searchable-select-DscHfpAa.js";import{S as D}from"./skeleton-DiGWALrs.js";import{d as v,t as U}from"./transform-CXoeFMaW.js";import{o as V,i as Z}from"./organizationNames-BVKzYEBp.js";import k from"./NotFound-E4uwO9V5.js";import{l as J}from"./LoadFailurePage-BIYmxtFy.js";import"./researchTopic-hhMPs4g3.js";import"./useMutation-Db093XSk.js";import"./plus-B4ZP41Rg.js";/* empty css */import"./PaperPreviewLink-DvyVialT.js";import"./index-ruElXN5Q.js";import"./index-BCW47Vvr.js";import"./katex-DkKDou_j.js";import"./hover-card-D4j7S6P3.js";import"./PaperCard-CUJXx9SW.js";import"./AuthorAvatar-DFoIK6Bc.js";import"./SotaBadges-CHGUskQn.js";import"./colors-BkWRhvFI.js";import"./Icon-D5cUFATZ.js";import"./LatexTitle-BRJTz_K0.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-MF6JD1Yi.js";import"./useIntersectionObserver-CU-1-_ok.js";import"./useInfiniteQuery-C91fE_fV.js";import"./button-BGphIht2.js";import"./dialog-C-drkhvX.js";import"./search-D6uSAb1U.js";import"./loader-circle-gyMLnt4Y.js";import"./alert-B2i0PAyW.js";const X=({organizationSlug:t,taskSlug:n})=>{var x,_,j,b,N;const P=C(),c=G({defaultToLastMonth:!0}),{searchParams:$}=c,[w,h]=d.useState(!1),u=y(L.organization(t)),l=y(L.organizationAreasWithTasks(t)),p=H(Q.organization(t,n,c.filters),s=>z.forOrganization(t,{...c.filters,task:n,page:s,page_size:12}),{enabled:!!t});d.useEffect(()=>{h(!1)},[t,n]);const g=d.useMemo(()=>{var s;return(((s=l.data)==null?void 0:s.results)??[]).flatMap(o=>o.tasks.filter(r=>!!r.slug).map(r=>({...r,slug:r.slug,label:v(r.name,r.slug)})))},[l.data]),i=g.find(s=>s.slug===n),O=d.useMemo(()=>{var s;return(((s=p.data)==null?void 0:s.pages)??[]).flatMap(o=>o.results.map(U))},[p.data]),e=u.data??((x=l.data)==null?void 0:x.organization),m=e?V(e):null,M=((j=(_=p.data)==null?void 0:_.pages[0])==null?void 0:j.count)??0;if(I(u.error))return a.jsx(k,{});const f=J([l.error,p.error],"Failed to load organization papers. Please try again.");if(f)return f;const T=s=>{const o=s.trim().toLocaleLowerCase();return g.filter(r=>`${r.label} ${r.slug}`.toLocaleLowerCase().includes(o)).map(r=>({value:r.slug,label:r.label,description:`${r.paper_count.toLocaleString()} ${r.paper_count===1?"paper":"papers"}`}))},A=s=>{const o=s==="__all__"?`/orgs/${t}`:`/orgs/${t}/${s}`,r=$.toString();P({pathname:o,search:r?`?${r}`:""})};return a.jsxs("div",{className:"page",children:[a.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[a.jsx(F,{to:"/",children:"Home"}),a.jsx("span",{children:" / "}),a.jsx(F,{to:"/organizations",children:"Organizations"}),a.jsx("span",{children:" / "}),a.jsx("span",{children:(e==null?void 0:e.name)??t}),i&&a.jsxs(a.Fragment,{children:[a.jsx("span",{children:" / "}),a.jsx("span",{children:v(i.name,i.slug)})]})]}),a.jsxs("header",{className:"organization-hero",children:[a.jsxs("div",{className:"organization-hero-profile",children:[a.jsx("div",{className:"organizations-eyebrow",children:"ORGANIZATION"}),a.jsxs("h1",{className:`feed-title organization-hero-title${e&&!m&&Z(e.name)?" organization-hero-title--long":""}`,children:[e!=null&&e.logo_url&&!w?a.jsx("img",{src:e.logo_url,alt:"",width:58,height:58,onError:()=>h(!0)}):e?a.jsx("span",{className:"organization-hero-monogram","aria-hidden":"true",children:(m??e.name).slice(0,1).toUpperCase()}):null,e?a.jsxs("span",{className:"organization-hero-name",children:[m??e.name,m&&a.jsx("span",{className:"organization-hero-full-name",children:e.name})]}):a.jsx(D,{className:"h-12 w-64"})]}),e&&a.jsx(R,{kind:"organization",entityId:e.id}),e&&a.jsxs("div",{className:"feed-subtitle",children:[((b=e.paper_count)==null?void 0:b.toLocaleString())??0," papers",(e.organization_trending_score??0)>0&&e.trending_rank&&a.jsxs(a.Fragment,{children:[" · #",e.trending_rank," trending this month"]})]}),(e==null?void 0:e.description)&&a.jsx(q,{className:"method-description",text:e.description}),e&&a.jsxs("div",{className:"organization-hero-links",children:[e.website_url&&a.jsx("a",{href:e.website_url,target:"_blank",rel:"noreferrer",children:"Website ↗"}),e.hf_url&&a.jsx("a",{href:e.hf_url,target:"_blank",rel:"noreferrer",children:"Hugging Face ↗"}),e.github_url&&a.jsx("a",{href:e.github_url,target:"_blank",rel:"noreferrer",children:"GitHub ↗"})]})]}),a.jsx(B,{organizationSlug:t,organizationName:(e==null?void 0:e.name)??t})]}),a.jsx(S,{feed:c,style:{alignItems:"center",gap:16},leading:a.jsx("div",{style:{minWidth:260},children:a.jsx(K,{value:n??"__all__",onChange:A,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:`${((N=e==null?void 0:e.paper_count)==null?void 0:N.toLocaleString())??0} papers`},queryKey:["organization-task-options",t],queryFn:async s=>{var o;return[{value:"__all__",label:"All tasks",description:`${((o=e==null?void 0:e.paper_count)==null?void 0:o.toLocaleString())??0} papers`},...T(s)]},enabled:!l.isLoading,className:"h-[38px]"})}),children:a.jsxs("div",{className:"results-count",children:[M.toLocaleString()," papers"]})}),a.jsx(W,{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."})]})},Ce=()=>{const{orgSlug:t,taskSlug:n}=E();return t?a.jsx(X,{organizationSlug:t,taskSlug:n}):a.jsx(k,{})};export{Ce as default}; diff --git a/assets/OrganizationsIndexView-DLszWG1v.js b/assets/OrganizationsIndexView-Bmjo7Cen.js similarity index 97% rename from assets/OrganizationsIndexView-DLszWG1v.js rename to assets/OrganizationsIndexView-Bmjo7Cen.js index 6c8458c598d7166fdd8bfa766cfc02e16dd103b9..ad80c34b93ce86b4f21d15d79385221afa901f41 100644 --- a/assets/OrganizationsIndexView-DLszWG1v.js +++ b/assets/OrganizationsIndexView-Bmjo7Cen.js @@ -1 +1 @@ -import{f as m,b as x,i as g,j as e,L as j,v as u}from"./index-C1Xuuz1Y.js";import{A as N,a as y}from"./alert-UfpiwFIJ.js";const f=n=>n==="papers"||n==="name"?n:"trending",_=({organization:n})=>{const[d,i]=g.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)})})},k=()=>{const[n,d]=m(),i=f(n.get("sort")),c=n.get("q")??"",o=x(u.organizationIndex()),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)},h=g.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(y,{children:["Failed to load organizations."," ",e.jsx("button",{type:"button",onClick:()=>o.refetch(),children:"Try again"})]})}):h.length===0?e.jsxs("div",{className:"organizations-empty",children:["No organizations match “",c,"”."]}):e.jsx("div",{className:"organizations-grid",children:h.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(j,{to:`/orgs/${s.slug}`,className:"organization-card","aria-label":a?`Browse ${a.toLocaleString()} ${s.name} papers`:`Browse ${s.name} papers`,children:[e.jsxs("div",{className:"organization-card-header",children:[e.jsx(_,{organization:s}),e.jsxs("div",{children:[e.jsx("h3",{children:s.name}),e.jsxs("span",{children:["@",s.hf_slug??s.slug]})]})]}),e.jsxs("div",{className:"organization-card-metrics",children:[e.jsx("strong",{children:a.toLocaleString()}),e.jsx("span",{children:a===1?"paper":"papers"}),i==="trending"&&s.trending_rank&&e.jsxs("span",{className:"organization-rank",children:["#",s.trending_rank]})]}),e.jsxs("div",{className:"organization-highlight",children:[e.jsx("span",{children:"Trending paper"}),e.jsx("strong",{children:((r=s.top_trending_paper)==null?void 0:r.title)??"No papers indexed yet"})]}),e.jsxs("div",{className:"organization-card-footer",children:[t?`Publishing ${t}`:"Research archive ready",e.jsx("span",{"aria-hidden":"true",children:"↗"})]})]},s.id)})})]})]})};export{k as default}; +import{f as m,b as x,i as g,j as e,L as j,v as u}from"./index-DMjO_toh.js";import{A as N,a as y}from"./alert-B2i0PAyW.js";const f=n=>n==="papers"||n==="name"?n:"trending",_=({organization:n})=>{const[d,i]=g.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)})})},k=()=>{const[n,d]=m(),i=f(n.get("sort")),c=n.get("q")??"",o=x(u.organizationIndex()),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)},h=g.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(y,{children:["Failed to load organizations."," ",e.jsx("button",{type:"button",onClick:()=>o.refetch(),children:"Try again"})]})}):h.length===0?e.jsxs("div",{className:"organizations-empty",children:["No organizations match “",c,"”."]}):e.jsx("div",{className:"organizations-grid",children:h.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(j,{to:`/orgs/${s.slug}`,className:"organization-card","aria-label":a?`Browse ${a.toLocaleString()} ${s.name} papers`:`Browse ${s.name} papers`,children:[e.jsxs("div",{className:"organization-card-header",children:[e.jsx(_,{organization:s}),e.jsxs("div",{children:[e.jsx("h3",{children:s.name}),e.jsxs("span",{children:["@",s.hf_slug??s.slug]})]})]}),e.jsxs("div",{className:"organization-card-metrics",children:[e.jsx("strong",{children:a.toLocaleString()}),e.jsx("span",{children:a===1?"paper":"papers"}),i==="trending"&&s.trending_rank&&e.jsxs("span",{className:"organization-rank",children:["#",s.trending_rank]})]}),e.jsxs("div",{className:"organization-highlight",children:[e.jsx("span",{children:"Trending paper"}),e.jsx("strong",{children:((r=s.top_trending_paper)==null?void 0:r.title)??"No papers indexed yet"})]}),e.jsxs("div",{className:"organization-card-footer",children:[t?`Publishing ${t}`:"Research archive ready",e.jsx("span",{"aria-hidden":"true",children:"↗"})]})]},s.id)})})]})]})};export{k as default}; diff --git a/assets/PaperCard-DjlN6X2v.js b/assets/PaperCard-CUJXx9SW.js similarity index 96% rename from assets/PaperCard-DjlN6X2v.js rename to assets/PaperCard-CUJXx9SW.js index e2912f6427815f6a4783fea5a8d7c06e1c003e54..bc15b056f456968928fc28ed68ab3a3961c84511 100644 --- a/assets/PaperCard-DjlN6X2v.js +++ b/assets/PaperCard-CUJXx9SW.js @@ -1 +1 @@ -import{o as M,aa as g,K as L,j as a,L as d}from"./index-C1Xuuz1Y.js";import{A as Z}from"./AuthorAvatar-DqCnji_B.js";import{P as k,S as A,T as P,M as y}from"./SotaBadges-B5MVNUr2.js";import{I as C}from"./Icon-BADQ_q7j.js";import{L as E,a as U}from"./LatexTitle-B0RfzwYI.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 w(s){const t=[...new Set(s.map(n=>n.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 N(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 N(s.slug)==="large language model"||N(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[n,r]=g.useState(!1);return!l||n?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:()=>r(!0)})})},O=({paper:s,priority:t=!1,showInstitution:l=!0,highlightQuery:n,followReasons:r,isNew:m=!1})=>{const x=M(),u=`/paper/${s.id}`,i=g.useCallback(()=>{x.prefetchQuery(L.detail(s.id))},[s.id,x]),v=s.authors.slice(0,3).map((e,o)=>{var p,F;const f=(p=s.authorIds)==null?void 0:p[o],b=(F=s.authorHfProfiles)==null?void 0:F[o];return a.jsxs(g.Fragment,{children:[o>0&&", ",b&&a.jsx(Z,{className:"paper-card-author-avatar",url:b.avatarUrl}),f?a.jsx(d,{to:`/authors/${f}`,children:e}):e]},o)}),c=s.authors.length,j=D(s);return a.jsxs("article",{className:"paper-card",children:[a.jsx(d,{to:u,className:"paper-thumb-wrap",onFocus:i,onMouseEnter:i,children:a.jsx(k,{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:[(m||r&&r.length>0)&&a.jsxs("div",{className:"paper-follow-reason",children:[m&&a.jsx("span",{className:"paper-new-chip",children:"New"}),r&&r.length>0&&a.jsxs(a.Fragment,{children:["Because you follow ",w(r)]})]}),a.jsxs("h3",{className:"paper-title",children:[a.jsx(d,{to:u,onFocus:i,onMouseEnter:i,children:a.jsx(E,{title:s.title,highlight:n})}),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:[v,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(U,{text:s.abstract,highlight:n})}),s.sotaRanks.length>0&&a.jsx(A,{ranks:s.sotaRanks,paperHref:u}),(s.tags.length>0||j.length>0)&&a.jsxs("div",{className:"paper-tags paper-tags--clamped",children:[s.tags.map(e=>a.jsx(P,{slug:e},e)),j.map(e=>a.jsx(y,{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(C,{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{O as P}; +import{o as M,aa as g,K as L,j as a,L as d}from"./index-DMjO_toh.js";import{A as Z}from"./AuthorAvatar-DFoIK6Bc.js";import{P as k,S as A,T as P,M as y}from"./SotaBadges-CHGUskQn.js";import{I as C}from"./Icon-D5cUFATZ.js";import{L as E,a as U}from"./LatexTitle-BRJTz_K0.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 w(s){const t=[...new Set(s.map(n=>n.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 N(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 N(s.slug)==="large language model"||N(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[n,r]=g.useState(!1);return!l||n?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:()=>r(!0)})})},O=({paper:s,priority:t=!1,showInstitution:l=!0,highlightQuery:n,followReasons:r,isNew:m=!1})=>{const x=M(),u=`/paper/${s.id}`,i=g.useCallback(()=>{x.prefetchQuery(L.detail(s.id))},[s.id,x]),v=s.authors.slice(0,3).map((e,o)=>{var p,F;const f=(p=s.authorIds)==null?void 0:p[o],b=(F=s.authorHfProfiles)==null?void 0:F[o];return a.jsxs(g.Fragment,{children:[o>0&&", ",b&&a.jsx(Z,{className:"paper-card-author-avatar",url:b.avatarUrl}),f?a.jsx(d,{to:`/authors/${f}`,children:e}):e]},o)}),c=s.authors.length,j=D(s);return a.jsxs("article",{className:"paper-card",children:[a.jsx(d,{to:u,className:"paper-thumb-wrap",onFocus:i,onMouseEnter:i,children:a.jsx(k,{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:[(m||r&&r.length>0)&&a.jsxs("div",{className:"paper-follow-reason",children:[m&&a.jsx("span",{className:"paper-new-chip",children:"New"}),r&&r.length>0&&a.jsxs(a.Fragment,{children:["Because you follow ",w(r)]})]}),a.jsxs("h3",{className:"paper-title",children:[a.jsx(d,{to:u,onFocus:i,onMouseEnter:i,children:a.jsx(E,{title:s.title,highlight:n})}),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:[v,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(U,{text:s.abstract,highlight:n})}),s.sotaRanks.length>0&&a.jsx(A,{ranks:s.sotaRanks,paperHref:u}),(s.tags.length>0||j.length>0)&&a.jsxs("div",{className:"paper-tags paper-tags--clamped",children:[s.tags.map(e=>a.jsx(P,{slug:e},e)),j.map(e=>a.jsx(y,{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(C,{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{O as P}; diff --git a/assets/PaperDetailView-uhLfEM17.js b/assets/PaperDetailView-ouIH95io.js similarity index 98% rename from assets/PaperDetailView-uhLfEM17.js rename to assets/PaperDetailView-ouIH95io.js index 7c991fccbd7af6f5f38547ea39fbafab1ebb7f1c..dd74725c6b0c10495b94634a2d8bee07a83fa04e 100644 --- a/assets/PaperDetailView-uhLfEM17.js +++ b/assets/PaperDetailView-ouIH95io.js @@ -1,4 +1,4 @@ -import{d as Ee,b as G,E as Ys,F as ne,G as Js,n as Jt,I as K,i as x,J as Zs,K as me,B as z,M as dt,j as e,C as ut,o as W,v as Q,N as Ne,O as mt,X as Zt,P as ea,Q as es,R as Y,S as ts,U as fe,V as pe,W as ss,Y as ht,Z as we,_ as Rt,$ as It,a0 as ta,a1 as sa,L as H,a2 as aa,a3 as ra,a4 as na,a5 as ia,a6 as as,a7 as oa,l as la,a8 as ca,A as Ce,x as da,a as Pe,a9 as rs,aa as Se,ab as Lt,k as ns,u as ua,ac as At,ad as ma,ae as Tt,af as ha,D as Dt,ag as pa,ah as fa,ai as ga,aj as xa,ak as ba,al as ja,am as va}from"./index-C1Xuuz1Y.js";import{u as re}from"./useMutation-Cb0wrKBq.js";import{I as F}from"./Icon-BADQ_q7j.js";import{T as _a,M as ya,S as ka,P as Na}from"./SotaBadges-B5MVNUr2.js";import{L as ye,a as nt}from"./LatexTitle-B0RfzwYI.js";import{u as is}from"./preferences-zpJ52tLe.js";import{s as wa,a as Ca}from"./transform-btCQtWTl.js";import{r as os,p as Sa}from"./paperReader-td2aJigh.js";import{u as Ea,f as Pa}from"./useDocumentTitle-DS68IpOJ.js";import{s as V}from"./safeExternalHref-CkBrsh84.js";import{m as $a}from"./mlIntern-BRf6eT1x.js";import{S as he}from"./skeleton-D8hFkZOU.js";import{A as Ra,a as Ia}from"./alert-UfpiwFIJ.js";import{B as A}from"./button-DMLWlhJJ.js";import{D as $e,a as Re,c as Ie,b as Le,d as Ae,e as pt}from"./dialog-CCU_33Ju.js";import{A as La,a as Aa}from"./AgentLogos-CJgsqwCs.js";import{C as Ta}from"./copy-DN4cM864.js";import{i as ls,a as cs,r as Da,b as Fa,e as Ua,p as za}from"./cacheSync-Dp3vd6Pv.js";import{I as U}from"./input-DJqx9Wtu.js";import{S as Ft}from"./searchable-select-DPAXOMOd.js";import{L as ft}from"./loader-circle-tzO1dF92.js";import{T as Te,n as Ma,C as Ba}from"./CatalogEntityPreviewLink-DxTQ9Cxu.js";import{S as ds,L as O,a as Ha}from"./SignInToEditDialog-DkoRRdng.js";import{u as je}from"./useQueries-qwvJW35M.js";import{s as us,p as ms}from"./submissions-DcU5ZqyQ.js";import{D as Oa}from"./database-rIkpN7y5.js";import{P as De}from"./plus-VBQCmtt2.js";import{S as it}from"./search-YolWz-tq.js";import{B as qa}from"./badge-_8Y6CJzv.js";import{G as Ga}from"./globe-D69lYFoB.js";import{G as Xa}from"./github-DYMnkwxi.js";import{u as hs}from"./index-CNkd3QcT.js";import{C as Ka,E as Qa}from"./ExternalSourceEvalBadge-CttojFFk.js";import{M as Va}from"./index-SntObKrh.js";import{r as Wa}from"./index-B8mUud-W.js";import{u as Ya}from"./useIntersectionObserver-CwCTFEhv.js";import{S as Ut,s as Ja}from"./savedPapersAuth-qhoxX36l.js";import{o as Za}from"./organizationNames-BVKzYEBp.js";import{A as er}from"./AuthorAvatar-DqCnji_B.js";import"./colors-BkWRhvFI.js";import"./popover-C1A8cBwB.js";import"./hover-card-BSWfQepz.js";import"./textarea--CThIdhF.js";/** +import{d as Ee,b as G,E as Ys,F as ne,G as Js,n as Jt,I as K,i as x,J as Zs,K as me,B as z,M as dt,j as e,C as ut,o as W,v as Q,N as Ne,O as mt,X as Zt,P as ea,Q as es,R as Y,S as ts,U as fe,V as pe,W as ss,Y as ht,Z as we,_ as Rt,$ as It,a0 as ta,a1 as sa,L as H,a2 as aa,a3 as ra,a4 as na,a5 as ia,a6 as as,a7 as oa,l as la,a8 as ca,A as Ce,x as da,a as Pe,a9 as rs,aa as Se,ab as Lt,k as ns,u as ua,ac as At,ad as ma,ae as Tt,af as ha,D as Dt,ag as pa,ah as fa,ai as ga,aj as xa,ak as ba,al as ja,am as va}from"./index-DMjO_toh.js";import{u as re}from"./useMutation-Db093XSk.js";import{I as F}from"./Icon-D5cUFATZ.js";import{T as _a,M as ya,S as ka,P as Na}from"./SotaBadges-CHGUskQn.js";import{L as ye,a as nt}from"./LatexTitle-BRJTz_K0.js";import{u as is}from"./preferences-B1gzdJ4J.js";import{s as wa,a as Ca}from"./transform-CXoeFMaW.js";import{r as os,p as Sa}from"./paperReader-td2aJigh.js";import{u as Ea,f as Pa}from"./useDocumentTitle-DVQ2ceqw.js";import{s as V}from"./safeExternalHref-CkBrsh84.js";import{m as $a}from"./mlIntern-DaNPa3iB.js";import{S as he}from"./skeleton-DiGWALrs.js";import{A as Ra,a as Ia}from"./alert-B2i0PAyW.js";import{B as A}from"./button-BGphIht2.js";import{D as $e,a as Re,c as Ie,b as Le,d as Ae,e as pt}from"./dialog-C-drkhvX.js";import{A as La,a as Aa}from"./AgentLogos-C26IQbJ9.js";import{C as Ta}from"./copy-DXTYKY8f.js";import{i as ls,a as cs,r as Da,b as Fa,e as Ua,p as za}from"./cacheSync-BmYny7qy.js";import{I as U}from"./input-BzpOTl46.js";import{S as Ft}from"./searchable-select-DscHfpAa.js";import{L as ft}from"./loader-circle-gyMLnt4Y.js";import{T as Te,n as Ma,C as Ba}from"./CatalogEntityPreviewLink-BirlAu9e.js";import{S as ds,L as O,a as Ha}from"./SignInToEditDialog-BIKQbaVj.js";import{u as je}from"./useQueries-DpMmxV-N.js";import{s as us,p as ms}from"./submissions-C02Zu9zt.js";import{D as Oa}from"./database-UPYeEFxO.js";import{P as De}from"./plus-B4ZP41Rg.js";import{S as it}from"./search-D6uSAb1U.js";import{B as qa}from"./badge-CARHLO4T.js";import{G as Ga}from"./globe-C6Up_LzV.js";import{G as Xa}from"./github-3dJEQTDr.js";import{u as hs}from"./index-BgYoYvBg.js";import{C as Ka,E as Qa}from"./ExternalSourceEvalBadge-DYcvJrz-.js";import{M as Va}from"./index-ruElXN5Q.js";import{r as Wa}from"./index-BCW47Vvr.js";import{u as Ya}from"./useIntersectionObserver-CU-1-_ok.js";import{S as Ut,s as Ja}from"./savedPapersAuth-DWaz2psA.js";import{o as Za}from"./organizationNames-BVKzYEBp.js";import{A as er}from"./AuthorAvatar-DFoIK6Bc.js";import"./colors-BkWRhvFI.js";import"./popover-MF6JD1Yi.js";import"./hover-card-D4j7S6P3.js";import"./textarea-nRN8oSDz.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/PaperPreviewLink-CTwxrQQW.js b/assets/PaperPreviewLink-DvyVialT.js similarity index 98% rename from assets/PaperPreviewLink-CTwxrQQW.js rename to assets/PaperPreviewLink-DvyVialT.js index 8e606bfe0835945a7411885fecd872d6d15462d6..89e176464c5248847cf45fd6e49f029f55196268 100644 --- a/assets/PaperPreviewLink-CTwxrQQW.js +++ b/assets/PaperPreviewLink-DvyVialT.js @@ -1,4 +1,4 @@ -import{o as F,f as j,m as b,a as ce,p as L,b as O,n as z,h as ue,s as he,c as pe,v as me,S as fe}from"./index-SntObKrh.js";import{l as de}from"./index-B8mUud-W.js";import D from"./katex-DkKDou_j.js";import{j as h,aa as E,al as xe,B as Z,G as C,K as J,e as ge,o as ye,L as T,b as we,m as be}from"./index-C1Xuuz1Y.js";import{H as Ne,a as ve,b as ke}from"./hover-card-BSWfQepz.js";import{u as Fe}from"./useMutation-Cb0wrKBq.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 ce,p as L,b as O,n as z,h as ue,s as he,c as pe,v as me,S as fe}from"./index-ruElXN5Q.js";import{l as de}from"./index-BCW47Vvr.js";import D from"./katex-DkKDou_j.js";import{j as h,aa as E,al as xe,B as Z,G as C,K as J,e as ge,o as ye,L as T,b as we,m as be}from"./index-DMjO_toh.js";import{H as Ne,a as ve,b as ke}from"./hover-card-D4j7S6P3.js";import{u as Fe}from"./useMutation-Db093XSk.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(de(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-zhsdEzJM.js b/assets/PaperReaderView-CHBZiJsP.js similarity index 91% rename from assets/PaperReaderView-zhsdEzJM.js rename to assets/PaperReaderView-CHBZiJsP.js index 036a7a8b846a2265b5a437b8ae6ff51acb1d3988..25f6ff6803d4279dc17eb6bfc638f82bd05e87ba 100644 --- a/assets/PaperReaderView-zhsdEzJM.js +++ b/assets/PaperReaderView-CHBZiJsP.js @@ -1 +1 @@ -import{i as s,b as A,K as O,j as a,A as te,u as Oe,G as Fe,n as Ke,al as _e,af as De,L as J}from"./index-C1Xuuz1Y.js";import{u as Ue,R as qe,A as Ve,c as Qe,d as Xe,a as Ge,P as Ye,e as Ze}from"./chatLifecycle-CbrXR8Sy.js";import{M as Je}from"./MarkdownText-Dv3hoeZl.js";import{f as et,w as tt,s as at,e as rt,a as ee,b as Se,c as Ce}from"./paperReader-td2aJigh.js";import{c as st}from"./chat-CiW-DJRi.js";import{s as ae}from"./safeExternalHref-CkBrsh84.js";import{ChatExperience as nt}from"./ChatView-BVQ4YUnD.js";import"./chatSessions-DFoCf0pS.js";/* empty css */import"./hover-card-BSWfQepz.js";import"./CatalogEntityPreviewLink-DxTQ9Cxu.js";import"./github-DYMnkwxi.js";import"./file-text-BlXclTHj.js";import"./PaperPreviewLink-CTwxrQQW.js";import"./index-SntObKrh.js";import"./index-B8mUud-W.js";import"./katex-DkKDou_j.js";import"./useMutation-Cb0wrKBq.js";import"./thumbs-up-Ys3ImX4j.js";import"./copy-DN4cM864.js";import"./arrow-left-B9GmgZLS.js";import"./external-link-BwpBZl45.js";import"./plus-VBQCmtt2.js";import"./search-YolWz-tq.js";import"./chevron-up-zZuEVcHx.js";import"./AuthorAvatar-DqCnji_B.js";import"./McpShowcase-CwUcSruT.js";import"./AgentLogos-CJgsqwCs.js";import"./share-2-Zzb236oj.js";import"./Icon-BADQ_q7j.js";import"./mlIntern-BRf6eT1x.js";import"./openrouter-B1BP_cUi.js";function it(r){return r instanceof te&&r.status===422?"This page could not be turned into a readable paper.":r instanceof te&&r.status===503?"Paper content is still being prepared. Please try again later.":"The paper could not be loaded."}function ot({paperId:r,paperKey:i,paperTitle:c,paperHref:b,sourceUrl:t,resources:o,paperVersion:g="",selectionEnabled:v=!1,onReady:w,onPaperSelection:F,onPaperSelectionError:d}){var T;const E=s.useRef(null),x=et(t),C=A({...O.webPage(r),enabled:!x,retry:!1}),P=!x&&C.isPending,S=x||((T=C.data)==null?void 0:T.frameable)===!0,[u,$]=s.useState("original"),p=S&&u==="original",m=A({...O.webMarkdown(r),retry:(D,I)=>D<2&&!(I instanceof te&&I.status<500),retryDelay:3e3}),R=m.isSuccess;s.useEffect(()=>{R&&(w==null||w())},[w,R]),Ue({enabled:v&&!!g&&R&&!p,pagesRoot:E,routeId:i,paperVersion:g,numPages:1,onSelect:F,onError:d});const y=m.data?tt(m.data):"",K=!!(o!=null&&o.projectPage&&at(o.projectPage.href,t));return a.jsxs("div",{className:"pdf-viewer",children:[a.jsx(qe,{paperTitle:c,paperHref:b,resources:o,label:"Paper controls",children:a.jsxs("div",{className:"pdf-toolbar-controls",children:[S&&a.jsxs("div",{className:"reader-web-view-toggle",role:"group","aria-label":"Paper view",children:[a.jsx("button",{type:"button","aria-pressed":p,onClick:()=>$("original"),children:"Original"}),a.jsx("button",{type:"button","aria-pressed":!p,title:"Readable text; select a passage to ask the chat about it",onClick:()=>$("text"),children:"Text"})]}),!K&&a.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",children:"Open original"})]})}),a.jsx("div",{className:"pdf-scroll-frame",children:P?a.jsx("div",{className:"pdf-loading",role:"status",children:"Loading the paper…"}):p?a.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"}):a.jsx("div",{className:"pdf-scroll",role:"region","aria-label":"Paper web page",children:m.isPending?a.jsx("div",{className:"pdf-loading",role:"status",children:"Preparing a readable version of this page…"}):m.isError?a.jsxs("div",{className:"pdf-error",role:"alert",children:[a.jsx("p",{children:it(m.error)}),a.jsxs("div",{children:[a.jsx("button",{type:"button",onClick:()=>void m.refetch(),children:"Retry"})," ",a.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",children:"Open original"})]})]}):a.jsxs("article",{ref:E,className:"reader-web-document","data-page":"1",children:[!y.startsWith("# ")&&a.jsx("h1",{children:c}),a.jsx(Je,{text:y})]})})})]})}const ke=66,ct=240,re="pwc:reader:split-ratio";function lt(r){const i=Number(sessionStorage.getItem(Ce(r)));return Number.isInteger(i)&&i>0?i:1}function dt(){const r=Number(localStorage.getItem(re));return Number.isFinite(r)&&r>=45&&r<=75?r:ke}function ut(r){const i=ae(r);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 pt=/^\/pdf\/(\d{4}\.\d{4,5}(?:v\d{1,3})?|[a-z]+(?:-[a-z]+)*(?:\.[A-Z]{2})?\/\d{7}(?:v\d{1,3})?)$/;function ft(r){const i=new URL(r),c=i.pathname.match(pt);return(i.hostname==="arxiv.org"||i.hostname==="www.arxiv.org")&&c&&!i.search?_e(`/paper-assets/arxiv-pdf/${c[1]}`)??r:r}function mt(r){return new URL(r).hostname.replace(/^www\./,"")}function ht(r){if(!r)return{};const i={};for(const t of r.repositories??[]){if(!t.is_official)continue;const o=ae(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=[...r.project_pages??[]].sort((t,o)=>Number(o.is_official)-Number(t.is_official));for(const t of c){const o=ae(t.url);if(o){i.projectPage={href:o,label:mt(o)};break}}const b=r.hf_artifact_summary?r.hf_artifact_summary.model_count+r.hf_artifact_summary.dataset_count+r.hf_artifact_summary.space_count:new Set([...r.hf_models??[],...r.hf_datasets??[],...r.hf_spaces??[]]).size;return b>0&&r.arxiv_id&&(i.huggingFace={href:`https://huggingface.co/papers/${r.arxiv_id.replace(/v\d+$/i,"")}`,count:b}),i}function gt({routeId:r}){var we,Pe,Re,ye,je;const i=Ke(),c=A(O.detail(r)),b=A({queryKey:["chatAvailability"],queryFn:()=>st.getAvailability(),refetchInterval:3e4,retry:!1}),t=c.data,o=t?rt(t):null,g=o?null:(t==null?void 0:t.source)==="external"?_e(`/paper-assets/external/${t.id}/paper.pdf`):ut(t==null?void 0:t.url_pdf),v=g&&(t==null?void 0:t.source)!=="external"?ft(g):g,w=ht(t),F=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]),d=((we=t==null?void 0:t.arxiv_id)==null?void 0:we.replace(/v\d+$/i,""))||r,E=s.useCallback(()=>i(`/paper/${d}`),[d,i]),[x,C]=s.useState(()=>sessionStorage.getItem(ee(r))||void 0),[P,S]=s.useState(dt),[u,$]=s.useState(()=>sessionStorage.getItem(Se(r))==="1"),[p,m]=s.useState("paper"),[R,y]=s.useState(),[K,T]=s.useState(),[D,I]=s.useState(!1),Ne=s.useCallback(()=>I(!0),[]),[Ae,_]=s.useState(""),[se]=s.useState(()=>lt(r)),[k,Ee]=s.useState(0),[ne,ie]=s.useState(!1),[$e,oe]=s.useState(!1),M=s.useRef(null),U=s.useRef(null),z=s.useRef(null),ce=s.useRef(null),le=s.useRef(null),q=s.useRef(!1),W=s.useRef(!1),V=s.useRef(0),j=s.useRef(0),Q=s.useRef(0),N=s.useRef(P),de=s.useRef(se),X=s.useRef(t==null?void 0:t.version),ue=Qe().reset,pe=s.useRef(x),f=k>=840;s.useEffect(()=>{pe.current!==x&&(pe.current=x,ue())},[x,ue]),s.useEffect(()=>{t!=null&&t.version&&X.current&&t.version!==X.current&&(y(void 0),_("")),X.current=t==null?void 0:t.version},[t==null?void 0:t.version]),s.useEffect(()=>()=>{window.clearTimeout(V.current),cancelAnimationFrame(j.current)},[]),s.useLayoutEffect(()=>{const e=M.current;if(!e)return;const n=()=>Ee(e.clientWidth);n();const l=new ResizeObserver(n);return l.observe(e),()=>l.disconnect()},[t]),s.useEffect(()=>{if(!t)return;document.title=`${t.title} — Papers With Code reader`;let e=document.querySelector('meta[name="robots"]');const n=!e;e||(e=document.createElement("meta"),e.name="robots",document.head.appendChild(e));const l=e.content;e.content="noindex, nofollow";let h=document.querySelector('link[rel="canonical"]');const Be=!h;h||(h=document.createElement("link"),h.rel="canonical",document.head.appendChild(h));const He=h.href;return h.href=`${window.location.origin}/paper/${d}`,()=>{document.title="Papers With Code",n?e==null||e.remove():e&&(e.content=l),Be?h==null||h.remove():h&&(h.href=He)}},[d,t]);const L=s.useCallback(e=>{if(!k)return Math.max(45,Math.min(75,e));const n=480/k*100,l=100-360/k*100;return Math.max(n,Math.min(l,e))},[k]);s.useEffect(()=>S(e=>{const n=L(e);return N.current=n,n}),[L]);const B=e=>{const n=L(e);N.current=n,S(n),localStorage.setItem(re,String(n))},fe=e=>{var l;const n=L(e);N.current=n,U.current&&(U.current.style.width=`${n}%`),z.current&&(z.current.style.width=`${100-n}%`),(l=ce.current)==null||l.setAttribute("aria-valuenow",String(Math.round(n)))},me=e=>{Q.current=e,!j.current&&(j.current=requestAnimationFrame(()=>{var l;j.current=0;const n=(l=M.current)==null?void 0:l.getBoundingClientRect();n!=null&&n.width&&fe((Q.current-n.left)/n.width*100)}))},Te=e=>{W.current=!0,ie(!0),e.currentTarget.setPointerCapture(e.pointerId),me(e.clientX)},G=()=>{var e;if(W.current){if(j.current){cancelAnimationFrame(j.current),j.current=0;const n=(e=M.current)==null?void 0:e.getBoundingClientRect();n!=null&&n.width&&fe((Q.current-n.left)/n.width*100)}W.current=!1,S(N.current),localStorage.setItem(re,String(N.current)),ie(!1)}},he=e=>{window.clearTimeout(V.current),oe(!0),$(e),sessionStorage.setItem(Se(r),e?"1":"0"),V.current=window.setTimeout(()=>oe(!1),ct+40)},ge=e=>{q.current=!0,he(e)};s.useEffect(()=>{var e;q.current&&(q.current=!1,(e=u?le.current:z.current)==null||e.focus())},[u]);const Ie=e=>{C(e),sessionStorage.setItem(ee(r),e)},Me=()=>{C(void 0),sessionStorage.removeItem(ee(r)),y(void 0),_("")},be=((Pe=b.data)==null?void 0:Pe.paper_reader_selection_enabled)===!0,ve=e=>{y(e),_(`Selection from page ${e.page} added to chat`),f&&u&&he(!1)},ze=s.useCallback(e=>{y(e),e||_("")},[]),Y=((Re=b.data)==null?void 0:Re.paper_reader_citations_enabled)===!0&&!!v,H=A({...O.layout(d),enabled:Y&&!!d}).data,We=s.useMemo(()=>Y?{layout:H,open:e=>{const n=H?Xe(H,e):[];n.length&&(T(l=>({boxes:n,nonce:((l==null?void 0:l.nonce)??0)+1})),m("paper"))}}:null,[Y,H]),xe=De()&&((ye=b.data)==null?void 0:ye.paper_reader_chat_enabled)!==!1,Z=!!(t&&xe&&!(o&&!D)),Le=t&&xe&&!Z?a.jsx("div",{className:"reader-chat-unavailable",role:"status",children:"Chat opens once the paper is ready."}):t&&Z?a.jsx(nt,{mode:"paper",routeSessionId:x,primaryPaper:{id:t.id,routeId:d,title:t.title,arxivId:t.arxiv_id},currentPage:()=>de.current,paperSelection:R,onPaperSelectionChange:ze,onSessionId:Ie,onReaderSubmit:()=>m("assistant"),onReaderNewChat:Me,onReaderClose:f?()=>ge(!0):void 0}):a.jsx("div",{className:"reader-chat-unavailable",children:"Chat is not enabled for this preview."});return c.isLoading?a.jsx("div",{className:"reader-status",role:"status",children:"Loading paper…"}):c.error||!t?a.jsxs("div",{className:"reader-status",role:"alert",children:[a.jsx("p",{children:"Paper not found."}),a.jsx(J,{to:"/papers",children:"Browse papers"})]}):((je=b.data)==null?void 0:je.native_pdf_reader_enabled)===!1?a.jsxs("div",{className:"reader-status",role:"alert",children:[a.jsx("p",{children:"The native reader is currently unavailable."}),a.jsx(J,{to:`/paper/${d}`,children:"Back to paper"})]}):!v&&!o?a.jsxs("div",{className:"reader-status",role:"alert",children:[a.jsx("p",{children:"Native reading is unavailable for this resource."}),a.jsx(J,{to:`/paper/${d}`,children:"Back to paper"})]}):a.jsxs("div",{className:"paper-reader-shell",children:[!f&&a.jsxs("div",{className:"reader-tabs",role:"tablist","aria-label":"Reader panels",children:[a.jsx("button",{type:"button",role:"tab","aria-selected":p==="paper",onClick:()=>m("paper"),children:"Paper"}),a.jsxs("button",{type:"button",role:"tab","aria-selected":p==="assistant","aria-label":R&&p!=="assistant"?"Chat, selection attached":"Chat",onClick:()=>m("assistant"),children:["Chat",R&&p!=="assistant"&&a.jsx("span",{className:"reader-tab-pending","aria-hidden":"true"})]})]}),a.jsx(Ge,{variant:"reader",children:a.jsxs("div",{ref:M,className:`reader-workspace${f?" is-desktop":" is-tabs"}${u?" is-assistant-collapsed":""}${ne?" is-resizing":""}`,"data-testid":"paper-chat-workspace",children:[a.jsx("section",{ref:U,className:`reader-paper-pane${!f&&p!=="paper"?" is-hidden":""}`,style:f?{width:u?"100%":`${P}%`}:void 0,role:"tabpanel","aria-label":"Paper","aria-hidden":!f&&p!=="paper",children:o?a.jsx(ot,{paperId:t.id,paperKey:d,paperTitle:t.title,paperHref:`/paper/${d}`,sourceUrl:o,resources:w,paperVersion:t.version,selectionEnabled:be,onReady:Ne,onPaperSelection:ve,onPaperSelectionError:_}):v&&a.jsx(Ye,{url:v,downloadUrl:g??v,paperKey:d,paperTitle:t.title,paperHref:`/paper/${d}`,onClose:E,resources:w,initialPage:se,resizeActive:ne||$e,selectionEnabled:be,paperVersion:t.version,authors:F,loadErrorMessage:t.source==="external"?"Paper content is still being prepared. Please try again later.":void 0,onPaperSelection:ve,onPaperSelectionError:_,highlight:K,onPageChange:e=>{de.current=e,sessionStorage.setItem(Ce(r),String(e))}})}),f&&!u&&a.jsx("div",{ref:ce,className:"reader-resize-handle",role:"separator","aria-label":"Resize paper and Chat panels","aria-orientation":"vertical","aria-valuemin":45,"aria-valuemax":75,"aria-valuenow":Math.round(P),tabIndex:0,onPointerDown:Te,onPointerMove:e=>{W.current&&me(e.clientX)},onPointerUp:G,onPointerCancel:G,onLostPointerCapture:G,onDoubleClick:()=>B(ke),onKeyDown:e=>{(e.key==="ArrowLeft"||e.key==="ArrowRight")&&(e.preventDefault(),B(P+(e.key==="ArrowRight"?2:-2))),e.key==="Home"&&B(45),e.key==="End"&&B(75)}}),a.jsx("aside",{ref:z,id:"reader-chat-panel",className:`reader-assistant-pane${!f&&p!=="assistant"?" is-hidden":""}${f&&u?" is-collapsed":""}`,style:f?{width:u?0:`${100-P}%`}:void 0,role:"tabpanel","aria-label":"Chat","aria-hidden":!f&&p!=="assistant"||u,tabIndex:-1,children:a.jsx(Ze.Provider,{value:We,children:Le})}),a.jsx("div",{className:"sr-only","aria-live":"polite",children:Ae}),f&&(u||!Z)&&a.jsx("button",{ref:le,type:"button",className:"reader-collapse-assistant","aria-controls":"reader-chat-panel","aria-expanded":!u,onClick:()=>ge(!u),children:u?"Open chat":"Hide chat"})]})})]})}function Yt(){const{paperId:r=""}=Oe(),i=Fe(r).replace(/v\d+$/i,"");return a.jsx(Ve,{workspaceKey:`reader:${r}`,children:a.jsx(gt,{routeId:i},i)})}export{Yt as default,ht as readerToolbarResources}; +import{i as s,b as A,K as O,j as a,A as te,u as Oe,G as Fe,n as Ke,al as _e,af as De,L as J}from"./index-DMjO_toh.js";import{u as Ue,R as qe,A as Ve,c as Qe,d as Xe,a as Ge,P as Ye,e as Ze}from"./chatLifecycle-CkvR6Xsi.js";import{M as Je}from"./MarkdownText-PyDBRK4a.js";import{f as et,w as tt,s as at,e as rt,a as ee,b as Se,c as Ce}from"./paperReader-td2aJigh.js";import{c as st}from"./chat-B4elm0RV.js";import{s as ae}from"./safeExternalHref-CkBrsh84.js";import{ChatExperience as nt}from"./ChatView-C_8EJWxW.js";import"./chatSessions-CtEVszLf.js";/* empty css */import"./hover-card-D4j7S6P3.js";import"./CatalogEntityPreviewLink-BirlAu9e.js";import"./github-3dJEQTDr.js";import"./file-text-D6OyOvvT.js";import"./PaperPreviewLink-DvyVialT.js";import"./index-ruElXN5Q.js";import"./index-BCW47Vvr.js";import"./katex-DkKDou_j.js";import"./useMutation-Db093XSk.js";import"./thumbs-up-CZ7BdM1B.js";import"./copy-DXTYKY8f.js";import"./arrow-left-BSWED_nt.js";import"./external-link-Bt4eibsp.js";import"./plus-B4ZP41Rg.js";import"./search-D6uSAb1U.js";import"./chevron-up-5Y7cB_yq.js";import"./AuthorAvatar-DFoIK6Bc.js";import"./McpShowcase-fiJIUUiM.js";import"./AgentLogos-C26IQbJ9.js";import"./share-2-BO6l1rLC.js";import"./Icon-D5cUFATZ.js";import"./mlIntern-DaNPa3iB.js";import"./openrouter-bfrcMxtX.js";function it(r){return r instanceof te&&r.status===422?"This page could not be turned into a readable paper.":r instanceof te&&r.status===503?"Paper content is still being prepared. Please try again later.":"The paper could not be loaded."}function ot({paperId:r,paperKey:i,paperTitle:c,paperHref:b,sourceUrl:t,resources:o,paperVersion:g="",selectionEnabled:v=!1,onReady:w,onPaperSelection:F,onPaperSelectionError:d}){var T;const E=s.useRef(null),x=et(t),C=A({...O.webPage(r),enabled:!x,retry:!1}),P=!x&&C.isPending,S=x||((T=C.data)==null?void 0:T.frameable)===!0,[u,$]=s.useState("original"),p=S&&u==="original",m=A({...O.webMarkdown(r),retry:(D,I)=>D<2&&!(I instanceof te&&I.status<500),retryDelay:3e3}),R=m.isSuccess;s.useEffect(()=>{R&&(w==null||w())},[w,R]),Ue({enabled:v&&!!g&&R&&!p,pagesRoot:E,routeId:i,paperVersion:g,numPages:1,onSelect:F,onError:d});const y=m.data?tt(m.data):"",K=!!(o!=null&&o.projectPage&&at(o.projectPage.href,t));return a.jsxs("div",{className:"pdf-viewer",children:[a.jsx(qe,{paperTitle:c,paperHref:b,resources:o,label:"Paper controls",children:a.jsxs("div",{className:"pdf-toolbar-controls",children:[S&&a.jsxs("div",{className:"reader-web-view-toggle",role:"group","aria-label":"Paper view",children:[a.jsx("button",{type:"button","aria-pressed":p,onClick:()=>$("original"),children:"Original"}),a.jsx("button",{type:"button","aria-pressed":!p,title:"Readable text; select a passage to ask the chat about it",onClick:()=>$("text"),children:"Text"})]}),!K&&a.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",children:"Open original"})]})}),a.jsx("div",{className:"pdf-scroll-frame",children:P?a.jsx("div",{className:"pdf-loading",role:"status",children:"Loading the paper…"}):p?a.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"}):a.jsx("div",{className:"pdf-scroll",role:"region","aria-label":"Paper web page",children:m.isPending?a.jsx("div",{className:"pdf-loading",role:"status",children:"Preparing a readable version of this page…"}):m.isError?a.jsxs("div",{className:"pdf-error",role:"alert",children:[a.jsx("p",{children:it(m.error)}),a.jsxs("div",{children:[a.jsx("button",{type:"button",onClick:()=>void m.refetch(),children:"Retry"})," ",a.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",children:"Open original"})]})]}):a.jsxs("article",{ref:E,className:"reader-web-document","data-page":"1",children:[!y.startsWith("# ")&&a.jsx("h1",{children:c}),a.jsx(Je,{text:y})]})})})]})}const ke=66,ct=240,re="pwc:reader:split-ratio";function lt(r){const i=Number(sessionStorage.getItem(Ce(r)));return Number.isInteger(i)&&i>0?i:1}function dt(){const r=Number(localStorage.getItem(re));return Number.isFinite(r)&&r>=45&&r<=75?r:ke}function ut(r){const i=ae(r);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 pt=/^\/pdf\/(\d{4}\.\d{4,5}(?:v\d{1,3})?|[a-z]+(?:-[a-z]+)*(?:\.[A-Z]{2})?\/\d{7}(?:v\d{1,3})?)$/;function ft(r){const i=new URL(r),c=i.pathname.match(pt);return(i.hostname==="arxiv.org"||i.hostname==="www.arxiv.org")&&c&&!i.search?_e(`/paper-assets/arxiv-pdf/${c[1]}`)??r:r}function mt(r){return new URL(r).hostname.replace(/^www\./,"")}function ht(r){if(!r)return{};const i={};for(const t of r.repositories??[]){if(!t.is_official)continue;const o=ae(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=[...r.project_pages??[]].sort((t,o)=>Number(o.is_official)-Number(t.is_official));for(const t of c){const o=ae(t.url);if(o){i.projectPage={href:o,label:mt(o)};break}}const b=r.hf_artifact_summary?r.hf_artifact_summary.model_count+r.hf_artifact_summary.dataset_count+r.hf_artifact_summary.space_count:new Set([...r.hf_models??[],...r.hf_datasets??[],...r.hf_spaces??[]]).size;return b>0&&r.arxiv_id&&(i.huggingFace={href:`https://huggingface.co/papers/${r.arxiv_id.replace(/v\d+$/i,"")}`,count:b}),i}function gt({routeId:r}){var we,Pe,Re,ye,je;const i=Ke(),c=A(O.detail(r)),b=A({queryKey:["chatAvailability"],queryFn:()=>st.getAvailability(),refetchInterval:3e4,retry:!1}),t=c.data,o=t?rt(t):null,g=o?null:(t==null?void 0:t.source)==="external"?_e(`/paper-assets/external/${t.id}/paper.pdf`):ut(t==null?void 0:t.url_pdf),v=g&&(t==null?void 0:t.source)!=="external"?ft(g):g,w=ht(t),F=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]),d=((we=t==null?void 0:t.arxiv_id)==null?void 0:we.replace(/v\d+$/i,""))||r,E=s.useCallback(()=>i(`/paper/${d}`),[d,i]),[x,C]=s.useState(()=>sessionStorage.getItem(ee(r))||void 0),[P,S]=s.useState(dt),[u,$]=s.useState(()=>sessionStorage.getItem(Se(r))==="1"),[p,m]=s.useState("paper"),[R,y]=s.useState(),[K,T]=s.useState(),[D,I]=s.useState(!1),Ne=s.useCallback(()=>I(!0),[]),[Ae,_]=s.useState(""),[se]=s.useState(()=>lt(r)),[k,Ee]=s.useState(0),[ne,ie]=s.useState(!1),[$e,oe]=s.useState(!1),M=s.useRef(null),U=s.useRef(null),z=s.useRef(null),ce=s.useRef(null),le=s.useRef(null),q=s.useRef(!1),W=s.useRef(!1),V=s.useRef(0),j=s.useRef(0),Q=s.useRef(0),N=s.useRef(P),de=s.useRef(se),X=s.useRef(t==null?void 0:t.version),ue=Qe().reset,pe=s.useRef(x),f=k>=840;s.useEffect(()=>{pe.current!==x&&(pe.current=x,ue())},[x,ue]),s.useEffect(()=>{t!=null&&t.version&&X.current&&t.version!==X.current&&(y(void 0),_("")),X.current=t==null?void 0:t.version},[t==null?void 0:t.version]),s.useEffect(()=>()=>{window.clearTimeout(V.current),cancelAnimationFrame(j.current)},[]),s.useLayoutEffect(()=>{const e=M.current;if(!e)return;const n=()=>Ee(e.clientWidth);n();const l=new ResizeObserver(n);return l.observe(e),()=>l.disconnect()},[t]),s.useEffect(()=>{if(!t)return;document.title=`${t.title} — Papers With Code reader`;let e=document.querySelector('meta[name="robots"]');const n=!e;e||(e=document.createElement("meta"),e.name="robots",document.head.appendChild(e));const l=e.content;e.content="noindex, nofollow";let h=document.querySelector('link[rel="canonical"]');const Be=!h;h||(h=document.createElement("link"),h.rel="canonical",document.head.appendChild(h));const He=h.href;return h.href=`${window.location.origin}/paper/${d}`,()=>{document.title="Papers With Code",n?e==null||e.remove():e&&(e.content=l),Be?h==null||h.remove():h&&(h.href=He)}},[d,t]);const L=s.useCallback(e=>{if(!k)return Math.max(45,Math.min(75,e));const n=480/k*100,l=100-360/k*100;return Math.max(n,Math.min(l,e))},[k]);s.useEffect(()=>S(e=>{const n=L(e);return N.current=n,n}),[L]);const B=e=>{const n=L(e);N.current=n,S(n),localStorage.setItem(re,String(n))},fe=e=>{var l;const n=L(e);N.current=n,U.current&&(U.current.style.width=`${n}%`),z.current&&(z.current.style.width=`${100-n}%`),(l=ce.current)==null||l.setAttribute("aria-valuenow",String(Math.round(n)))},me=e=>{Q.current=e,!j.current&&(j.current=requestAnimationFrame(()=>{var l;j.current=0;const n=(l=M.current)==null?void 0:l.getBoundingClientRect();n!=null&&n.width&&fe((Q.current-n.left)/n.width*100)}))},Te=e=>{W.current=!0,ie(!0),e.currentTarget.setPointerCapture(e.pointerId),me(e.clientX)},G=()=>{var e;if(W.current){if(j.current){cancelAnimationFrame(j.current),j.current=0;const n=(e=M.current)==null?void 0:e.getBoundingClientRect();n!=null&&n.width&&fe((Q.current-n.left)/n.width*100)}W.current=!1,S(N.current),localStorage.setItem(re,String(N.current)),ie(!1)}},he=e=>{window.clearTimeout(V.current),oe(!0),$(e),sessionStorage.setItem(Se(r),e?"1":"0"),V.current=window.setTimeout(()=>oe(!1),ct+40)},ge=e=>{q.current=!0,he(e)};s.useEffect(()=>{var e;q.current&&(q.current=!1,(e=u?le.current:z.current)==null||e.focus())},[u]);const Ie=e=>{C(e),sessionStorage.setItem(ee(r),e)},Me=()=>{C(void 0),sessionStorage.removeItem(ee(r)),y(void 0),_("")},be=((Pe=b.data)==null?void 0:Pe.paper_reader_selection_enabled)===!0,ve=e=>{y(e),_(`Selection from page ${e.page} added to chat`),f&&u&&he(!1)},ze=s.useCallback(e=>{y(e),e||_("")},[]),Y=((Re=b.data)==null?void 0:Re.paper_reader_citations_enabled)===!0&&!!v,H=A({...O.layout(d),enabled:Y&&!!d}).data,We=s.useMemo(()=>Y?{layout:H,open:e=>{const n=H?Xe(H,e):[];n.length&&(T(l=>({boxes:n,nonce:((l==null?void 0:l.nonce)??0)+1})),m("paper"))}}:null,[Y,H]),xe=De()&&((ye=b.data)==null?void 0:ye.paper_reader_chat_enabled)!==!1,Z=!!(t&&xe&&!(o&&!D)),Le=t&&xe&&!Z?a.jsx("div",{className:"reader-chat-unavailable",role:"status",children:"Chat opens once the paper is ready."}):t&&Z?a.jsx(nt,{mode:"paper",routeSessionId:x,primaryPaper:{id:t.id,routeId:d,title:t.title,arxivId:t.arxiv_id},currentPage:()=>de.current,paperSelection:R,onPaperSelectionChange:ze,onSessionId:Ie,onReaderSubmit:()=>m("assistant"),onReaderNewChat:Me,onReaderClose:f?()=>ge(!0):void 0}):a.jsx("div",{className:"reader-chat-unavailable",children:"Chat is not enabled for this preview."});return c.isLoading?a.jsx("div",{className:"reader-status",role:"status",children:"Loading paper…"}):c.error||!t?a.jsxs("div",{className:"reader-status",role:"alert",children:[a.jsx("p",{children:"Paper not found."}),a.jsx(J,{to:"/papers",children:"Browse papers"})]}):((je=b.data)==null?void 0:je.native_pdf_reader_enabled)===!1?a.jsxs("div",{className:"reader-status",role:"alert",children:[a.jsx("p",{children:"The native reader is currently unavailable."}),a.jsx(J,{to:`/paper/${d}`,children:"Back to paper"})]}):!v&&!o?a.jsxs("div",{className:"reader-status",role:"alert",children:[a.jsx("p",{children:"Native reading is unavailable for this resource."}),a.jsx(J,{to:`/paper/${d}`,children:"Back to paper"})]}):a.jsxs("div",{className:"paper-reader-shell",children:[!f&&a.jsxs("div",{className:"reader-tabs",role:"tablist","aria-label":"Reader panels",children:[a.jsx("button",{type:"button",role:"tab","aria-selected":p==="paper",onClick:()=>m("paper"),children:"Paper"}),a.jsxs("button",{type:"button",role:"tab","aria-selected":p==="assistant","aria-label":R&&p!=="assistant"?"Chat, selection attached":"Chat",onClick:()=>m("assistant"),children:["Chat",R&&p!=="assistant"&&a.jsx("span",{className:"reader-tab-pending","aria-hidden":"true"})]})]}),a.jsx(Ge,{variant:"reader",children:a.jsxs("div",{ref:M,className:`reader-workspace${f?" is-desktop":" is-tabs"}${u?" is-assistant-collapsed":""}${ne?" is-resizing":""}`,"data-testid":"paper-chat-workspace",children:[a.jsx("section",{ref:U,className:`reader-paper-pane${!f&&p!=="paper"?" is-hidden":""}`,style:f?{width:u?"100%":`${P}%`}:void 0,role:"tabpanel","aria-label":"Paper","aria-hidden":!f&&p!=="paper",children:o?a.jsx(ot,{paperId:t.id,paperKey:d,paperTitle:t.title,paperHref:`/paper/${d}`,sourceUrl:o,resources:w,paperVersion:t.version,selectionEnabled:be,onReady:Ne,onPaperSelection:ve,onPaperSelectionError:_}):v&&a.jsx(Ye,{url:v,downloadUrl:g??v,paperKey:d,paperTitle:t.title,paperHref:`/paper/${d}`,onClose:E,resources:w,initialPage:se,resizeActive:ne||$e,selectionEnabled:be,paperVersion:t.version,authors:F,loadErrorMessage:t.source==="external"?"Paper content is still being prepared. Please try again later.":void 0,onPaperSelection:ve,onPaperSelectionError:_,highlight:K,onPageChange:e=>{de.current=e,sessionStorage.setItem(Ce(r),String(e))}})}),f&&!u&&a.jsx("div",{ref:ce,className:"reader-resize-handle",role:"separator","aria-label":"Resize paper and Chat panels","aria-orientation":"vertical","aria-valuemin":45,"aria-valuemax":75,"aria-valuenow":Math.round(P),tabIndex:0,onPointerDown:Te,onPointerMove:e=>{W.current&&me(e.clientX)},onPointerUp:G,onPointerCancel:G,onLostPointerCapture:G,onDoubleClick:()=>B(ke),onKeyDown:e=>{(e.key==="ArrowLeft"||e.key==="ArrowRight")&&(e.preventDefault(),B(P+(e.key==="ArrowRight"?2:-2))),e.key==="Home"&&B(45),e.key==="End"&&B(75)}}),a.jsx("aside",{ref:z,id:"reader-chat-panel",className:`reader-assistant-pane${!f&&p!=="assistant"?" is-hidden":""}${f&&u?" is-collapsed":""}`,style:f?{width:u?0:`${100-P}%`}:void 0,role:"tabpanel","aria-label":"Chat","aria-hidden":!f&&p!=="assistant"||u,tabIndex:-1,children:a.jsx(Ze.Provider,{value:We,children:Le})}),a.jsx("div",{className:"sr-only","aria-live":"polite",children:Ae}),f&&(u||!Z)&&a.jsx("button",{ref:le,type:"button",className:"reader-collapse-assistant","aria-controls":"reader-chat-panel","aria-expanded":!u,onClick:()=>ge(!u),children:u?"Open chat":"Hide chat"})]})})]})}function Yt(){const{paperId:r=""}=Oe(),i=Fe(r).replace(/v\d+$/i,"");return a.jsx(Ve,{workspaceKey:`reader:${r}`,children:a.jsx(gt,{routeId:i},i)})}export{Yt as default,ht as readerToolbarResources}; diff --git a/assets/PapersListView-BtYBhno6.js b/assets/PapersListView-CseFoJbP.js similarity index 90% rename from assets/PapersListView-BtYBhno6.js rename to assets/PapersListView-CseFoJbP.js index b6284307197d17961c27d636563743abc0f52202..463821e59c23b6bf66c9c7cc0b60786f420ecdc8 100644 --- a/assets/PapersListView-BtYBhno6.js +++ b/assets/PapersListView-CseFoJbP.js @@ -1 +1 @@ -import{f as G,i as u,B,w as I,m as Q,j as e,L as f,x as U,b as K,v as V}from"./index-C1Xuuz1Y.js";import{T as X}from"./SotaBadges-B5MVNUr2.js";import{I as q}from"./Icon-BADQ_q7j.js";import{b as J,u as M,a as W,c as Y,d as Z,P as ee}from"./usePapers-DzSHAOm5.js";import{t as se,d as re}from"./transform-btCQtWTl.js";import{u as ae}from"./useDebounce-lFex_Aum.js";import{S as te}from"./skeleton-D8hFkZOU.js";import{A as ne,a as ie}from"./alert-UfpiwFIJ.js";import{f as le}from"./frameworks-DDA0P4Tf.js";import"./colors-BkWRhvFI.js";import"./PaperCard-DjlN6X2v.js";import"./AuthorAvatar-DqCnji_B.js";import"./LatexTitle-B0RfzwYI.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-C1A8cBwB.js";import"./useIntersectionObserver-CwCTFEhv.js";import"./useInfiniteQuery-D52ptoDl.js";const g=360;function de(s,r){const a=s.toLocaleLowerCase();return r.trim().split(/\s+/).filter(Boolean).reduce((t,n)=>{const i=a.indexOf(n.toLocaleLowerCase());return i>=0&&(t<0||i=0?n+1:r}function oe(s,r){if(s.length<=g)return s;const a=de(s,r);if(a<0||a0?"…":""}${s.slice(t,n).trim()}${n{var L,D,R,E,C,T,$,A;const[s]=G(),r=s.get("framework")||void 0,a=s.get("repository")||void 0,t=s.get("search")||"",n=me(s),i=n==="search",l=J({defaultToLastMonth:!i}),{setSearchParams:o}=l,[x,y]=u.useState(t),p=ae(x,300);u.useEffect(()=>y(t),[t]),u.useEffect(()=>{if(p===t)return;const d=new URLSearchParams(s);p?d.set("search",p):d.delete("search"),o(d,{replace:!0})},[p]),u.useEffect(()=>{const d=s.get("order_by"),h=new URLSearchParams(s);i&&!["relevance","date_published","citation_count"].includes(d||"")?(h.set("order_by","relevance"),o(h,{replace:!0})):!i&&d==="relevance"&&(h.delete("order_by"),o(h,{replace:!0}))},[i,s,o]);const j=i&&l.orderBy==="trending"?"relevance":l.orderBy,F=n!=="scoped"&&l.hasCode,S={...l.filters,has_code:F,search:n==="scoped"&&p||void 0,conference:s.get("conference")||void 0,latest_only:s.get("latest_only")!=="false",framework:r,repository:a},v=M(I.list(S),d=>B.list({...S,page:d,page_size:20}),{enabled:!i}),_={q:p.trim(),order_by:j==="trending"?"relevance":j,start_date:l.dateRange.startDate,end_date:l.dateRange.endDate,has_code:F,has_hf_artifacts:l.hasHfArtifacts},P=M(I.search(_),d=>B.searchFeed({..._,page:d,page_size:20,mode:"hybrid"}),{enabled:i&&_.q.length>0}),c=i?P:v,N=u.useMemo(()=>{var h;return(((h=c.data)==null?void 0:h.pages.flatMap(w=>w.results))||[]).map(w=>{const b=se(w);return i?{...b,abstract:oe(b.abstract,t)}:b})},[c.data,i,t]),O=((R=(D=(L=v.data)==null?void 0:L.pages)==null?void 0:D[0])==null?void 0:R.count)??0,m=(T=(C=(E=v.data)==null?void 0:E.pages)==null?void 0:C[0])==null?void 0:T.scope,k=(A=($=P.data)==null?void 0:$.pages)==null?void 0:A.at(-1),z=r&&Q(c.error);return e.jsxs("div",{className:"page",children:[(m==null?void 0:m.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:m.framework_name})]}),e.jsxs("div",{className:"feed-header",children:[e.jsxs("div",{children:[e.jsx(he,{mode:n,scope:m,scopeName:r||a,search:t,totalCount:O,loadedCount:N.length,hasDateRange:!!(l.dateRange.startDate||l.dateRange.endDate)}),n==="scoped"&&m&&e.jsx(pe,{scope:m})]}),e.jsx(W,{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(q,{name:"search",size:14}),e.jsx("input",{className:"papers-search-input",placeholder:"Search title or abstract…",value:x,onChange:d=>y(d.target.value)})]})}),e.jsxs("div",{className:n==="browse"?"layout-with-sidebar":"papers-feed-layout-scoped",children:[n==="browse"&&e.jsx(ue,{}),e.jsxs("div",{children:[e.jsx(Y,{feed:l,sorts:i?ce:Z,activeSort:j,showDateFilter:!1,showHasCode:n!=="scoped",children:e.jsxs("div",{className:"results-count",children:[N.length," loaded"]})}),z?e.jsx("div",{className:"no-results",children:"Framework not found."}):e.jsxs(e.Fragment,{children:[c.error&&e.jsx(ne,{variant:"destructive",className:"mb-4",children:e.jsx(ie,{children:"Failed to load papers. Please try again."})}),e.jsx(ee,{query:c,cards:N,skeleton:"card",highlightQuery:i?t:void 0,empty:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:"No matching papers."}),i&&U()&&e.jsx(f,{to:`/chat?q=${encodeURIComponent(t.trim())}`,children:"Ask the assistant instead"})]}),children:!c.hasNextPage&&!c.isFetchingNextPage&&i&&e.jsx("div",{className:"search-results-end",children:k!=null&&k.cap_reached?"End of the top 100 results":"End of results"})})]})]})]})]})};function he({mode:s,scope:r,scopeName:a,search:t,totalCount:n,loadedCount:i,hasDateRange:l}){const o=n>0&&`${n.toLocaleString()} papers.`;switch(s){case"scoped":{const x=(r==null?void 0:r.kind)==="framework"?r.framework_name:r==null?void 0:r.repository;return e.jsxs(e.Fragment,{children:[e.jsxs("h1",{className:"feed-title",children:["Papers implemented by ",e.jsx("em",{children:x||a})]}),e.jsx("div",{className:"feed-subtitle",children:(r==null?void 0:r.kind)==="framework"?o:r!=null&&r.repository?e.jsxs(e.Fragment,{children:["GitHub repository ",e.jsx("strong",{children:r.repository}),". ",o]}):"Repository-scoped paper feed."})]})}case"search":return e.jsxs(e.Fragment,{children:[e.jsxs("h1",{className:"feed-title",children:["Search results for ",e.jsxs("em",{children:["“",t,"”"]})]}),e.jsx("div",{className:"feed-subtitle",children:`${i} loaded from the most relevant results.`})]});case"browse":return e.jsxs(e.Fragment,{children:[e.jsxs("h1",{className:"feed-title",children:["All ",e.jsx("em",{children:"Papers"})]}),e.jsxs("div",{className:"feed-subtitle",children:["Search the full corpus. ",n>0&&`${n.toLocaleString()} ${l?"papers in this date range":"papers indexed"}.`]})]})}}function pe({scope:s}){const r=s.kind==="framework";return 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:r?"task-framework-link":"framework-link",children:[e.jsx(q,{name:"github",size:13}),r?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:["★ ",le(s.num_stars)]})]}):"GitHub"]}),r&&s.introducing_paper_arxiv_id&&e.jsx(f,{to:`/paper/${s.introducing_paper_arxiv_id}`,className:"framework-link",children:"Introducing paper"})]}),r&&s.recommended_tasks&&s.recommended_tasks.length>0&&e.jsx("div",{className:"paper-feed-task-tags",children:s.recommended_tasks.map(a=>a.slug?e.jsx(X,{slug:a.slug,label:a.name},a.id):null)})]})}function ue(){var r;const s=K(V.topTasks(8));return e.jsx("aside",{className:"sidebar",children:e.jsxs("div",{className:"sidebar-section",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),s.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((a,t)=>e.jsx(te,{className:"h-5 w-full"},t))}),e.jsx("div",{className:"sidebar-links",children:(r=s.data)==null?void 0:r.map(a=>e.jsxs(f,{to:`/tasks/${a.slug}`,className:"sidebar-link",children:[re(a.name,a.slug),a.paper_count!=null&&e.jsx("span",{className:"count",children:a.paper_count})]},a.id))})]})})}export{Ee as default}; +import{f as G,i as u,B,w as I,m as Q,j as e,L as f,x as U,b as K,v as V}from"./index-DMjO_toh.js";import{T as X}from"./SotaBadges-CHGUskQn.js";import{I as q}from"./Icon-D5cUFATZ.js";import{b as J,u as M,a as W,c as Y,d as Z,P as ee}from"./usePapers-DCcqZCMM.js";import{t as se,d as re}from"./transform-CXoeFMaW.js";import{u as ae}from"./useDebounce-_5_VjYb0.js";import{S as te}from"./skeleton-DiGWALrs.js";import{A as ne,a as ie}from"./alert-B2i0PAyW.js";import{f as le}from"./frameworks-DDA0P4Tf.js";import"./colors-BkWRhvFI.js";import"./PaperCard-CUJXx9SW.js";import"./AuthorAvatar-DFoIK6Bc.js";import"./LatexTitle-BRJTz_K0.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-MF6JD1Yi.js";import"./useIntersectionObserver-CU-1-_ok.js";import"./useInfiniteQuery-C91fE_fV.js";const g=360;function de(s,r){const a=s.toLocaleLowerCase();return r.trim().split(/\s+/).filter(Boolean).reduce((t,n)=>{const i=a.indexOf(n.toLocaleLowerCase());return i>=0&&(t<0||i=0?n+1:r}function oe(s,r){if(s.length<=g)return s;const a=de(s,r);if(a<0||a0?"…":""}${s.slice(t,n).trim()}${n{var L,D,R,E,C,T,$,A;const[s]=G(),r=s.get("framework")||void 0,a=s.get("repository")||void 0,t=s.get("search")||"",n=me(s),i=n==="search",l=J({defaultToLastMonth:!i}),{setSearchParams:o}=l,[x,y]=u.useState(t),p=ae(x,300);u.useEffect(()=>y(t),[t]),u.useEffect(()=>{if(p===t)return;const d=new URLSearchParams(s);p?d.set("search",p):d.delete("search"),o(d,{replace:!0})},[p]),u.useEffect(()=>{const d=s.get("order_by"),h=new URLSearchParams(s);i&&!["relevance","date_published","citation_count"].includes(d||"")?(h.set("order_by","relevance"),o(h,{replace:!0})):!i&&d==="relevance"&&(h.delete("order_by"),o(h,{replace:!0}))},[i,s,o]);const j=i&&l.orderBy==="trending"?"relevance":l.orderBy,F=n!=="scoped"&&l.hasCode,S={...l.filters,has_code:F,search:n==="scoped"&&p||void 0,conference:s.get("conference")||void 0,latest_only:s.get("latest_only")!=="false",framework:r,repository:a},v=M(I.list(S),d=>B.list({...S,page:d,page_size:20}),{enabled:!i}),_={q:p.trim(),order_by:j==="trending"?"relevance":j,start_date:l.dateRange.startDate,end_date:l.dateRange.endDate,has_code:F,has_hf_artifacts:l.hasHfArtifacts},P=M(I.search(_),d=>B.searchFeed({..._,page:d,page_size:20,mode:"hybrid"}),{enabled:i&&_.q.length>0}),c=i?P:v,N=u.useMemo(()=>{var h;return(((h=c.data)==null?void 0:h.pages.flatMap(w=>w.results))||[]).map(w=>{const b=se(w);return i?{...b,abstract:oe(b.abstract,t)}:b})},[c.data,i,t]),O=((R=(D=(L=v.data)==null?void 0:L.pages)==null?void 0:D[0])==null?void 0:R.count)??0,m=(T=(C=(E=v.data)==null?void 0:E.pages)==null?void 0:C[0])==null?void 0:T.scope,k=(A=($=P.data)==null?void 0:$.pages)==null?void 0:A.at(-1),z=r&&Q(c.error);return e.jsxs("div",{className:"page",children:[(m==null?void 0:m.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:m.framework_name})]}),e.jsxs("div",{className:"feed-header",children:[e.jsxs("div",{children:[e.jsx(he,{mode:n,scope:m,scopeName:r||a,search:t,totalCount:O,loadedCount:N.length,hasDateRange:!!(l.dateRange.startDate||l.dateRange.endDate)}),n==="scoped"&&m&&e.jsx(pe,{scope:m})]}),e.jsx(W,{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(q,{name:"search",size:14}),e.jsx("input",{className:"papers-search-input",placeholder:"Search title or abstract…",value:x,onChange:d=>y(d.target.value)})]})}),e.jsxs("div",{className:n==="browse"?"layout-with-sidebar":"papers-feed-layout-scoped",children:[n==="browse"&&e.jsx(ue,{}),e.jsxs("div",{children:[e.jsx(Y,{feed:l,sorts:i?ce:Z,activeSort:j,showDateFilter:!1,showHasCode:n!=="scoped",children:e.jsxs("div",{className:"results-count",children:[N.length," loaded"]})}),z?e.jsx("div",{className:"no-results",children:"Framework not found."}):e.jsxs(e.Fragment,{children:[c.error&&e.jsx(ne,{variant:"destructive",className:"mb-4",children:e.jsx(ie,{children:"Failed to load papers. Please try again."})}),e.jsx(ee,{query:c,cards:N,skeleton:"card",highlightQuery:i?t:void 0,empty:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:"No matching papers."}),i&&U()&&e.jsx(f,{to:`/chat?q=${encodeURIComponent(t.trim())}`,children:"Ask the assistant instead"})]}),children:!c.hasNextPage&&!c.isFetchingNextPage&&i&&e.jsx("div",{className:"search-results-end",children:k!=null&&k.cap_reached?"End of the top 100 results":"End of results"})})]})]})]})]})};function he({mode:s,scope:r,scopeName:a,search:t,totalCount:n,loadedCount:i,hasDateRange:l}){const o=n>0&&`${n.toLocaleString()} papers.`;switch(s){case"scoped":{const x=(r==null?void 0:r.kind)==="framework"?r.framework_name:r==null?void 0:r.repository;return e.jsxs(e.Fragment,{children:[e.jsxs("h1",{className:"feed-title",children:["Papers implemented by ",e.jsx("em",{children:x||a})]}),e.jsx("div",{className:"feed-subtitle",children:(r==null?void 0:r.kind)==="framework"?o:r!=null&&r.repository?e.jsxs(e.Fragment,{children:["GitHub repository ",e.jsx("strong",{children:r.repository}),". ",o]}):"Repository-scoped paper feed."})]})}case"search":return e.jsxs(e.Fragment,{children:[e.jsxs("h1",{className:"feed-title",children:["Search results for ",e.jsxs("em",{children:["“",t,"”"]})]}),e.jsx("div",{className:"feed-subtitle",children:`${i} loaded from the most relevant results.`})]});case"browse":return e.jsxs(e.Fragment,{children:[e.jsxs("h1",{className:"feed-title",children:["All ",e.jsx("em",{children:"Papers"})]}),e.jsxs("div",{className:"feed-subtitle",children:["Search the full corpus. ",n>0&&`${n.toLocaleString()} ${l?"papers in this date range":"papers indexed"}.`]})]})}}function pe({scope:s}){const r=s.kind==="framework";return 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:r?"task-framework-link":"framework-link",children:[e.jsx(q,{name:"github",size:13}),r?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:["★ ",le(s.num_stars)]})]}):"GitHub"]}),r&&s.introducing_paper_arxiv_id&&e.jsx(f,{to:`/paper/${s.introducing_paper_arxiv_id}`,className:"framework-link",children:"Introducing paper"})]}),r&&s.recommended_tasks&&s.recommended_tasks.length>0&&e.jsx("div",{className:"paper-feed-task-tags",children:s.recommended_tasks.map(a=>a.slug?e.jsx(X,{slug:a.slug,label:a.name},a.id):null)})]})}function ue(){var r;const s=K(V.topTasks(8));return e.jsx("aside",{className:"sidebar",children:e.jsxs("div",{className:"sidebar-section",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),s.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((a,t)=>e.jsx(te,{className:"h-5 w-full"},t))}),e.jsx("div",{className:"sidebar-links",children:(r=s.data)==null?void 0:r.map(a=>e.jsxs(f,{to:`/tasks/${a.slug}`,className:"sidebar-link",children:[re(a.name,a.slug),a.paper_count!=null&&e.jsx("span",{className:"count",children:a.paper_count})]},a.id))})]})})}export{Ee as default}; diff --git a/assets/PrivacyView-DWYIzZNF.js b/assets/PrivacyView-DH6mkyi8.js similarity index 98% rename from assets/PrivacyView-DWYIzZNF.js rename to assets/PrivacyView-DH6mkyi8.js index cba3d5f93de5fefa55adda19b0920f9d5ee52733..9a2657fba0fd6172aef54c311b637e494164ab48 100644 --- a/assets/PrivacyView-DWYIzZNF.js +++ b/assets/PrivacyView-DH6mkyi8.js @@ -1 +1 @@ -import{j as e}from"./index-C1Xuuz1Y.js";import{u as s,f as i}from"./useDocumentTitle-DS68IpOJ.js";const a=()=>(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:"Voice input."})," If you dictate into the research assistant, your microphone audio is streamed to a speech-recognition model to produce text in your message box. Papers With Code does not store the audio or a separate transcript; the text becomes research assistant content only if you send it. We keep the length and time of each voice session to enforce usage limits."]}),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:"Speech recognition."})," Voice input audio is transcribed by a model hosted on Hugging Face Inference Endpoints. While that model is starting up or at capacity, the audio is transcribed by OpenAI instead. Neither audio nor transcripts are retained by Papers With Code."]}),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{a as default}; +import{j as e}from"./index-DMjO_toh.js";import{u as s,f as i}from"./useDocumentTitle-DVQ2ceqw.js";const a=()=>(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:"Voice input."})," If you dictate into the research assistant, your microphone audio is streamed to a speech-recognition model to produce text in your message box. Papers With Code does not store the audio or a separate transcript; the text becomes research assistant content only if you send it. We keep the length and time of each voice session to enforce usage limits."]}),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:"Speech recognition."})," Voice input audio is transcribed by a model hosted on Hugging Face Inference Endpoints. While that model is starting up or at capacity, the audio is transcribed by OpenAI instead. Neither audio nor transcripts are retained by Papers With Code."]}),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{a as default}; diff --git a/assets/RateLimitsView-CDeHFKmm.js b/assets/RateLimitsView-BOCycN6-.js similarity index 93% rename from assets/RateLimitsView-CDeHFKmm.js rename to assets/RateLimitsView-BOCycN6-.js index a6cd00a1543d8d8083914e9c9fcc24208100a503..4d1b2eda08fa1658d8edcc8f7b5d55a472169c5d 100644 --- a/assets/RateLimitsView-CDeHFKmm.js +++ b/assets/RateLimitsView-BOCycN6-.js @@ -1 +1 @@ -import{b as t,j as e,a9 as s}from"./index-C1Xuuz1Y.js";const n=()=>{const i=t(s.rateLimitPolicy()).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,a9 as s}from"./index-DMjO_toh.js";const n=()=>{const i=t(s.rateLimitPolicy()).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-9sh3MNHN.js b/assets/ResearchFollowButton-BCRaiBQA.js similarity index 93% rename from assets/ResearchFollowButton-9sh3MNHN.js rename to assets/ResearchFollowButton-BCRaiBQA.js index 6f2d6d4d6cdcb815a63c2e44d57c5386ab8c0f1b..11d0b8e8675480aa49ce478473041035304d9ce8 100644 --- a/assets/ResearchFollowButton-9sh3MNHN.js +++ b/assets/ResearchFollowButton-BCRaiBQA.js @@ -1 +1 @@ -import{e as j,q as g,i as b,k as F,j as e,l as N,C as y,L as i}from"./index-C1Xuuz1Y.js";import{f as C,w as L}from"./researchTopic-BU8M-7Qo.js";import{P as u}from"./plus-VBQCmtt2.js";const f={task:"Get new papers on this task",method:"Get new papers using this method",benchmark:"Get new results on this benchmark",author:"Get new papers by this author",organization:"Get new papers from this organization"};function R({kind:o,entityId:n}){var w;const l=j(),c=l==null?void 0:l.user,h=g(),[m,p]=b.useState(null),d=`${o}:${n}`,r=C(),s=((w=r.data)==null?void 0:w.some(a=>a.kind===o&&String(a.entity_id)===String(n)))??!1,t=L({onChanged:({follow:a})=>p(a?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(u,{"aria-hidden":"true"}),"Follow"]}),e.jsxs("span",{className:"research-follow-hint",children:["Sign in to ",f[o].toLowerCase(),"."]})]});const x=t.error||r.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:r.isLoading||!!r.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(y,{"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(u,{"aria-hidden":"true"}),"Follow"]})}),x?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:"/following?edit=1",children:"Edit feed"})]}):e.jsxs("span",{className:"research-follow-hint",children:[f[o]," in ",e.jsx(i,{to:"/following",children:"your Following feed"}),"."]})]})}export{R}; +import{e as j,q as g,i as b,k as F,j as e,l as N,C as y,L as i}from"./index-DMjO_toh.js";import{f as C,w as L}from"./researchTopic-hhMPs4g3.js";import{P as u}from"./plus-B4ZP41Rg.js";const f={task:"Get new papers on this task",method:"Get new papers using this method",benchmark:"Get new results on this benchmark",author:"Get new papers by this author",organization:"Get new papers from this organization"};function R({kind:o,entityId:n}){var w;const l=j(),c=l==null?void 0:l.user,h=g(),[m,p]=b.useState(null),d=`${o}:${n}`,r=C(),s=((w=r.data)==null?void 0:w.some(a=>a.kind===o&&String(a.entity_id)===String(n)))??!1,t=L({onChanged:({follow:a})=>p(a?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(u,{"aria-hidden":"true"}),"Follow"]}),e.jsxs("span",{className:"research-follow-hint",children:["Sign in to ",f[o].toLowerCase(),"."]})]});const x=t.error||r.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:r.isLoading||!!r.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(y,{"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(u,{"aria-hidden":"true"}),"Follow"]})}),x?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:"/following?edit=1",children:"Edit feed"})]}):e.jsxs("span",{className:"research-follow-hint",children:[f[o]," in ",e.jsx(i,{to:"/following",children:"your Following feed"}),"."]})]})}export{R}; diff --git a/assets/SavedPapersView-B-bHqIdh.js b/assets/SavedPapersView-DZOensHN.js similarity index 91% rename from assets/SavedPapersView-B-bHqIdh.js rename to assets/SavedPapersView-DZOensHN.js index 3cf4892093d6da50c46e4296f8bacaaa9290727f..9a12ec36346d935dfaa835b116ac9e6b08f38cf7 100644 --- a/assets/SavedPapersView-B-bHqIdh.js +++ b/assets/SavedPapersView-DZOensHN.js @@ -1 +1 @@ -import{a as g,b as v,K as x,A as j,j as e,H as b,L as N}from"./index-C1Xuuz1Y.js";import{P as f}from"./PaperCard-DjlN6X2v.js";import{T as k}from"./SotaBadges-B5MVNUr2.js";import{S as r}from"./skeleton-D8hFkZOU.js";import{A as y,a as w}from"./alert-UfpiwFIJ.js";import{t as A}from"./transform-btCQtWTl.js";import{s as B}from"./savedPapersAuth-qhoxX36l.js";import"./AuthorAvatar-DqCnji_B.js";import"./Icon-BADQ_q7j.js";import"./LatexTitle-B0RfzwYI.js";import"./safeExternalHref-CkBrsh84.js";import"./colors-BkWRhvFI.js";const q=()=>{var o,l;const{user:t,isLoading:m}=g(),a=v({...x.saved(),enabled:!!t,staleTime:30*1e3}),c=a.error instanceof j&&a.error.code==="saved_papers_bucket_authorization_required",d=!!a.data&&!a.data.bucket_connected,n=()=>{window.location.assign(B())};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(!t)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(b,{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:[(o=a.data)!=null&&o.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/${t.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,d&&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"})]}):d?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((i,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(N,{to:"/papers",className:"sidebar-link",style:{display:"inline"},children:"Browse papers →"})]}):a.data.areas.map(i=>e.jsxs("section",{className:"saved-area-section",children:[e.jsx("h2",{className:"saved-area-heading",children:i.name}),i.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:A(u),priority:h++<3},u.id))})]},`task-${i.id??"other"}-${s.id??"untagged"}`)})]},`area-${i.id??"other"}`))]})};export{q as default}; +import{a as g,b as v,K as x,A as j,j as e,H as b,L as N}from"./index-DMjO_toh.js";import{P as f}from"./PaperCard-CUJXx9SW.js";import{T as k}from"./SotaBadges-CHGUskQn.js";import{S as r}from"./skeleton-DiGWALrs.js";import{A as y,a as w}from"./alert-B2i0PAyW.js";import{t as A}from"./transform-CXoeFMaW.js";import{s as B}from"./savedPapersAuth-DWaz2psA.js";import"./AuthorAvatar-DFoIK6Bc.js";import"./Icon-D5cUFATZ.js";import"./LatexTitle-BRJTz_K0.js";import"./safeExternalHref-CkBrsh84.js";import"./colors-BkWRhvFI.js";const q=()=>{var o,l;const{user:t,isLoading:m}=g(),a=v({...x.saved(),enabled:!!t,staleTime:30*1e3}),c=a.error instanceof j&&a.error.code==="saved_papers_bucket_authorization_required",d=!!a.data&&!a.data.bucket_connected,n=()=>{window.location.assign(B())};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(!t)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(b,{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:[(o=a.data)!=null&&o.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/${t.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,d&&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"})]}):d?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((i,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(N,{to:"/papers",className:"sidebar-link",style:{display:"inline"},children:"Browse papers →"})]}):a.data.areas.map(i=>e.jsxs("section",{className:"saved-area-section",children:[e.jsx("h2",{className:"saved-area-heading",children:i.name}),i.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:A(u),priority:h++<3},u.id))})]},`task-${i.id??"other"}-${s.id??"untagged"}`)})]},`area-${i.id??"other"}`))]})};export{q as default}; diff --git a/assets/SearchOverlay-x6g6F-JL.js b/assets/SearchOverlay-DazkXCH_.js similarity index 96% rename from assets/SearchOverlay-x6g6F-JL.js rename to assets/SearchOverlay-DazkXCH_.js index d7e0c8da7be9ba4723bcc48a73aeddf3d65343f3..c68aef70384370d65bb426dfb44a69480265f708 100644 --- a/assets/SearchOverlay-x6g6F-JL.js +++ b/assets/SearchOverlay-DazkXCH_.js @@ -1 +1 @@ -import{i as L,n as K,aa as U,x as B,b as l,K as $,v as x,j as e,bs as H}from"./index-C1Xuuz1Y.js";import{L as Y}from"./LatexTitle-B0RfzwYI.js";import{u as G}from"./useDebounce-lFex_Aum.js";import{c as X,h as Z}from"./colors-BkWRhvFI.js";import{d as V}from"./transform-btCQtWTl.js";const W=10,D=6,J=350,_=3,rs=({open:i,onClose:o})=>{var Q,S,P,T,R,z;const f=L.useRef(null),I=K(),[n,q]=U.useState(""),a=G(n,J),j=n.trim(),N=a.trim().length>=_,v=B();L.useEffect(()=>{var r;if(!i)return;(r=f.current)==null||r.focus();const s=k=>{k.key==="Escape"&&(k.preventDefault(),k.stopPropagation(),o())};return window.addEventListener("keydown",s,!0),()=>window.removeEventListener("keydown",s,!0)},[i,o]);const c={enabled:i&&N,staleTime:H,retry:!1},y=l({...$.search(a,W),...c}),b=l({...x.taskList({q:a,page_size:6}),...c}),E=l({...x.methodList({q:a,page_size:6}),...c}),F=l({...x.datasetList({q:a,page_size:6}),...c}),C=l({...$.authorSearch(a,D),...c}),w=l({...x.organizationSearch(a,D),...c});if(!i)return null;const h=((Q=b.data)==null?void 0:Q.results)||[],d=((S=E.data)==null?void 0:S.results)||[],m=((P=F.data)==null?void 0:P.results)||[],u=((T=C.data)==null?void 0:T.results)||[],p=((R=w.data)==null?void 0:R.results)||[],g=((z=y.data)==null?void 0:z.results)||[],M=y.isFetching||b.isFetching||E.isFetching||F.isFetching||C.isFetching||w.isFetching,O=h.length||g.length||d.length||m.length||u.length||p.length,t=s=>{o(),I(s)},A=()=>{const s=n.trim();s&&t(`/chat?q=${encodeURIComponent(s)}`)};return e.jsx("div",{className:"search-overlay",onClick:o,children:e.jsxs("div",{className:"search-modal",onClick:s=>s.stopPropagation(),children:[e.jsx("input",{ref:f,className:"search-modal-input",placeholder:"Search papers, tasks, methods, benchmarks, authors, or organizations…",value:n,onChange:s=>q(s.target.value),onKeyDown:s=>{v&&s.key==="Enter"&&(s.preventDefault(),A())}}),e.jsxs("div",{className:"search-results",children:[v&&n.trim()&&e.jsxs("button",{type:"button",className:"search-ask-row",onClick:A,children:[e.jsx("span",{className:"search-ask-chip",children:"assistant"}),e.jsxs("span",{className:"search-ask-text",children:["Ask: “",n.trim(),"”"]}),e.jsx("kbd",{children:"↵"})]}),!a&&e.jsxs("div",{className:"search-empty",children:["Try “diffusion”, “object detection”, or an arXiv id.",v&&e.jsx("span",{className:"search-empty-sub",children:"Press Enter to ask the assistant"})]}),a&&!N&&e.jsxs("div",{className:"search-empty",children:["Keep typing: results appear from ",_," characters."]}),N&&!M&&!O&&e.jsxs("div",{className:"search-empty",children:['No matches for "',n,'"']}),h.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Tasks · ",h.length]}),h.map(s=>{const r=X(Z(s.slug||""));return e.jsxs("div",{className:"search-result-tag",onClick:()=>t(`/tasks/${s.slug}`),children:[e.jsx("span",{className:"dot",style:{width:6,height:6,borderRadius:"50%",background:r.dot}}),e.jsx("span",{className:"name",children:V(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:()=>t(`/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:()=>t(`/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:()=>t(`/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:()=>t(`/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 r;return e.jsxs("div",{className:"search-result",onClick:()=>t(`/paper/${s.arxiv_id||s.id}`),children:[e.jsx("div",{className:"search-result-title",children:e.jsx(Y,{title:s.title})}),e.jsxs("div",{className:"search-result-meta",children:[e.jsx("span",{children:s.arxiv_id?`arXiv:${s.arxiv_id}`:"External resource"}),((r=s.authors)==null?void 0:r[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>=_&&e.jsxs("button",{type:"button",className:"search-view-all-row",onClick:()=>t(`/papers?search=${encodeURIComponent(j)}`),children:["View all paper results for “",j,"”"]})]})]})})};export{rs as default}; +import{i as L,n as K,aa as U,x as B,b as l,K as $,v as x,j as e,bs as H}from"./index-DMjO_toh.js";import{L as Y}from"./LatexTitle-BRJTz_K0.js";import{u as G}from"./useDebounce-_5_VjYb0.js";import{c as X,h as Z}from"./colors-BkWRhvFI.js";import{d as V}from"./transform-CXoeFMaW.js";const W=10,D=6,J=350,_=3,rs=({open:i,onClose:o})=>{var Q,S,P,T,R,z;const f=L.useRef(null),I=K(),[n,q]=U.useState(""),a=G(n,J),j=n.trim(),N=a.trim().length>=_,v=B();L.useEffect(()=>{var r;if(!i)return;(r=f.current)==null||r.focus();const s=k=>{k.key==="Escape"&&(k.preventDefault(),k.stopPropagation(),o())};return window.addEventListener("keydown",s,!0),()=>window.removeEventListener("keydown",s,!0)},[i,o]);const c={enabled:i&&N,staleTime:H,retry:!1},y=l({...$.search(a,W),...c}),b=l({...x.taskList({q:a,page_size:6}),...c}),E=l({...x.methodList({q:a,page_size:6}),...c}),F=l({...x.datasetList({q:a,page_size:6}),...c}),C=l({...$.authorSearch(a,D),...c}),w=l({...x.organizationSearch(a,D),...c});if(!i)return null;const h=((Q=b.data)==null?void 0:Q.results)||[],d=((S=E.data)==null?void 0:S.results)||[],m=((P=F.data)==null?void 0:P.results)||[],u=((T=C.data)==null?void 0:T.results)||[],p=((R=w.data)==null?void 0:R.results)||[],g=((z=y.data)==null?void 0:z.results)||[],M=y.isFetching||b.isFetching||E.isFetching||F.isFetching||C.isFetching||w.isFetching,O=h.length||g.length||d.length||m.length||u.length||p.length,t=s=>{o(),I(s)},A=()=>{const s=n.trim();s&&t(`/chat?q=${encodeURIComponent(s)}`)};return e.jsx("div",{className:"search-overlay",onClick:o,children:e.jsxs("div",{className:"search-modal",onClick:s=>s.stopPropagation(),children:[e.jsx("input",{ref:f,className:"search-modal-input",placeholder:"Search papers, tasks, methods, benchmarks, authors, or organizations…",value:n,onChange:s=>q(s.target.value),onKeyDown:s=>{v&&s.key==="Enter"&&(s.preventDefault(),A())}}),e.jsxs("div",{className:"search-results",children:[v&&n.trim()&&e.jsxs("button",{type:"button",className:"search-ask-row",onClick:A,children:[e.jsx("span",{className:"search-ask-chip",children:"assistant"}),e.jsxs("span",{className:"search-ask-text",children:["Ask: “",n.trim(),"”"]}),e.jsx("kbd",{children:"↵"})]}),!a&&e.jsxs("div",{className:"search-empty",children:["Try “diffusion”, “object detection”, or an arXiv id.",v&&e.jsx("span",{className:"search-empty-sub",children:"Press Enter to ask the assistant"})]}),a&&!N&&e.jsxs("div",{className:"search-empty",children:["Keep typing: results appear from ",_," characters."]}),N&&!M&&!O&&e.jsxs("div",{className:"search-empty",children:['No matches for "',n,'"']}),h.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Tasks · ",h.length]}),h.map(s=>{const r=X(Z(s.slug||""));return e.jsxs("div",{className:"search-result-tag",onClick:()=>t(`/tasks/${s.slug}`),children:[e.jsx("span",{className:"dot",style:{width:6,height:6,borderRadius:"50%",background:r.dot}}),e.jsx("span",{className:"name",children:V(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:()=>t(`/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:()=>t(`/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:()=>t(`/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:()=>t(`/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 r;return e.jsxs("div",{className:"search-result",onClick:()=>t(`/paper/${s.arxiv_id||s.id}`),children:[e.jsx("div",{className:"search-result-title",children:e.jsx(Y,{title:s.title})}),e.jsxs("div",{className:"search-result-meta",children:[e.jsx("span",{children:s.arxiv_id?`arXiv:${s.arxiv_id}`:"External resource"}),((r=s.authors)==null?void 0:r[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>=_&&e.jsxs("button",{type:"button",className:"search-view-all-row",onClick:()=>t(`/papers?search=${encodeURIComponent(j)}`),children:["View all paper results for “",j,"”"]})]})]})})};export{rs as default}; diff --git a/assets/SettingsView-z1Pe8Gpv.js b/assets/SettingsView-gwFUCq1L.js similarity index 97% rename from assets/SettingsView-z1Pe8Gpv.js rename to assets/SettingsView-gwFUCq1L.js index 52a04d465cb1b248d06b746175a3d30a7d3f724b..7e061d9d4a759cf92970035afd9c4d1992275dde 100644 --- a/assets/SettingsView-z1Pe8Gpv.js +++ b/assets/SettingsView-gwFUCq1L.js @@ -1,4 +1,4 @@ -import{d as U,a as ne,o as ae,r as oe,b as B,g as X,j as e,L as Z,H as x,l as ce,aS as de,q as he,aa as m,x as ue,A as te}from"./index-C1Xuuz1Y.js";import{u as f}from"./useMutation-Cb0wrKBq.js";import{f as ge,e as me}from"./researchTopic-BU8M-7Qo.js";import{S as P}from"./switch-BrihALZS.js";import{A as ee}from"./arrow-right-BUEjhpSy.js";import{c as p}from"./chat-CiW-DJRi.js";import{u as pe,f as xe}from"./useDocumentTitle-DS68IpOJ.js";import{a as fe,u as je,r as be,O as Y}from"./openrouter-B1BP_cUi.js";import{u as ye}from"./preferences-zpJ52tLe.js";import{E as se}from"./external-link-BwpBZl45.js";import{M as ve}from"./moon-DB_mnxXr.js";import"./index-CNkd3QcT.js";/** +import{d as U,a as ne,o as ae,r as oe,b as B,g as X,j as e,L as Z,H as x,l as ce,aS as de,q as he,aa as m,x as ue,A as te}from"./index-DMjO_toh.js";import{u as f}from"./useMutation-Db093XSk.js";import{f as ge,e as me}from"./researchTopic-hhMPs4g3.js";import{S as P}from"./switch-t5rMaesI.js";import{A as ee}from"./arrow-right-Tu8hJpdM.js";import{c as p}from"./chat-B4elm0RV.js";import{u as pe,f as xe}from"./useDocumentTitle-DVQ2ceqw.js";import{a as fe,u as je,r as be,O as Y}from"./openrouter-bfrcMxtX.js";import{u as ye}from"./preferences-B1gzdJ4J.js";import{E as se}from"./external-link-Bt4eibsp.js";import{M as ve}from"./moon-CIGKI3Uq.js";import"./index-BgYoYvBg.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/SharedChatView-BFhGSZmU.js b/assets/SharedChatView-Dj57MfC5.js similarity index 81% rename from assets/SharedChatView-BFhGSZmU.js rename to assets/SharedChatView-Dj57MfC5.js index 740433732d9e5ec34344426acd2848817ab3971e..a27fa16899cbc53830cb8d7316fe56e25f881718 100644 --- a/assets/SharedChatView-BFhGSZmU.js +++ b/assets/SharedChatView-Dj57MfC5.js @@ -1 +1 @@ -import{u as x,n as g,i as o,b as v,j as e,A as j,D as f}from"./index-C1Xuuz1Y.js";import{A as b,a as y,C as S,U as w,b as N,t as k}from"./chatLifecycle-CbrXR8Sy.js";import{h as C,p as q,j as A,q as P}from"./chatSessions-DFoCf0pS.js";import{c as _}from"./chat-CiW-DJRi.js";/* empty css */import"./hover-card-BSWfQepz.js";import"./CatalogEntityPreviewLink-DxTQ9Cxu.js";import"./github-DYMnkwxi.js";import"./file-text-BlXclTHj.js";import"./PaperPreviewLink-CTwxrQQW.js";import"./index-SntObKrh.js";import"./index-B8mUud-W.js";import"./katex-DkKDou_j.js";import"./useMutation-Cb0wrKBq.js";import"./thumbs-up-Ys3ImX4j.js";import"./copy-DN4cM864.js";import"./arrow-left-B9GmgZLS.js";import"./external-link-BwpBZl45.js";import"./plus-VBQCmtt2.js";import"./search-YolWz-tq.js";import"./chevron-up-zZuEVcHx.js";import"./AuthorAvatar-DqCnji_B.js";const m=s=>s instanceof j&&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))})},ee=()=>{const{shareId:s=""}=x(),n=g(),i=f(),[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{ee as default}; +import{u as x,n as g,i as o,b as v,j as e,A as j,D as f}from"./index-DMjO_toh.js";import{A as b,a as y,C as S,U as w,b as N,t as k}from"./chatLifecycle-CkvR6Xsi.js";import{h as C,p as q,j as A,q as P}from"./chatSessions-CtEVszLf.js";import{c as _}from"./chat-B4elm0RV.js";/* empty css */import"./hover-card-D4j7S6P3.js";import"./CatalogEntityPreviewLink-BirlAu9e.js";import"./github-3dJEQTDr.js";import"./file-text-D6OyOvvT.js";import"./PaperPreviewLink-DvyVialT.js";import"./index-ruElXN5Q.js";import"./index-BCW47Vvr.js";import"./katex-DkKDou_j.js";import"./useMutation-Db093XSk.js";import"./thumbs-up-CZ7BdM1B.js";import"./copy-DXTYKY8f.js";import"./arrow-left-BSWED_nt.js";import"./external-link-Bt4eibsp.js";import"./plus-B4ZP41Rg.js";import"./search-D6uSAb1U.js";import"./chevron-up-5Y7cB_yq.js";import"./AuthorAvatar-DFoIK6Bc.js";const m=s=>s instanceof j&&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))})},ee=()=>{const{shareId:s=""}=x(),n=g(),i=f(),[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{ee as default}; diff --git a/assets/SignInToEditDialog-DkoRRdng.js b/assets/SignInToEditDialog-BIKQbaVj.js similarity index 96% rename from assets/SignInToEditDialog-DkoRRdng.js rename to assets/SignInToEditDialog-BIKQbaVj.js index 41cba372c072ee2fb8a10edac6a0d6972a40d855..bfa7e98d03f120ffe8bd691dcb0b4eb5f91be96c 100644 --- a/assets/SignInToEditDialog-DkoRRdng.js +++ b/assets/SignInToEditDialog-BIKQbaVj.js @@ -1,4 +1,4 @@ -import{d as be,i as a,j as e,az as je,Z as fe,aA as ye,I as Ne,O as we,X as Se,C as _e,N as se,H as ke}from"./index-C1Xuuz1Y.js";import{B as P}from"./button-DMLWlhJJ.js";import{I as u}from"./input-DJqx9Wtu.js";import{T as Ce}from"./textarea--CThIdhF.js";import{S as te}from"./searchable-select-DPAXOMOd.js";import{D as ie,a as oe,c as le,b as ce,d as de,e as De}from"./dialog-CCU_33Ju.js";import{u as Ie}from"./useMutation-Cb0wrKBq.js";import{s as b,p as j}from"./submissions-DcU5ZqyQ.js";import{L as Ee}from"./loader-circle-tzO1dF92.js";/** +import{d as be,i as a,j as e,az as je,Z as fe,aA as ye,I as Ne,O as we,X as Se,C as _e,N as se,H as ke}from"./index-DMjO_toh.js";import{B as P}from"./button-BGphIht2.js";import{I as u}from"./input-BzpOTl46.js";import{T as Ce}from"./textarea-nRN8oSDz.js";import{S as te}from"./searchable-select-DscHfpAa.js";import{D as ie,a as oe,c as le,b as ce,d as de,e as De}from"./dialog-C-drkhvX.js";import{u as Ie}from"./useMutation-Db093XSk.js";import{s as b,p as j}from"./submissions-C02Zu9zt.js";import{L as Ee}from"./loader-circle-gyMLnt4Y.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/SotaBadges-B5MVNUr2.js b/assets/SotaBadges-CHGUskQn.js similarity index 97% rename from assets/SotaBadges-B5MVNUr2.js rename to assets/SotaBadges-CHGUskQn.js index caeeccda183b24e99a0ae193b4207d2b4031c633..ca84023305bd19ec5423e029cfcc284406d60427 100644 --- a/assets/SotaBadges-B5MVNUr2.js +++ b/assets/SotaBadges-CHGUskQn.js @@ -1 +1 @@ -import{n as T,j as e,aa as x,L as M}from"./index-C1Xuuz1Y.js";import{h as F,c as E}from"./colors-BkWRhvFI.js";import{d as A,h as P}from"./transform-btCQtWTl.js";const D=({slug:t,label:s,onClick:r})=>{const o=T(),g=F(t),n=E(g),u=c=>{if(c.stopPropagation(),r){r(t);return}o(`/tasks/${t}`)};return e.jsxs("span",{className:"tag-chip",style:{background:n.bg,color:n.text},onClick:u,children:[e.jsx("span",{className:"dot",style:{background:n.dot}}),A(s||P(t),t)]})},I=({method:t,onClick:s})=>{const r=T(),o=t.slug||t.id||"";if(!o)return null;const g=n=>{if(n.stopPropagation(),s){s(o);return}r(`/methods/${o}`)};return e.jsx("span",{className:"method-chip",onClick:g,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,o=220,g=[.85+s()*.1,.55+s()*.25],n=.45+s()*.3,u=[],c=9+Math.floor(s()*3);for(let $=0;$.3,m=Math.floor(s()*3),y=[],a=6+Math.floor(s()*3);for(let $=0;$e.jsx("rect",{x:l+(r-l*2)*(1-$)/2,y:C+k*2.4,width:(r-l*2)*$,height:1.4,fill:p,rx:.3},`t${k}`)),e.jsx("rect",{x:l+(r-l*2)*(1-n)/2,y:S,width:(r-l*2)*n,height:.9,fill:i,opacity:.7,rx:.2}),e.jsx("rect",{x:l,y:L,width:6,height:1,fill:p,opacity:.6}),u.map(($,k)=>{const v=j+k*2.1;return v>o-l-1?null:e.jsx("rect",{x:w,y:v,width:b*$,height:.8,fill:i,opacity:.55,rx:.2},`l${k}`)}),f&&e.jsxs("g",{children:[e.jsx("rect",{x:h,y:j,width:b,height:14,fill:"#F0EBE0",stroke:i,strokeWidth:.3,opacity:.9}),m===0&&e.jsx("g",{stroke:p,strokeWidth:.4,fill:"none",opacity:.6,children:e.jsx("polyline",{points:`${h+2},${j+11} ${h+6},${j+8} ${h+10},${j+9} ${h+14},${j+5} ${h+18},${j+6} ${h+22},${j+3}`})}),m===1&&e.jsxs("g",{opacity:.55,children:[e.jsx("circle",{cx:h+b/2,cy:j+7,r:3.5,fill:p}),e.jsx("rect",{x:h+2,y:j+11,width:b-4,height:1.5,fill:i})]}),m===2&&e.jsxs("g",{opacity:.55,children:[e.jsx("rect",{x:h+3,y:j+5,width:b-6,height:1,fill:p}),e.jsx("rect",{x:h+6,y:j+8,width:b-12,height:.8,fill:p})]})]}),y.map(($,k)=>{const v=j+(f?16:0)+k*2.1;return v>o-l-1?null:e.jsx("rect",{x:h,y:v,width:b*$,height:.8,fill:i,opacity:.55,rx:.2},`r${k}`)})]})})},Y=({paperId:t,title:s,thumbnailUrl:r,priority:o=!1})=>{const[g,n]=x.useState(!1),[u,c]=x.useState(0),[f,m]=x.useState(o),y=x.useRef(null);x.useEffect(()=>{n(!1),c(0)},[r]);const a=x.useMemo(()=>{if(!r)return null;if(u===0)return r;const i=r.includes("?")?"&":"?";return`${r}${i}retry=${u}`},[r,u]);return x.useEffect(()=>{if(o||f)return;const i=y.current;if(!i)return;const p=new IntersectionObserver(([l])=>{l.isIntersecting&&(m(!0),p.disconnect())},{rootMargin:"250px"});return p.observe(i),()=>p.disconnect()},[o,f]),r&&!g?e.jsx("div",{ref:y,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:(o||f)&&a&&e.jsx("img",{src:a,alt:`Thumbnail for ${s}`,loading:o?"eager":"lazy",decoding:"async",fetchPriority:o?"high":"auto",style:{width:"100%",height:"100%",objectFit:"contain",display:"block"},onError:()=>{if(u<1){c(i=>i+1);return}n(!0)}},a)}):e.jsx(O,{paperId:t})},N={1:"SOTA 🏆",2:"#2",3:"#3"},R=({units:t,paperHref:s,expandable:r=!1})=>{const o=x.useRef(null),g=x.useRef(null),[n,u]=x.useState(t.length),[c,f]=x.useState(!1);if(x.useLayoutEffect(()=>{const a=o.current,i=g.current;if(!a||!i||t.length===0)return;const p=w=>(i.textContent=w,i.scrollWidth),l=()=>{const w=a.clientWidth;if(w<=0)return;let h=0,d=0;for(const C of t){const S=p(C.measureText);if(h+S<=w)h+=S,d+=1;else break}if(d0&&h+p(` · +${t.length-d} more`)>w;)d-=1,h-=p(t[d].measureText);d===0&&(d=1)}u(d)};l();const b=new ResizeObserver(l);return b.observe(a),()=>b.disconnect()},[t]),t.length===0)return null;const m=c?t:t.slice(0,Math.max(1,Math.min(n,t.length))),y=t.length-m.length;return e.jsxs("div",{className:`paper-sota${c?" paper-sota--expanded":""}`,ref:o,children:[e.jsx("span",{ref:g,className:"paper-sota-measure","aria-hidden":"true"}),m.map((a,i)=>e.jsxs(x.Fragment,{children:[a.isGroupStart?e.jsxs(e.Fragment,{children:[i>0&&e.jsx("span",{className:"paper-sota-sep",children:" · "}),e.jsx("span",{className:`paper-sota-label${a.rank===1?" paper-sota-label--sota":""}`,children:N[a.rank]}),e.jsx("span",{className:"paper-sota-on",children:" on "})]}):e.jsx("span",{className:"paper-sota-sep",children:", "}),a.href?e.jsx(M,{to:a.href,className:"paper-sota-name",onClick:p=>p.stopPropagation(),children:a.name}):e.jsx("span",{className:"paper-sota-name",children:a.name})]},`${a.href||a.name}-${i}`)),c&&e.jsx("button",{type:"button",className:"paper-sota-more",onClick:()=>f(!1),children:" · show less"}),y>0&&r&&e.jsxs("button",{type:"button",className:"paper-sota-more","aria-expanded":!1,onClick:()=>f(!0),children:[" · +",y," more"]}),y>0&&!r&&e.jsxs(M,{to:`${s}#results`,className:"paper-sota-more",onClick:a=>a.stopPropagation(),children:[" · +",y," more"]})]})},_=({ranks:t,paperHref:s,wrap:r=!1})=>{const o=x.useMemo(()=>{const n=[];let u=!0;for(const c of[1,2,3]){const f=t.filter(m=>m.rank===c);f.forEach((m,y)=>{const a=y===0,i=a?`${u?"":" · "}${N[c]} on `:", ";n.push({name:m.name,href:m.href,rank:c,isGroupStart:a,measureText:i+m.name})}),f.length>0&&(u=!1)}return n},[t]),g=x.useMemo(()=>[1,2,3].map(n=>t.filter(c=>c.rank===n).map((c,f)=>({name:c.name,href:c.href,rank:n,isGroupStart:f===0,measureText:(f===0?`${N[n]} on `:", ")+c.name}))).filter(n=>n.length>0),[t]);return r?g.length===0?null:e.jsx("div",{className:"paper-sota-stack",children:g.map(n=>e.jsx(R,{units:n,paperHref:s,expandable:!0},`${s}-${n[0].rank}`))}):o.length===0?null:e.jsx(R,{units:o,paperHref:s})};export{I as M,Y as P,_ as S,D as T}; +import{n as T,j as e,aa as x,L as M}from"./index-DMjO_toh.js";import{h as F,c as E}from"./colors-BkWRhvFI.js";import{d as A,h as P}from"./transform-CXoeFMaW.js";const D=({slug:t,label:s,onClick:r})=>{const o=T(),g=F(t),n=E(g),u=c=>{if(c.stopPropagation(),r){r(t);return}o(`/tasks/${t}`)};return e.jsxs("span",{className:"tag-chip",style:{background:n.bg,color:n.text},onClick:u,children:[e.jsx("span",{className:"dot",style:{background:n.dot}}),A(s||P(t),t)]})},I=({method:t,onClick:s})=>{const r=T(),o=t.slug||t.id||"";if(!o)return null;const g=n=>{if(n.stopPropagation(),s){s(o);return}r(`/methods/${o}`)};return e.jsx("span",{className:"method-chip",onClick:g,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,o=220,g=[.85+s()*.1,.55+s()*.25],n=.45+s()*.3,u=[],c=9+Math.floor(s()*3);for(let $=0;$.3,m=Math.floor(s()*3),y=[],a=6+Math.floor(s()*3);for(let $=0;$e.jsx("rect",{x:l+(r-l*2)*(1-$)/2,y:C+k*2.4,width:(r-l*2)*$,height:1.4,fill:p,rx:.3},`t${k}`)),e.jsx("rect",{x:l+(r-l*2)*(1-n)/2,y:S,width:(r-l*2)*n,height:.9,fill:i,opacity:.7,rx:.2}),e.jsx("rect",{x:l,y:L,width:6,height:1,fill:p,opacity:.6}),u.map(($,k)=>{const v=j+k*2.1;return v>o-l-1?null:e.jsx("rect",{x:w,y:v,width:b*$,height:.8,fill:i,opacity:.55,rx:.2},`l${k}`)}),f&&e.jsxs("g",{children:[e.jsx("rect",{x:h,y:j,width:b,height:14,fill:"#F0EBE0",stroke:i,strokeWidth:.3,opacity:.9}),m===0&&e.jsx("g",{stroke:p,strokeWidth:.4,fill:"none",opacity:.6,children:e.jsx("polyline",{points:`${h+2},${j+11} ${h+6},${j+8} ${h+10},${j+9} ${h+14},${j+5} ${h+18},${j+6} ${h+22},${j+3}`})}),m===1&&e.jsxs("g",{opacity:.55,children:[e.jsx("circle",{cx:h+b/2,cy:j+7,r:3.5,fill:p}),e.jsx("rect",{x:h+2,y:j+11,width:b-4,height:1.5,fill:i})]}),m===2&&e.jsxs("g",{opacity:.55,children:[e.jsx("rect",{x:h+3,y:j+5,width:b-6,height:1,fill:p}),e.jsx("rect",{x:h+6,y:j+8,width:b-12,height:.8,fill:p})]})]}),y.map(($,k)=>{const v=j+(f?16:0)+k*2.1;return v>o-l-1?null:e.jsx("rect",{x:h,y:v,width:b*$,height:.8,fill:i,opacity:.55,rx:.2},`r${k}`)})]})})},Y=({paperId:t,title:s,thumbnailUrl:r,priority:o=!1})=>{const[g,n]=x.useState(!1),[u,c]=x.useState(0),[f,m]=x.useState(o),y=x.useRef(null);x.useEffect(()=>{n(!1),c(0)},[r]);const a=x.useMemo(()=>{if(!r)return null;if(u===0)return r;const i=r.includes("?")?"&":"?";return`${r}${i}retry=${u}`},[r,u]);return x.useEffect(()=>{if(o||f)return;const i=y.current;if(!i)return;const p=new IntersectionObserver(([l])=>{l.isIntersecting&&(m(!0),p.disconnect())},{rootMargin:"250px"});return p.observe(i),()=>p.disconnect()},[o,f]),r&&!g?e.jsx("div",{ref:y,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:(o||f)&&a&&e.jsx("img",{src:a,alt:`Thumbnail for ${s}`,loading:o?"eager":"lazy",decoding:"async",fetchPriority:o?"high":"auto",style:{width:"100%",height:"100%",objectFit:"contain",display:"block"},onError:()=>{if(u<1){c(i=>i+1);return}n(!0)}},a)}):e.jsx(O,{paperId:t})},N={1:"SOTA 🏆",2:"#2",3:"#3"},R=({units:t,paperHref:s,expandable:r=!1})=>{const o=x.useRef(null),g=x.useRef(null),[n,u]=x.useState(t.length),[c,f]=x.useState(!1);if(x.useLayoutEffect(()=>{const a=o.current,i=g.current;if(!a||!i||t.length===0)return;const p=w=>(i.textContent=w,i.scrollWidth),l=()=>{const w=a.clientWidth;if(w<=0)return;let h=0,d=0;for(const C of t){const S=p(C.measureText);if(h+S<=w)h+=S,d+=1;else break}if(d0&&h+p(` · +${t.length-d} more`)>w;)d-=1,h-=p(t[d].measureText);d===0&&(d=1)}u(d)};l();const b=new ResizeObserver(l);return b.observe(a),()=>b.disconnect()},[t]),t.length===0)return null;const m=c?t:t.slice(0,Math.max(1,Math.min(n,t.length))),y=t.length-m.length;return e.jsxs("div",{className:`paper-sota${c?" paper-sota--expanded":""}`,ref:o,children:[e.jsx("span",{ref:g,className:"paper-sota-measure","aria-hidden":"true"}),m.map((a,i)=>e.jsxs(x.Fragment,{children:[a.isGroupStart?e.jsxs(e.Fragment,{children:[i>0&&e.jsx("span",{className:"paper-sota-sep",children:" · "}),e.jsx("span",{className:`paper-sota-label${a.rank===1?" paper-sota-label--sota":""}`,children:N[a.rank]}),e.jsx("span",{className:"paper-sota-on",children:" on "})]}):e.jsx("span",{className:"paper-sota-sep",children:", "}),a.href?e.jsx(M,{to:a.href,className:"paper-sota-name",onClick:p=>p.stopPropagation(),children:a.name}):e.jsx("span",{className:"paper-sota-name",children:a.name})]},`${a.href||a.name}-${i}`)),c&&e.jsx("button",{type:"button",className:"paper-sota-more",onClick:()=>f(!1),children:" · show less"}),y>0&&r&&e.jsxs("button",{type:"button",className:"paper-sota-more","aria-expanded":!1,onClick:()=>f(!0),children:[" · +",y," more"]}),y>0&&!r&&e.jsxs(M,{to:`${s}#results`,className:"paper-sota-more",onClick:a=>a.stopPropagation(),children:[" · +",y," more"]})]})},_=({ranks:t,paperHref:s,wrap:r=!1})=>{const o=x.useMemo(()=>{const n=[];let u=!0;for(const c of[1,2,3]){const f=t.filter(m=>m.rank===c);f.forEach((m,y)=>{const a=y===0,i=a?`${u?"":" · "}${N[c]} on `:", ";n.push({name:m.name,href:m.href,rank:c,isGroupStart:a,measureText:i+m.name})}),f.length>0&&(u=!1)}return n},[t]),g=x.useMemo(()=>[1,2,3].map(n=>t.filter(c=>c.rank===n).map((c,f)=>({name:c.name,href:c.href,rank:n,isGroupStart:f===0,measureText:(f===0?`${N[n]} on `:", ")+c.name}))).filter(n=>n.length>0),[t]);return r?g.length===0?null:e.jsx("div",{className:"paper-sota-stack",children:g.map(n=>e.jsx(R,{units:n,paperHref:s,expandable:!0},`${s}-${n[0].rank}`))}):o.length===0?null:e.jsx(R,{units:o,paperHref:s})};export{I as M,Y as P,_ as S,D as T}; diff --git a/assets/StagingAccessRequestView-KqVz9HWF.js b/assets/StagingAccessRequestView-BhBwFqrG.js similarity index 95% rename from assets/StagingAccessRequestView-KqVz9HWF.js rename to assets/StagingAccessRequestView-BhBwFqrG.js index 9ff1ff92e9c32441623ca8073943298ed86f0fcc..7fcc1452e7a37b2c1ca7c6926b2489e7599f1749 100644 --- a/assets/StagingAccessRequestView-KqVz9HWF.js +++ b/assets/StagingAccessRequestView-BhBwFqrG.js @@ -1 +1 @@ -import{a as m,aa as a,j as e,H as g,bt as p}from"./index-C1Xuuz1Y.js";import{C as j}from"./circle-check-Btq6l2JE.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,aa as a,j as e,H as g,bt as p}from"./index-DMjO_toh.js";import{C as j}from"./circle-check-KHLmL3jb.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-UZ55xCo_.js b/assets/SubmissionsDashboard-kVd__SF8.js similarity index 98% rename from assets/SubmissionsDashboard-UZ55xCo_.js rename to assets/SubmissionsDashboard-kVd__SF8.js index 8b3238fdbdc2b4f9e1cf41b0c746f1255ef19b7b..4662ccfa917328ab7d42b462783f9bd291a1fea9 100644 --- a/assets/SubmissionsDashboard-UZ55xCo_.js +++ b/assets/SubmissionsDashboard-kVd__SF8.js @@ -1,4 +1,4 @@ -import{d as ee,aa as x,j as e,Z as b,b as se,v as M,al as te,I as ae,O as k,o as ne,bn as R,N as re,bo as le,bp as oe,bq as de}from"./index-C1Xuuz1Y.js";import{i as W,b as ce,e as ue,a as q}from"./cacheSync-Dp3vd6Pv.js";import{u as F}from"./useMutation-Cb0wrKBq.js";import{u as pe}from"./useInfiniteQuery-D52ptoDl.js";import{u as ie}from"./useQueries-qwvJW35M.js";import{s as me}from"./safeExternalHref-CkBrsh84.js";import{E as D,s as $}from"./submissions-DcU5ZqyQ.js";import{R as he,C as fe}from"./refresh-cw-Cq-FpYrg.js";import{L as I}from"./loader-circle-tzO1dF92.js";import{C as je}from"./circle-check-Btq6l2JE.js";/** +import{d as ee,aa as x,j as e,Z as b,b as se,v as M,al as te,I as ae,O as k,o as ne,bn as R,N as re,bo as le,bp as oe,bq as de}from"./index-DMjO_toh.js";import{i as W,b as ce,e as ue,a as q}from"./cacheSync-BmYny7qy.js";import{u as F}from"./useMutation-Db093XSk.js";import{u as pe}from"./useInfiniteQuery-C91fE_fV.js";import{u as ie}from"./useQueries-DpMmxV-N.js";import{s as me}from"./safeExternalHref-CkBrsh84.js";import{E as D,s as $}from"./submissions-C02Zu9zt.js";import{R as he,C as fe}from"./refresh-cw-CeolKVxs.js";import{L as I}from"./loader-circle-gyMLnt4Y.js";import{C as je}from"./circle-check-KHLmL3jb.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/SubmitView-T4yIxBdA.js b/assets/SubmitView-BFMgGf_E.js similarity index 94% rename from assets/SubmitView-T4yIxBdA.js rename to assets/SubmitView-BFMgGf_E.js index 82363a6482f5bfc79a47738d4f4f01c7dad4762f..399fbc4be33216aa65a3f9d9a3ac78cd25f95342 100644 --- a/assets/SubmitView-T4yIxBdA.js +++ b/assets/SubmitView-BFMgGf_E.js @@ -1 +1 @@ -import{n as D,o as E,I as C,a as F,f as N,aa as o,O as X,B as z,j as e,l as O}from"./index-C1Xuuz1Y.js";import{u as U}from"./useMutation-Cb0wrKBq.js";import{A as B,a as q}from"./alert-UfpiwFIJ.js";import{B as P}from"./button-DMLWlhJJ.js";import{I as h}from"./input-DJqx9Wtu.js";import{T as H}from"./textarea--CThIdhF.js";import{a as M}from"./cacheSync-Dp3vd6Pv.js";const S="pwc:paper-submit-draft",R={color:"var(--accent-text)",fontWeight:600,textDecoration:"underline",textUnderlineOffset:2},V=/^\d{4}\.\d{4,5}(v\d+)?$/i,J=/^[a-z-]+(\.[A-Z]{2})?\/\d{7}$/,W=/^https?:\/\/(?:www\.)?arxiv\.org\//i;function k(l){const i=l.trim();return i?V.test(i)||J.test(i)||W.test(i)?"arxiv":/^https?:\/\//i.test(i)?"external":"arxiv":"empty"}function $(l,i){const r=l.trim();if(k(r)==="arxiv")return/^https?:\/\//i.test(r)?{source_url:r}:{arxiv_id:r};const s={source_url:r},c=i.title.trim();c&&(s.title=c);const d=i.abstract.trim();d&&(s.abstract=d);const n=i.authors.split(/[,\n]/).map(p=>p.trim()).filter(Boolean);return n.length>0&&(s.authors=n),i.datePublished&&(s.date_published=i.datePublished),s}const ie=()=>{const l=D(),i=E(),{toast:r}=C(),{user:g,isLoading:s}=F(),[c]=N(),d=c.get("arxiv_id")??"",[n,p]=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);p(a.input??""),j(a.title??""),w(a.abstract??""),I(a.authors??""),_(a.datePublished??"")}catch{}}},[d]);const m=k(n),L=m==="external",u=U({mutationFn:t=>z.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}M(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(O(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:R,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:R,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=>p(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(H,{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(B,{variant:"destructive",children:e.jsx(q,{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{ie as default}; +import{n as D,o as E,I as C,a as F,f as N,aa as o,O as X,B as z,j as e,l as O}from"./index-DMjO_toh.js";import{u as U}from"./useMutation-Db093XSk.js";import{A as B,a as q}from"./alert-B2i0PAyW.js";import{B as P}from"./button-BGphIht2.js";import{I as h}from"./input-BzpOTl46.js";import{T as H}from"./textarea-nRN8oSDz.js";import{a as M}from"./cacheSync-BmYny7qy.js";const S="pwc:paper-submit-draft",R={color:"var(--accent-text)",fontWeight:600,textDecoration:"underline",textUnderlineOffset:2},V=/^\d{4}\.\d{4,5}(v\d+)?$/i,J=/^[a-z-]+(\.[A-Z]{2})?\/\d{7}$/,W=/^https?:\/\/(?:www\.)?arxiv\.org\//i;function k(l){const i=l.trim();return i?V.test(i)||J.test(i)||W.test(i)?"arxiv":/^https?:\/\//i.test(i)?"external":"arxiv":"empty"}function $(l,i){const r=l.trim();if(k(r)==="arxiv")return/^https?:\/\//i.test(r)?{source_url:r}:{arxiv_id:r};const s={source_url:r},c=i.title.trim();c&&(s.title=c);const d=i.abstract.trim();d&&(s.abstract=d);const n=i.authors.split(/[,\n]/).map(p=>p.trim()).filter(Boolean);return n.length>0&&(s.authors=n),i.datePublished&&(s.date_published=i.datePublished),s}const ie=()=>{const l=D(),i=E(),{toast:r}=C(),{user:g,isLoading:s}=F(),[c]=N(),d=c.get("arxiv_id")??"",[n,p]=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);p(a.input??""),j(a.title??""),w(a.abstract??""),I(a.authors??""),_(a.datePublished??"")}catch{}}},[d]);const m=k(n),L=m==="external",u=U({mutationFn:t=>z.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}M(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(O(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:R,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:R,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=>p(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(H,{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(B,{variant:"destructive",children:e.jsx(q,{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{ie as default}; diff --git a/assets/TagBrowseView-Fs_0Z72c.js b/assets/TagBrowseView-v9VEerfq.js similarity index 92% rename from assets/TagBrowseView-Fs_0Z72c.js rename to assets/TagBrowseView-v9VEerfq.js index 8b0da8e24001bb387162edf100f390dac0490ed1..be11ebe40752c0cf670ea9d36718abbf56d71b95 100644 --- a/assets/TagBrowseView-Fs_0Z72c.js +++ b/assets/TagBrowseView-v9VEerfq.js @@ -1 +1 @@ -import{j as e,L as g,aa as de,u as me,n as he,i as j,b as O,B as pe,w as ue,al as ge,v as W}from"./index-C1Xuuz1Y.js";import{R as be}from"./ResearchFollowButton-9sh3MNHN.js";import{M as xe}from"./SotaBadges-B5MVNUr2.js";import{b as je,u as ke,c as _e,P as Ne}from"./usePapers-DzSHAOm5.js";import{A as L}from"./arrow-right-BUEjhpSy.js";import{B as fe}from"./BenchmarkTrendSparkline-Gf-WHpzB.js";import{M as J}from"./MarkdownText-Dv3hoeZl.js";import{f as we}from"./frameworks-DDA0P4Tf.js";import{u as ve}from"./preferences-zpJ52tLe.js";import{s as ye}from"./slug-BpH-Nkvz.js";import{d as f,t as Se}from"./transform-btCQtWTl.js";import{S as P}from"./skeleton-D8hFkZOU.js";import Te from"./NotFound-BVs_mdc4.js";import{l as Ee}from"./LoadFailurePage-qL80B4Za.js";import{T as Be}from"./trophy-B0LpQA62.js";import{G as $e}from"./github-DYMnkwxi.js";import"./researchTopic-BU8M-7Qo.js";import"./useMutation-Cb0wrKBq.js";import"./plus-VBQCmtt2.js";import"./colors-BkWRhvFI.js";import"./PaperCard-DjlN6X2v.js";import"./AuthorAvatar-DqCnji_B.js";import"./Icon-BADQ_q7j.js";import"./LatexTitle-B0RfzwYI.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-C1A8cBwB.js";import"./useIntersectionObserver-CwCTFEhv.js";import"./useInfiniteQuery-D52ptoDl.js";/* empty css */import"./PaperPreviewLink-CTwxrQQW.js";import"./index-SntObKrh.js";import"./index-B8mUud-W.js";import"./katex-DkKDou_j.js";import"./hover-card-BSWfQepz.js";import"./alert-UfpiwFIJ.js";const Fe=()=>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(o=>o.trim()).filter(Boolean):[]};function Me(n,c){const o=X(n);if(c===void 0)return"standard";const i=new Set(X(c).map(l=>l.toLowerCase())),h=o.filter(l=>!i.has(l.toLowerCase()));return h.length?h.join(", "):n}function Ae(n,c){const o=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?o.get(w):void 0;if(!_)return k.id;if(x.has(_.id))return l.id;x.add(_.id),k=_}},h=new Map;return n.forEach(l=>{const x=i(l);h.set(x,[...h.get(x)||[],l])}),[...h].map(([l,x])=>({key:l,members:[o.get(l),...x.filter(k=>k.id!==l)]}))}const R=3,Ce=[{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"}],Pe=({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:["★ ",we(c.num_stars)]})]},c.framework_id))]}),Re=({task:n,area:c,parents:o})=>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-${ye(c.name)}`,children:c.name})]}),[...o].reverse().map(i=>e.jsxs(de.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(g,{to:`/tasks/${i.slug||i.id}`,children:f(i.name,i.slug)})]},i.id)),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--accent-text)"},children:f(n.name,n.slug)})]}),Le=({task:n,relatedTasks:c})=>{const o=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:Ce.map(i=>{const h=o.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:[(h==null?void 0:h.paper_count)!=null?`${h.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)})})]})},Ie={"auto-research":{wideHero:!0},"omni-models":{compactFigure:!0},healthcare:{feature:Le,featureListsRelatedTasks:!0},robotics:{feature:Fe}},Y=new Set(["classic-language-modeling"]),He=n=>[...n].sort((c,o)=>Number(Y.has(c.slug))-Number(Y.has(o.slug))),Ns=()=>{var U,V,K;const{taskSlug:n}=me(),c=he(),o=je({defaultToLastMonth:!0}),{searchParams:i}=o,[h,l]=j.useState(!1),[x,k]=j.useState({}),[w,_]=j.useState(()=>new Set),{preferences:Z}=ve(),E=(s,a)=>{const t=s||"";return a?`/benchmark/${t}?task=${encodeURIComponent(a)}`:`/benchmark/${t}`},I=Z.hide_closed_source_evals?!0:void 0,m=O(W.taskPage(n,{is_open:I}));j.useEffect(()=>{var t;const s=(t=m.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,(U=m.data)==null?void 0:U.task.slug,i,n]);const H=O(W.taskBenchmarkTrends(n,{limit:100,min_recent_papers:0,is_open:I})),v=j.useMemo(()=>{var s;return He(((s=m.data)==null?void 0:s.children)||[])},[m.data]),B=j.useMemo(()=>{var a;const s=new Map;return(((a=m.data)==null?void 0:a.subtask_benchmarks)||[]).forEach(t=>{s.set(t.subtask_id,t.benchmarks||[])}),s},[m.data]),N=ke(ue.task(n,o.filters),s=>pe.forTask(n,{...o.filters,page:s,page_size:20,repository_limit:1}),{enabled:!!n}),ee=j.useMemo(()=>{var s;return((s=N.data)==null?void 0:s.pages.flatMap(a=>a.results.map(Se)))??[]},[N.data]),$=j.useMemo(()=>{var a;const s={};return(a=N.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)},[N.data]);if(m.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(!m.data)return Ee([m.error],"Failed to load this task. Please try again.")??e.jsx(Te,{});const d=m.data.task,se=m.data.parents||[],F=f(d.name,d.slug),M=(m.data.sisters||[]).filter(s=>s.id!==d.id),y=d.slug&&Ie[d.slug]||{},D=y.feature,ae=m.data.recommended_frameworks||[],S=m.data.benchmarks||[],Q=new Map(S.map(s=>[s.id,s])),re=new Set(S.map(s=>s.id)),q=(((V=H.data)==null?void 0:V.results)||[]).filter(s=>re.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}}),A=q.length?q: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(A,s=>{var a;return(a=Q.get(s.id))==null?void 0:a.parent_dataset_id}),te=h?T:T.slice(0,5),ne=T.slice(5).reduce((s,a)=>s+a.members.length,0),z=((K=H.data)==null?void 0:K.recent_days)||90,ie=v.some(s=>(B.get(s.id)||[]).length>0),ce=v.length>0,G=A.length>0,le=(()=>{const s=new Set;return S.forEach(a=>s.add(a.id)),B.forEach(a=>a.forEach(t=>s.add(t.id))),s.size})(),oe=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(Re,{task:d,area:m.data.area,parents:se}),e.jsxs("div",{className:d.image_url?`task-hero-grid${y.wideHero?" 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:F}),e.jsx(be,{kind:"task",entityId:d.id}),d.description&&e.jsx(J,{className:"task-explainer",text:d.description}),e.jsxs("div",{className:"task-quickstats",children:[e.jsxs("span",{children:[e.jsx("span",{className:"num",children:(d.paper_count??0).toLocaleString()}),"PAPERS"]}),e.jsxs("span",{children:[e.jsx("span",{className:"num",children:le}),"BENCHMARKS"]}),e.jsxs("span",{children:[e.jsxs("span",{className:"num",children:[$.length,"+"]}),"METHODS USED"]})]}),e.jsx(Pe,{frameworks:ae})]}),d.image_url&&e.jsxs("figure",{className:`task-figure-card${y.compactFigure?" task-figure-card--compact":""}`,children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:ge(d.image_url)??void 0,alt:`${F} 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 · ",F,d.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(J,{className:"task-image-credit",text:d.image_credit})]})]})]})]}),D&&e.jsx(D,{task:d,relatedTasks:M}),e.jsxs("div",{className:"task-page-grid",style:{marginTop:28},children:[e.jsxs("div",{children:[G&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"task-section-head",id:"benchmarks",children:[e.jsxs("div",{className:"task-section-eyebrow",children:[z,"-day reporting activity · select a benchmark"]}),e.jsxs("div",{className:"task-section-title",children:["Benchmarks ",e.jsxs("span",{className:"meta",children:["[",A.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"})]}),te.map(({key:s,members:a})=>{const t=a[0],b=p=>p===t?"standard":Me(p.name,t.name),u=[t,...a.slice(1).sort((p,C)=>b(p).localeCompare(b(C),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(fe,{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"," /"," ",z,"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(C=>({...C,[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(Be,{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($e,{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:h?"− show top 5":`+ show ${ne} more benchmarks`})]}),ce&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"task-section-head",style:G?{marginTop:36}:void 0,children:[e.jsx("div",{className:"task-section-eyebrow",children:ie?"Benchmarks by capability":"Task hierarchy"}),e.jsxs("div",{className:"task-section-title",children:["Subtasks ",e.jsxs("span",{className:"meta",children:["[",v.length,"]"]})]})]}),e.jsx("div",{className:"subtask-grid",children:v.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:f(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:()=>oe(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:["[",(d.paper_count??0).toLocaleString(),"]"]})]})]}),e.jsx(_e,{feed:o}),e.jsx(Ne,{query:N,cards:ee,empty:o.dateRange.startDate||o.dateRange.endDate?"No papers in this task in this date range.":"No papers in this task yet."})]}),e.jsxs("aside",{className:"task-side",children:[M.length>0&&!y.featureListsRelatedTasks&&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"}),M.slice(0,8).map(s=>e.jsxs(g,{to:`/tasks/${s.slug||s.id}`,className:"side-link-row",children:[e.jsx("span",{children:f(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(xe,{method:{slug:s.slug,name:s.name}}),e.jsxs("span",{className:"num",children:["·",s.count]})]},s.id))]})]})]})]})};export{Le as HealthcareMedicalAiHub,Pe as RecommendedFrameworkLinks,Re as TaskBreadcrumb,Ns as default}; +import{j as e,L as g,aa as de,u as me,n as he,i as j,b as O,B as pe,w as ue,al as ge,v as W}from"./index-DMjO_toh.js";import{R as be}from"./ResearchFollowButton-BCRaiBQA.js";import{M as xe}from"./SotaBadges-CHGUskQn.js";import{b as je,u as ke,c as _e,P as Ne}from"./usePapers-DCcqZCMM.js";import{A as L}from"./arrow-right-Tu8hJpdM.js";import{B as fe}from"./BenchmarkTrendSparkline-BuEjY1OI.js";import{M as J}from"./MarkdownText-PyDBRK4a.js";import{f as we}from"./frameworks-DDA0P4Tf.js";import{u as ve}from"./preferences-B1gzdJ4J.js";import{s as ye}from"./slug-BpH-Nkvz.js";import{d as f,t as Se}from"./transform-CXoeFMaW.js";import{S as P}from"./skeleton-DiGWALrs.js";import Te from"./NotFound-E4uwO9V5.js";import{l as Ee}from"./LoadFailurePage-BIYmxtFy.js";import{T as Be}from"./trophy-C75hq_xI.js";import{G as $e}from"./github-3dJEQTDr.js";import"./researchTopic-hhMPs4g3.js";import"./useMutation-Db093XSk.js";import"./plus-B4ZP41Rg.js";import"./colors-BkWRhvFI.js";import"./PaperCard-CUJXx9SW.js";import"./AuthorAvatar-DFoIK6Bc.js";import"./Icon-D5cUFATZ.js";import"./LatexTitle-BRJTz_K0.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-MF6JD1Yi.js";import"./useIntersectionObserver-CU-1-_ok.js";import"./useInfiniteQuery-C91fE_fV.js";/* empty css */import"./PaperPreviewLink-DvyVialT.js";import"./index-ruElXN5Q.js";import"./index-BCW47Vvr.js";import"./katex-DkKDou_j.js";import"./hover-card-D4j7S6P3.js";import"./alert-B2i0PAyW.js";const Fe=()=>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(o=>o.trim()).filter(Boolean):[]};function Me(n,c){const o=X(n);if(c===void 0)return"standard";const i=new Set(X(c).map(l=>l.toLowerCase())),h=o.filter(l=>!i.has(l.toLowerCase()));return h.length?h.join(", "):n}function Ae(n,c){const o=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?o.get(w):void 0;if(!_)return k.id;if(x.has(_.id))return l.id;x.add(_.id),k=_}},h=new Map;return n.forEach(l=>{const x=i(l);h.set(x,[...h.get(x)||[],l])}),[...h].map(([l,x])=>({key:l,members:[o.get(l),...x.filter(k=>k.id!==l)]}))}const R=3,Ce=[{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"}],Pe=({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:["★ ",we(c.num_stars)]})]},c.framework_id))]}),Re=({task:n,area:c,parents:o})=>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-${ye(c.name)}`,children:c.name})]}),[...o].reverse().map(i=>e.jsxs(de.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(g,{to:`/tasks/${i.slug||i.id}`,children:f(i.name,i.slug)})]},i.id)),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--accent-text)"},children:f(n.name,n.slug)})]}),Le=({task:n,relatedTasks:c})=>{const o=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:Ce.map(i=>{const h=o.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:[(h==null?void 0:h.paper_count)!=null?`${h.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)})})]})},Ie={"auto-research":{wideHero:!0},"omni-models":{compactFigure:!0},healthcare:{feature:Le,featureListsRelatedTasks:!0},robotics:{feature:Fe}},Y=new Set(["classic-language-modeling"]),He=n=>[...n].sort((c,o)=>Number(Y.has(c.slug))-Number(Y.has(o.slug))),Ns=()=>{var U,V,K;const{taskSlug:n}=me(),c=he(),o=je({defaultToLastMonth:!0}),{searchParams:i}=o,[h,l]=j.useState(!1),[x,k]=j.useState({}),[w,_]=j.useState(()=>new Set),{preferences:Z}=ve(),E=(s,a)=>{const t=s||"";return a?`/benchmark/${t}?task=${encodeURIComponent(a)}`:`/benchmark/${t}`},I=Z.hide_closed_source_evals?!0:void 0,m=O(W.taskPage(n,{is_open:I}));j.useEffect(()=>{var t;const s=(t=m.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,(U=m.data)==null?void 0:U.task.slug,i,n]);const H=O(W.taskBenchmarkTrends(n,{limit:100,min_recent_papers:0,is_open:I})),v=j.useMemo(()=>{var s;return He(((s=m.data)==null?void 0:s.children)||[])},[m.data]),B=j.useMemo(()=>{var a;const s=new Map;return(((a=m.data)==null?void 0:a.subtask_benchmarks)||[]).forEach(t=>{s.set(t.subtask_id,t.benchmarks||[])}),s},[m.data]),N=ke(ue.task(n,o.filters),s=>pe.forTask(n,{...o.filters,page:s,page_size:20,repository_limit:1}),{enabled:!!n}),ee=j.useMemo(()=>{var s;return((s=N.data)==null?void 0:s.pages.flatMap(a=>a.results.map(Se)))??[]},[N.data]),$=j.useMemo(()=>{var a;const s={};return(a=N.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)},[N.data]);if(m.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(!m.data)return Ee([m.error],"Failed to load this task. Please try again.")??e.jsx(Te,{});const d=m.data.task,se=m.data.parents||[],F=f(d.name,d.slug),M=(m.data.sisters||[]).filter(s=>s.id!==d.id),y=d.slug&&Ie[d.slug]||{},D=y.feature,ae=m.data.recommended_frameworks||[],S=m.data.benchmarks||[],Q=new Map(S.map(s=>[s.id,s])),re=new Set(S.map(s=>s.id)),q=(((V=H.data)==null?void 0:V.results)||[]).filter(s=>re.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}}),A=q.length?q: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(A,s=>{var a;return(a=Q.get(s.id))==null?void 0:a.parent_dataset_id}),te=h?T:T.slice(0,5),ne=T.slice(5).reduce((s,a)=>s+a.members.length,0),z=((K=H.data)==null?void 0:K.recent_days)||90,ie=v.some(s=>(B.get(s.id)||[]).length>0),ce=v.length>0,G=A.length>0,le=(()=>{const s=new Set;return S.forEach(a=>s.add(a.id)),B.forEach(a=>a.forEach(t=>s.add(t.id))),s.size})(),oe=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(Re,{task:d,area:m.data.area,parents:se}),e.jsxs("div",{className:d.image_url?`task-hero-grid${y.wideHero?" 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:F}),e.jsx(be,{kind:"task",entityId:d.id}),d.description&&e.jsx(J,{className:"task-explainer",text:d.description}),e.jsxs("div",{className:"task-quickstats",children:[e.jsxs("span",{children:[e.jsx("span",{className:"num",children:(d.paper_count??0).toLocaleString()}),"PAPERS"]}),e.jsxs("span",{children:[e.jsx("span",{className:"num",children:le}),"BENCHMARKS"]}),e.jsxs("span",{children:[e.jsxs("span",{className:"num",children:[$.length,"+"]}),"METHODS USED"]})]}),e.jsx(Pe,{frameworks:ae})]}),d.image_url&&e.jsxs("figure",{className:`task-figure-card${y.compactFigure?" task-figure-card--compact":""}`,children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:ge(d.image_url)??void 0,alt:`${F} 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 · ",F,d.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(J,{className:"task-image-credit",text:d.image_credit})]})]})]})]}),D&&e.jsx(D,{task:d,relatedTasks:M}),e.jsxs("div",{className:"task-page-grid",style:{marginTop:28},children:[e.jsxs("div",{children:[G&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"task-section-head",id:"benchmarks",children:[e.jsxs("div",{className:"task-section-eyebrow",children:[z,"-day reporting activity · select a benchmark"]}),e.jsxs("div",{className:"task-section-title",children:["Benchmarks ",e.jsxs("span",{className:"meta",children:["[",A.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"})]}),te.map(({key:s,members:a})=>{const t=a[0],b=p=>p===t?"standard":Me(p.name,t.name),u=[t,...a.slice(1).sort((p,C)=>b(p).localeCompare(b(C),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(fe,{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"," /"," ",z,"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(C=>({...C,[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(Be,{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($e,{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:h?"− show top 5":`+ show ${ne} more benchmarks`})]}),ce&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"task-section-head",style:G?{marginTop:36}:void 0,children:[e.jsx("div",{className:"task-section-eyebrow",children:ie?"Benchmarks by capability":"Task hierarchy"}),e.jsxs("div",{className:"task-section-title",children:["Subtasks ",e.jsxs("span",{className:"meta",children:["[",v.length,"]"]})]})]}),e.jsx("div",{className:"subtask-grid",children:v.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:f(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:()=>oe(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:["[",(d.paper_count??0).toLocaleString(),"]"]})]})]}),e.jsx(_e,{feed:o}),e.jsx(Ne,{query:N,cards:ee,empty:o.dateRange.startDate||o.dateRange.endDate?"No papers in this task in this date range.":"No papers in this task yet."})]}),e.jsxs("aside",{className:"task-side",children:[M.length>0&&!y.featureListsRelatedTasks&&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"}),M.slice(0,8).map(s=>e.jsxs(g,{to:`/tasks/${s.slug||s.id}`,className:"side-link-row",children:[e.jsx("span",{children:f(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(xe,{method:{slug:s.slug,name:s.name}}),e.jsxs("span",{className:"num",children:["·",s.count]})]},s.id))]})]})]})]})};export{Le as HealthcareMedicalAiHub,Pe as RecommendedFrameworkLinks,Re as TaskBreadcrumb,Ns as default}; diff --git a/assets/TagsIndexView-kySdXExL.js b/assets/TagsIndexView-Bi7hK8KC.js similarity index 65% rename from assets/TagsIndexView-kySdXExL.js rename to assets/TagsIndexView-Bi7hK8KC.js index 2c94c16ba2dd4c13caa92c468e05c37734d682b1..3a758055de1cb4e6e0731accfc84b6ee10a4f367 100644 --- a/assets/TagsIndexView-kySdXExL.js +++ b/assets/TagsIndexView-Bi7hK8KC.js @@ -1 +1 @@ -import{b as l,i as x,j as e,L as _,v as c}from"./index-C1Xuuz1Y.js";import{c as j,h as f}from"./colors-BkWRhvFI.js";import{d as y}from"./transform-btCQtWTl.js";import{s as k}from"./slug-BpH-Nkvz.js";import{t as v}from"./taskIcons-DurKAT-u.js";import{A,a as T}from"./alert-UfpiwFIJ.js";import{A as L,a as S,b}from"./AreaSection-CJqBHh3n.js";import{T as D}from"./TaxonomySuggestionTile-BjF2aVUk.js";import{u as $,T as w}from"./useHashScrollOnReady-DmDIxpQA.js";import{s as C}from"./areas-Dvi8w2dp.js";import"./search-YolWz-tq.js";import"./triangle-alert-DGQdZ5Fh.js";import"./share-2-Zzb236oj.js";import"./trending-up-Dmgkbga2.js";import"./moon-DB_mnxXr.js";import"./thumbs-up-Ys3ImX4j.js";import"./database-rIkpN7y5.js";import"./link-2-D52PZ3mH.js";import"./trophy-B0LpQA62.js";import"./file-text-BlXclTHj.js";import"./activity-BCn9520W.js";import"./globe-D69lYFoB.js";import"./skeleton-D8hFkZOU.js";import"./SignInToEditDialog-DkoRRdng.js";import"./button-DMLWlhJJ.js";import"./input-DJqx9Wtu.js";import"./textarea--CThIdhF.js";import"./searchable-select-DPAXOMOd.js";import"./popover-C1A8cBwB.js";import"./dialog-CCU_33Ju.js";import"./loader-circle-tzO1dF92.js";import"./useMutation-Cb0wrKBq.js";import"./submissions-DcU5ZqyQ.js";import"./plus-VBQCmtt2.js";const ue=()=>{var g,h;const i=l(c.areasWithTasks()),o=l(c.trendingTasks({limit:12,min_recent_papers:10})),p=l(c.areas()),N=x.useMemo(()=>{var m,r,t;const a=new Map((((m=p.data)==null?void 0:m.results)??[]).map(s=>[s.id,s.name])),n=new Map((((r=i.data)==null?void 0:r.results)??[]).flatMap(s=>s.tasks.map(d=>[d.id,d.slug])));return(t=o.data)==null?void 0:t.results.map(s=>({id:s.id,name:y(s.name,s.slug),href:`/tasks/${s.slug}`,icon:v(s.slug??"",s.parent_id?n.get(s.parent_id):void 0),iconColor:j(f(s.slug??"")).dot,areaName:s.area_id?a.get(s.area_id):void 0,recentPaperCount:s.recent_paper_count,shareLift:s.share_lift}))},[o.data,p.data,i.data]),u=x.useMemo(()=>{var a;return C(((a=i.data)==null?void 0:a.results)??[])},[i.data]);return $(!!i.data&&!o.isLoading),i.error?e.jsx("div",{className:"page",children:e.jsx(A,{variant:"destructive",children:e.jsx(T,{children:"Failed to load taxonomy. 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:"Domains"})]}),e.jsx("div",{className:"feed-subtitle",children:"Browse research by area. Click any task to see trending work."})]})}),e.jsx(w,{noun:"task",items:N,recentDays:(g=o.data)==null?void 0:g.recent_days,baselineDays:(h=o.data)==null?void 0:h.baseline_days,isLoading:o.isLoading,error:o.error}),i.isLoading?e.jsx(L,{tiles:6,tileClassName:"h-24"}):u.map(a=>{const n=a.tasks;if(n.length===0)return null;const m=n.reduce((r,t)=>r+(t.paper_count||0),0);return e.jsxs(S,{id:`area-${k(a.name)}`,title:a.name,description:a.description,meta:`${n.length} ${n.length===1?"task":"tasks"} · ${m.toLocaleString()} papers`,children:[n.map(r=>{const t=r.slug||"",s=j(f(t)),d=v(t);return e.jsxs(_,{to:`/tasks/${t}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"task-icon",style:{color:s.dot},children:e.jsx(d,{size:16,strokeWidth:2,"aria-hidden":"true"})}),y(r.name,t)]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(r.paper_count??0).toLocaleString()," papers"]})})]},r.id)}),e.jsx(D,{kind:"task"})]},a.id)}),e.jsx(b,{areas:u})]})};export{ue as default}; +import{b as l,i as x,j as e,L as _,v as c}from"./index-DMjO_toh.js";import{c as j,h as f}from"./colors-BkWRhvFI.js";import{d as y}from"./transform-CXoeFMaW.js";import{s as k}from"./slug-BpH-Nkvz.js";import{t as v}from"./taskIcons-BeSRODUD.js";import{A,a as T}from"./alert-B2i0PAyW.js";import{A as L,a as S,b}from"./AreaSection-BdgwTHWx.js";import{T as D}from"./TaxonomySuggestionTile-CU-KualO.js";import{u as $,T as w}from"./useHashScrollOnReady-C5GDmlDb.js";import{s as C}from"./areas-Dvi8w2dp.js";import"./search-D6uSAb1U.js";import"./triangle-alert-CcBqLaPP.js";import"./share-2-BO6l1rLC.js";import"./trending-up-DRI2hJAf.js";import"./moon-CIGKI3Uq.js";import"./thumbs-up-CZ7BdM1B.js";import"./database-UPYeEFxO.js";import"./link-2-n6VIX0kb.js";import"./trophy-C75hq_xI.js";import"./file-text-D6OyOvvT.js";import"./activity-CJ9AQ3mn.js";import"./globe-C6Up_LzV.js";import"./skeleton-DiGWALrs.js";import"./SignInToEditDialog-BIKQbaVj.js";import"./button-BGphIht2.js";import"./input-BzpOTl46.js";import"./textarea-nRN8oSDz.js";import"./searchable-select-DscHfpAa.js";import"./popover-MF6JD1Yi.js";import"./dialog-C-drkhvX.js";import"./loader-circle-gyMLnt4Y.js";import"./useMutation-Db093XSk.js";import"./submissions-C02Zu9zt.js";import"./plus-B4ZP41Rg.js";const ue=()=>{var g,h;const i=l(c.areasWithTasks()),o=l(c.trendingTasks({limit:12,min_recent_papers:10})),p=l(c.areas()),N=x.useMemo(()=>{var m,r,t;const a=new Map((((m=p.data)==null?void 0:m.results)??[]).map(s=>[s.id,s.name])),n=new Map((((r=i.data)==null?void 0:r.results)??[]).flatMap(s=>s.tasks.map(d=>[d.id,d.slug])));return(t=o.data)==null?void 0:t.results.map(s=>({id:s.id,name:y(s.name,s.slug),href:`/tasks/${s.slug}`,icon:v(s.slug??"",s.parent_id?n.get(s.parent_id):void 0),iconColor:j(f(s.slug??"")).dot,areaName:s.area_id?a.get(s.area_id):void 0,recentPaperCount:s.recent_paper_count,shareLift:s.share_lift}))},[o.data,p.data,i.data]),u=x.useMemo(()=>{var a;return C(((a=i.data)==null?void 0:a.results)??[])},[i.data]);return $(!!i.data&&!o.isLoading),i.error?e.jsx("div",{className:"page",children:e.jsx(A,{variant:"destructive",children:e.jsx(T,{children:"Failed to load taxonomy. 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:"Domains"})]}),e.jsx("div",{className:"feed-subtitle",children:"Browse research by area. Click any task to see trending work."})]})}),e.jsx(w,{noun:"task",items:N,recentDays:(g=o.data)==null?void 0:g.recent_days,baselineDays:(h=o.data)==null?void 0:h.baseline_days,isLoading:o.isLoading,error:o.error}),i.isLoading?e.jsx(L,{tiles:6,tileClassName:"h-24"}):u.map(a=>{const n=a.tasks;if(n.length===0)return null;const m=n.reduce((r,t)=>r+(t.paper_count||0),0);return e.jsxs(S,{id:`area-${k(a.name)}`,title:a.name,description:a.description,meta:`${n.length} ${n.length===1?"task":"tasks"} · ${m.toLocaleString()} papers`,children:[n.map(r=>{const t=r.slug||"",s=j(f(t)),d=v(t);return e.jsxs(_,{to:`/tasks/${t}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"task-icon",style:{color:s.dot},children:e.jsx(d,{size:16,strokeWidth:2,"aria-hidden":"true"})}),y(r.name,t)]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(r.paper_count??0).toLocaleString()," papers"]})})]},r.id)}),e.jsx(D,{kind:"task"})]},a.id)}),e.jsx(b,{areas:u})]})};export{ue as default}; diff --git a/assets/TaxonomySuggestionTile-BjF2aVUk.js b/assets/TaxonomySuggestionTile-CU-KualO.js similarity index 76% rename from assets/TaxonomySuggestionTile-BjF2aVUk.js rename to assets/TaxonomySuggestionTile-CU-KualO.js index e739adf70ad3dc4dc7438dfa2874cc0d010ff209..172cc24e64fa41b0e4eaaf536ab43f4bc50de0c6 100644 --- a/assets/TaxonomySuggestionTile-BjF2aVUk.js +++ b/assets/TaxonomySuggestionTile-CU-KualO.js @@ -1 +1 @@ -import{a as u,i as t,j as e}from"./index-C1Xuuz1Y.js";import{S as c,a as m}from"./SignInToEditDialog-DkoRRdng.js";import{P as p}from"./plus-VBQCmtt2.js";function j({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{j as T}; +import{a as u,i as t,j as e}from"./index-DMjO_toh.js";import{S as c,a as m}from"./SignInToEditDialog-BIKQbaVj.js";import{P as p}from"./plus-B4ZP41Rg.js";function j({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{j as T}; diff --git a/assets/TopicView-DeWGpkof.js b/assets/TopicView-THW1BoPW.js similarity index 90% rename from assets/TopicView-DeWGpkof.js rename to assets/TopicView-THW1BoPW.js index ea9290e5affd1674ff7afaba234ff089dc79b8ef..8583f223ea78930798b8309976bac9e20d513e4b 100644 --- a/assets/TopicView-DeWGpkof.js +++ b/assets/TopicView-THW1BoPW.js @@ -1,4 +1,4 @@ -import{d as C,u as L,e as N,f as T,b as S,r as _,g as D,T as j,h as E,i as u,j as e,L as $,k as A,l as R,C as I,A as M,m as U}from"./index-C1Xuuz1Y.js";import{r as q,u as z,P as g,a as B,w as H}from"./usePapers-DzSHAOm5.js";import{S as f}from"./skeleton-D8hFkZOU.js";import{t as v,a as P,u as O,b as Q,r as G,s as V}from"./researchTopic-BU8M-7Qo.js";import{t as K}from"./transform-btCQtWTl.js";import{P as b}from"./plus-VBQCmtt2.js";import{L as W}from"./link-2-D52PZ3mH.js";import"./PaperCard-DjlN6X2v.js";import"./AuthorAvatar-DqCnji_B.js";import"./SotaBadges-B5MVNUr2.js";import"./colors-BkWRhvFI.js";import"./Icon-BADQ_q7j.js";import"./LatexTitle-B0RfzwYI.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-C1A8cBwB.js";import"./useIntersectionObserver-CwCTFEhv.js";import"./useInfiniteQuery-D52ptoDl.js";import"./useMutation-Cb0wrKBq.js";/** +import{d as C,u as L,e as N,f as T,b as S,r as _,g as D,T as j,h as E,i as u,j as e,L as $,k as A,l as R,C as I,A as M,m as U}from"./index-DMjO_toh.js";import{r as q,u as z,P as g,a as B,w as H}from"./usePapers-DCcqZCMM.js";import{S as f}from"./skeleton-DiGWALrs.js";import{t as v,a as P,u as O,b as Q,r as G,s as V}from"./researchTopic-hhMPs4g3.js";import{t as K}from"./transform-CXoeFMaW.js";import{P as b}from"./plus-B4ZP41Rg.js";import{L as W}from"./link-2-n6VIX0kb.js";import"./PaperCard-CUJXx9SW.js";import"./AuthorAvatar-DFoIK6Bc.js";import"./SotaBadges-CHGUskQn.js";import"./colors-BkWRhvFI.js";import"./Icon-D5cUFATZ.js";import"./LatexTitle-BRJTz_K0.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-MF6JD1Yi.js";import"./useIntersectionObserver-CU-1-_ok.js";import"./useInfiniteQuery-C91fE_fV.js";import"./useMutation-Db093XSk.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/TrendsView-B-6Mq2H2.js b/assets/TrendsView-DLCEhyZN.js similarity index 97% rename from assets/TrendsView-B-6Mq2H2.js rename to assets/TrendsView-DLCEhyZN.js index a4de55025dcdd2766bb87b0b72b5a5a9b123d2b4..f9ebfc96140a75faf7ee78c281799887e9197f85 100644 --- a/assets/TrendsView-B-6Mq2H2.js +++ b/assets/TrendsView-DLCEhyZN.js @@ -1 +1 @@ -import{aa as X,j as e,b as G,ay as J}from"./index-C1Xuuz1Y.js";import{A as Q,a as E}from"./alert-UfpiwFIJ.js";import{S as P}from"./skeleton-D8hFkZOU.js";const m=t=>{const i=/^(\d{4})-(0[1-9]|1[0-2])$/.exec(t);if(!i)return t;const[,r,l]=i;return`${["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][Number(l)-1]} '${r.slice(2)}`},g=980,j=400,x=62,B=26,f=30,V=58,u=g-x-B,F=j-f-V,v=f+F,Y=t=>{if(t.length<3)return t.map((r,l)=>`${l?"L":"M"}${r[0]} ${r[1]}`).join(" ");let i=`M${t[0][0]} ${t[0][1]}`;for(let r=0;r{const[a,y]=X.useState(null),s=i.length,b=l[l.length-1],d=n=>x+u*(s===1?0:n/(s-1)),p=n=>f+F*(1-n/b);if(s===0)return null;const _=i.map((n,h)=>[d(h),p(n.percent)]),A=Y(_),O=`${A} L ${d(s-1)} ${v} L ${x} ${v} Z`,w=s<=12?1:Math.ceil(s/8),R=n=>{const h=n.currentTarget.getBoundingClientRect(),S=(n.clientX-h.left)/h.width*g,k=s>1?u/(s-1):u,I=Math.max(0,Math.min(s-1,Math.round((S-x)/k)));y(I)},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(i[0].month)} (${i[0].percent}%) to ${m(i[s-1].month)} (${i[s-1].percent}%)`,style:{display:"block",overflow:"visible",cursor:"crosshair"},onPointerMove:R,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:r,stopOpacity:.26}}),e.jsx("stop",{offset:"100%",style:{stopColor:r,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:O,fill:`url(#${H})`}),e.jsx("path",{d:A,fill:"none",stroke:r,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round"}),i.map((n,h)=>{const S=h===s-1,k=h%w===0&&s-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+F/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:r,strokeWidth:1,strokeDasharray:"3 4",opacity:.5}),e.jsx("circle",{cx:d(a),cy:p(i[a].percent),r:5,fill:"var(--bg)",stroke:r,strokeWidth:2})]})]}),a!=null&&e.jsxs("div",{style:{position:"absolute",left:`${d(a)/g*100}%`,top:`${p(i[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(i[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:r,display:"inline-block"}}),i[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:i.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))})]})]})]})},$={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},U=()=>{const t=G(J.trends());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(Q,{variant:"destructive",children:e.jsx(E,{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{U as default}; +import{aa as X,j as e,b as G,ay as J}from"./index-DMjO_toh.js";import{A as Q,a as E}from"./alert-B2i0PAyW.js";import{S as P}from"./skeleton-DiGWALrs.js";const m=t=>{const i=/^(\d{4})-(0[1-9]|1[0-2])$/.exec(t);if(!i)return t;const[,r,l]=i;return`${["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][Number(l)-1]} '${r.slice(2)}`},g=980,j=400,x=62,B=26,f=30,V=58,u=g-x-B,F=j-f-V,v=f+F,Y=t=>{if(t.length<3)return t.map((r,l)=>`${l?"L":"M"}${r[0]} ${r[1]}`).join(" ");let i=`M${t[0][0]} ${t[0][1]}`;for(let r=0;r{const[a,y]=X.useState(null),s=i.length,b=l[l.length-1],d=n=>x+u*(s===1?0:n/(s-1)),p=n=>f+F*(1-n/b);if(s===0)return null;const _=i.map((n,h)=>[d(h),p(n.percent)]),A=Y(_),O=`${A} L ${d(s-1)} ${v} L ${x} ${v} Z`,w=s<=12?1:Math.ceil(s/8),R=n=>{const h=n.currentTarget.getBoundingClientRect(),S=(n.clientX-h.left)/h.width*g,k=s>1?u/(s-1):u,I=Math.max(0,Math.min(s-1,Math.round((S-x)/k)));y(I)},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(i[0].month)} (${i[0].percent}%) to ${m(i[s-1].month)} (${i[s-1].percent}%)`,style:{display:"block",overflow:"visible",cursor:"crosshair"},onPointerMove:R,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:r,stopOpacity:.26}}),e.jsx("stop",{offset:"100%",style:{stopColor:r,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:O,fill:`url(#${H})`}),e.jsx("path",{d:A,fill:"none",stroke:r,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round"}),i.map((n,h)=>{const S=h===s-1,k=h%w===0&&s-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+F/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:r,strokeWidth:1,strokeDasharray:"3 4",opacity:.5}),e.jsx("circle",{cx:d(a),cy:p(i[a].percent),r:5,fill:"var(--bg)",stroke:r,strokeWidth:2})]})]}),a!=null&&e.jsxs("div",{style:{position:"absolute",left:`${d(a)/g*100}%`,top:`${p(i[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(i[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:r,display:"inline-block"}}),i[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:i.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))})]})]})]})},$={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},U=()=>{const t=G(J.trends());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(Q,{variant:"destructive",children:e.jsx(E,{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{U as default}; diff --git a/assets/UserProfileView-8ohS1aEG.js b/assets/UserProfileView-C9P7_Rj8.js similarity index 87% rename from assets/UserProfileView-8ohS1aEG.js rename to assets/UserProfileView-C9P7_Rj8.js index 0f8a7cba969797d70d4deac4fd47884f2621d58c..c537457e6d7c7621ef1bbaf7ecd9b3df716210ce 100644 --- a/assets/UserProfileView-8ohS1aEG.js +++ b/assets/UserProfileView-C9P7_Rj8.js @@ -1 +1 @@ -import{u as i,b as t,br as n,j as e,aK as d}from"./index-C1Xuuz1Y.js";import{C as o}from"./OrganizationContributionGraph-IO2x3ESF.js";import"./skeleton-D8hFkZOU.js";const m=()=>{const{username:s=""}=i(),a=t(n.user(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(o,{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{m as default}; +import{u as i,b as t,br as n,j as e,aK as d}from"./index-DMjO_toh.js";import{C as o}from"./OrganizationContributionGraph-RQt-m7Ns.js";import"./skeleton-DiGWALrs.js";const m=()=>{const{username:s=""}=i(),a=t(n.user(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(o,{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{m as default}; diff --git a/assets/activity-BCn9520W.js b/assets/activity-CJ9AQ3mn.js similarity index 89% rename from assets/activity-BCn9520W.js rename to assets/activity-CJ9AQ3mn.js index 161d953bb26bb442ec088ec7a7795cea041a1c86..46157227302b35806dabe6232b35b7f010054514 100644 --- a/assets/activity-BCn9520W.js +++ b/assets/activity-CJ9AQ3mn.js @@ -1,4 +1,4 @@ -import{d as t}from"./index-C1Xuuz1Y.js";/** +import{d as t}from"./index-DMjO_toh.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/alert-UfpiwFIJ.js b/assets/alert-B2i0PAyW.js similarity index 92% rename from assets/alert-UfpiwFIJ.js rename to assets/alert-B2i0PAyW.js index 1e116b40e432e5b8b1cef9ddc21e13be7e93e3e3..236c135ce8527c19fc182c8e4ca69eac1eb3a180 100644 --- a/assets/alert-UfpiwFIJ.js +++ b/assets/alert-B2i0PAyW.js @@ -1 +1 @@ -import{i as r,j as s,Z as i,aA as d}from"./index-C1Xuuz1Y.js";const o=d("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},l)=>s.jsx("div",{ref:l,role:"alert",className:i(o({variant:t}),e),...a}));n.displayName="Alert";const v=r.forwardRef(({className:e,...t},a)=>s.jsx("h5",{ref:a,className:i("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:i("text-sm [&_p]:leading-relaxed",e),...t}));c.displayName="AlertDescription";export{n as A,c as a}; +import{i as r,j as s,Z as i,aA as d}from"./index-DMjO_toh.js";const o=d("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},l)=>s.jsx("div",{ref:l,role:"alert",className:i(o({variant:t}),e),...a}));n.displayName="Alert";const v=r.forwardRef(({className:e,...t},a)=>s.jsx("h5",{ref:a,className:i("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:i("text-sm [&_p]:leading-relaxed",e),...t}));c.displayName="AlertDescription";export{n as A,c as a}; diff --git a/assets/arrow-left-B9GmgZLS.js b/assets/arrow-left-BSWED_nt.js similarity index 86% rename from assets/arrow-left-B9GmgZLS.js rename to assets/arrow-left-BSWED_nt.js index ca34b9080251e34d3e4f44df9425b38b7e7b76e2..0b0663b6e4381f34f8b732cf95770e672ae8cbb1 100644 --- a/assets/arrow-left-B9GmgZLS.js +++ b/assets/arrow-left-BSWED_nt.js @@ -1,4 +1,4 @@ -import{d as e}from"./index-C1Xuuz1Y.js";/** +import{d as e}from"./index-DMjO_toh.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/arrow-right-BUEjhpSy.js b/assets/arrow-right-Tu8hJpdM.js similarity index 86% rename from assets/arrow-right-BUEjhpSy.js rename to assets/arrow-right-Tu8hJpdM.js index 58540663b0dcf4f7a506cb88b62bf7ce2ad7d400..f67e410368506838e4244b54a7b0482e72e3cf2e 100644 --- a/assets/arrow-right-BUEjhpSy.js +++ b/assets/arrow-right-Tu8hJpdM.js @@ -1,4 +1,4 @@ -import{d as r}from"./index-C1Xuuz1Y.js";/** +import{d as r}from"./index-DMjO_toh.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/arrow-up-right-gHB4zR82.js b/assets/arrow-up-right-Dcycbt3C.js similarity index 86% rename from assets/arrow-up-right-gHB4zR82.js rename to assets/arrow-up-right-Dcycbt3C.js index 9b13b3c77bd70f9d08bb436f547558c9f753bd45..d72d25db1be14b6171dd7110ed3fc7cdeea50846 100644 --- a/assets/arrow-up-right-gHB4zR82.js +++ b/assets/arrow-up-right-Dcycbt3C.js @@ -1,4 +1,4 @@ -import{d as t}from"./index-C1Xuuz1Y.js";/** +import{d as t}from"./index-DMjO_toh.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/badge-_8Y6CJzv.js b/assets/badge-CARHLO4T.js similarity index 90% rename from assets/badge-_8Y6CJzv.js rename to assets/badge-CARHLO4T.js index 04f0efc0643c76786be201d14cc6f8fb501fae6b..67ba6f435b5418c6502bab5938d3571ab5364d76 100644 --- a/assets/badge-_8Y6CJzv.js +++ b/assets/badge-CARHLO4T.js @@ -1 +1 @@ -import{j as n,Z as o,aA as a}from"./index-C1Xuuz1Y.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,Z as o,aA as a}from"./index-DMjO_toh.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-DMLWlhJJ.js b/assets/button-BGphIht2.js similarity index 89% rename from assets/button-DMLWlhJJ.js rename to assets/button-BGphIht2.js index 7e15348827fffbed29d80548ed6b03747f4a0206..483f42c095ca40c5e595754b528744e0cbc509a4 100644 --- a/assets/button-DMLWlhJJ.js +++ b/assets/button-BGphIht2.js @@ -1 +1 @@ -import{i as a,j as d,aY as u,Z as c,aA as f}from"./index-C1Xuuz1Y.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{i as a,j as d,aY as u,Z as c,aA as f}from"./index-DMjO_toh.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/cacheSync-Dp3vd6Pv.js b/assets/cacheSync-BmYny7qy.js similarity index 97% rename from assets/cacheSync-Dp3vd6Pv.js rename to assets/cacheSync-BmYny7qy.js index f294f09c97a9bc585002ce2d932293ca5e841ff3..4cfe36b2c3ecc570e1ecc9ab249058c9749b05e4 100644 --- a/assets/cacheSync-Dp3vd6Pv.js +++ b/assets/cacheSync-BmYny7qy.js @@ -1 +1 @@ -import{bd as m,K as u}from"./index-C1Xuuz1Y.js";const v=["paper-evals"],l=["dataset-evals"],f=e=>String(e.queryKey[1]);function y(e){return new Set(e.filter(a=>!!a))}function _(e){return[...y(e)].flatMap(a=>[u.detail(a).queryKey,u.summary(a).queryKey])}function Q(e,a){for(const r of _(a))e.invalidateQueries({queryKey:r,exact:!0})}function S(e){for(const a of m)e.invalidateQueries({queryKey:[a],refetchType:"none"})}async function g(e,a,r){const i=_(a);await Promise.all(i.map(t=>e.cancelQueries({queryKey:t,exact:!0})));const o=i.map(t=>({queryKey:t,data:e.getQueryData(t)}));for(const{queryKey:t,data:c}of o)c&&e.setQueryData(t,r(c));return()=>o.forEach(({queryKey:t,data:c})=>e.setQueryData(t,c))}function k(e,a,r){return e!=null&&e.some(i=>i.paper_id===a&&i.paper_title!==r)?e.map(i=>i.paper_id===a?{...i,paper_title:r}:i):e}function x(e,a,r){const i=y([...r,a.id,a.arxiv_id]);for(const t of i)e.setQueryData(u.detail(t).queryKey,a),e.setQueriesData({queryKey:u.summary(t).queryKey,exact:!0},a);S(e);const o=String(a.id);for(const t of[v,l])e.setQueriesData({queryKey:t},c=>k(c,o,a.title)),e.invalidateQueries({queryKey:t,refetchType:"none"})}function b(e,a,r,i){const o=new Set(r.flatMap(t=>t.op==="create"?[]:[String(t.evaluation_id)]));return{paperId:e,arxivId:i,contexts:[...a.filter(t=>t.id!==void 0&&o.has(String(t.id))),...r.flatMap(t=>t.op==="delete"?[]:[t.data])]}}function I(e,a){const r=new Set(a.contexts.flatMap(s=>s.dataset_id==null?[]:[String(s.dataset_id)])),i=new Set(a.contexts.flatMap(s=>s.task_id==null?[]:[String(s.task_id)])),o=new Set([a.paperId]),t=new Set;a.arxivId&&t.add(a.arxivId);const c=new Set(a.contexts.map(s=>`${s.task_id}:${s.dataset_id}`));for(const s of[l,v])for(const[,n]of e.getQueriesData({queryKey:s}))for(const d of n??[])c.has(`${d.task_id}:${d.dataset_id}`)&&(o.add(String(d.paper_id)),d.paper_arxiv_id&&t.add(d.paper_arxiv_id));Q(e,[...o,...t]),S(e),e.invalidateQueries({queryKey:v,predicate:s=>o.has(f(s))});const p=s=>r.has(f(s));e.invalidateQueries({queryKey:l,predicate:p}),e.invalidateQueries({queryKey:["dataset-tasks"],predicate:p}),e.invalidateQueries({queryKey:["dataset"],predicate:s=>{const n=s.state.data;return p(s)||!!(n&&r.has(String(n.id)))}}),e.invalidateQueries({queryKey:["task-page"],predicate:s=>{const n=s.state.data;return i.has(f(s))||!!(n&&(i.has(String(n.task.id))||n.subtask_benchmarks.some(d=>i.has(String(d.subtask_id)))||n.benchmarks.some(d=>r.has(String(d.id)))||n.subtask_benchmarks.some(d=>d.benchmarks.some(h=>r.has(String(h.id))))))}}),e.invalidateQueries({queryKey:["task-benchmark-trends"],predicate:s=>{const n=s.state.data;return i.has(f(s))||!!(n&&i.has(String(n.task_id)))}})}export{S as a,I as b,b as e,Q as i,g as p,x as r}; +import{bd as m,K as u}from"./index-DMjO_toh.js";const v=["paper-evals"],l=["dataset-evals"],f=e=>String(e.queryKey[1]);function y(e){return new Set(e.filter(a=>!!a))}function _(e){return[...y(e)].flatMap(a=>[u.detail(a).queryKey,u.summary(a).queryKey])}function Q(e,a){for(const r of _(a))e.invalidateQueries({queryKey:r,exact:!0})}function S(e){for(const a of m)e.invalidateQueries({queryKey:[a],refetchType:"none"})}async function g(e,a,r){const i=_(a);await Promise.all(i.map(t=>e.cancelQueries({queryKey:t,exact:!0})));const o=i.map(t=>({queryKey:t,data:e.getQueryData(t)}));for(const{queryKey:t,data:c}of o)c&&e.setQueryData(t,r(c));return()=>o.forEach(({queryKey:t,data:c})=>e.setQueryData(t,c))}function k(e,a,r){return e!=null&&e.some(i=>i.paper_id===a&&i.paper_title!==r)?e.map(i=>i.paper_id===a?{...i,paper_title:r}:i):e}function x(e,a,r){const i=y([...r,a.id,a.arxiv_id]);for(const t of i)e.setQueryData(u.detail(t).queryKey,a),e.setQueriesData({queryKey:u.summary(t).queryKey,exact:!0},a);S(e);const o=String(a.id);for(const t of[v,l])e.setQueriesData({queryKey:t},c=>k(c,o,a.title)),e.invalidateQueries({queryKey:t,refetchType:"none"})}function b(e,a,r,i){const o=new Set(r.flatMap(t=>t.op==="create"?[]:[String(t.evaluation_id)]));return{paperId:e,arxivId:i,contexts:[...a.filter(t=>t.id!==void 0&&o.has(String(t.id))),...r.flatMap(t=>t.op==="delete"?[]:[t.data])]}}function I(e,a){const r=new Set(a.contexts.flatMap(s=>s.dataset_id==null?[]:[String(s.dataset_id)])),i=new Set(a.contexts.flatMap(s=>s.task_id==null?[]:[String(s.task_id)])),o=new Set([a.paperId]),t=new Set;a.arxivId&&t.add(a.arxivId);const c=new Set(a.contexts.map(s=>`${s.task_id}:${s.dataset_id}`));for(const s of[l,v])for(const[,n]of e.getQueriesData({queryKey:s}))for(const d of n??[])c.has(`${d.task_id}:${d.dataset_id}`)&&(o.add(String(d.paper_id)),d.paper_arxiv_id&&t.add(d.paper_arxiv_id));Q(e,[...o,...t]),S(e),e.invalidateQueries({queryKey:v,predicate:s=>o.has(f(s))});const p=s=>r.has(f(s));e.invalidateQueries({queryKey:l,predicate:p}),e.invalidateQueries({queryKey:["dataset-tasks"],predicate:p}),e.invalidateQueries({queryKey:["dataset"],predicate:s=>{const n=s.state.data;return p(s)||!!(n&&r.has(String(n.id)))}}),e.invalidateQueries({queryKey:["task-page"],predicate:s=>{const n=s.state.data;return i.has(f(s))||!!(n&&(i.has(String(n.task.id))||n.subtask_benchmarks.some(d=>i.has(String(d.subtask_id)))||n.benchmarks.some(d=>r.has(String(d.id)))||n.subtask_benchmarks.some(d=>d.benchmarks.some(h=>r.has(String(h.id))))))}}),e.invalidateQueries({queryKey:["task-benchmark-trends"],predicate:s=>{const n=s.state.data;return i.has(f(s))||!!(n&&i.has(String(n.task_id)))}})}export{S as a,I as b,b as e,Q as i,g as p,x as r}; diff --git a/assets/chat-CiW-DJRi.js b/assets/chat-B4elm0RV.js similarity index 98% rename from assets/chat-CiW-DJRi.js rename to assets/chat-B4elm0RV.js index ee227342412aeb3a240195b9785858fdea1c8984..a817d3143779bb9d82e1be4fd3177ce0974465d0 100644 --- a/assets/chat-CiW-DJRi.js +++ b/assets/chat-B4elm0RV.js @@ -1 +1 @@ -import{ao as i,av as p,aW as h,aX as m}from"./index-C1Xuuz1Y.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{ao as i,av as p,aW as h,aX as m}from"./index-DMjO_toh.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-CbrXR8Sy.js b/assets/chatLifecycle-CkvR6Xsi.js similarity index 99% rename from assets/chatLifecycle-CbrXR8Sy.js rename to assets/chatLifecycle-CkvR6Xsi.js index a09635bacde60000d9d2631caef2fdbb15273ca3..12c629c0f2141bfbd08d68f8283aa12733cb0429 100644 --- a/assets/chatLifecycle-CbrXR8Sy.js +++ b/assets/chatLifecycle-CkvR6Xsi.js @@ -1,4 +1,4 @@ -var bL=Object.defineProperty;var ck=n=>{throw TypeError(n)};var vL=(n,e,t)=>e in n?bL(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var ae=(n,e,t)=>vL(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 _(r){$(n,e,r,t)},get _(){return f(n,e,s)}});import{d as Na,i as q,j as S,aa as te,b as yo,an as G_,ao as wL,ap as n0,L as Md,aq as _L,X as s0,ar as um,as as r0,at as SL,K as xL,o as FC,au as Id,A as kL,C as AL}from"./index-C1Xuuz1Y.js";import{u as zC,a as EL,b as CL,g as $L,d as HC,i as TL,f as BC,e as PL,h as K_,A as RL,v as ML,X as IL,Y as OL,Z as NL,_ as LL,$ as DL,P as qC,a0 as jL,a1 as FL,a2 as VC,a3 as zL}from"./chatSessions-DFoCf0pS.js";/* empty css */import{H as Ip,a as Op,b as Np}from"./hover-card-BSWfQepz.js";import{f as HL,i as UC,p as BL,C as qL,a as VL,T as UL}from"./CatalogEntityPreviewLink-DxTQ9Cxu.js";import{G as i0}from"./github-DYMnkwxi.js";import{F as WC}from"./file-text-BlXclTHj.js";import{r as WL,a as GL,P as o0,c as KL}from"./PaperPreviewLink-CTwxrQQW.js";import{M as ZL,d as XL}from"./index-SntObKrh.js";import{r as YL}from"./index-B8mUud-W.js";import{u as ad}from"./useMutation-Cb0wrKBq.js";import{c as ts,a as Fo}from"./chat-CiW-DJRi.js";import{T as JL}from"./thumbs-up-Ys3ImX4j.js";import{C as QL}from"./copy-DN4cM864.js";import{A as eD}from"./arrow-left-B9GmgZLS.js";import{E as GC}from"./external-link-BwpBZl45.js";import{P as tD}from"./plus-VBQCmtt2.js";import{S as nD}from"./search-YolWz-tq.js";import{C as KC,a as ZC}from"./chevron-up-zZuEVcHx.js";import{A as sD}from"./AuthorAvatar-DqCnji_B.js";/** +var bL=Object.defineProperty;var ck=n=>{throw TypeError(n)};var vL=(n,e,t)=>e in n?bL(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var ae=(n,e,t)=>vL(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 _(r){$(n,e,r,t)},get _(){return f(n,e,s)}});import{d as Na,i as q,j as S,aa as te,b as yo,an as G_,ao as wL,ap as n0,L as Md,aq as _L,X as s0,ar as um,as as r0,at as SL,K as xL,o as FC,au as Id,A as kL,C as AL}from"./index-DMjO_toh.js";import{u as zC,a as EL,b as CL,g as $L,d as HC,i as TL,f as BC,e as PL,h as K_,A as RL,v as ML,X as IL,Y as OL,Z as NL,_ as LL,$ as DL,P as qC,a0 as jL,a1 as FL,a2 as VC,a3 as zL}from"./chatSessions-CtEVszLf.js";/* empty css */import{H as Ip,a as Op,b as Np}from"./hover-card-D4j7S6P3.js";import{f as HL,i as UC,p as BL,C as qL,a as VL,T as UL}from"./CatalogEntityPreviewLink-BirlAu9e.js";import{G as i0}from"./github-3dJEQTDr.js";import{F as WC}from"./file-text-D6OyOvvT.js";import{r as WL,a as GL,P as o0,c as KL}from"./PaperPreviewLink-DvyVialT.js";import{M as ZL,d as XL}from"./index-ruElXN5Q.js";import{r as YL}from"./index-BCW47Vvr.js";import{u as ad}from"./useMutation-Db093XSk.js";import{c as ts,a as Fo}from"./chat-B4elm0RV.js";import{T as JL}from"./thumbs-up-CZ7BdM1B.js";import{C as QL}from"./copy-DXTYKY8f.js";import{A as eD}from"./arrow-left-BSWED_nt.js";import{E as GC}from"./external-link-Bt4eibsp.js";import{P as tD}from"./plus-B4ZP41Rg.js";import{S as nD}from"./search-D6uSAb1U.js";import{C as KC,a as ZC}from"./chevron-up-5Y7cB_yq.js";import{A as sD}from"./AuthorAvatar-DFoIK6Bc.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/chatSessions-DFoCf0pS.js b/assets/chatSessions-CtEVszLf.js similarity index 99% rename from assets/chatSessions-DFoCf0pS.js rename to assets/chatSessions-CtEVszLf.js index 74212eb868fe14b69681d022b9219ed086485437..972329a902661cf2045cb4136aaeda8b1ef4c921 100644 --- a/assets/chatSessions-DFoCf0pS.js +++ b/assets/chatSessions-CtEVszLf.js @@ -1,4 +1,4 @@ -import{d as Ie,j as u,av as Ne,aa as m,x as je,b as X,aw as Fe,A as fe,l as Ye,B as qe,o as We,ax as Ue}from"./index-C1Xuuz1Y.js";import{c as j}from"./chat-CiW-DJRi.js";/** +import{d as Ie,j as u,av as Ne,aa as m,x as je,b as X,aw as Fe,A as fe,l as Ye,B as qe,o as We,ax as Ue}from"./index-DMjO_toh.js";import{c as j}from"./chat-B4elm0RV.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/chevron-up-zZuEVcHx.js b/assets/chevron-up-5Y7cB_yq.js similarity index 91% rename from assets/chevron-up-zZuEVcHx.js rename to assets/chevron-up-5Y7cB_yq.js index 45bc92bd95b80c2b8af6f22cfa08464587eb1867..e090a6640efae17dab322281241b609eb0378454 100644 --- a/assets/chevron-up-zZuEVcHx.js +++ b/assets/chevron-up-5Y7cB_yq.js @@ -1,4 +1,4 @@ -import{d as o}from"./index-C1Xuuz1Y.js";/** +import{d as o}from"./index-DMjO_toh.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/circle-check-Btq6l2JE.js b/assets/circle-check-KHLmL3jb.js similarity index 87% rename from assets/circle-check-Btq6l2JE.js rename to assets/circle-check-KHLmL3jb.js index a9256fe2cecf727cfd33cf899756640100137210..7103d9e7d6e79fc105bbe923ccf4250e23469c77 100644 --- a/assets/circle-check-Btq6l2JE.js +++ b/assets/circle-check-KHLmL3jb.js @@ -1,4 +1,4 @@ -import{d as c}from"./index-C1Xuuz1Y.js";/** +import{d as c}from"./index-DMjO_toh.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/copy-DN4cM864.js b/assets/copy-DXTYKY8f.js similarity index 89% rename from assets/copy-DN4cM864.js rename to assets/copy-DXTYKY8f.js index 071cf1581aa559e6dc5c973aba064e86dafd4aaf..659ecffbf4565c24dc1a15ba46f6f2c2ba0014eb 100644 --- a/assets/copy-DN4cM864.js +++ b/assets/copy-DXTYKY8f.js @@ -1,4 +1,4 @@ -import{d as e}from"./index-C1Xuuz1Y.js";/** +import{d as e}from"./index-DMjO_toh.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/database-rIkpN7y5.js b/assets/database-UPYeEFxO.js similarity index 89% rename from assets/database-rIkpN7y5.js rename to assets/database-UPYeEFxO.js index cfc78ed16054886565c4a99401effe51b14d2e58..7593a19b7cbba944cdef5ccdbb7a5970289a3804 100644 --- a/assets/database-rIkpN7y5.js +++ b/assets/database-UPYeEFxO.js @@ -1,4 +1,4 @@ -import{d as e}from"./index-C1Xuuz1Y.js";/** +import{d as e}from"./index-DMjO_toh.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/dialog-CCU_33Ju.js b/assets/dialog-C-drkhvX.js similarity index 96% rename from assets/dialog-CCU_33Ju.js rename to assets/dialog-C-drkhvX.js index 7cffe99670ae9b1b8af640f2d49a0208192c8015..95cb237aad3767ae8bfd665653c7914ae3b2e29b 100644 --- a/assets/dialog-CCU_33Ju.js +++ b/assets/dialog-C-drkhvX.js @@ -1 +1 @@ -import{aC as f,i as l,j as t,aD as p,aF as d,aH as g,X as x,Z as o,aE as i,aI as n,aJ as r}from"./index-C1Xuuz1Y.js";const w=f,u=p,c=l.forwardRef(({className:a,...e},s)=>t.jsx(i,{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=i.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(n,{ref:s,className:o("text-lg font-semibold leading-none tracking-tight",a),...e}));D.displayName=n.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{aC as f,i as l,j as t,aD as p,aF as d,aH as g,X as x,Z as o,aE as i,aI as n,aJ as r}from"./index-DMjO_toh.js";const w=f,u=p,c=l.forwardRef(({className:a,...e},s)=>t.jsx(i,{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=i.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(n,{ref:s,className:o("text-lg font-semibold leading-none tracking-tight",a),...e}));D.displayName=n.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/external-link-BwpBZl45.js b/assets/external-link-Bt4eibsp.js similarity index 89% rename from assets/external-link-BwpBZl45.js rename to assets/external-link-Bt4eibsp.js index ceddff49c850270f1ec94641d6eaac57ad29bf47..9d093a2a322744048d34921279ee27b6e2dcaa09 100644 --- a/assets/external-link-BwpBZl45.js +++ b/assets/external-link-Bt4eibsp.js @@ -1,4 +1,4 @@ -import{d as a}from"./index-C1Xuuz1Y.js";/** +import{d as a}from"./index-DMjO_toh.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/file-text-BlXclTHj.js b/assets/file-text-D6OyOvvT.js similarity index 91% rename from assets/file-text-BlXclTHj.js rename to assets/file-text-D6OyOvvT.js index 2f7f2607e7e57620cdf85db6c0da27a3bd91cfc3..2fe920215e471fc3fdd80cf0ed910bf6bde26bbd 100644 --- a/assets/file-text-BlXclTHj.js +++ b/assets/file-text-D6OyOvvT.js @@ -1,4 +1,4 @@ -import{d as e}from"./index-C1Xuuz1Y.js";/** +import{d as e}from"./index-DMjO_toh.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/github-DYMnkwxi.js b/assets/github-3dJEQTDr.js similarity index 92% rename from assets/github-DYMnkwxi.js rename to assets/github-3dJEQTDr.js index b8c0126feab304ba27da1ef1f92353f31f823f52..0d53eb163d0508cfb186aa12d9dcc9f288a9708d 100644 --- a/assets/github-DYMnkwxi.js +++ b/assets/github-3dJEQTDr.js @@ -1,4 +1,4 @@ -import{d as c}from"./index-C1Xuuz1Y.js";/** +import{d as c}from"./index-DMjO_toh.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/globe-D69lYFoB.js b/assets/globe-C6Up_LzV.js similarity index 89% rename from assets/globe-D69lYFoB.js rename to assets/globe-C6Up_LzV.js index ca5f62421349e62cdaa7898b4f1824eccfbe8080..967f622e0413daa983e119ad7f3f27eb634df89e 100644 --- a/assets/globe-D69lYFoB.js +++ b/assets/globe-C6Up_LzV.js @@ -1,4 +1,4 @@ -import{d as e}from"./index-C1Xuuz1Y.js";/** +import{d as e}from"./index-DMjO_toh.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/hover-card-BSWfQepz.js b/assets/hover-card-D4j7S6P3.js similarity index 98% rename from assets/hover-card-BSWfQepz.js rename to assets/hover-card-D4j7S6P3.js index c452c51dbf2b7d18d6201ddefd7d94621e6c6146..72c5c6909d07a1bdff4bcdf002d6d15d91800c54 100644 --- a/assets/hover-card-BSWfQepz.js +++ b/assets/hover-card-D4j7S6P3.js @@ -1 +1 @@ -import{i as n,S as k,j as i,aL as F,aM as I,R as U,V as l,aN as T,Q as O,aO as $,Y as W,U as z,aP as B,aQ as G,aR as K,Z as Q}from"./index-C1Xuuz1Y.js";var E,b="HoverCard",[N]=W(b,[T]),g=T(),[V,w]=N(b),y=e=>{const{__scopeHoverCard:o,children:r,open:s,defaultOpen:a,onOpenChange:c,openDelay:f=700,closeDelay:v=300}=e,d=g(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:c,caller:b}),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)},[]),i.jsx(V,{scope:o,open:m,onOpenChange:t,onOpen:x,onClose:P,onDismiss:M,hasSelectionRef:h,isPointerDownOnContentRef:p,children:i.jsx(F,{...d,children:r})})};y.displayName=b;var _="HoverCardTrigger",D=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,...s}=e,a=w(_,r),c=g(r);return i.jsx(I,{asChild:!0,...c,children:i.jsx(U.a,{"data-state":a.open?"open":"closed",...s,ref:o,onPointerEnter:l(e.onPointerEnter,S(a.onOpen)),onPointerLeave:l(e.onPointerLeave,S(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",[Y,Z]=N(H,{forceMount:void 0}),j=e=>{const{__scopeHoverCard:o,forceMount:r,children:s,container:a}=e,c=w(H,o);return i.jsx(Y,{scope:o,forceMount:r,children:i.jsx(O,{present:r||c.open,children:i.jsx($,{asChild:!0,container:a,children:s})})})};j.displayName=H;var R="HoverCardContent",A=n.forwardRef((e,o)=>{const r=Z(R,e.__scopeHoverCard),{forceMount:s=r.forceMount,...a}=e,c=w(R,e.__scopeHoverCard);return i.jsx(O,{present:s||c.open,children:i.jsx(q,{"data-state":c.open?"open":"closed",...a,onPointerEnter:l(e.onPointerEnter,S(c.onOpen)),onPointerLeave:l(e.onPointerLeave,S(c.onClose)),ref:o})})});A.displayName=R;var q=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:c,onInteractOutside:f,...v}=e,d=w(R,r),C=g(r),u=n.useRef(null),h=z(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"))}),i.jsx(B,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:f,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:l(c,t=>{t.preventDefault()}),onDismiss:d.onDismiss,children:i.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)"}})})}),J="HoverCardArrow",X=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,...s}=e,a=g(r);return i.jsx(K,{...a,...s,ref:o})});X.displayName=J;function S(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=y,oe=D,re=j,L=A;const se=te,ie=oe,ne=n.forwardRef(({className:e,align:o="center",sideOffset:r=4,...s},a)=>i.jsx(re,{children:i.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,ie as a,ne as b}; +import{i as n,S as k,j as i,aL as F,aM as I,R as U,V as l,aN as T,Q as O,aO as $,Y as W,U as z,aP as B,aQ as G,aR as K,Z as Q}from"./index-DMjO_toh.js";var E,b="HoverCard",[N]=W(b,[T]),g=T(),[V,w]=N(b),y=e=>{const{__scopeHoverCard:o,children:r,open:s,defaultOpen:a,onOpenChange:c,openDelay:f=700,closeDelay:v=300}=e,d=g(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:c,caller:b}),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)},[]),i.jsx(V,{scope:o,open:m,onOpenChange:t,onOpen:x,onClose:P,onDismiss:M,hasSelectionRef:h,isPointerDownOnContentRef:p,children:i.jsx(F,{...d,children:r})})};y.displayName=b;var _="HoverCardTrigger",D=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,...s}=e,a=w(_,r),c=g(r);return i.jsx(I,{asChild:!0,...c,children:i.jsx(U.a,{"data-state":a.open?"open":"closed",...s,ref:o,onPointerEnter:l(e.onPointerEnter,S(a.onOpen)),onPointerLeave:l(e.onPointerLeave,S(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",[Y,Z]=N(H,{forceMount:void 0}),j=e=>{const{__scopeHoverCard:o,forceMount:r,children:s,container:a}=e,c=w(H,o);return i.jsx(Y,{scope:o,forceMount:r,children:i.jsx(O,{present:r||c.open,children:i.jsx($,{asChild:!0,container:a,children:s})})})};j.displayName=H;var R="HoverCardContent",A=n.forwardRef((e,o)=>{const r=Z(R,e.__scopeHoverCard),{forceMount:s=r.forceMount,...a}=e,c=w(R,e.__scopeHoverCard);return i.jsx(O,{present:s||c.open,children:i.jsx(q,{"data-state":c.open?"open":"closed",...a,onPointerEnter:l(e.onPointerEnter,S(c.onOpen)),onPointerLeave:l(e.onPointerLeave,S(c.onClose)),ref:o})})});A.displayName=R;var q=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:c,onInteractOutside:f,...v}=e,d=w(R,r),C=g(r),u=n.useRef(null),h=z(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"))}),i.jsx(B,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:f,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:l(c,t=>{t.preventDefault()}),onDismiss:d.onDismiss,children:i.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)"}})})}),J="HoverCardArrow",X=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,...s}=e,a=g(r);return i.jsx(K,{...a,...s,ref:o})});X.displayName=J;function S(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=y,oe=D,re=j,L=A;const se=te,ie=oe,ne=n.forwardRef(({className:e,align:o="center",sideOffset:r=4,...s},a)=>i.jsx(re,{children:i.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,ie as a,ne as b}; diff --git a/assets/index-B8mUud-W.js b/assets/index-BCW47Vvr.js similarity index 99% rename from assets/index-B8mUud-W.js rename to assets/index-BCW47Vvr.js index 442aaf186c1c4ddca3edf98b089bce4434f75229..3839328e513e6cc96cc1bad75591ac1d8dacb487 100644 --- a/assets/index-B8mUud-W.js +++ b/assets/index-BCW47Vvr.js @@ -1,4 +1,4 @@ -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-SntObKrh.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?` +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-ruElXN5Q.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{i as u}from"./index-DMjO_toh.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/index-C1Xuuz1Y.js b/assets/index-DMjO_toh.js similarity index 98% rename from assets/index-C1Xuuz1Y.js rename to assets/index-DMjO_toh.js index 92ff188406232920d5cde07f2f4f43e55680d16d..c75b5713b7623d2cc8abbd4805961999f9c962e2 100644 --- a/assets/index-C1Xuuz1Y.js +++ b/assets/index-DMjO_toh.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/AuthorizePaperEditView-BFjGjwg0.js","assets/useMutation-Cb0wrKBq.js","assets/button-DMLWlhJJ.js","assets/FollowingView-C3WQTFyb.js","assets/FeedView-CEndb4QE.js","assets/taskIcons-DurKAT-u.js","assets/search-YolWz-tq.js","assets/triangle-alert-DGQdZ5Fh.js","assets/share-2-Zzb236oj.js","assets/trending-up-Dmgkbga2.js","assets/moon-DB_mnxXr.js","assets/thumbs-up-Ys3ImX4j.js","assets/database-rIkpN7y5.js","assets/link-2-D52PZ3mH.js","assets/trophy-B0LpQA62.js","assets/file-text-BlXclTHj.js","assets/activity-BCn9520W.js","assets/globe-D69lYFoB.js","assets/researchTopic-BU8M-7Qo.js","assets/plus-VBQCmtt2.js","assets/dialog-CCU_33Ju.js","assets/switch-BrihALZS.js","assets/index-CNkd3QcT.js","assets/useDebounce-lFex_Aum.js","assets/transform-btCQtWTl.js","assets/chatSessions-DFoCf0pS.js","assets/chat-CiW-DJRi.js","assets/arrow-up-right-gHB4zR82.js","assets/arrow-right-BUEjhpSy.js","assets/colors-BkWRhvFI.js","assets/usePapers-DzSHAOm5.js","assets/PaperCard-DjlN6X2v.js","assets/AuthorAvatar-DqCnji_B.js","assets/AuthorAvatar-o5W6pl_W.css","assets/SotaBadges-B5MVNUr2.js","assets/Icon-BADQ_q7j.js","assets/LatexTitle-B0RfzwYI.js","assets/safeExternalHref-CkBrsh84.js","assets/popover-C1A8cBwB.js","assets/skeleton-D8hFkZOU.js","assets/useIntersectionObserver-CwCTFEhv.js","assets/useInfiniteQuery-D52ptoDl.js","assets/McpShowcase-CwUcSruT.js","assets/AgentLogos-CJgsqwCs.js","assets/alert-UfpiwFIJ.js","assets/TopicView-DeWGpkof.js","assets/ChatView-BVQ4YUnD.js","assets/chatLifecycle-CbrXR8Sy.js","assets/hover-card-BSWfQepz.js","assets/CatalogEntityPreviewLink-DxTQ9Cxu.js","assets/github-DYMnkwxi.js","assets/PaperPreviewLink-CTwxrQQW.js","assets/index-SntObKrh.js","assets/index-B8mUud-W.js","assets/katex-DkKDou_j.js","assets/copy-DN4cM864.js","assets/arrow-left-B9GmgZLS.js","assets/external-link-BwpBZl45.js","assets/chevron-up-zZuEVcHx.js","assets/chatLifecycle-Lr_OJaUk.css","assets/katex-wklAmtGL.css","assets/mlIntern-BRf6eT1x.js","assets/openrouter-B1BP_cUi.js","assets/SharedChatView-BFhGSZmU.js","assets/PapersListView-BtYBhno6.js","assets/frameworks-DDA0P4Tf.js","assets/PaperDetailView-uhLfEM17.js","assets/preferences-zpJ52tLe.js","assets/paperReader-td2aJigh.js","assets/useDocumentTitle-DS68IpOJ.js","assets/cacheSync-Dp3vd6Pv.js","assets/input-DJqx9Wtu.js","assets/searchable-select-DPAXOMOd.js","assets/loader-circle-tzO1dF92.js","assets/SignInToEditDialog-DkoRRdng.js","assets/textarea--CThIdhF.js","assets/submissions-DcU5ZqyQ.js","assets/useQueries-qwvJW35M.js","assets/badge-_8Y6CJzv.js","assets/ExternalSourceEvalBadge-CttojFFk.js","assets/ExternalSourceEvalBadge-CWUQ52cV.css","assets/savedPapersAuth-qhoxX36l.js","assets/organizationNames-BVKzYEBp.js","assets/PaperDetailView-CKoGaU4P.css","assets/PaperReaderView-zhsdEzJM.js","assets/MarkdownText-Dv3hoeZl.js","assets/TagsIndexView-kySdXExL.js","assets/slug-BpH-Nkvz.js","assets/AreaSection-CJqBHh3n.js","assets/TaxonomySuggestionTile-BjF2aVUk.js","assets/useHashScrollOnReady-DmDIxpQA.js","assets/areas-Dvi8w2dp.js","assets/TagBrowseView-Fs_0Z72c.js","assets/ResearchFollowButton-9sh3MNHN.js","assets/BenchmarkTrendSparkline-Gf-WHpzB.js","assets/NotFound-BVs_mdc4.js","assets/LoadFailurePage-qL80B4Za.js","assets/MethodsIndexView-CKdiTTbz.js","assets/FrameworksIndexView-C6nlEkCA.js","assets/TrendsView-B-6Mq2H2.js","assets/ConferencesIndexView-BAr9KGLJ.js","assets/deadlines-BG5SWwEG.js","assets/AiDeadlinesView-DZKef9lV.js","assets/ConferenceDetailView-B8HyemPf.js","assets/conferenceListings-BnmhBx-_.js","assets/ConferenceTaskView-C7TsDxKx.js","assets/OrganizationsIndexView-DLszWG1v.js","assets/OrganizationsIndexView-CJnrfIkP.css","assets/OrganizationDetailView-3jQLAskn.js","assets/OrganizationContributionGraph-IO2x3ESF.js","assets/AuthorDetailView-2OMsjKmR.js","assets/MethodDetailView-DGKWIGN2.js","assets/BenchmarkDetailView-NDBfhlkv.js","assets/BenchmarkDetailView-CXxK75GR.css","assets/SavedPapersView-B-bHqIdh.js","assets/SettingsView-z1Pe8Gpv.js","assets/PrivacyView-DWYIzZNF.js","assets/ApiDocsView-7qPalr9E.js","assets/ApiDocsView-DPuMdYvY.css","assets/McpView-D5Q-Ca7m.js","assets/McpView-EGeqkP46.css","assets/SubmitView-T4yIxBdA.js","assets/CronDashboard-Xj6HXS6e.js","assets/CronDashboard-BtUcBsc0.js","assets/CronDashboard-DwChfW9h.css","assets/refresh-cw-Cq-FpYrg.js","assets/circle-check-Btq6l2JE.js","assets/AutonomousOperations-B6I2GPOQ.js","assets/SubmissionsDashboard-UZ55xCo_.js","assets/SubmissionsDashboard-BTmvDoLW.css","assets/UserProfileView-8ohS1aEG.js","assets/AstraForRoboticsView-_difWBZx.js","assets/AstraForRoboticsView-C_lTF_XB.css","assets/SearchOverlay-x6g6F-JL.js","assets/StagingAccessRequestView-KqVz9HWF.js"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/AuthorizePaperEditView-BOFahK60.js","assets/useMutation-Db093XSk.js","assets/button-BGphIht2.js","assets/FollowingView-Cxa7B_EK.js","assets/FeedView-BHFMyhM7.js","assets/taskIcons-BeSRODUD.js","assets/search-D6uSAb1U.js","assets/triangle-alert-CcBqLaPP.js","assets/share-2-BO6l1rLC.js","assets/trending-up-DRI2hJAf.js","assets/moon-CIGKI3Uq.js","assets/thumbs-up-CZ7BdM1B.js","assets/database-UPYeEFxO.js","assets/link-2-n6VIX0kb.js","assets/trophy-C75hq_xI.js","assets/file-text-D6OyOvvT.js","assets/activity-CJ9AQ3mn.js","assets/globe-C6Up_LzV.js","assets/researchTopic-hhMPs4g3.js","assets/plus-B4ZP41Rg.js","assets/dialog-C-drkhvX.js","assets/switch-t5rMaesI.js","assets/index-BgYoYvBg.js","assets/useDebounce-_5_VjYb0.js","assets/transform-CXoeFMaW.js","assets/chatSessions-CtEVszLf.js","assets/chat-B4elm0RV.js","assets/arrow-up-right-Dcycbt3C.js","assets/arrow-right-Tu8hJpdM.js","assets/colors-BkWRhvFI.js","assets/usePapers-DCcqZCMM.js","assets/PaperCard-CUJXx9SW.js","assets/AuthorAvatar-DFoIK6Bc.js","assets/AuthorAvatar-o5W6pl_W.css","assets/SotaBadges-CHGUskQn.js","assets/Icon-D5cUFATZ.js","assets/LatexTitle-BRJTz_K0.js","assets/safeExternalHref-CkBrsh84.js","assets/popover-MF6JD1Yi.js","assets/skeleton-DiGWALrs.js","assets/useIntersectionObserver-CU-1-_ok.js","assets/useInfiniteQuery-C91fE_fV.js","assets/McpShowcase-fiJIUUiM.js","assets/AgentLogos-C26IQbJ9.js","assets/alert-B2i0PAyW.js","assets/TopicView-THW1BoPW.js","assets/ChatView-C_8EJWxW.js","assets/chatLifecycle-CkvR6Xsi.js","assets/hover-card-D4j7S6P3.js","assets/CatalogEntityPreviewLink-BirlAu9e.js","assets/github-3dJEQTDr.js","assets/PaperPreviewLink-DvyVialT.js","assets/index-ruElXN5Q.js","assets/index-BCW47Vvr.js","assets/katex-DkKDou_j.js","assets/copy-DXTYKY8f.js","assets/arrow-left-BSWED_nt.js","assets/external-link-Bt4eibsp.js","assets/chevron-up-5Y7cB_yq.js","assets/chatLifecycle-Lr_OJaUk.css","assets/katex-wklAmtGL.css","assets/mlIntern-DaNPa3iB.js","assets/openrouter-bfrcMxtX.js","assets/SharedChatView-Dj57MfC5.js","assets/PapersListView-CseFoJbP.js","assets/frameworks-DDA0P4Tf.js","assets/PaperDetailView-ouIH95io.js","assets/preferences-B1gzdJ4J.js","assets/paperReader-td2aJigh.js","assets/useDocumentTitle-DVQ2ceqw.js","assets/cacheSync-BmYny7qy.js","assets/input-BzpOTl46.js","assets/searchable-select-DscHfpAa.js","assets/loader-circle-gyMLnt4Y.js","assets/SignInToEditDialog-BIKQbaVj.js","assets/textarea-nRN8oSDz.js","assets/submissions-C02Zu9zt.js","assets/useQueries-DpMmxV-N.js","assets/badge-CARHLO4T.js","assets/ExternalSourceEvalBadge-DYcvJrz-.js","assets/ExternalSourceEvalBadge-CWUQ52cV.css","assets/savedPapersAuth-DWaz2psA.js","assets/organizationNames-BVKzYEBp.js","assets/PaperDetailView-CKoGaU4P.css","assets/PaperReaderView-CHBZiJsP.js","assets/MarkdownText-PyDBRK4a.js","assets/TagsIndexView-Bi7hK8KC.js","assets/slug-BpH-Nkvz.js","assets/AreaSection-BdgwTHWx.js","assets/TaxonomySuggestionTile-CU-KualO.js","assets/useHashScrollOnReady-C5GDmlDb.js","assets/areas-Dvi8w2dp.js","assets/TagBrowseView-v9VEerfq.js","assets/ResearchFollowButton-BCRaiBQA.js","assets/BenchmarkTrendSparkline-BuEjY1OI.js","assets/NotFound-E4uwO9V5.js","assets/LoadFailurePage-BIYmxtFy.js","assets/MethodsIndexView-oQRuQvC5.js","assets/FrameworksIndexView-BudvANNm.js","assets/TrendsView-DLCEhyZN.js","assets/ConferencesIndexView-Gq6pPaBT.js","assets/deadlines-BG5SWwEG.js","assets/AiDeadlinesView-BwYw1rSE.js","assets/ConferenceDetailView-CY8QPPd0.js","assets/conferenceListings-BnmhBx-_.js","assets/ConferenceTaskView-Dy6qzWoe.js","assets/OrganizationsIndexView-Bmjo7Cen.js","assets/OrganizationsIndexView-CJnrfIkP.css","assets/OrganizationDetailView-D7onRyJK.js","assets/OrganizationContributionGraph-RQt-m7Ns.js","assets/AuthorDetailView-IWnDx7CU.js","assets/MethodDetailView-B8HdpGV0.js","assets/BenchmarkDetailView-vHps8p5Q.js","assets/BenchmarkDetailView-CXxK75GR.css","assets/SavedPapersView-DZOensHN.js","assets/SettingsView-gwFUCq1L.js","assets/PrivacyView-DH6mkyi8.js","assets/ApiDocsView-DyP_0MsP.js","assets/ApiDocsView-DPuMdYvY.css","assets/McpView-_zMii-R1.js","assets/McpView-EGeqkP46.css","assets/SubmitView-BFMgGf_E.js","assets/CronDashboard-B8-bAbmS.js","assets/CronDashboard-DI0D1T-u.js","assets/CronDashboard-DwChfW9h.css","assets/refresh-cw-CeolKVxs.js","assets/circle-check-KHLmL3jb.js","assets/AutonomousOperations-Dh-ifubq.js","assets/SubmissionsDashboard-kVd__SF8.js","assets/SubmissionsDashboard-BTmvDoLW.css","assets/UserProfileView-C9P7_Rj8.js","assets/AstraForRoboticsView-Csl6OWzU.js","assets/AstraForRoboticsView-C_lTF_XB.css","assets/SearchOverlay-DazkXCH_.js","assets/StagingAccessRequestView-BhBwFqrG.js"])))=>i.map(i=>d[i]); var uP=Object.defineProperty;var Am=t=>{throw TypeError(t)};var cP=(t,e,r)=>e in t?uP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Nr=(t,e,r)=>cP(t,typeof e!="symbol"?e+"":e,r),Xd=(t,e,r)=>e.has(t)||Am("Cannot "+r);var C=(t,e,r)=>(Xd(t,e,"read from private field"),r?r.call(t):e.get(t)),X=(t,e,r)=>e.has(t)?Am("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),W=(t,e,r,n)=>(Xd(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),ue=(t,e,r)=>(Xd(t,e,"access private method"),r);var Vl=(t,e,r,n)=>({set _(s){W(t,e,s,r)},get _(){return C(t,e,n)}});function dP(t,e){for(var r=0;rn[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(s){if(s.ep)return;s.ep=!0;const i=r(s);fetch(s.href,i)}})();var U3=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ew(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var kw={exports:{}},cd={},Cw={exports:{}},le={};/** * @license React * react.production.min.js @@ -159,4 +159,4 @@ For more information, see https://radix-ui.com/primitives/docs/components/${e.do * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const M2=Gd("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),A2=S2,$2=E2,N2=g.forwardRef(({className:t,inset:e,children:r,...n},s)=>w.jsxs(CC,{ref:s,className:pt("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",e&&"pl-8",t),...n,children:[r,w.jsx(O2,{className:"ml-auto h-4 w-4"})]}));N2.displayName=CC.displayName;const F2=g.forwardRef(({className:t,...e},r)=>w.jsx(PC,{ref:r,className:pt("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",t),...e}));F2.displayName=PC.displayName;const RC=g.forwardRef(({className:t,sideOffset:e=4,...r},n)=>w.jsx(k2,{children:w.jsx(_C,{ref:n,sideOffset:e,className:pt("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",t),...r})}));RC.displayName=_C.displayName;const un=g.forwardRef(({className:t,inset:e,...r},n)=>w.jsx(xC,{ref:n,className:pt("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",e&&"pl-8",t),...r}));un.displayName=xC.displayName;const L2=g.forwardRef(({className:t,children:e,checked:r,...n},s)=>w.jsxs(bC,{ref:s,className:pt("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",t),checked:r,...n,children:[w.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:w.jsx(EC,{children:w.jsx(R2,{className:"h-4 w-4"})})}),e]}));L2.displayName=bC.displayName;const j2=g.forwardRef(({className:t,children:e,...r},n)=>w.jsxs(SC,{ref:n,className:pt("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",t),...r,children:[w.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:w.jsx(EC,{children:w.jsx(I2,{className:"h-2 w-2 fill-current"})})}),e]}));j2.displayName=SC.displayName;const OC=g.forwardRef(({className:t,inset:e,...r},n)=>w.jsx(wC,{ref:n,className:pt("px-2 py-1.5 text-sm font-semibold",e&&"pl-8",t),...r}));OC.displayName=wC.displayName;const Pv=g.forwardRef(({className:t,...e},r)=>w.jsx(kC,{ref:r,className:pt("-mx-1 my-1 h-px bg-muted",t),...e}));Pv.displayName=kC.displayName;function D2(t){const r=(t.name||t.username||"?").trim().split(/\s+/).filter(Boolean);return r.length===0?"?":r.length===1?r[0][0].toUpperCase():(r[0][0]+r[r.length-1][0]).toUpperCase()}const q2=({user:t,onLogout:e})=>w.jsxs(A2,{children:[w.jsx($2,{asChild:!0,children:w.jsx("button",{type:"button",className:"user-avatar-btn","aria-label":`Account menu for ${t.username}`,children:w.jsxs(nk,{className:"h-8 w-8",children:[t.avatar_url&&w.jsx(sk,{src:t.avatar_url,alt:t.username}),w.jsx(ik,{className:"text-xs",children:D2(t)})]})})}),w.jsxs(RC,{align:"end",className:"w-56",children:[w.jsxs(OC,{className:"flex flex-col gap-0.5 py-2",children:[w.jsx("span",{className:"text-sm font-medium leading-tight",children:t.name||t.username}),w.jsxs("span",{className:"text-xs font-normal text-muted-foreground",children:["@",t.username]}),t.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"}),t.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(Pv,{}),w.jsx(un,{asChild:!0,children:w.jsx("a",{href:`https://huggingface.co/${encodeURIComponent(t.username)}`,target:"_blank",rel:"noopener noreferrer",children:"Hugging Face profile"})}),w.jsx(un,{asChild:!0,children:w.jsx(Pr,{to:"/frameworks",children:"Frameworks"})}),w.jsx(un,{asChild:!0,children:w.jsx(Pr,{to:"/trends",children:"Trends"})}),t.is_admin&&w.jsxs(w.Fragment,{children:[w.jsx(un,{asChild:!0,children:w.jsx(Pr,{to:"/admin-dashboard",children:"Admin dashboard"})}),w.jsx(un,{asChild:!0,children:w.jsx(Pr,{to:"/submissions",children:"Review submissions"})})]}),w.jsx(un,{asChild:!0,children:w.jsx(Pr,{to:`/${encodeURIComponent(t.username)}`,children:"My contributions"})}),w.jsx(un,{asChild:!0,children:w.jsx(Pr,{to:"/settings",children:"Settings"})}),w.jsx(Pv,{}),w.jsx(un,{onSelect:r=>{r.preventDefault(),e()},children:"Log out"})]})]}),z2=!1;class Bo extends Error{constructor(r,n){var s;super(`API request failed: ${r.status} ${r.statusText}`);Nr(this,"status");Nr(this,"statusText");Nr(this,"response");Nr(this,"detail");Nr(this,"code");Nr(this,"displayMessage");this.name="ApiError",this.status=r.status,this.statusText=r.statusText,this.response=n;try{if(this.detail=(s=JSON.parse(n))==null?void 0:s.detail,typeof this.detail=="string"&&(this.message=this.detail),Array.isArray(this.detail)){const i=this.detail[0];typeof i=="object"&&i!==null&&"msg"in i&&typeof i.msg=="string"&&(this.message=i.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 i="help"in this.detail&&typeof this.detail.help=="string"?` See ${this.detail.help} for help.`:"";this.message=`${this.detail.message}${i}`}}catch{this.detail=void 0,this.displayMessage=n||this.message;return}this.displayMessage=this.message}}const U2=t=>t instanceof Bo&&t.status===404;function oz(t,e){return t instanceof Bo?t.displayMessage||e:typeof t=="object"&&t!==null&&"message"in t&&typeof t.message=="string"&&t.message||e}class B2{constructor(e){this.baseUrl=e}async fetch(e,r){const n=`${this.baseUrl}${e}`;try{const{headers:s,...i}=r??{},a=(i.method??"GET").toUpperCase()==="GET"?"default":"no-store",l=new Headers(s);return typeof i.body=="string"&&!l.has("Content-Type")&&l.set("Content-Type","application/json"),await fetch(n,{...i,cache:i.cache??a,credentials:i.credentials??"include",headers:l})}catch(s){throw console.error(`[API] Request to ${n} failed:`,s),s}}async fetchOk(e,r){const n=await this.fetch(e,r);if(!n.ok){const s=new Bo(n,await n.text());throw console.error("[API] Error response:",s.response),s}return n}async request(e,r){const n=await this.fetchOk(e,r);return n.status===204?void 0:await n.json()}}function V2(t){t instanceof Bo&&t.status===401&&t.code!=="fresh_auth_required"&&t.code!=="saved_papers_bucket_authorization_required"&&typeof window<"u"&&window.dispatchEvent(new CustomEvent("pwc:auth-stale"))}async function IC(t){try{return await t()}catch(e){throw V2(e),e}}const km=new B2(`${im()}/api/v1`),H2=(t,e)=>km.fetch(t,e),MC=(t,e)=>IC(()=>km.fetchOk(t,e)),he=(t,e)=>IC(()=>km.request(t,e));async function W2(t,e){try{return await he(t,e)}catch(r){if(U2(r))return null;throw r}}const AC={async getCurrentUser(){if(Go())return null;const t=await H2("/auth/me",{cache:"no-store"});return t.status===401||!t.ok?null:t.json()},async logout(){await he("/auth/logout",{method:"POST"})},async requestStagingAccess(){await he("/staging-access-request",{method:"POST"})}};class K2{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 Zu=new K2(he);function Nt(t,e){const r=new URLSearchParams;for(const[s,i]of Object.entries(e??{}))i!==void 0&&i!==""&&r.set(s,String(i));const n=r.toString();return`${t}${n?`?${n}`:""}`}class G2{constructor(e){this.request=e}listAreas(e){return this.request(Nt("/areas/",e))}getArea(e){return this.request(`/areas/${e}`)}areasWithTasks(){return this.request("/areas/with-tasks/")}listTasks(e){return this.request(Nt("/tasks/",e))}getTask(e){return this.request(`/tasks/${e}`)}topTasks(e){return this.request(Nt("/tasks/top",{limit:e}))}trendingTasks(e){return this.request(Nt("/tasks/trending",e))}taskChildren(e,r){return this.request(Nt(`/tasks/${e}/children`,r))}taskParents(e){return this.request(`/tasks/${e}/parents`)}taskPage(e,r){return this.request(Nt(`/tasks/${e}/page`,r))}trendingBenchmarks(e,r){return this.request(Nt(`/tasks/${encodeURIComponent(e)}/trending-benchmarks`,r))}frameworkCatalog(){return this.request("/frameworks/")}listMethods(e){return this.request(Nt("/methods/",e))}methodIndex(){return this.request("/methods/index/cards")}trendingMethods(e){return this.request(Nt("/methods/trending",e))}getMethod(e){return this.request(`/methods/${encodeURIComponent(e)}`)}relatedMethods(e){return this.request(`/methods/${encodeURIComponent(e)}/related`)}methodTrend(e,r){return this.request(Nt(`/methods/${encodeURIComponent(e)}/trend`,r))}listDatasets(e){const{task_id:r,...n}=e??{};return this.request(Nt("/datasets/",{...n,task:n.task??r}))}getDataset(e){return this.request(`/datasets/${e}`)}getDatasetBySlug(e,r){return this.request(Nt(`/datasets/${e}`,r))}async datasetTasks(e){return(await this.request(`/datasets/${e}/tasks/`)).results}async leaderboardMetrics(e,r){return(await this.request(`/datasets/${e}/tasks/${r}/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,r){return this.request(Nt("/organizations/",{q:e,limit:r}))}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(Nt("/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 ge=new G2(he),az="No paper text was available yet. This job starts again automatically within an hour of the paper's Markdown being extracted.",qn="/admin/codex-curation/jobs";class Q2{constructor(e){this.request=e}startPaperJob(e,r){return this.request(`/admin/codex-${e}/jobs`,{method:"POST",body:JSON.stringify({paper_id:r})})}getPaperJob(e,r){return this.request(`/admin/codex-${e}/jobs/${r}`)}cancelPaperJob(e,r){return this.request(`/admin/codex-${e}/jobs/${r}`,{method:"DELETE"})}listJobs(e=100,r={}){const n=new URLSearchParams({limit:String(e)});return Object.entries(r).forEach(([s,i])=>{i&&n.set(s,i)}),this.request(`${qn}?${n}`,{cache:"no-store"})}retryJob(e){return this.request(`${qn}/${e}/retry`,{method:"POST"})}cancelJob(e){return this.request(`${qn}/${e}`,{method:"DELETE"})}async retryTrace(e){await this.request(`${qn}/${e}/retry-trace`,{method:"POST"})}async setScheduler(e){await this.request(`${qn}/scheduler/${e}`,{method:"POST"})}async promoteBenchmarkCandidate(e,r){await this.request(`${qn}/benchmark-candidates/${e}/promote`,{method:"POST",body:JSON.stringify(r)})}async rollbackBenchmarkCandidate(e){await this.request(`${qn}/benchmark-candidates/${e}/rollback`,{method:"POST"})}traceUrl(e){return N1(`/api/v1${qn}/${e}/trace`)}}const tw=new Q2(he),Y2={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 lz(t){return Object.prototype.hasOwnProperty.call(Y2,t)}const $C="pwc:fresh-auth-edit",Tu="pwc:fresh-auth-mutation";function X2(t){if(typeof window>"u")return;sessionStorage.setItem($C,t);const e=qd("/api/v1/auth/hf/login");window.location.assign(`${e}?return_to=${encodeURIComponent(window.location.href)}`)}class J2{constructor(e,r=X2){Nr(this,"paperLoads",new Map);Nr(this,"evaluationLoads",new Map);this.request=e,this.recoverFreshAuth=r}primePaper(e,r=!1){r&&this.paperLoads.delete(e);let n=this.paperLoads.get(e);return n||(n=this.request(`/papers/${e}/curation-state`).catch(s=>{throw this.paperLoads.delete(e),s}),this.paperLoads.set(e,n)),n}primeEvaluations(e,r=!1){r&&this.evaluationLoads.delete(e);let n=this.evaluationLoads.get(e);return n||(n=this.request(`/evaluations/curation-state?paper_id=${e}`).catch(s=>{throw this.evaluationLoads.delete(e),s}),this.evaluationLoads.set(e,n)),n}async mutatePaper(e,r,n,s,i){const o=this.paperLoads.get(e);if(!o)throw new Error("The catalog version was not loaded when this editor opened. Close and reopen the editor.");const a=(await o).sections[r];if(!a)throw new Error(`Missing curation version for ${r}`);return this.mutate(r,s,n,a,i,`paper:${e}:${r}`)}async mutateEvaluations(e,r,n,s){const i=this.evaluationLoads.get(String(e));if(!i)throw new Error("The evaluation version was not loaded when this editor opened. Close and reopen the editor.");const o=(await i).version;return this.mutate("evaluations",n,r,o,s,`paper:${e}:evaluations`)}async mutate(e,r,n,s,i,o){const a=new Headers(i.headers);Object.entries(this.idempotencyHeaders(o,n,s)).forEach(([u,c])=>a.set(u,c));const l={...i,headers:a};try{const u=await this.request(r,l);return this.clearAttempt(l),u}catch(u){throw u instanceof Bo&&u.status===401&&u.code==="fresh_auth_required"?(this.saveFreshAuthMutation(e,r,n,l),this.recoverFreshAuth(e)):u instanceof Bo&&u.status===409&&(this.clearAttempt(l),typeof window<"u"&&window.dispatchEvent(new CustomEvent("pwc:catalog-conflict",{detail:{endpoint:r}}))),u}}freshAuthMutationDraft(){const e=sessionStorage.getItem(Tu);if(!e)return null;try{const r=JSON.parse(e);if(!r.endpoint.startsWith("/")||r.endpoint.startsWith("//")||!["POST","PUT","PATCH","DELETE"].includes(r.options.method))throw new Error("Invalid saved mutation draft");return r}catch{return sessionStorage.removeItem(Tu),null}}async resumeFreshAuthMutation(){const e=this.freshAuthMutationDraft();if(!e)throw new Error("No saved catalog edit is available.");const r=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(Tu),sessionStorage.removeItem($C),r}saveFreshAuthMutation(e,r,n,s){const i=Object.fromEntries(new Headers(s.headers).entries()),o=typeof s.body=="string"?s.body:void 0;sessionStorage.setItem(Tu,JSON.stringify({section:e,endpoint:r,payload:n,options:{method:(s.method??"POST").toUpperCase(),body:o,headers:i}}))}idempotencyHeaders(e,r,n){const s=`pwc:mutation:${e}:${JSON.stringify(r)}`,i=sessionStorage.getItem(s);if(i){const a=JSON.parse(i);return{"Idempotency-Key":a.key,"If-Match":a.version}}const o=crypto.randomUUID();return sessionStorage.setItem(s,JSON.stringify({key:o,version:n})),sessionStorage.setItem(`pwc:mutation-key:${o}`,s),{"Idempotency-Key":o,"If-Match":n}}clearAttempt(e){const r=new Headers(e.headers).get("Idempotency-Key");if(!r)return;const n=sessionStorage.getItem(`pwc:mutation-key:${r}`);n&&sessionStorage.removeItem(n),sessionStorage.removeItem(`pwc:mutation-key:${r}`),this.paperLoads.clear(),this.evaluationLoads.clear()}}const Kt=new J2(he);class Z2{constructor(e){this.request=e}list(e={}){const r=new URLSearchParams(Object.entries(e).filter(n=>n[1]!==void 0).map(([n,s])=>[n,String(s)])).toString();return this.request(`/evaluations/${r?`?${r}`:""}`,{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,r){return this.allPages({dataset_id:Number(e),best_metric:r,ordering:"best_rank"})}async byLeaderboard(e,r,n={}){return this.allPages({dataset_id:Number(e),task_id:Number(r),ordering:"best_rank",...n})}create(e){return this.request("/evaluations/",{method:"POST",body:JSON.stringify(e)})}update(e,r){return this.request(`/evaluations/${e}`,{method:"PUT",body:JSON.stringify(r)})}delete(e){return this.request(`/evaluations/${e}`,{method:"DELETE"})}primeCurationState(e,r=!1){return Kt.primeEvaluations(e,r)}batch(e,r){return Kt.mutateEvaluations(e,r,"/evaluations/batch",{method:"POST",body:JSON.stringify({paper_id:e,operations:r})})}async allPages(e){const n=await this.list({...e,page_size:100});if(!n.next_page)return n.results;const s=Math.ceil(n.count/100),i=await Promise.all(Array.from({length:s-1},(o,a)=>this.list({...e,page:a+2,page_size:100})));return[n,...i].flatMap(o=>o.results)}}const rw=new Z2(he);class eq{constructor(e){this.request=e}getCronStatus(e=!1){const r=e?"?force_refresh=true":"";return this.request(`/cron/status${r}`,{cache:"no-store"})}getPaperMarkdownJobs(){return this.request("/cron/paper-markdown-jobs",{cache:"no-store"})}getAutonomousOperations(){return this.request("/admin/autonomous-operations",{cache:"no-store"})}setAutonomousManualMode(e,r,n){return this.request("/admin/autonomous-operations/manual-mode",{method:"PATCH",body:JSON.stringify({enabled:e,expected_revision:r,confirmation:n})})}setAutonomousOperator(e,r,n,s){return this.request(`/admin/autonomous-operations/operators/${e}`,{method:"PATCH",body:JSON.stringify({enabled:r,expected_revision:n,confirmation:s})})}qualifyAutonomousChatBaseline(e,r,n){return this.request("/admin/autonomous-operations/chat-baseline",{method:"POST",body:JSON.stringify({sha:e,expected_revision:r,confirmation:n})})}}const yh=new eq(he),nw={authorization:t=>he(`/paper-edit-authorizations/${encodeURIComponent(t)}`),approve:t=>he(`/paper-edit-authorizations/${encodeURIComponent(t)}/approve`,{method:"POST"}),digest:(t,e)=>he(`/admin/paper-edit-digest?day=${t}&page=${e}`),suspend:(t,e)=>he("/admin/paper-edit-suspension",{method:"POST",body:JSON.stringify({hf_subject:t,suspended:e})})};function Ai(t){const e=new URLSearchParams;for(const[n,s]of Object.entries(t??{}))s!==void 0&&s!==""&&e.set(n,String(s));const r=e.toString();return r?`?${r}`:""}class tq{constructor(e){this.request=e}list(e){const r=new URLSearchParams;for(const[s,i]of Object.entries(e??{}))i!==void 0&&i!==""&&r.set(s,String(i));const n=r.toString();return this.request(`/papers/${n?`?${n}`:""}`,{cache:"no-cache"})}search(e,r=1,n=10,s,i,o){const a=new URLSearchParams({q:e,page:r.toString(),page_size:n.toString()});return s&&a.set("mode",s),o!=null&&o.start_date&&a.set("start_date",o.start_date),o!=null&&o.end_date&&a.set("end_date",o.end_date),this.request(`/papers/search?${a.toString()}`,{signal:i})}searchFeed(e){return this.request(`/papers/search/feed${Ai(e)}`,{cache:"no-cache"})}get(e,r=!0){const n=r?"?include_resources=true":"";return this.request(`/papers/${e}${n}`)}getByArxivId(e,r=!0){const n=r?"?include_resources=true":"";return this.request(`/papers/arxiv/${e}${n}`)}lookup(e){return this.request("/papers/lookup",{method:"POST",body:JSON.stringify({references:e})})}related(e,r=4){return this.request(`/papers/${encodeURIComponent(e)}/related?limit=${r}`)}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,r){return this.request(`/papers/${encodeURIComponent(e)}/copy-to-bucket`,{method:"POST",body:JSON.stringify(r)})}trending(e){const r=new URLSearchParams;for(const[s,i]of Object.entries(e??{}))i!==void 0&&r.set(s,String(i));const n=r.toString();return this.request(`/papers/trending${n?`?${n}`:""}`,{cache:"no-store"})}forTask(e,r){return this.request(`/tasks/${e}/papers${Ai(r)}`)}forMethod(e,r){return this.request(`/methods/${encodeURIComponent(e)}/papers${Ai(r)}`)}forConference(e,r){return this.request(`/conferences/${e}/papers${Ai(r)}`)}forOrganization(e,r){return this.request(`/organizations/${e}/papers${Ai(r)}`)}getAuthor(e){return this.request(`/authors/${e}`)}searchAuthors(e,r){return this.request(`/authors/${Ai({search:e,page_size:r})}`)}primeCurationState(e,r=!1){return Kt.primePaper(e,r)}freshAuthMutationDraft(){return Kt.freshAuthMutationDraft()}resumeFreshAuthMutation(){return Kt.resumeFreshAuthMutation()}updateTasks(e,r){const n=new URLSearchParams(r.map(s=>["task_ids",String(s)])).toString();return Kt.mutatePaper(e,"tasks",r,`/papers/${e}/tasks?${n}`,{method:"PUT"})}updateMethods(e,r){const n=new URLSearchParams(r.map(s=>["method_ids",String(s)])).toString();return Kt.mutatePaper(e,"methods",r,`/papers/${e}/methods?${n}`,{method:"PUT"})}updateOrganizations(e,r){const n=new URLSearchParams(r.map(s=>["organization_ids",String(s)])).toString();return Kt.mutatePaper(e,"organizations",r,`/papers/${e}/organizations?${n}`,{method:"PUT"})}updateRepositories(e,r){return Kt.mutatePaper(e,"repositories",r,`/papers/${e}/repositories`,{method:"PUT",body:JSON.stringify({repositories:r})})}updateProjectPages(e,r){return Kt.mutatePaper(e,"project_pages",r,`/papers/${e}/project-pages`,{method:"PUT",body:JSON.stringify({project_pages:r})})}updateXThreads(e,r){return Kt.mutatePaper(e,"x_threads",r,`/papers/${e}/x-threads`,{method:"PUT",body:JSON.stringify({x_threads:r})})}updateSourceUrl(e,r){return Kt.mutatePaper(e,"source_url",r,`/papers/${e}/source-url`,{method:"PUT",body:JSON.stringify({source_url:r})})}updateHfArtifacts(e,r){return Kt.mutatePaper(e,"hf_artifacts",r,`/papers/${e}/hf-artifacts`,{method:"PUT",body:JSON.stringify(r)})}}const zn=new tq(he);async function rq(t){return(await MC(`/papers/${encodeURIComponent(t)}/web-markdown`)).text()}function nq(t){return he(`/papers/${encodeURIComponent(t)}/web-page`)}function sq(t){return W2(`/papers/${encodeURIComponent(t)}/layout`)}const iq={async get(t){const e=await MC(`/profiles/${encodeURIComponent(t)}`),r=await e.json();if(!e.redirected)return r;const n=decodeURIComponent(new URL(e.url).pathname.split("/").pop()||r.username);return{...r,username:n,redirected_from_alias:!0}}},oq=20,uz=300,cz=10,Un={follows:()=>he("/me/follows"),followSuggestions:()=>he("/research/follow-suggestions"),setFollow:(t,e,r)=>he(`/me/follows/${t}/${e}`,{method:r?"PUT":"DELETE"}),following:(t=0,e={})=>{var n,s;const r=new URLSearchParams({offset:String(t),limit:"40"});return e.startDate&&r.set("start_date",e.startDate),e.endDate&&r.set("end_date",e.endDate),!e.startDate&&!e.endDate&&r.set("all_time","true"),e.topicOnly&&r.set("topic_only","true"),(n=e.topicIds)==null||n.forEach(i=>r.append("topic_id",String(i))),(s=e.follows)==null||s.forEach(i=>r.append("follow",i)),e.addedAfter&&r.set("added_after",e.addedAfter),he(`/me/following?${r}`)},followingNewCount:t=>he(`/me/following/new-count?${new URLSearchParams({since:t})}`),topics:()=>he("/me/topics"),addTopic:t=>he("/me/topics",{method:"POST",body:JSON.stringify({text:t})}),updateTopic:(t,e)=>he(`/me/topics/${t}`,{method:"PUT",body:JSON.stringify({text:e})}),removeTopic:t=>he(`/me/topics/${t}`,{method:"DELETE"}),reorderTopics:t=>he("/me/topics/order",{method:"PUT",body:JSON.stringify({topic_ids:t})}),followTopic:t=>he(`/me/topics/${t}/follow`,{method:"POST"}),setTopicPublic:(t,e)=>he(`/me/topics/${t}`,{method:"PATCH",body:JSON.stringify({is_public:e})}),setShowAsFollower:t=>he("/me/topic-follower-visibility",{method:"PUT",body:JSON.stringify({show_as_follower:t})}),publicTopic:t=>he(`/research/topics/${t}`),topicPapers:(t,e,r=0,n={})=>{const s=new URLSearchParams({order:e,offset:String(r),limit:String(oq)});return n.startDate&&s.set("start_date",n.startDate),n.endDate&&s.set("end_date",n.endDate),he(`/research/topics/${t}/papers?${s}`)},featuredTopics:()=>he("/research/topics/featured"),topicMatches:t=>he(`/research/topic-matches?${new URLSearchParams({text:t})}`),email:()=>he("/me/research-email"),setEmail:t=>he("/me/research-email",{method:"PUT",body:JSON.stringify({enabled:t})})};class aq{constructor(e){this.request=e}trends(){return this.request("/stats/trends")}}const lq=new aq(he),El=60*1e3,js=5*El,me=10*El,NC=60*El,et=(t,e)=>t==null||t===""?jl:()=>e(t),Ru={me:()=>({queryKey:["auth","me"],queryFn:()=>AC.getCurrentUser(),staleTime:1/0})},dz={preferences:()=>({queryKey:["account","preferences"],queryFn:()=>Zu.getPreferences(),staleTime:1/0}),bookmarkIds:()=>({queryKey:["my-bookmark-ids"],queryFn:()=>Zu.getBookmarkIds()}),rateLimitPolicy:()=>({queryKey:["submission-rate-limit-policy"],queryFn:()=>Zu.getRateLimitPolicy()})},fz={organizations:["organizations"]},hz={areas:()=>({queryKey:["areas"],queryFn:()=>ge.listAreas({page_size:50,ordering:"name"}),staleTime:me}),area:t=>({queryKey:["area",t],queryFn:et(t,e=>ge.getArea(e)),staleTime:me}),areasWithTasks:()=>({queryKey:["areas-with-tasks"],queryFn:()=>ge.areasWithTasks(),staleTime:me}),topTasks:t=>({queryKey:["top-tasks",t],queryFn:()=>ge.topTasks(t),staleTime:me}),trendingTasks:t=>({queryKey:["trending-tasks",t],queryFn:()=>ge.trendingTasks(t),staleTime:me}),trendingMethods:t=>({queryKey:["trending-methods",t],queryFn:()=>ge.trendingMethods(t),staleTime:me}),taskList:t=>({queryKey:["task-list",t],queryFn:()=>ge.listTasks(t)}),methodList:t=>({queryKey:["method-list",t],queryFn:()=>ge.listMethods(t)}),datasetList:t=>({queryKey:["dataset-list",t],queryFn:()=>ge.listDatasets(t)}),task:t=>({queryKey:["task",t],queryFn:et(t,e=>ge.getTask(e)),staleTime:me}),taskPage:(t,e)=>({queryKey:["task-page",t,e],queryFn:et(t,r=>ge.taskPage(r,e)),staleTime:me}),taskBenchmarkTrends:(t,e)=>({queryKey:["task-benchmark-trends",t,e],queryFn:et(t,r=>ge.trendingBenchmarks(r,e)),staleTime:me}),method:t=>({queryKey:["method",t],queryFn:et(t,e=>ge.getMethod(e)),staleTime:me}),methodIndex:()=>({queryKey:["method-index"],queryFn:()=>ge.methodIndex(),staleTime:me}),methodTrend:t=>({queryKey:["method-trend",t],queryFn:et(t,e=>ge.methodTrend(e)),staleTime:me}),relatedMethods:t=>({queryKey:["related-methods",t],queryFn:et(t,e=>ge.relatedMethods(e)),staleTime:me}),dataset:t=>({queryKey:["dataset",t],queryFn:et(t,e=>ge.getDataset(e)),staleTime:me}),datasetPage:(t,e)=>({queryKey:["dataset",t,e],queryFn:et(t,r=>ge.getDatasetBySlug(r,e)),staleTime:me}),datasetTasks:t=>({queryKey:["dataset-tasks",t],queryFn:et(t,e=>ge.datasetTasks(e)),staleTime:me}),leaderboardMetrics:(t,e)=>({queryKey:["leaderboard-metrics",t,e],queryFn:t&&e?()=>ge.leaderboardMetrics(t,e):jl,staleTime:me}),metricDirections:()=>({queryKey:["metric-directions"],queryFn:()=>ge.metricDirections(),staleTime:NC}),frameworkCatalog:()=>({queryKey:["framework-catalog"],queryFn:()=>ge.frameworkCatalog()}),conferences:()=>({queryKey:["conferences"],queryFn:()=>ge.conferences(),staleTime:me}),conferenceDeadlines:()=>({queryKey:["conference-deadlines"],queryFn:()=>ge.conferenceDeadlines(),staleTime:me}),conference:t=>({queryKey:["conference",t],queryFn:et(t,e=>ge.getConference(e)),staleTime:me}),conferenceAreasWithTasks:t=>({queryKey:["conference-areas-with-tasks",t],queryFn:et(t,e=>ge.conferenceAreasWithTasks(e)),staleTime:me}),organizations:()=>({queryKey:["organizations","all"],queryFn:()=>ge.organizations(),staleTime:js}),organizationIndex:()=>({queryKey:["organizations","index"],queryFn:()=>ge.organizationIndex(),staleTime:me}),organizationSearch:(t,e)=>({queryKey:["organizations","search",t,e],queryFn:()=>ge.searchOrganizations(t,e)}),organization:t=>({queryKey:["organization",t],queryFn:et(t,e=>ge.getOrganization(e)),staleTime:me}),organizationAreasWithTasks:t=>({queryKey:["organization-areas-with-tasks",t],queryFn:()=>ge.organizationAreasWithTasks(t),staleTime:me}),organizationContributions:t=>({queryKey:["organization-contributions",t],queryFn:()=>ge.organizationContributions(t),staleTime:me})},pz={detail:t=>({queryKey:["paper",t],queryFn:et(t,e=>zn.get(e,!0)),staleTime:me}),summary:t=>({queryKey:["paper-summary",t],queryFn:()=>zn.get(t,!1),staleTime:js}),versions:t=>({queryKey:["paper-versions",t],queryFn:et(t,e=>zn.versions(e)),staleTime:me}),related:t=>({queryKey:["related-papers",t],queryFn:et(t,e=>zn.related(e,4)),staleTime:me}),search:(t,e)=>({queryKey:["paper-search",t,e],queryFn:()=>zn.search(t,1,e),staleTime:El}),saved:()=>({queryKey:["my-bookmarks"],queryFn:()=>Zu.getBookmarks()}),layout:t=>({queryKey:["paper-layout",t],queryFn:()=>sq(t),staleTime:js}),webPage:t=>({queryKey:["paper-web-page",t],queryFn:()=>nq(t),staleTime:js}),webMarkdown:t=>({queryKey:["paper-web-markdown",t],queryFn:()=>rq(t),staleTime:js}),suggestedQuestions:t=>({queryKey:["paper-suggested-questions",t],queryFn:()=>zn.suggestedQuestions(t)}),author:t=>({queryKey:["author",t],queryFn:()=>zn.getAuthor(t),staleTime:js}),authorSearch:(t,e)=>({queryKey:["author-search",t,e],queryFn:()=>zn.searchAuthors(t,e),staleTime:El})},qr={list:"papers-infinite",search:"paper-search-feed",task:"task-papers-infinite",conference:"conference-papers-infinite",organization:"organization-papers-infinite",method:"method-papers-infinite",following:"research-feed",trending:"trending-papers"},vz={list:t=>[qr.list,t],search:t=>[qr.search,t],task:(t,e)=>[qr.task,t,e],conference:(t,e,r)=>[qr.conference,t,e,r],organization:(t,e,r)=>[qr.organization,t,e,r],method:(t,e)=>[qr.method,t,e],following:(t,e)=>e?[qr.following,t,e]:[qr.following,t],trending:t=>[qr.trending,t]},gz=[...Object.values(qr),"my-bookmarks","related-papers","paper-versions","paper-search","chat-paper-mention-search"],mz={byPaper:t=>({queryKey:["paper-evals",t],queryFn:et(t,e=>rw.byPaper(e)),staleTime:0}),byDataset:t=>({queryKey:["dataset-evals",t],queryFn:et(t,e=>rw.byDataset(e)),staleTime:js})},yz={follows:t=>({queryKey:["research-follows",t],queryFn:Un.follows}),followSuggestions:()=>({queryKey:["research-follow-suggestions"],queryFn:Un.followSuggestions,staleTime:me}),topics:t=>({queryKey:["research-topics",t],queryFn:Un.topics}),publicTopic:(t,e)=>({queryKey:["research-public-topic",t,e],queryFn:()=>Un.publicTopic(t)}),followingNewCount:(t,e)=>({queryKey:["research-following-new-count",t,e],queryFn:()=>Un.followingNewCount(e),staleTime:5*60*1e3}),featuredTopics:()=>({queryKey:["research-featured-topics"],queryFn:Un.featuredTopics,staleTime:me}),topicMatches:t=>({queryKey:["research-topic-matches",t],queryFn:()=>Un.topicMatches(t),staleTime:me}),email:t=>({queryKey:["research-email",t],queryFn:Un.email})},_z={trends:()=>({queryKey:["research-trends"],queryFn:()=>lq.trends(),staleTime:NC})},wz={publicTopics:["research-public-topic"],topicPapers:(t,e,r,n)=>[`research-topic-papers-${t}`,e,r.startDate??null,r.endDate??null,n]},xz={user:t=>({queryKey:["user-profile",t.toLowerCase()],queryFn:()=>iq.get(t)})},bz={authorization:t=>({queryKey:["paper-edit-authorization",t],queryFn:()=>nw.authorization(t)}),digest:(t,e)=>({queryKey:["paper-edit-digest",t,e],queryFn:et(t,r=>nw.digest(r,e))})},Sz={pendingEdits:["pendingPaperEdits"],counts:(t,e)=>["pendingPaperEdits","counts",t,e],list:t=>["pendingPaperEdits",t]},sw={all:["admin"],cronStatus:["admin","cronStatus"],chatSandboxSpend:t=>["admin","chatSandboxSpend",t],chatWebSearchBudget:["admin","chatWebSearchBudget"],codexPaperJobs:["admin","codexPaperJobs"],catalogAudit:["catalog-audit"]},Ez={cronStatus:()=>({queryKey:sw.cronStatus,queryFn:()=>yh.getCronStatus()}),autonomousOperations:()=>({queryKey:["admin","autonomousOperations"],queryFn:()=>yh.getAutonomousOperations()}),paperMarkdownJobs:()=>({queryKey:["admin","paperMarkdownJobs"],queryFn:()=>yh.getPaperMarkdownJobs()}),codexPaperJobs:t=>({queryKey:[...sw.codexPaperJobs,t],queryFn:()=>tw.listJobs(100,t)}),codexPaperJob:(t,e)=>({queryKey:["admin","codexPaperJob",t,e],queryFn:et(e,r=>tw.getPaperJob(t,r))})},Cm=V.createContext(null),iw="pwc:auth-stale",uq=({children:t})=>{const e=n1(),r=M$(Ru.me()),n=r.data??null,s=V.useRef(null),{refetch:i}=r,o=V.useCallback(async()=>{await i()},[i]),a=V.useCallback(async()=>{const u=qd("/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 AC.logout(),e.setQueryData(Ru.me().queryKey,null)},[e]);V.useEffect(()=>{},[n]),V.useEffect(()=>{s.current&&!n&&e.resetQueries({predicate:u=>u.queryKey[0]!==Ru.me().queryKey[0]}),s.current=n},[e,n]),V.useEffect(()=>{const u=()=>e.setQueryData(Ru.me().queryKey,null);return window.addEventListener(iw,u),()=>window.removeEventListener(iw,u)},[e]);const l=V.useMemo(()=>({user:n,isLoading:r.isPending,refresh:o,logout:a}),[n,r.isPending,o,a]);return w.jsx(Cm.Provider,{value:l,children:t})};function FC(){const t=V.useContext(Cm);if(!t)throw new Error("useAuth must be used inside an ");return t}function kz(){return V.useContext(Cm)}const on=({name:t,size:e=14})=>{const r={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"}),x:w.jsx("path",{fill:"currentColor",d:"M12.6.75h2.45L9.7 6.87 16 15.25h-4.94l-3.87-5.06-4.42 5.06H.32l5.73-6.55L0 .75h5.06l3.5 4.63L12.6.75zm-.86 13.03h1.36L4.32 2.15H2.86l8.88 11.63z"})};return w.jsx("svg",{className:e===11?"icon-sm":"icon",viewBox:"0 0 16 16",width:e,height:e,children:r[t]})},ow="https://github.com/huggingface/paperswithcode",aw="https://x.com/paperswithcodee",cq="https://paperswithcode.co/following",lw="pwc:announcement:following-feed:v1:dismissed",_h=[{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:"/ai-deadlines",label:"Deadlines",end:!1},{to:"/organizations",label:"Organizations",end:!1},{to:"/submit",label:"Submit",end:!1}],dq=()=>{if(typeof navigator>"u")return!1;const t=navigator.userAgentData,e=(t==null?void 0:t.platform)||navigator.platform||navigator.userAgent||"";return/Mac|iPhone|iPad|iPod/i.test(e)},fq=()=>{const[t,e]=V.useState(!1);return V.useEffect(()=>{e(dq())},[]),w.jsx("kbd",{children:t?"⌘K":"Ctrl K"})},hq=({onOpenSearch:t})=>{const[e,r]=V.useState(!1),[n,s]=V.useState(()=>localStorage.getItem(lw)!=="1"),i=V.useRef(null),o=V.useRef(null),a=()=>r(!1),{user:l,logout:u}=FC(),c=yr(),d=c.pathname.startsWith("/pdf/"),f=`${c.pathname}${c.search}`||"/",m=Go(),_=wl()?{to:"/chat",label:"Chat",end:!1,badge:"New"}:SF()?{to:"/chat",label:"Chat",end:!1,badge:"New",href:bF}:null,p=_?[_h[0],_,..._h.slice(1)]:_h;return V.useLayoutEffect(()=>{var E;const y=i.current,h=o.current;if(!y||!h)return;let v=!1;const x=()=>{if(v)return;const P=y.querySelector(".nav-item.active"),k=(P==null?void 0:P.offsetWidth)??0;h.style.width=`${k}px`,h.style.transform=`translateX(${(P==null?void 0:P.offsetLeft)??0}px)`,h.style.opacity=k>0?"1":"0"};x();const b=window.requestAnimationFrame(()=>{h.classList.add("nav-indicator-ready")}),S=typeof ResizeObserver>"u"?null:new ResizeObserver(x);return S==null||S.observe(y),window.addEventListener("resize",x),(E=document.fonts)==null||E.ready.then(x),()=>{v=!0,window.cancelAnimationFrame(b),S==null||S.disconnect(),window.removeEventListener("resize",x)}},[c.pathname,p.length]),w.jsxs(hF,{open:e,onOpenChange:r,children:[w.jsxs("header",{className:"app-header",children:[w.jsxs("div",{className:"app-header-inner",children:[w.jsxs(Ri,{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:i,children:[p.map(({to:y,label:h,end:v,badge:x,href:b})=>{const 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:`nav-item${x?" nav-item-with-badge":""}`,children:S},y):w.jsx(Ri,{to:y,end:v,className:({isActive:E})=>`nav-item${x?" nav-item-with-badge":""}${E?" active":""}`,children:S},y)}),w.jsx("span",{ref:o,className:"nav-indicator","aria-hidden":"true"})]}),w.jsx("div",{className:"header-spacer"}),w.jsx("a",{className:"icon-btn header-github-btn",href:ow,target:"_blank",rel:"noreferrer","aria-label":"GitHub repository",title:"GitHub repository",children:w.jsx(on,{name:"github",size:14})}),w.jsx("a",{className:"icon-btn header-x-btn",href:aw,target:"_blank",rel:"noreferrer","aria-label":"Follow us on X",title:"Follow us on X",children:w.jsx(on,{name:"x",size:14})}),w.jsxs("button",{className:"search-trigger","aria-label":"Search papers, authors, domains",onClick:t,children:[w.jsx(on,{name:"search",size:13}),w.jsx("span",{children:"Search papers, authors, domains…"}),w.jsx(fq,{})]}),w.jsx("button",{className:"icon-btn mobile-search-btn","aria-label":"Search",onClick:t,children:w.jsx(on,{name:"search",size:14})}),!m&&w.jsx(Ri,{to:"/saved",className:"icon-btn header-bookmark-btn","aria-label":"Saved papers",title:"Saved papers",children:w.jsx(on,{name:"bookmark",size:13})}),m?null:l?w.jsx(q2,{user:l,onLogout:u}):w.jsx(F1,{returnTo:f}),w.jsx(pF,{asChild:!0,children:w.jsx("button",{className:"icon-btn mobile-menu-btn","aria-label":"Open menu",children:w.jsx(on,{name:"menu",size:14})})})]}),!d&&n&&w.jsxs("div",{className:"site-announcement",role:"status",children:[w.jsx("span",{children:"New: "}),m?w.jsx("a",{href:cq,target:"_blank",rel:"noreferrer",children:"following feed"}):w.jsx(Pr,{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(lw,"1"),s(!1)},children:w.jsx(on,{name:"close",size:11})})]})]}),w.jsx(vF,{children:w.jsx(gF,{className:"mobile-nav-drawer",children:w.jsxs(mF,{className:"mobile-nav-panel","aria-describedby":void 0,children:[w.jsx(yF,{className:"sr-only",children:"Navigation menu"}),w.jsx(_F,{className:"icon-btn mobile-nav-close","aria-label":"Close menu",children:w.jsx(on,{name:"close",size:14})}),w.jsxs("button",{type:"button",className:"mobile-nav-link mobile-nav-search",onClick:()=>{a(),t()},children:[w.jsx(on,{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 S=`mobile-nav-link${x?" mobile-nav-link-with-badge":""}`,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:S,onClick:a,children:E},y):w.jsx(Ri,{to:y,end:v,className:S,onClick:a,children:E},y)}),w.jsx("a",{className:"mobile-nav-link",href:ow,target:"_blank",rel:"noreferrer",onClick:a,children:"GitHub"}),w.jsx("a",{className:"mobile-nav-link",href:aw,target:"_blank",rel:"noreferrer",onClick:a,children:"Follow us on X"}),!m&&w.jsx(Ri,{to:"/saved",className:"mobile-nav-link",onClick:a,children:"Saved papers"}),!m&&(l==null?void 0:l.is_admin)&&w.jsx(Ri,{to:"/admin-dashboard",className:"mobile-nav-link",onClick:a,children:"Admin dashboard"})]})})})]})},pq=()=>{const{pathname:t}=yr();return t==="/chat"||t.startsWith("/chat/")||t.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(Pr,{to:"/docs/api",children:"API"}),w.jsx(Pr,{to:"/mcp",children:"MCP"}),w.jsx(Pr,{to:"/privacy",children:"Privacy"}),w.jsx("a",{href:"https://github.com/huggingface/paperswithcode-feedback/issues",target:"_blank",rel:"noreferrer",children:"Feedback"}),w.jsx("a",{href:"https://x.com/paperswithcodee",target:"_blank",rel:"noreferrer",children:"Follow us on X"})]})})},vq=1,gq=1e6;let wh=0;function mq(){return wh=(wh+1)%Number.MAX_SAFE_INTEGER,wh.toString()}const xh=new Map,uw=t=>{if(xh.has(t))return;const e=setTimeout(()=>{xh.delete(t),Ba({type:"REMOVE_TOAST",toastId:t})},gq);xh.set(t,e)},yq=(t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,vq)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(r=>r.id===e.toast.id?{...r,...e.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=e;return r?uw(r):t.toasts.forEach(n=>{uw(n.id)}),{...t,toasts:t.toasts.map(n=>n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(r=>r.id!==e.toastId)}}},ec=[];let tc={toasts:[]};function Ba(t){tc=yq(tc,t),ec.forEach(e=>{e(tc)})}function _q({...t}){const e=mq(),r=s=>Ba({type:"UPDATE_TOAST",toast:{...s,id:e}}),n=()=>Ba({type:"DISMISS_TOAST",toastId:e});return Ba({type:"ADD_TOAST",toast:{...t,id:e,open:!0,onOpenChange:s=>{s||n()}}}),{id:e,dismiss:n,update:r}}function wq(){const[t,e]=g.useState(tc);return g.useEffect(()=>(ec.push(e),()=>{const r=ec.indexOf(e);r>-1&&ec.splice(r,1)}),[t]),{...t,toast:_q,dismiss:r=>Ba({type:"DISMISS_TOAST",toastId:r})}}var xq=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"}),bq="VisuallyHidden",Pm=g.forwardRef((t,e)=>w.jsx(Re.span,{...t,ref:e,style:{...xq,...t.style}}));Pm.displayName=bq;var Tm="ToastProvider",[Rm,Sq,Eq]=um("Toast"),[LC]=mi("Toast",[Eq]),[kq,Qd]=LC(Tm),jC=t=>{const{__scopeToast:e,label:r="Notification",duration:n=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=t,[a,l]=g.useState(null),[u,c]=g.useState(0),d=g.useRef(!1),f=g.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${Tm}\`. Expected non-empty \`string\`.`),w.jsx(Rm.Provider,{scope:e,children:w.jsx(kq,{scope:e,label:r,duration:n,swipeDirection:s,swipeThreshold:i,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})})};jC.displayName=Tm;var DC="ToastViewport",Cq=["F8"],Tv="toast.viewportPause",Rv="toast.viewportResume",qC=g.forwardRef((t,e)=>{const{__scopeToast:r,hotkey:n=Cq,label:s="Notifications ({hotkey})",...i}=t,o=Qd(DC,r),a=Sq(r),l=g.useRef(null),u=g.useRef(null),c=g.useRef(null),d=g.useRef(null),f=st(e,d,o.onViewportChange),m=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),_=o.toastCount>0;g.useEffect(()=>{const y=h=>{var x;n.length!==0&&n.every(b=>h[b]||h.code===b)&&((x=d.current)==null||x.focus())};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[n]),g.useEffect(()=>{const y=l.current,h=d.current;if(_&&y&&h){const v=()=>{if(!o.isClosePausedRef.current){const E=new CustomEvent(Tv);h.dispatchEvent(E),o.isClosePausedRef.current=!0}},x=()=>{if(o.isClosePausedRef.current){const E=new CustomEvent(Rv);h.dispatchEvent(E),o.isClosePausedRef.current=!1}},b=E=>{!y.contains(E.relatedTarget)&&x()},S=()=>{y.contains(document.activeElement)||x()};return y.addEventListener("focusin",v),y.addEventListener("focusout",b),y.addEventListener("pointermove",v),y.addEventListener("pointerleave",S),window.addEventListener("blur",v),window.addEventListener("focus",x),()=>{y.removeEventListener("focusin",v),y.removeEventListener("focusout",b),y.removeEventListener("pointermove",v),y.removeEventListener("pointerleave",S),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,S=[b,...Dq(b)];return y==="forwards"?S:S.reverse()});return(y==="forwards"?v.reverse():v).flat()},[a]);return g.useEffect(()=>{const y=d.current;if(y){const h=v=>{var S,E,P;const x=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!x){const k=document.activeElement,R=v.shiftKey;if(v.target===y&&R){(S=u.current)==null||S.focus();return}const M=p({tabbingDirection:R?"backwards":"forwards"}),q=M.findIndex(F=>F===k);bh(M.slice(q+1))?v.preventDefault():R?(E=u.current)==null||E.focus():(P=c.current)==null||P.focus()}};return y.addEventListener("keydown",h),()=>y.removeEventListener("keydown",h)}},[a,p]),w.jsxs(tN,{ref:l,role:"region","aria-label":s.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:_?void 0:"none"},children:[_&&w.jsx(Ov,{ref:u,onFocusFromOutsideViewport:()=>{const y=p({tabbingDirection:"forwards"});bh(y)}}),w.jsx(Rm.Slot,{scope:r,children:w.jsx(Re.ol,{tabIndex:-1,...i,ref:f})}),_&&w.jsx(Ov,{ref:c,onFocusFromOutsideViewport:()=>{const y=p({tabbingDirection:"backwards"});bh(y)}})]})});qC.displayName=DC;var zC="ToastFocusProxy",Ov=g.forwardRef((t,e)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=t,i=Qd(zC,r);return w.jsx(Pm,{tabIndex:0,...s,ref:e,style:{position:"fixed"},onFocus:o=>{var u;const a=o.relatedTarget;!((u=i.viewport)!=null&&u.contains(a))&&n()}})});Ov.displayName=zC;var Bl="Toast",Pq="toast.swipeStart",Tq="toast.swipeMove",Rq="toast.swipeCancel",Oq="toast.swipeEnd",UC=g.forwardRef((t,e)=>{const{forceMount:r,open:n,defaultOpen:s,onOpenChange:i,...o}=t,[a,l]=Nd({prop:n,defaultProp:s??!0,onChange:i,caller:Bl});return w.jsx(In,{present:r||a,children:w.jsx(Aq,{open:a,...o,ref:e,onClose:()=>l(!1),onPause:Wt(t.onPause),onResume:Wt(t.onResume),onSwipeStart:ee(t.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ee(t.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(t.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(t.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)})})})});UC.displayName=Bl;var[Iq,Mq]=LC(Bl,{onClose(){}}),Aq=g.forwardRef((t,e)=>{const{__scopeToast:r,type:n="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:c,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:m,..._}=t,p=Qd(Bl,r),[y,h]=g.useState(null),v=st(e,F=>h(F)),x=g.useRef(null),b=g.useRef(null),S=s||p.duration,E=g.useRef(0),P=g.useRef(S),k=g.useRef(0),{onToastAdd:R,onToastRemove:T}=p,$=Wt(()=>{var H;(y==null?void 0:y.contains(document.activeElement))&&((H=p.viewport)==null||H.focus()),o()}),M=g.useCallback(F=>{!F||F===1/0||(window.clearTimeout(k.current),E.current=new Date().getTime(),k.current=window.setTimeout($,F))},[$]);g.useEffect(()=>{const F=p.viewport;if(F){const H=()=>{M(P.current),u==null||u()},B=()=>{const Q=new Date().getTime()-E.current;P.current=P.current-Q,window.clearTimeout(k.current),l==null||l()};return F.addEventListener(Tv,B),F.addEventListener(Rv,H),()=>{F.removeEventListener(Tv,B),F.removeEventListener(Rv,H)}}},[p.viewport,S,l,u,M]),g.useEffect(()=>{i&&!p.isClosePausedRef.current&&M(S)},[i,S,p.isClosePausedRef,M]),g.useEffect(()=>(R(),()=>T()),[R,T]);const q=g.useMemo(()=>y?QC(y):null,[y]);return p.viewport?w.jsxs(w.Fragment,{children:[q&&w.jsx($q,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite",children:q}),w.jsx(Iq,{scope:r,onClose:$,children:Nl.createPortal(w.jsx(Rm.ItemSlot,{scope:r,children:w.jsx(eN,{asChild:!0,onEscapeKeyDown:ee(a,()=>{p.isFocusedToastEscapeKeyDownRef.current||$(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:w.jsx(Re.li,{tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":p.swipeDirection,..._,ref:v,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:ee(t.onKeyDown,F=>{F.key==="Escape"&&(a==null||a(F.nativeEvent),F.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,$()))}),onPointerDown:ee(t.onPointerDown,F=>{F.button===0&&(x.current={x:F.clientX,y:F.clientY})}),onPointerMove:ee(t.onPointerMove,F=>{if(!x.current)return;const H=F.clientX-x.current.x,B=F.clientY-x.current.y,Q=!!b.current,I=["left","right"].includes(p.swipeDirection),A=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,U=I?A(0,H):0,G=I?0:A(0,B),te=F.pointerType==="touch"?10:2,oe={x:U,y:G},de={originalEvent:F,delta:oe};Q?(b.current=oe,Ou(Tq,d,de,{discrete:!1})):cw(oe,p.swipeDirection,te)?(b.current=oe,Ou(Pq,c,de,{discrete:!1}),F.target.setPointerCapture(F.pointerId)):(Math.abs(H)>te||Math.abs(B)>te)&&(x.current=null)}),onPointerUp:ee(t.onPointerUp,F=>{const H=b.current,B=F.target;if(B.hasPointerCapture(F.pointerId)&&B.releasePointerCapture(F.pointerId),b.current=null,x.current=null,H){const Q=F.currentTarget,I={originalEvent:F,delta:H};cw(H,p.swipeDirection,p.swipeThreshold)?Ou(Oq,m,I,{discrete:!0}):Ou(Rq,f,I,{discrete:!0}),Q.addEventListener("click",A=>A.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),$q=t=>{const{__scopeToast:e,children:r,...n}=t,s=Qd(Bl,e),[i,o]=g.useState(!1),[a,l]=g.useState(!1);return Lq(()=>o(!0)),g.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:w.jsx(Ld,{asChild:!0,children:w.jsx(Pm,{...n,children:i&&w.jsxs(w.Fragment,{children:[s.label," ",r]})})})},Nq="ToastTitle",BC=g.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t;return w.jsx(Re.div,{...n,ref:e})});BC.displayName=Nq;var Fq="ToastDescription",VC=g.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t;return w.jsx(Re.div,{...n,ref:e})});VC.displayName=Fq;var HC="ToastAction",WC=g.forwardRef((t,e)=>{const{altText:r,...n}=t;return r.trim()?w.jsx(GC,{altText:r,asChild:!0,children:w.jsx(Om,{...n,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${HC}\`. Expected non-empty \`string\`.`),null)});WC.displayName=HC;var KC="ToastClose",Om=g.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t,s=Mq(KC,r);return w.jsx(GC,{asChild:!0,children:w.jsx(Re.button,{type:"button",...n,ref:e,onClick:ee(t.onClick,s.onClose)})})});Om.displayName=KC;var GC=g.forwardRef((t,e)=>{const{__scopeToast:r,altText:n,...s}=t;return w.jsx(Re.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:e})});function QC(t){const e=[];return Array.from(t.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&e.push(n.textContent),jq(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",i=n.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=n.dataset.radixToastAnnounceAlt;o&&e.push(o)}else e.push(...QC(n))}}),e}function Ou(t,e,r,{discrete:n}){const s=r.originalEvent.currentTarget,i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?Zg(s,i):s.dispatchEvent(i)}var cw=(t,e,r=0)=>{const n=Math.abs(t.x),s=Math.abs(t.y),i=n>s;return e==="left"||e==="right"?i&&n>r:!i&&s>r};function Lq(t=()=>{}){const e=Wt(t);mr(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[e])}function jq(t){return t.nodeType===t.ELEMENT_NODE}function Dq(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function bh(t){const e=document.activeElement;return t.some(r=>r===e?!0:(r.focus(),document.activeElement!==e))}var qq=jC,YC=qC,XC=UC,JC=BC,ZC=VC,eP=WC,tP=Om;const dw=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,fw=X1,zq=(t,e)=>r=>{var n;if((e==null?void 0:e.variants)==null)return fw(t,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:i}=e,o=Object.keys(s).map(u=>{const c=r==null?void 0:r[u],d=i==null?void 0:i[u];if(c===null)return null;const f=dw(c)||dw(d);return s[u][f]}),a=r&&Object.entries(r).reduce((u,c)=>{let[d,f]=c;return f===void 0||(u[d]=f),u},{}),l=e==null||(n=e.compoundVariants)===null||n===void 0?void 0:n.reduce((u,c)=>{let{class:d,className:f,...m}=c;return Object.entries(m).every(_=>{let[p,y]=_;return Array.isArray(y)?y.includes({...i,...a}[p]):{...i,...a}[p]===y})?[...u,d,f]:u},[]);return fw(t,o,l,r==null?void 0:r.class,r==null?void 0:r.className)},Uq=qq,rP=g.forwardRef(({className:t,...e},r)=>w.jsx(YC,{ref:r,className:pt("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]",t),...e}));rP.displayName=YC.displayName;const Bq=zq("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"}}),nP=g.forwardRef(({className:t,variant:e,...r},n)=>w.jsx(XC,{ref:n,className:pt(Bq({variant:e}),t),...r}));nP.displayName=XC.displayName;const Vq=g.forwardRef(({className:t,...e},r)=>w.jsx(eP,{ref:r,className:pt("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",t),...e}));Vq.displayName=eP.displayName;const sP=g.forwardRef(({className:t,...e},r)=>w.jsx(tP,{ref:r,className:pt("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",t),"aria-label":"Dismiss notification","toast-close":"",...e,children:w.jsx(M2,{className:"h-4 w-4"})}));sP.displayName=tP.displayName;const iP=g.forwardRef(({className:t,...e},r)=>w.jsx(JC,{ref:r,className:pt("text-sm font-semibold",t),...e}));iP.displayName=JC.displayName;const oP=g.forwardRef(({className:t,...e},r)=>w.jsx(ZC,{ref:r,className:pt("text-sm opacity-90",t),...e}));oP.displayName=ZC.displayName;function Hq(){const{toasts:t}=wq();return w.jsxs(Uq,{children:[t.map(function({id:e,title:r,description:n,action:s,...i}){return w.jsxs(nP,{...i,children:[w.jsxs("div",{className:"grid gap-1",children:[r&&w.jsx(iP,{children:r}),n&&w.jsx(oP,{children:n})]}),s,w.jsx(sP,{})]},e)}),w.jsx(rP,{})]})}function Wq(){const{pathname:t,hash:e}=yr();g.useLayoutEffect(()=>{e||window.scrollTo({top:0,left:0,behavior:"instant"})},[t,e])}const aP=kF(),Kq=aP?BA:UA;if(!aP&&typeof window<"u"){const t=window.location.hash;t.startsWith("#/")&&!t.startsWith("#//")&&window.history.replaceState(null,"",t.slice(1))}const Gq=V.lazy(()=>ae(()=>import("./AuthorizePaperEditView-BFjGjwg0.js"),__vite__mapDeps([0,1,2]))),Qq=V.lazy(()=>ae(()=>import("./FollowingView-C3WQTFyb.js"),__vite__mapDeps([3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,1,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44]))),Yq=V.lazy(()=>ae(()=>import("./TopicView-DeWGpkof.js"),__vite__mapDeps([45,30,31,32,33,34,29,24,35,36,37,38,39,40,41,18,1,19,13]))),Xq=V.lazy(()=>ae(()=>import("./FeedView-CEndb4QE.js"),__vite__mapDeps([4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,1,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44]))),Jq=V.lazy(()=>ae(()=>import("./ChatView-BVQ4YUnD.js"),__vite__mapDeps([46,47,25,26,48,49,50,15,51,52,53,54,1,11,55,56,57,19,6,58,32,33,59,60,42,43,8,35,61,62]))),Zq=V.lazy(()=>ae(()=>import("./SharedChatView-BFhGSZmU.js"),__vite__mapDeps([63,47,25,26,48,49,50,15,51,52,53,54,1,11,55,56,57,19,6,58,32,33,59,60]))),e3=V.lazy(()=>ae(()=>import("./PapersListView-BtYBhno6.js"),__vite__mapDeps([64,34,29,24,35,30,31,32,33,36,37,38,39,40,41,23,44,65]))),t3=V.lazy(()=>ae(()=>import("./PaperDetailView-uhLfEM17.js"),__vite__mapDeps([66,1,35,34,29,24,36,67,68,37,69,61,39,44,2,20,43,55,70,71,72,38,6,73,49,48,74,75,76,77,12,19,78,17,50,22,79,80,52,53,40,81,82,32,33,83]))),r3=V.lazy(()=>ae(()=>import("./PaperReaderView-zhsdEzJM.js"),__vite__mapDeps([84,47,25,26,48,49,50,15,51,52,53,54,1,11,55,56,57,19,6,58,32,33,59,60,85,68,37,46,42,43,8,35,61,62]))),n3=V.lazy(()=>ae(()=>import("./TagsIndexView-kySdXExL.js"),__vite__mapDeps([86,29,24,87,5,6,7,8,9,10,11,12,13,14,15,16,17,44,88,39,89,74,2,71,75,72,38,20,73,1,76,19,90,91]))),s3=V.lazy(()=>ae(()=>import("./TagBrowseView-Fs_0Z72c.js"),__vite__mapDeps([92,93,18,1,19,34,29,24,30,31,32,33,35,36,37,38,39,40,41,28,94,85,51,52,53,54,48,60,65,67,87,95,96,44,14,50]))),i3=V.lazy(()=>ae(()=>import("./MethodsIndexView-CKdiTTbz.js"),__vite__mapDeps([97,91,87,44,88,39,89,74,2,71,75,72,38,20,6,73,1,76,19,90,9]))),o3=V.lazy(()=>ae(()=>import("./FrameworksIndexView-C6nlEkCA.js"),__vite__mapDeps([98,35,29,65]))),a3=V.lazy(()=>ae(()=>import("./TrendsView-B-6Mq2H2.js"),__vite__mapDeps([99,44,39]))),l3=V.lazy(()=>ae(()=>import("./ConferencesIndexView-BAr9KGLJ.js"),__vite__mapDeps([100,101,44,88,39,89,74,2,71,75,72,38,20,6,73,1,76,19]))),u3=V.lazy(()=>ae(()=>import("./AiDeadlinesView-DZKef9lV.js"),__vite__mapDeps([102,21,22,39,44,37,20,101]))),c3=V.lazy(()=>ae(()=>import("./ConferenceDetailView-B8HyemPf.js"),__vite__mapDeps([103,88,39,85,51,52,53,54,48,1,60,91,29,104,101,24,37,96,44,95]))),d3=V.lazy(()=>ae(()=>import("./ConferenceTaskView-C7TsDxKx.js"),__vite__mapDeps([105,30,31,32,33,34,29,24,35,36,37,38,39,40,41,85,51,52,53,54,48,1,60,104,96,44,95]))),f3=V.lazy(()=>ae(()=>import("./OrganizationsIndexView-DLszWG1v.js"),__vite__mapDeps([106,44,107]))),h3=V.lazy(()=>ae(()=>import("./OrganizationDetailView-3jQLAskn.js"),__vite__mapDeps([108,93,18,1,19,85,51,52,53,54,48,60,109,39,30,31,32,33,34,29,24,35,36,37,38,40,41,72,2,20,6,73,82,95,96,44]))),p3=V.lazy(()=>ae(()=>import("./OrganizationDetailView-3jQLAskn.js"),__vite__mapDeps([108,93,18,1,19,85,51,52,53,54,48,60,109,39,30,31,32,33,34,29,24,35,36,37,38,40,41,72,2,20,6,73,82,95,96,44]))),v3=V.lazy(()=>ae(()=>import("./AuthorDetailView-2OMsjKmR.js"),__vite__mapDeps([110,32,33,30,31,34,29,24,35,36,37,38,39,40,41,93,18,1,19,44,95]))),g3=V.lazy(()=>ae(()=>import("./MethodDetailView-DGKWIGN2.js"),__vite__mapDeps([111,93,18,1,19,34,29,24,30,31,32,33,35,36,37,38,39,40,41,85,51,52,53,54,48,60,87,95,96,44]))),m3=V.lazy(()=>ae(()=>import("./BenchmarkDetailView-NDBfhlkv.js"),__vite__mapDeps([112,93,18,1,19,67,36,79,48,37,80,21,22,35,39,94,87,95,96,44,113]))),y3=V.lazy(()=>ae(()=>import("./SavedPapersView-B-bHqIdh.js"),__vite__mapDeps([114,31,32,33,34,29,24,35,36,37,39,44,81]))),_3=V.lazy(()=>ae(()=>import("./SettingsView-z1Pe8Gpv.js"),__vite__mapDeps([115,1,18,21,22,28,26,69,62,67,57,10]))),w3=V.lazy(()=>ae(()=>import("./PrivacyView-DWYIzZNF.js"),__vite__mapDeps([116,69]))),x3=V.lazy(()=>ae(()=>import("./ApiDocsView-7qPalr9E.js"),__vite__mapDeps([117,69,52,118]))),b3=V.lazy(()=>ae(()=>import("./McpView-D5Q-Ca7m.js"),__vite__mapDeps([119,69,50,27,57,55,120]))),S3=V.lazy(()=>ae(()=>import("./SubmitView-T4yIxBdA.js"),__vite__mapDeps([121,1,44,2,71,75,70]))),E3=V.lazy(()=>ae(()=>import("./CronDashboard-Xj6HXS6e.js"),__vite__mapDeps([122,1,123,124,78,2,58,12,9,16,15,7,57,125,73,126,41,26]))),k3=V.lazy(()=>ae(()=>import("./AutonomousOperations-B6I2GPOQ.js"),__vite__mapDeps([127,1,123,124,78,2,71,16,56]))),C3=V.lazy(()=>ae(()=>import("./SubmissionsDashboard-UZ55xCo_.js"),__vite__mapDeps([128,70,1,41,77,37,76,125,73,126,129]))),P3=V.lazy(()=>ae(()=>import("./UserProfileView-8ohS1aEG.js"),__vite__mapDeps([130,109,39]))),T3=V.lazy(()=>ae(()=>import("./RateLimitsView-CDeHFKmm.js"),[])),R3=V.lazy(()=>ae(()=>import("./AstraForRoboticsView-_difWBZx.js"),__vite__mapDeps([131,30,31,32,33,34,29,24,35,36,37,38,39,40,41,44,69,132]))),Sh=V.lazy(()=>ae(()=>import("./NotFound-BVs_mdc4.js"),[])),O3=V.lazy(()=>ae(()=>import("./SearchOverlay-x6g6F-JL.js"),__vite__mapDeps([133,36,23,29,24]))),I3=V.lazy(()=>ae(()=>import("./StagingAccessRequestView-KqVz9HWF.js"),__vite__mapDeps([134,126]))),lP=()=>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}})]})]}),M3=new _$({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}}),A3=()=>{const{arxivId:t}=jE();return w.jsx(ii,{to:t?`/paper/${t}`:"/papers",replace:!0})},$3=()=>{const{taskSlug:t}=jE();return w.jsx(ii,{to:t?`/tasks/${t}`:"/tasks",replace:!0})},N3=({element:t})=>Go()?w.jsx(ii,{to:"/",replace:!0}):w.jsx(w.Fragment,{children:t}),Iv=({element:t})=>{const{user:e,isLoading:r}=FC(),n=yr();return Go()?w.jsx(ii,{to:"/",replace:!0}):r?w.jsx("div",{className:"page",children:w.jsx("div",{className:"submission-loading",children:w.jsx("span",{children:"Checking admin session..."})})}):e?e.is_admin?w.jsx(w.Fragment,{children:t}):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 @",e.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(F1,{returnTo:`${n.pathname}${n.search}`})]})})},F3=()=>{const t=xF(),e=typeof window<"u"&&new URL(t,window.location.origin).origin!==window.location.origin;return V.useEffect(()=>{e&&window.location.replace(t)},[t,e]),e?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:t,children:"Continue"})]})}):w.jsx(Iv,{element:w.jsx(E3,{})})},hw=({reader:t=!1})=>{const[e,r]=V.useState(!1),{pathname:n}=yr();V.useEffect(()=>{const a=l=>{(l.metaKey||l.ctrlKey)&&l.key==="k"&&(l.preventDefault(),r(!0))};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[]);const s=w.jsx(hq,{onOpenSearch:()=>r(!0)}),i=w.jsx(RE,{resetKey:n,children:w.jsx(V.Suspense,{fallback:w.jsx(lP,{}),children:w.jsx(MA,{})})}),o=e&&w.jsx(V.Suspense,{fallback:null,children:w.jsx(O3,{open:e,onClose:()=>r(!1)})});return t?w.jsxs("div",{className:"reader-route-shell",children:[s,w.jsx("div",{className:"reader-route-content",children:i}),o]}):w.jsxs(w.Fragment,{children:[s,w.jsx("main",{children:i}),w.jsx(pq,{}),o]})},L3=()=>(Wq(),V.useLayoutEffect(()=>{var t;(t=document.getElementById("initial-discovery-footer"))==null||t.remove()},[]),w.jsxs(AA,{children:[w.jsx(ne,{path:"/request-access",element:w.jsx(V.Suspense,{fallback:w.jsx(lP,{}),children:w.jsx(I3,{})})}),w.jsx(ne,{element:w.jsx(hw,{reader:!0}),children:w.jsx(ne,{path:"/pdf/:paperId",element:EF()?w.jsx(r3,{}):w.jsx(Sh,{})})}),w.jsxs(ne,{element:w.jsx(hw,{}),children:[w.jsx(ne,{path:"/",element:w.jsx(Xq,{})}),w.jsx(ne,{path:"/following",element:w.jsx(Qq,{})}),w.jsx(ne,{path:"/topics/:topicParam",element:w.jsx(Yq,{})}),w.jsx(ne,{path:"/x-trending",element:w.jsx(ii,{to:"/",replace:!0})}),w.jsx(ne,{path:"/chat/:sessionId?",element:wl()?w.jsx(Jq,{}):w.jsx(ii,{to:"/",replace:!0})}),w.jsx(ne,{path:"/share/:shareId",element:wl()?w.jsx(Zq,{}):w.jsx(Sh,{})}),w.jsx(ne,{path:"/papers",element:w.jsx(e3,{})}),w.jsx(ne,{path:"/papers/:arxivId",element:w.jsx(A3,{})}),w.jsx(ne,{path:"/paper/:arxivId",element:w.jsx(t3,{})}),w.jsx(ne,{path:"/tasks",element:w.jsx(n3,{})}),w.jsx(ne,{path:"/tasks/:taskSlug",element:w.jsx(s3,{})}),w.jsx(ne,{path:"/task/:taskSlug",element:w.jsx($3,{})}),w.jsx(ne,{path:"/methods",element:w.jsx(i3,{})}),w.jsx(ne,{path:"/methods/:methodSlug",element:w.jsx(g3,{})}),w.jsx(ne,{path:"/frameworks",element:w.jsx(o3,{})}),w.jsx(ne,{path:"/trends",element:w.jsx(a3,{})}),w.jsx(ne,{path:"/conferences",element:w.jsx(l3,{})}),w.jsx(ne,{path:"/ai-deadlines",element:w.jsx(u3,{})}),w.jsx(ne,{path:"/conferences/:confSlug",element:w.jsx(c3,{})}),w.jsx(ne,{path:"/conferences/:confSlug/:taskSlug",element:w.jsx(d3,{})}),w.jsx(ne,{path:"/organizations",element:w.jsx(f3,{})}),w.jsx(ne,{path:"/orgs/:orgSlug",element:w.jsx(h3,{})}),w.jsx(ne,{path:"/orgs/:orgSlug/:taskSlug",element:w.jsx(p3,{})}),w.jsx(ne,{path:"/authors/:authorId",element:w.jsx(v3,{})}),w.jsx(ne,{path:"/benchmark/:datasetSlug",element:w.jsx(m3,{})}),w.jsx(ne,{path:"/authorize-paper-edit/:authorizationId",element:w.jsx(Gq,{})}),w.jsx(ne,{path:"/submit",element:w.jsx(S3,{})}),w.jsx(ne,{path:"/saved",element:w.jsx(N3,{element:w.jsx(y3,{})})}),w.jsx(ne,{path:"/settings",element:w.jsx(_3,{})}),w.jsx(ne,{path:"/privacy",element:w.jsx(w3,{})}),w.jsx(ne,{path:"/docs/api",element:w.jsx(x3,{})}),w.jsx(ne,{path:"/mcp",element:w.jsx(b3,{})}),w.jsx(ne,{path:"/admin-dashboard",element:w.jsx(F3,{})}),w.jsx(ne,{path:"/autonomous-operations",element:w.jsx(Iv,{element:w.jsx(k3,{})})}),w.jsx(ne,{path:"/cron-dashboard",element:w.jsx(ii,{to:"/admin-dashboard",replace:!0})}),w.jsx(ne,{path:"/submissions",element:w.jsx(Iv,{element:w.jsx(C3,{})})}),w.jsx(ne,{path:"/rate-limits",element:w.jsx(T3,{})}),w.jsx(ne,{path:"/astra-for-robotics",element:w.jsx(R3,{})}),w.jsx(ne,{path:"/:username",element:w.jsx(P3,{})}),w.jsx(ne,{path:"*",element:w.jsx(Sh,{})})]})]})),j3=()=>w.jsx(w$,{client:M3,children:w.jsxs(uq,{children:[w.jsx(Kq,{children:w.jsx(L3,{})}),w.jsx(Hq,{}),!1]})});qM();const D3=w.jsx(qR,{attribute:"class",defaultTheme:"system",enableSystem:!0,disableTransitionOnChange:!0,storageKey:"pwc-theme",children:w.jsx(RE,{children:w.jsx(j3,{})})}),q3=Lb(document.getElementById("root"));q3.render(w.jsx(V.StrictMode,{children:D3}));export{tw as $,Bo as A,zn as B,R2 as C,ez as D,me as E,rz as F,nz as G,F1 as H,wq as I,mz as J,pz as K,Pr as L,rw as M,ge as N,oz as O,fz as P,In as Q,Re as R,Nd as S,oq as T,st as U,ee as V,Uj as W,M2 as X,mi as Y,pt as Z,Ez as _,FC as a,ml as a$,az as a0,J3 as a1,sz as a2,ok as a3,uD as a4,cD as a5,Ok as a6,I2 as a7,Vq as a8,dz as a9,zq as aA,lo as aB,hF as aC,vF as aD,gF as aE,mF as aF,ks as aG,_F as aH,yF as aI,Q3 as aJ,ii as aK,Qj as aL,Yj as aM,wk as aN,Ld as aO,Fd as aP,Xj as aQ,Jj as aR,B3 as aS,U3 as aT,sw as aU,yh as aV,H2 as aW,MC as aX,tz as aY,Ll as aZ,iv as a_,V as aa,Zu as ab,$C as ac,lz as ad,EF as ae,X3 as af,A2 as ag,$2 as ah,RC as ai,un as aj,Z3 as ak,Y3 as al,Y2 as am,Ew as an,N1 as ao,K3 as ap,O2 as aq,ae as ar,X1 as as,Nl as at,jl as au,he as av,im as aw,V2 as ax,_z as ay,j1 as az,M$ as b,g$ as b0,dt as b1,jt as b2,GE as b3,js as b4,y1 as b5,tm as b6,u1 as b7,em as b8,f$ as b9,W3 as ba,H3 as bb,I$ as bc,gz as bd,WE as be,x$ as bf,E$ as bg,T$ as bh,k$ as bi,C$ as bj,O$ as bk,S0 as bl,P$ as bm,Sz as bn,nk as bo,sk as bp,ik as bq,xz as br,El as bs,AC as bt,nw as c,Gd as d,kz as e,V3 as f,Un as g,wz as h,g as i,w as j,Go as k,wF as l,U2 as m,Qg as n,n1 as o,bz as p,yr as q,yz as r,cz as s,uz as t,jE as u,hz as v,vz as w,wl as x,SF as y,bF as z}; + */const M2=Gd("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),A2=S2,$2=E2,N2=g.forwardRef(({className:t,inset:e,children:r,...n},s)=>w.jsxs(CC,{ref:s,className:pt("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",e&&"pl-8",t),...n,children:[r,w.jsx(O2,{className:"ml-auto h-4 w-4"})]}));N2.displayName=CC.displayName;const F2=g.forwardRef(({className:t,...e},r)=>w.jsx(PC,{ref:r,className:pt("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",t),...e}));F2.displayName=PC.displayName;const RC=g.forwardRef(({className:t,sideOffset:e=4,...r},n)=>w.jsx(k2,{children:w.jsx(_C,{ref:n,sideOffset:e,className:pt("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",t),...r})}));RC.displayName=_C.displayName;const un=g.forwardRef(({className:t,inset:e,...r},n)=>w.jsx(xC,{ref:n,className:pt("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",e&&"pl-8",t),...r}));un.displayName=xC.displayName;const L2=g.forwardRef(({className:t,children:e,checked:r,...n},s)=>w.jsxs(bC,{ref:s,className:pt("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",t),checked:r,...n,children:[w.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:w.jsx(EC,{children:w.jsx(R2,{className:"h-4 w-4"})})}),e]}));L2.displayName=bC.displayName;const j2=g.forwardRef(({className:t,children:e,...r},n)=>w.jsxs(SC,{ref:n,className:pt("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",t),...r,children:[w.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:w.jsx(EC,{children:w.jsx(I2,{className:"h-2 w-2 fill-current"})})}),e]}));j2.displayName=SC.displayName;const OC=g.forwardRef(({className:t,inset:e,...r},n)=>w.jsx(wC,{ref:n,className:pt("px-2 py-1.5 text-sm font-semibold",e&&"pl-8",t),...r}));OC.displayName=wC.displayName;const Pv=g.forwardRef(({className:t,...e},r)=>w.jsx(kC,{ref:r,className:pt("-mx-1 my-1 h-px bg-muted",t),...e}));Pv.displayName=kC.displayName;function D2(t){const r=(t.name||t.username||"?").trim().split(/\s+/).filter(Boolean);return r.length===0?"?":r.length===1?r[0][0].toUpperCase():(r[0][0]+r[r.length-1][0]).toUpperCase()}const q2=({user:t,onLogout:e})=>w.jsxs(A2,{children:[w.jsx($2,{asChild:!0,children:w.jsx("button",{type:"button",className:"user-avatar-btn","aria-label":`Account menu for ${t.username}`,children:w.jsxs(nk,{className:"h-8 w-8",children:[t.avatar_url&&w.jsx(sk,{src:t.avatar_url,alt:t.username}),w.jsx(ik,{className:"text-xs",children:D2(t)})]})})}),w.jsxs(RC,{align:"end",className:"w-56",children:[w.jsxs(OC,{className:"flex flex-col gap-0.5 py-2",children:[w.jsx("span",{className:"text-sm font-medium leading-tight",children:t.name||t.username}),w.jsxs("span",{className:"text-xs font-normal text-muted-foreground",children:["@",t.username]}),t.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"}),t.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(Pv,{}),w.jsx(un,{asChild:!0,children:w.jsx("a",{href:`https://huggingface.co/${encodeURIComponent(t.username)}`,target:"_blank",rel:"noopener noreferrer",children:"Hugging Face profile"})}),w.jsx(un,{asChild:!0,children:w.jsx(Pr,{to:"/frameworks",children:"Frameworks"})}),w.jsx(un,{asChild:!0,children:w.jsx(Pr,{to:"/trends",children:"Trends"})}),t.is_admin&&w.jsxs(w.Fragment,{children:[w.jsx(un,{asChild:!0,children:w.jsx(Pr,{to:"/admin-dashboard",children:"Admin dashboard"})}),w.jsx(un,{asChild:!0,children:w.jsx(Pr,{to:"/submissions",children:"Review submissions"})})]}),w.jsx(un,{asChild:!0,children:w.jsx(Pr,{to:`/${encodeURIComponent(t.username)}`,children:"My contributions"})}),w.jsx(un,{asChild:!0,children:w.jsx(Pr,{to:"/settings",children:"Settings"})}),w.jsx(Pv,{}),w.jsx(un,{onSelect:r=>{r.preventDefault(),e()},children:"Log out"})]})]}),z2=!1;class Bo extends Error{constructor(r,n){var s;super(`API request failed: ${r.status} ${r.statusText}`);Nr(this,"status");Nr(this,"statusText");Nr(this,"response");Nr(this,"detail");Nr(this,"code");Nr(this,"displayMessage");this.name="ApiError",this.status=r.status,this.statusText=r.statusText,this.response=n;try{if(this.detail=(s=JSON.parse(n))==null?void 0:s.detail,typeof this.detail=="string"&&(this.message=this.detail),Array.isArray(this.detail)){const i=this.detail[0];typeof i=="object"&&i!==null&&"msg"in i&&typeof i.msg=="string"&&(this.message=i.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 i="help"in this.detail&&typeof this.detail.help=="string"?` See ${this.detail.help} for help.`:"";this.message=`${this.detail.message}${i}`}}catch{this.detail=void 0,this.displayMessage=n||this.message;return}this.displayMessage=this.message}}const U2=t=>t instanceof Bo&&t.status===404;function oz(t,e){return t instanceof Bo?t.displayMessage||e:typeof t=="object"&&t!==null&&"message"in t&&typeof t.message=="string"&&t.message||e}class B2{constructor(e){this.baseUrl=e}async fetch(e,r){const n=`${this.baseUrl}${e}`;try{const{headers:s,...i}=r??{},a=(i.method??"GET").toUpperCase()==="GET"?"default":"no-store",l=new Headers(s);return typeof i.body=="string"&&!l.has("Content-Type")&&l.set("Content-Type","application/json"),await fetch(n,{...i,cache:i.cache??a,credentials:i.credentials??"include",headers:l})}catch(s){throw console.error(`[API] Request to ${n} failed:`,s),s}}async fetchOk(e,r){const n=await this.fetch(e,r);if(!n.ok){const s=new Bo(n,await n.text());throw console.error("[API] Error response:",s.response),s}return n}async request(e,r){const n=await this.fetchOk(e,r);return n.status===204?void 0:await n.json()}}function V2(t){t instanceof Bo&&t.status===401&&t.code!=="fresh_auth_required"&&t.code!=="saved_papers_bucket_authorization_required"&&typeof window<"u"&&window.dispatchEvent(new CustomEvent("pwc:auth-stale"))}async function IC(t){try{return await t()}catch(e){throw V2(e),e}}const km=new B2(`${im()}/api/v1`),H2=(t,e)=>km.fetch(t,e),MC=(t,e)=>IC(()=>km.fetchOk(t,e)),he=(t,e)=>IC(()=>km.request(t,e));async function W2(t,e){try{return await he(t,e)}catch(r){if(U2(r))return null;throw r}}const AC={async getCurrentUser(){if(Go())return null;const t=await H2("/auth/me",{cache:"no-store"});return t.status===401||!t.ok?null:t.json()},async logout(){await he("/auth/logout",{method:"POST"})},async requestStagingAccess(){await he("/staging-access-request",{method:"POST"})}};class K2{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 Zu=new K2(he);function Nt(t,e){const r=new URLSearchParams;for(const[s,i]of Object.entries(e??{}))i!==void 0&&i!==""&&r.set(s,String(i));const n=r.toString();return`${t}${n?`?${n}`:""}`}class G2{constructor(e){this.request=e}listAreas(e){return this.request(Nt("/areas/",e))}getArea(e){return this.request(`/areas/${e}`)}areasWithTasks(){return this.request("/areas/with-tasks/")}listTasks(e){return this.request(Nt("/tasks/",e))}getTask(e){return this.request(`/tasks/${e}`)}topTasks(e){return this.request(Nt("/tasks/top",{limit:e}))}trendingTasks(e){return this.request(Nt("/tasks/trending",e))}taskChildren(e,r){return this.request(Nt(`/tasks/${e}/children`,r))}taskParents(e){return this.request(`/tasks/${e}/parents`)}taskPage(e,r){return this.request(Nt(`/tasks/${e}/page`,r))}trendingBenchmarks(e,r){return this.request(Nt(`/tasks/${encodeURIComponent(e)}/trending-benchmarks`,r))}frameworkCatalog(){return this.request("/frameworks/")}listMethods(e){return this.request(Nt("/methods/",e))}methodIndex(){return this.request("/methods/index/cards")}trendingMethods(e){return this.request(Nt("/methods/trending",e))}getMethod(e){return this.request(`/methods/${encodeURIComponent(e)}`)}relatedMethods(e){return this.request(`/methods/${encodeURIComponent(e)}/related`)}methodTrend(e,r){return this.request(Nt(`/methods/${encodeURIComponent(e)}/trend`,r))}listDatasets(e){const{task_id:r,...n}=e??{};return this.request(Nt("/datasets/",{...n,task:n.task??r}))}getDataset(e){return this.request(`/datasets/${e}`)}getDatasetBySlug(e,r){return this.request(Nt(`/datasets/${e}`,r))}async datasetTasks(e){return(await this.request(`/datasets/${e}/tasks/`)).results}async leaderboardMetrics(e,r){return(await this.request(`/datasets/${e}/tasks/${r}/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,r){return this.request(Nt("/organizations/",{q:e,limit:r}))}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(Nt("/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 ge=new G2(he),az="No paper text was available yet. This job starts again automatically within an hour of the paper's Markdown being extracted.",qn="/admin/codex-curation/jobs";class Q2{constructor(e){this.request=e}startPaperJob(e,r){return this.request(`/admin/codex-${e}/jobs`,{method:"POST",body:JSON.stringify({paper_id:r})})}getPaperJob(e,r){return this.request(`/admin/codex-${e}/jobs/${r}`)}cancelPaperJob(e,r){return this.request(`/admin/codex-${e}/jobs/${r}`,{method:"DELETE"})}listJobs(e=100,r={}){const n=new URLSearchParams({limit:String(e)});return Object.entries(r).forEach(([s,i])=>{i&&n.set(s,i)}),this.request(`${qn}?${n}`,{cache:"no-store"})}retryJob(e){return this.request(`${qn}/${e}/retry`,{method:"POST"})}cancelJob(e){return this.request(`${qn}/${e}`,{method:"DELETE"})}async retryTrace(e){await this.request(`${qn}/${e}/retry-trace`,{method:"POST"})}async setScheduler(e){await this.request(`${qn}/scheduler/${e}`,{method:"POST"})}async promoteBenchmarkCandidate(e,r){await this.request(`${qn}/benchmark-candidates/${e}/promote`,{method:"POST",body:JSON.stringify(r)})}async rollbackBenchmarkCandidate(e){await this.request(`${qn}/benchmark-candidates/${e}/rollback`,{method:"POST"})}traceUrl(e){return N1(`/api/v1${qn}/${e}/trace`)}}const tw=new Q2(he),Y2={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 lz(t){return Object.prototype.hasOwnProperty.call(Y2,t)}const $C="pwc:fresh-auth-edit",Tu="pwc:fresh-auth-mutation";function X2(t){if(typeof window>"u")return;sessionStorage.setItem($C,t);const e=qd("/api/v1/auth/hf/login");window.location.assign(`${e}?return_to=${encodeURIComponent(window.location.href)}`)}class J2{constructor(e,r=X2){Nr(this,"paperLoads",new Map);Nr(this,"evaluationLoads",new Map);this.request=e,this.recoverFreshAuth=r}primePaper(e,r=!1){r&&this.paperLoads.delete(e);let n=this.paperLoads.get(e);return n||(n=this.request(`/papers/${e}/curation-state`).catch(s=>{throw this.paperLoads.delete(e),s}),this.paperLoads.set(e,n)),n}primeEvaluations(e,r=!1){r&&this.evaluationLoads.delete(e);let n=this.evaluationLoads.get(e);return n||(n=this.request(`/evaluations/curation-state?paper_id=${e}`).catch(s=>{throw this.evaluationLoads.delete(e),s}),this.evaluationLoads.set(e,n)),n}async mutatePaper(e,r,n,s,i){const o=this.paperLoads.get(e);if(!o)throw new Error("The catalog version was not loaded when this editor opened. Close and reopen the editor.");const a=(await o).sections[r];if(!a)throw new Error(`Missing curation version for ${r}`);return this.mutate(r,s,n,a,i,`paper:${e}:${r}`)}async mutateEvaluations(e,r,n,s){const i=this.evaluationLoads.get(String(e));if(!i)throw new Error("The evaluation version was not loaded when this editor opened. Close and reopen the editor.");const o=(await i).version;return this.mutate("evaluations",n,r,o,s,`paper:${e}:evaluations`)}async mutate(e,r,n,s,i,o){const a=new Headers(i.headers);Object.entries(this.idempotencyHeaders(o,n,s)).forEach(([u,c])=>a.set(u,c));const l={...i,headers:a};try{const u=await this.request(r,l);return this.clearAttempt(l),u}catch(u){throw u instanceof Bo&&u.status===401&&u.code==="fresh_auth_required"?(this.saveFreshAuthMutation(e,r,n,l),this.recoverFreshAuth(e)):u instanceof Bo&&u.status===409&&(this.clearAttempt(l),typeof window<"u"&&window.dispatchEvent(new CustomEvent("pwc:catalog-conflict",{detail:{endpoint:r}}))),u}}freshAuthMutationDraft(){const e=sessionStorage.getItem(Tu);if(!e)return null;try{const r=JSON.parse(e);if(!r.endpoint.startsWith("/")||r.endpoint.startsWith("//")||!["POST","PUT","PATCH","DELETE"].includes(r.options.method))throw new Error("Invalid saved mutation draft");return r}catch{return sessionStorage.removeItem(Tu),null}}async resumeFreshAuthMutation(){const e=this.freshAuthMutationDraft();if(!e)throw new Error("No saved catalog edit is available.");const r=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(Tu),sessionStorage.removeItem($C),r}saveFreshAuthMutation(e,r,n,s){const i=Object.fromEntries(new Headers(s.headers).entries()),o=typeof s.body=="string"?s.body:void 0;sessionStorage.setItem(Tu,JSON.stringify({section:e,endpoint:r,payload:n,options:{method:(s.method??"POST").toUpperCase(),body:o,headers:i}}))}idempotencyHeaders(e,r,n){const s=`pwc:mutation:${e}:${JSON.stringify(r)}`,i=sessionStorage.getItem(s);if(i){const a=JSON.parse(i);return{"Idempotency-Key":a.key,"If-Match":a.version}}const o=crypto.randomUUID();return sessionStorage.setItem(s,JSON.stringify({key:o,version:n})),sessionStorage.setItem(`pwc:mutation-key:${o}`,s),{"Idempotency-Key":o,"If-Match":n}}clearAttempt(e){const r=new Headers(e.headers).get("Idempotency-Key");if(!r)return;const n=sessionStorage.getItem(`pwc:mutation-key:${r}`);n&&sessionStorage.removeItem(n),sessionStorage.removeItem(`pwc:mutation-key:${r}`),this.paperLoads.clear(),this.evaluationLoads.clear()}}const Kt=new J2(he);class Z2{constructor(e){this.request=e}list(e={}){const r=new URLSearchParams(Object.entries(e).filter(n=>n[1]!==void 0).map(([n,s])=>[n,String(s)])).toString();return this.request(`/evaluations/${r?`?${r}`:""}`,{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,r){return this.allPages({dataset_id:Number(e),best_metric:r,ordering:"best_rank"})}async byLeaderboard(e,r,n={}){return this.allPages({dataset_id:Number(e),task_id:Number(r),ordering:"best_rank",...n})}create(e){return this.request("/evaluations/",{method:"POST",body:JSON.stringify(e)})}update(e,r){return this.request(`/evaluations/${e}`,{method:"PUT",body:JSON.stringify(r)})}delete(e){return this.request(`/evaluations/${e}`,{method:"DELETE"})}primeCurationState(e,r=!1){return Kt.primeEvaluations(e,r)}batch(e,r){return Kt.mutateEvaluations(e,r,"/evaluations/batch",{method:"POST",body:JSON.stringify({paper_id:e,operations:r})})}async allPages(e){const n=await this.list({...e,page_size:100});if(!n.next_page)return n.results;const s=Math.ceil(n.count/100),i=await Promise.all(Array.from({length:s-1},(o,a)=>this.list({...e,page:a+2,page_size:100})));return[n,...i].flatMap(o=>o.results)}}const rw=new Z2(he);class eq{constructor(e){this.request=e}getCronStatus(e=!1){const r=e?"?force_refresh=true":"";return this.request(`/cron/status${r}`,{cache:"no-store"})}getPaperMarkdownJobs(){return this.request("/cron/paper-markdown-jobs",{cache:"no-store"})}getAutonomousOperations(){return this.request("/admin/autonomous-operations",{cache:"no-store"})}setAutonomousManualMode(e,r,n){return this.request("/admin/autonomous-operations/manual-mode",{method:"PATCH",body:JSON.stringify({enabled:e,expected_revision:r,confirmation:n})})}setAutonomousOperator(e,r,n,s){return this.request(`/admin/autonomous-operations/operators/${e}`,{method:"PATCH",body:JSON.stringify({enabled:r,expected_revision:n,confirmation:s})})}qualifyAutonomousChatBaseline(e,r,n){return this.request("/admin/autonomous-operations/chat-baseline",{method:"POST",body:JSON.stringify({sha:e,expected_revision:r,confirmation:n})})}}const yh=new eq(he),nw={authorization:t=>he(`/paper-edit-authorizations/${encodeURIComponent(t)}`),approve:t=>he(`/paper-edit-authorizations/${encodeURIComponent(t)}/approve`,{method:"POST"}),digest:(t,e)=>he(`/admin/paper-edit-digest?day=${t}&page=${e}`),suspend:(t,e)=>he("/admin/paper-edit-suspension",{method:"POST",body:JSON.stringify({hf_subject:t,suspended:e})})};function Ai(t){const e=new URLSearchParams;for(const[n,s]of Object.entries(t??{}))s!==void 0&&s!==""&&e.set(n,String(s));const r=e.toString();return r?`?${r}`:""}class tq{constructor(e){this.request=e}list(e){const r=new URLSearchParams;for(const[s,i]of Object.entries(e??{}))i!==void 0&&i!==""&&r.set(s,String(i));const n=r.toString();return this.request(`/papers/${n?`?${n}`:""}`,{cache:"no-cache"})}search(e,r=1,n=10,s,i,o){const a=new URLSearchParams({q:e,page:r.toString(),page_size:n.toString()});return s&&a.set("mode",s),o!=null&&o.start_date&&a.set("start_date",o.start_date),o!=null&&o.end_date&&a.set("end_date",o.end_date),this.request(`/papers/search?${a.toString()}`,{signal:i})}searchFeed(e){return this.request(`/papers/search/feed${Ai(e)}`,{cache:"no-cache"})}get(e,r=!0){const n=r?"?include_resources=true":"";return this.request(`/papers/${e}${n}`)}getByArxivId(e,r=!0){const n=r?"?include_resources=true":"";return this.request(`/papers/arxiv/${e}${n}`)}lookup(e){return this.request("/papers/lookup",{method:"POST",body:JSON.stringify({references:e})})}related(e,r=4){return this.request(`/papers/${encodeURIComponent(e)}/related?limit=${r}`)}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,r){return this.request(`/papers/${encodeURIComponent(e)}/copy-to-bucket`,{method:"POST",body:JSON.stringify(r)})}trending(e){const r=new URLSearchParams;for(const[s,i]of Object.entries(e??{}))i!==void 0&&r.set(s,String(i));const n=r.toString();return this.request(`/papers/trending${n?`?${n}`:""}`,{cache:"no-store"})}forTask(e,r){return this.request(`/tasks/${e}/papers${Ai(r)}`)}forMethod(e,r){return this.request(`/methods/${encodeURIComponent(e)}/papers${Ai(r)}`)}forConference(e,r){return this.request(`/conferences/${e}/papers${Ai(r)}`)}forOrganization(e,r){return this.request(`/organizations/${e}/papers${Ai(r)}`)}getAuthor(e){return this.request(`/authors/${e}`)}searchAuthors(e,r){return this.request(`/authors/${Ai({search:e,page_size:r})}`)}primeCurationState(e,r=!1){return Kt.primePaper(e,r)}freshAuthMutationDraft(){return Kt.freshAuthMutationDraft()}resumeFreshAuthMutation(){return Kt.resumeFreshAuthMutation()}updateTasks(e,r){const n=new URLSearchParams(r.map(s=>["task_ids",String(s)])).toString();return Kt.mutatePaper(e,"tasks",r,`/papers/${e}/tasks?${n}`,{method:"PUT"})}updateMethods(e,r){const n=new URLSearchParams(r.map(s=>["method_ids",String(s)])).toString();return Kt.mutatePaper(e,"methods",r,`/papers/${e}/methods?${n}`,{method:"PUT"})}updateOrganizations(e,r){const n=new URLSearchParams(r.map(s=>["organization_ids",String(s)])).toString();return Kt.mutatePaper(e,"organizations",r,`/papers/${e}/organizations?${n}`,{method:"PUT"})}updateRepositories(e,r){return Kt.mutatePaper(e,"repositories",r,`/papers/${e}/repositories`,{method:"PUT",body:JSON.stringify({repositories:r})})}updateProjectPages(e,r){return Kt.mutatePaper(e,"project_pages",r,`/papers/${e}/project-pages`,{method:"PUT",body:JSON.stringify({project_pages:r})})}updateXThreads(e,r){return Kt.mutatePaper(e,"x_threads",r,`/papers/${e}/x-threads`,{method:"PUT",body:JSON.stringify({x_threads:r})})}updateSourceUrl(e,r){return Kt.mutatePaper(e,"source_url",r,`/papers/${e}/source-url`,{method:"PUT",body:JSON.stringify({source_url:r})})}updateHfArtifacts(e,r){return Kt.mutatePaper(e,"hf_artifacts",r,`/papers/${e}/hf-artifacts`,{method:"PUT",body:JSON.stringify(r)})}}const zn=new tq(he);async function rq(t){return(await MC(`/papers/${encodeURIComponent(t)}/web-markdown`)).text()}function nq(t){return he(`/papers/${encodeURIComponent(t)}/web-page`)}function sq(t){return W2(`/papers/${encodeURIComponent(t)}/layout`)}const iq={async get(t){const e=await MC(`/profiles/${encodeURIComponent(t)}`),r=await e.json();if(!e.redirected)return r;const n=decodeURIComponent(new URL(e.url).pathname.split("/").pop()||r.username);return{...r,username:n,redirected_from_alias:!0}}},oq=20,uz=300,cz=10,Un={follows:()=>he("/me/follows"),followSuggestions:()=>he("/research/follow-suggestions"),setFollow:(t,e,r)=>he(`/me/follows/${t}/${e}`,{method:r?"PUT":"DELETE"}),following:(t=0,e={})=>{var n,s;const r=new URLSearchParams({offset:String(t),limit:"40"});return e.startDate&&r.set("start_date",e.startDate),e.endDate&&r.set("end_date",e.endDate),!e.startDate&&!e.endDate&&r.set("all_time","true"),e.topicOnly&&r.set("topic_only","true"),(n=e.topicIds)==null||n.forEach(i=>r.append("topic_id",String(i))),(s=e.follows)==null||s.forEach(i=>r.append("follow",i)),e.addedAfter&&r.set("added_after",e.addedAfter),he(`/me/following?${r}`)},followingNewCount:t=>he(`/me/following/new-count?${new URLSearchParams({since:t})}`),topics:()=>he("/me/topics"),addTopic:t=>he("/me/topics",{method:"POST",body:JSON.stringify({text:t})}),updateTopic:(t,e)=>he(`/me/topics/${t}`,{method:"PUT",body:JSON.stringify({text:e})}),removeTopic:t=>he(`/me/topics/${t}`,{method:"DELETE"}),reorderTopics:t=>he("/me/topics/order",{method:"PUT",body:JSON.stringify({topic_ids:t})}),followTopic:t=>he(`/me/topics/${t}/follow`,{method:"POST"}),setTopicPublic:(t,e)=>he(`/me/topics/${t}`,{method:"PATCH",body:JSON.stringify({is_public:e})}),setShowAsFollower:t=>he("/me/topic-follower-visibility",{method:"PUT",body:JSON.stringify({show_as_follower:t})}),publicTopic:t=>he(`/research/topics/${t}`),topicPapers:(t,e,r=0,n={})=>{const s=new URLSearchParams({order:e,offset:String(r),limit:String(oq)});return n.startDate&&s.set("start_date",n.startDate),n.endDate&&s.set("end_date",n.endDate),he(`/research/topics/${t}/papers?${s}`)},featuredTopics:()=>he("/research/topics/featured"),topicMatches:t=>he(`/research/topic-matches?${new URLSearchParams({text:t})}`),email:()=>he("/me/research-email"),setEmail:t=>he("/me/research-email",{method:"PUT",body:JSON.stringify({enabled:t})})};class aq{constructor(e){this.request=e}trends(){return this.request("/stats/trends")}}const lq=new aq(he),El=60*1e3,js=5*El,me=10*El,NC=60*El,et=(t,e)=>t==null||t===""?jl:()=>e(t),Ru={me:()=>({queryKey:["auth","me"],queryFn:()=>AC.getCurrentUser(),staleTime:1/0})},dz={preferences:()=>({queryKey:["account","preferences"],queryFn:()=>Zu.getPreferences(),staleTime:1/0}),bookmarkIds:()=>({queryKey:["my-bookmark-ids"],queryFn:()=>Zu.getBookmarkIds()}),rateLimitPolicy:()=>({queryKey:["submission-rate-limit-policy"],queryFn:()=>Zu.getRateLimitPolicy()})},fz={organizations:["organizations"]},hz={areas:()=>({queryKey:["areas"],queryFn:()=>ge.listAreas({page_size:50,ordering:"name"}),staleTime:me}),area:t=>({queryKey:["area",t],queryFn:et(t,e=>ge.getArea(e)),staleTime:me}),areasWithTasks:()=>({queryKey:["areas-with-tasks"],queryFn:()=>ge.areasWithTasks(),staleTime:me}),topTasks:t=>({queryKey:["top-tasks",t],queryFn:()=>ge.topTasks(t),staleTime:me}),trendingTasks:t=>({queryKey:["trending-tasks",t],queryFn:()=>ge.trendingTasks(t),staleTime:me}),trendingMethods:t=>({queryKey:["trending-methods",t],queryFn:()=>ge.trendingMethods(t),staleTime:me}),taskList:t=>({queryKey:["task-list",t],queryFn:()=>ge.listTasks(t)}),methodList:t=>({queryKey:["method-list",t],queryFn:()=>ge.listMethods(t)}),datasetList:t=>({queryKey:["dataset-list",t],queryFn:()=>ge.listDatasets(t)}),task:t=>({queryKey:["task",t],queryFn:et(t,e=>ge.getTask(e)),staleTime:me}),taskPage:(t,e)=>({queryKey:["task-page",t,e],queryFn:et(t,r=>ge.taskPage(r,e)),staleTime:me}),taskBenchmarkTrends:(t,e)=>({queryKey:["task-benchmark-trends",t,e],queryFn:et(t,r=>ge.trendingBenchmarks(r,e)),staleTime:me}),method:t=>({queryKey:["method",t],queryFn:et(t,e=>ge.getMethod(e)),staleTime:me}),methodIndex:()=>({queryKey:["method-index"],queryFn:()=>ge.methodIndex(),staleTime:me}),methodTrend:t=>({queryKey:["method-trend",t],queryFn:et(t,e=>ge.methodTrend(e)),staleTime:me}),relatedMethods:t=>({queryKey:["related-methods",t],queryFn:et(t,e=>ge.relatedMethods(e)),staleTime:me}),dataset:t=>({queryKey:["dataset",t],queryFn:et(t,e=>ge.getDataset(e)),staleTime:me}),datasetPage:(t,e)=>({queryKey:["dataset",t,e],queryFn:et(t,r=>ge.getDatasetBySlug(r,e)),staleTime:me}),datasetTasks:t=>({queryKey:["dataset-tasks",t],queryFn:et(t,e=>ge.datasetTasks(e)),staleTime:me}),leaderboardMetrics:(t,e)=>({queryKey:["leaderboard-metrics",t,e],queryFn:t&&e?()=>ge.leaderboardMetrics(t,e):jl,staleTime:me}),metricDirections:()=>({queryKey:["metric-directions"],queryFn:()=>ge.metricDirections(),staleTime:NC}),frameworkCatalog:()=>({queryKey:["framework-catalog"],queryFn:()=>ge.frameworkCatalog()}),conferences:()=>({queryKey:["conferences"],queryFn:()=>ge.conferences(),staleTime:me}),conferenceDeadlines:()=>({queryKey:["conference-deadlines"],queryFn:()=>ge.conferenceDeadlines(),staleTime:me}),conference:t=>({queryKey:["conference",t],queryFn:et(t,e=>ge.getConference(e)),staleTime:me}),conferenceAreasWithTasks:t=>({queryKey:["conference-areas-with-tasks",t],queryFn:et(t,e=>ge.conferenceAreasWithTasks(e)),staleTime:me}),organizations:()=>({queryKey:["organizations","all"],queryFn:()=>ge.organizations(),staleTime:js}),organizationIndex:()=>({queryKey:["organizations","index"],queryFn:()=>ge.organizationIndex(),staleTime:me}),organizationSearch:(t,e)=>({queryKey:["organizations","search",t,e],queryFn:()=>ge.searchOrganizations(t,e)}),organization:t=>({queryKey:["organization",t],queryFn:et(t,e=>ge.getOrganization(e)),staleTime:me}),organizationAreasWithTasks:t=>({queryKey:["organization-areas-with-tasks",t],queryFn:()=>ge.organizationAreasWithTasks(t),staleTime:me}),organizationContributions:t=>({queryKey:["organization-contributions",t],queryFn:()=>ge.organizationContributions(t),staleTime:me})},pz={detail:t=>({queryKey:["paper",t],queryFn:et(t,e=>zn.get(e,!0)),staleTime:me}),summary:t=>({queryKey:["paper-summary",t],queryFn:()=>zn.get(t,!1),staleTime:js}),versions:t=>({queryKey:["paper-versions",t],queryFn:et(t,e=>zn.versions(e)),staleTime:me}),related:t=>({queryKey:["related-papers",t],queryFn:et(t,e=>zn.related(e,4)),staleTime:me}),search:(t,e)=>({queryKey:["paper-search",t,e],queryFn:()=>zn.search(t,1,e),staleTime:El}),saved:()=>({queryKey:["my-bookmarks"],queryFn:()=>Zu.getBookmarks()}),layout:t=>({queryKey:["paper-layout",t],queryFn:()=>sq(t),staleTime:js}),webPage:t=>({queryKey:["paper-web-page",t],queryFn:()=>nq(t),staleTime:js}),webMarkdown:t=>({queryKey:["paper-web-markdown",t],queryFn:()=>rq(t),staleTime:js}),suggestedQuestions:t=>({queryKey:["paper-suggested-questions",t],queryFn:()=>zn.suggestedQuestions(t)}),author:t=>({queryKey:["author",t],queryFn:()=>zn.getAuthor(t),staleTime:js}),authorSearch:(t,e)=>({queryKey:["author-search",t,e],queryFn:()=>zn.searchAuthors(t,e),staleTime:El})},qr={list:"papers-infinite",search:"paper-search-feed",task:"task-papers-infinite",conference:"conference-papers-infinite",organization:"organization-papers-infinite",method:"method-papers-infinite",following:"research-feed",trending:"trending-papers"},vz={list:t=>[qr.list,t],search:t=>[qr.search,t],task:(t,e)=>[qr.task,t,e],conference:(t,e,r)=>[qr.conference,t,e,r],organization:(t,e,r)=>[qr.organization,t,e,r],method:(t,e)=>[qr.method,t,e],following:(t,e)=>e?[qr.following,t,e]:[qr.following,t],trending:t=>[qr.trending,t]},gz=[...Object.values(qr),"my-bookmarks","related-papers","paper-versions","paper-search","chat-paper-mention-search"],mz={byPaper:t=>({queryKey:["paper-evals",t],queryFn:et(t,e=>rw.byPaper(e)),staleTime:0}),byDataset:t=>({queryKey:["dataset-evals",t],queryFn:et(t,e=>rw.byDataset(e)),staleTime:js})},yz={follows:t=>({queryKey:["research-follows",t],queryFn:Un.follows}),followSuggestions:()=>({queryKey:["research-follow-suggestions"],queryFn:Un.followSuggestions,staleTime:me}),topics:t=>({queryKey:["research-topics",t],queryFn:Un.topics}),publicTopic:(t,e)=>({queryKey:["research-public-topic",t,e],queryFn:()=>Un.publicTopic(t)}),followingNewCount:(t,e)=>({queryKey:["research-following-new-count",t,e],queryFn:()=>Un.followingNewCount(e),staleTime:5*60*1e3}),featuredTopics:()=>({queryKey:["research-featured-topics"],queryFn:Un.featuredTopics,staleTime:me}),topicMatches:t=>({queryKey:["research-topic-matches",t],queryFn:()=>Un.topicMatches(t),staleTime:me}),email:t=>({queryKey:["research-email",t],queryFn:Un.email})},_z={trends:()=>({queryKey:["research-trends"],queryFn:()=>lq.trends(),staleTime:NC})},wz={publicTopics:["research-public-topic"],topicPapers:(t,e,r,n)=>[`research-topic-papers-${t}`,e,r.startDate??null,r.endDate??null,n]},xz={user:t=>({queryKey:["user-profile",t.toLowerCase()],queryFn:()=>iq.get(t)})},bz={authorization:t=>({queryKey:["paper-edit-authorization",t],queryFn:()=>nw.authorization(t)}),digest:(t,e)=>({queryKey:["paper-edit-digest",t,e],queryFn:et(t,r=>nw.digest(r,e))})},Sz={pendingEdits:["pendingPaperEdits"],counts:(t,e)=>["pendingPaperEdits","counts",t,e],list:t=>["pendingPaperEdits",t]},sw={all:["admin"],cronStatus:["admin","cronStatus"],chatSandboxSpend:t=>["admin","chatSandboxSpend",t],chatWebSearchBudget:["admin","chatWebSearchBudget"],codexPaperJobs:["admin","codexPaperJobs"],catalogAudit:["catalog-audit"]},Ez={cronStatus:()=>({queryKey:sw.cronStatus,queryFn:()=>yh.getCronStatus()}),autonomousOperations:()=>({queryKey:["admin","autonomousOperations"],queryFn:()=>yh.getAutonomousOperations()}),paperMarkdownJobs:()=>({queryKey:["admin","paperMarkdownJobs"],queryFn:()=>yh.getPaperMarkdownJobs()}),codexPaperJobs:t=>({queryKey:[...sw.codexPaperJobs,t],queryFn:()=>tw.listJobs(100,t)}),codexPaperJob:(t,e)=>({queryKey:["admin","codexPaperJob",t,e],queryFn:et(e,r=>tw.getPaperJob(t,r))})},Cm=V.createContext(null),iw="pwc:auth-stale",uq=({children:t})=>{const e=n1(),r=M$(Ru.me()),n=r.data??null,s=V.useRef(null),{refetch:i}=r,o=V.useCallback(async()=>{await i()},[i]),a=V.useCallback(async()=>{const u=qd("/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 AC.logout(),e.setQueryData(Ru.me().queryKey,null)},[e]);V.useEffect(()=>{},[n]),V.useEffect(()=>{s.current&&!n&&e.resetQueries({predicate:u=>u.queryKey[0]!==Ru.me().queryKey[0]}),s.current=n},[e,n]),V.useEffect(()=>{const u=()=>e.setQueryData(Ru.me().queryKey,null);return window.addEventListener(iw,u),()=>window.removeEventListener(iw,u)},[e]);const l=V.useMemo(()=>({user:n,isLoading:r.isPending,refresh:o,logout:a}),[n,r.isPending,o,a]);return w.jsx(Cm.Provider,{value:l,children:t})};function FC(){const t=V.useContext(Cm);if(!t)throw new Error("useAuth must be used inside an ");return t}function kz(){return V.useContext(Cm)}const on=({name:t,size:e=14})=>{const r={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"}),x:w.jsx("path",{fill:"currentColor",d:"M12.6.75h2.45L9.7 6.87 16 15.25h-4.94l-3.87-5.06-4.42 5.06H.32l5.73-6.55L0 .75h5.06l3.5 4.63L12.6.75zm-.86 13.03h1.36L4.32 2.15H2.86l8.88 11.63z"})};return w.jsx("svg",{className:e===11?"icon-sm":"icon",viewBox:"0 0 16 16",width:e,height:e,children:r[t]})},ow="https://github.com/huggingface/paperswithcode",aw="https://x.com/paperswithcodee",cq="https://paperswithcode.co/following",lw="pwc:announcement:following-feed:v1:dismissed",_h=[{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:"/ai-deadlines",label:"Deadlines",end:!1},{to:"/organizations",label:"Organizations",end:!1},{to:"/submit",label:"Submit",end:!1}],dq=()=>{if(typeof navigator>"u")return!1;const t=navigator.userAgentData,e=(t==null?void 0:t.platform)||navigator.platform||navigator.userAgent||"";return/Mac|iPhone|iPad|iPod/i.test(e)},fq=()=>{const[t,e]=V.useState(!1);return V.useEffect(()=>{e(dq())},[]),w.jsx("kbd",{children:t?"⌘K":"Ctrl K"})},hq=({onOpenSearch:t})=>{const[e,r]=V.useState(!1),[n,s]=V.useState(()=>localStorage.getItem(lw)!=="1"),i=V.useRef(null),o=V.useRef(null),a=()=>r(!1),{user:l,logout:u}=FC(),c=yr(),d=c.pathname.startsWith("/pdf/"),f=`${c.pathname}${c.search}`||"/",m=Go(),_=wl()?{to:"/chat",label:"Chat",end:!1,badge:"New"}:SF()?{to:"/chat",label:"Chat",end:!1,badge:"New",href:bF}:null,p=_?[_h[0],_,..._h.slice(1)]:_h;return V.useLayoutEffect(()=>{var E;const y=i.current,h=o.current;if(!y||!h)return;let v=!1;const x=()=>{if(v)return;const P=y.querySelector(".nav-item.active"),k=(P==null?void 0:P.offsetWidth)??0;h.style.width=`${k}px`,h.style.transform=`translateX(${(P==null?void 0:P.offsetLeft)??0}px)`,h.style.opacity=k>0?"1":"0"};x();const b=window.requestAnimationFrame(()=>{h.classList.add("nav-indicator-ready")}),S=typeof ResizeObserver>"u"?null:new ResizeObserver(x);return S==null||S.observe(y),window.addEventListener("resize",x),(E=document.fonts)==null||E.ready.then(x),()=>{v=!0,window.cancelAnimationFrame(b),S==null||S.disconnect(),window.removeEventListener("resize",x)}},[c.pathname,p.length]),w.jsxs(hF,{open:e,onOpenChange:r,children:[w.jsxs("header",{className:"app-header",children:[w.jsxs("div",{className:"app-header-inner",children:[w.jsxs(Ri,{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:i,children:[p.map(({to:y,label:h,end:v,badge:x,href:b})=>{const 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:`nav-item${x?" nav-item-with-badge":""}`,children:S},y):w.jsx(Ri,{to:y,end:v,className:({isActive:E})=>`nav-item${x?" nav-item-with-badge":""}${E?" active":""}`,children:S},y)}),w.jsx("span",{ref:o,className:"nav-indicator","aria-hidden":"true"})]}),w.jsx("div",{className:"header-spacer"}),w.jsx("a",{className:"icon-btn header-github-btn",href:ow,target:"_blank",rel:"noreferrer","aria-label":"GitHub repository",title:"GitHub repository",children:w.jsx(on,{name:"github",size:14})}),w.jsx("a",{className:"icon-btn header-x-btn",href:aw,target:"_blank",rel:"noreferrer","aria-label":"Follow us on X",title:"Follow us on X",children:w.jsx(on,{name:"x",size:14})}),w.jsxs("button",{className:"search-trigger","aria-label":"Search papers, authors, domains",onClick:t,children:[w.jsx(on,{name:"search",size:13}),w.jsx("span",{children:"Search papers, authors, domains…"}),w.jsx(fq,{})]}),w.jsx("button",{className:"icon-btn mobile-search-btn","aria-label":"Search",onClick:t,children:w.jsx(on,{name:"search",size:14})}),!m&&w.jsx(Ri,{to:"/saved",className:"icon-btn header-bookmark-btn","aria-label":"Saved papers",title:"Saved papers",children:w.jsx(on,{name:"bookmark",size:13})}),m?null:l?w.jsx(q2,{user:l,onLogout:u}):w.jsx(F1,{returnTo:f}),w.jsx(pF,{asChild:!0,children:w.jsx("button",{className:"icon-btn mobile-menu-btn","aria-label":"Open menu",children:w.jsx(on,{name:"menu",size:14})})})]}),!d&&n&&w.jsxs("div",{className:"site-announcement",role:"status",children:[w.jsx("span",{children:"New: "}),m?w.jsx("a",{href:cq,target:"_blank",rel:"noreferrer",children:"following feed"}):w.jsx(Pr,{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(lw,"1"),s(!1)},children:w.jsx(on,{name:"close",size:11})})]})]}),w.jsx(vF,{children:w.jsx(gF,{className:"mobile-nav-drawer",children:w.jsxs(mF,{className:"mobile-nav-panel","aria-describedby":void 0,children:[w.jsx(yF,{className:"sr-only",children:"Navigation menu"}),w.jsx(_F,{className:"icon-btn mobile-nav-close","aria-label":"Close menu",children:w.jsx(on,{name:"close",size:14})}),w.jsxs("button",{type:"button",className:"mobile-nav-link mobile-nav-search",onClick:()=>{a(),t()},children:[w.jsx(on,{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 S=`mobile-nav-link${x?" mobile-nav-link-with-badge":""}`,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:S,onClick:a,children:E},y):w.jsx(Ri,{to:y,end:v,className:S,onClick:a,children:E},y)}),w.jsx("a",{className:"mobile-nav-link",href:ow,target:"_blank",rel:"noreferrer",onClick:a,children:"GitHub"}),w.jsx("a",{className:"mobile-nav-link",href:aw,target:"_blank",rel:"noreferrer",onClick:a,children:"Follow us on X"}),!m&&w.jsx(Ri,{to:"/saved",className:"mobile-nav-link",onClick:a,children:"Saved papers"}),!m&&(l==null?void 0:l.is_admin)&&w.jsx(Ri,{to:"/admin-dashboard",className:"mobile-nav-link",onClick:a,children:"Admin dashboard"})]})})})]})},pq=()=>{const{pathname:t}=yr();return t==="/chat"||t.startsWith("/chat/")||t.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(Pr,{to:"/docs/api",children:"API"}),w.jsx(Pr,{to:"/mcp",children:"MCP"}),w.jsx(Pr,{to:"/privacy",children:"Privacy"}),w.jsx("a",{href:"https://github.com/huggingface/paperswithcode-feedback/issues",target:"_blank",rel:"noreferrer",children:"Feedback"}),w.jsx("a",{href:"https://x.com/paperswithcodee",target:"_blank",rel:"noreferrer",children:"Follow us on X"})]})})},vq=1,gq=1e6;let wh=0;function mq(){return wh=(wh+1)%Number.MAX_SAFE_INTEGER,wh.toString()}const xh=new Map,uw=t=>{if(xh.has(t))return;const e=setTimeout(()=>{xh.delete(t),Ba({type:"REMOVE_TOAST",toastId:t})},gq);xh.set(t,e)},yq=(t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,vq)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(r=>r.id===e.toast.id?{...r,...e.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=e;return r?uw(r):t.toasts.forEach(n=>{uw(n.id)}),{...t,toasts:t.toasts.map(n=>n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(r=>r.id!==e.toastId)}}},ec=[];let tc={toasts:[]};function Ba(t){tc=yq(tc,t),ec.forEach(e=>{e(tc)})}function _q({...t}){const e=mq(),r=s=>Ba({type:"UPDATE_TOAST",toast:{...s,id:e}}),n=()=>Ba({type:"DISMISS_TOAST",toastId:e});return Ba({type:"ADD_TOAST",toast:{...t,id:e,open:!0,onOpenChange:s=>{s||n()}}}),{id:e,dismiss:n,update:r}}function wq(){const[t,e]=g.useState(tc);return g.useEffect(()=>(ec.push(e),()=>{const r=ec.indexOf(e);r>-1&&ec.splice(r,1)}),[t]),{...t,toast:_q,dismiss:r=>Ba({type:"DISMISS_TOAST",toastId:r})}}var xq=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"}),bq="VisuallyHidden",Pm=g.forwardRef((t,e)=>w.jsx(Re.span,{...t,ref:e,style:{...xq,...t.style}}));Pm.displayName=bq;var Tm="ToastProvider",[Rm,Sq,Eq]=um("Toast"),[LC]=mi("Toast",[Eq]),[kq,Qd]=LC(Tm),jC=t=>{const{__scopeToast:e,label:r="Notification",duration:n=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=t,[a,l]=g.useState(null),[u,c]=g.useState(0),d=g.useRef(!1),f=g.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${Tm}\`. Expected non-empty \`string\`.`),w.jsx(Rm.Provider,{scope:e,children:w.jsx(kq,{scope:e,label:r,duration:n,swipeDirection:s,swipeThreshold:i,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})})};jC.displayName=Tm;var DC="ToastViewport",Cq=["F8"],Tv="toast.viewportPause",Rv="toast.viewportResume",qC=g.forwardRef((t,e)=>{const{__scopeToast:r,hotkey:n=Cq,label:s="Notifications ({hotkey})",...i}=t,o=Qd(DC,r),a=Sq(r),l=g.useRef(null),u=g.useRef(null),c=g.useRef(null),d=g.useRef(null),f=st(e,d,o.onViewportChange),m=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),_=o.toastCount>0;g.useEffect(()=>{const y=h=>{var x;n.length!==0&&n.every(b=>h[b]||h.code===b)&&((x=d.current)==null||x.focus())};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[n]),g.useEffect(()=>{const y=l.current,h=d.current;if(_&&y&&h){const v=()=>{if(!o.isClosePausedRef.current){const E=new CustomEvent(Tv);h.dispatchEvent(E),o.isClosePausedRef.current=!0}},x=()=>{if(o.isClosePausedRef.current){const E=new CustomEvent(Rv);h.dispatchEvent(E),o.isClosePausedRef.current=!1}},b=E=>{!y.contains(E.relatedTarget)&&x()},S=()=>{y.contains(document.activeElement)||x()};return y.addEventListener("focusin",v),y.addEventListener("focusout",b),y.addEventListener("pointermove",v),y.addEventListener("pointerleave",S),window.addEventListener("blur",v),window.addEventListener("focus",x),()=>{y.removeEventListener("focusin",v),y.removeEventListener("focusout",b),y.removeEventListener("pointermove",v),y.removeEventListener("pointerleave",S),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,S=[b,...Dq(b)];return y==="forwards"?S:S.reverse()});return(y==="forwards"?v.reverse():v).flat()},[a]);return g.useEffect(()=>{const y=d.current;if(y){const h=v=>{var S,E,P;const x=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!x){const k=document.activeElement,R=v.shiftKey;if(v.target===y&&R){(S=u.current)==null||S.focus();return}const M=p({tabbingDirection:R?"backwards":"forwards"}),q=M.findIndex(F=>F===k);bh(M.slice(q+1))?v.preventDefault():R?(E=u.current)==null||E.focus():(P=c.current)==null||P.focus()}};return y.addEventListener("keydown",h),()=>y.removeEventListener("keydown",h)}},[a,p]),w.jsxs(tN,{ref:l,role:"region","aria-label":s.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:_?void 0:"none"},children:[_&&w.jsx(Ov,{ref:u,onFocusFromOutsideViewport:()=>{const y=p({tabbingDirection:"forwards"});bh(y)}}),w.jsx(Rm.Slot,{scope:r,children:w.jsx(Re.ol,{tabIndex:-1,...i,ref:f})}),_&&w.jsx(Ov,{ref:c,onFocusFromOutsideViewport:()=>{const y=p({tabbingDirection:"backwards"});bh(y)}})]})});qC.displayName=DC;var zC="ToastFocusProxy",Ov=g.forwardRef((t,e)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=t,i=Qd(zC,r);return w.jsx(Pm,{tabIndex:0,...s,ref:e,style:{position:"fixed"},onFocus:o=>{var u;const a=o.relatedTarget;!((u=i.viewport)!=null&&u.contains(a))&&n()}})});Ov.displayName=zC;var Bl="Toast",Pq="toast.swipeStart",Tq="toast.swipeMove",Rq="toast.swipeCancel",Oq="toast.swipeEnd",UC=g.forwardRef((t,e)=>{const{forceMount:r,open:n,defaultOpen:s,onOpenChange:i,...o}=t,[a,l]=Nd({prop:n,defaultProp:s??!0,onChange:i,caller:Bl});return w.jsx(In,{present:r||a,children:w.jsx(Aq,{open:a,...o,ref:e,onClose:()=>l(!1),onPause:Wt(t.onPause),onResume:Wt(t.onResume),onSwipeStart:ee(t.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ee(t.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(t.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(t.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)})})})});UC.displayName=Bl;var[Iq,Mq]=LC(Bl,{onClose(){}}),Aq=g.forwardRef((t,e)=>{const{__scopeToast:r,type:n="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:c,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:m,..._}=t,p=Qd(Bl,r),[y,h]=g.useState(null),v=st(e,F=>h(F)),x=g.useRef(null),b=g.useRef(null),S=s||p.duration,E=g.useRef(0),P=g.useRef(S),k=g.useRef(0),{onToastAdd:R,onToastRemove:T}=p,$=Wt(()=>{var H;(y==null?void 0:y.contains(document.activeElement))&&((H=p.viewport)==null||H.focus()),o()}),M=g.useCallback(F=>{!F||F===1/0||(window.clearTimeout(k.current),E.current=new Date().getTime(),k.current=window.setTimeout($,F))},[$]);g.useEffect(()=>{const F=p.viewport;if(F){const H=()=>{M(P.current),u==null||u()},B=()=>{const Q=new Date().getTime()-E.current;P.current=P.current-Q,window.clearTimeout(k.current),l==null||l()};return F.addEventListener(Tv,B),F.addEventListener(Rv,H),()=>{F.removeEventListener(Tv,B),F.removeEventListener(Rv,H)}}},[p.viewport,S,l,u,M]),g.useEffect(()=>{i&&!p.isClosePausedRef.current&&M(S)},[i,S,p.isClosePausedRef,M]),g.useEffect(()=>(R(),()=>T()),[R,T]);const q=g.useMemo(()=>y?QC(y):null,[y]);return p.viewport?w.jsxs(w.Fragment,{children:[q&&w.jsx($q,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite",children:q}),w.jsx(Iq,{scope:r,onClose:$,children:Nl.createPortal(w.jsx(Rm.ItemSlot,{scope:r,children:w.jsx(eN,{asChild:!0,onEscapeKeyDown:ee(a,()=>{p.isFocusedToastEscapeKeyDownRef.current||$(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:w.jsx(Re.li,{tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":p.swipeDirection,..._,ref:v,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:ee(t.onKeyDown,F=>{F.key==="Escape"&&(a==null||a(F.nativeEvent),F.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,$()))}),onPointerDown:ee(t.onPointerDown,F=>{F.button===0&&(x.current={x:F.clientX,y:F.clientY})}),onPointerMove:ee(t.onPointerMove,F=>{if(!x.current)return;const H=F.clientX-x.current.x,B=F.clientY-x.current.y,Q=!!b.current,I=["left","right"].includes(p.swipeDirection),A=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,U=I?A(0,H):0,G=I?0:A(0,B),te=F.pointerType==="touch"?10:2,oe={x:U,y:G},de={originalEvent:F,delta:oe};Q?(b.current=oe,Ou(Tq,d,de,{discrete:!1})):cw(oe,p.swipeDirection,te)?(b.current=oe,Ou(Pq,c,de,{discrete:!1}),F.target.setPointerCapture(F.pointerId)):(Math.abs(H)>te||Math.abs(B)>te)&&(x.current=null)}),onPointerUp:ee(t.onPointerUp,F=>{const H=b.current,B=F.target;if(B.hasPointerCapture(F.pointerId)&&B.releasePointerCapture(F.pointerId),b.current=null,x.current=null,H){const Q=F.currentTarget,I={originalEvent:F,delta:H};cw(H,p.swipeDirection,p.swipeThreshold)?Ou(Oq,m,I,{discrete:!0}):Ou(Rq,f,I,{discrete:!0}),Q.addEventListener("click",A=>A.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),$q=t=>{const{__scopeToast:e,children:r,...n}=t,s=Qd(Bl,e),[i,o]=g.useState(!1),[a,l]=g.useState(!1);return Lq(()=>o(!0)),g.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:w.jsx(Ld,{asChild:!0,children:w.jsx(Pm,{...n,children:i&&w.jsxs(w.Fragment,{children:[s.label," ",r]})})})},Nq="ToastTitle",BC=g.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t;return w.jsx(Re.div,{...n,ref:e})});BC.displayName=Nq;var Fq="ToastDescription",VC=g.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t;return w.jsx(Re.div,{...n,ref:e})});VC.displayName=Fq;var HC="ToastAction",WC=g.forwardRef((t,e)=>{const{altText:r,...n}=t;return r.trim()?w.jsx(GC,{altText:r,asChild:!0,children:w.jsx(Om,{...n,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${HC}\`. Expected non-empty \`string\`.`),null)});WC.displayName=HC;var KC="ToastClose",Om=g.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t,s=Mq(KC,r);return w.jsx(GC,{asChild:!0,children:w.jsx(Re.button,{type:"button",...n,ref:e,onClick:ee(t.onClick,s.onClose)})})});Om.displayName=KC;var GC=g.forwardRef((t,e)=>{const{__scopeToast:r,altText:n,...s}=t;return w.jsx(Re.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:e})});function QC(t){const e=[];return Array.from(t.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&e.push(n.textContent),jq(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",i=n.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=n.dataset.radixToastAnnounceAlt;o&&e.push(o)}else e.push(...QC(n))}}),e}function Ou(t,e,r,{discrete:n}){const s=r.originalEvent.currentTarget,i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?Zg(s,i):s.dispatchEvent(i)}var cw=(t,e,r=0)=>{const n=Math.abs(t.x),s=Math.abs(t.y),i=n>s;return e==="left"||e==="right"?i&&n>r:!i&&s>r};function Lq(t=()=>{}){const e=Wt(t);mr(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[e])}function jq(t){return t.nodeType===t.ELEMENT_NODE}function Dq(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function bh(t){const e=document.activeElement;return t.some(r=>r===e?!0:(r.focus(),document.activeElement!==e))}var qq=jC,YC=qC,XC=UC,JC=BC,ZC=VC,eP=WC,tP=Om;const dw=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,fw=X1,zq=(t,e)=>r=>{var n;if((e==null?void 0:e.variants)==null)return fw(t,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:i}=e,o=Object.keys(s).map(u=>{const c=r==null?void 0:r[u],d=i==null?void 0:i[u];if(c===null)return null;const f=dw(c)||dw(d);return s[u][f]}),a=r&&Object.entries(r).reduce((u,c)=>{let[d,f]=c;return f===void 0||(u[d]=f),u},{}),l=e==null||(n=e.compoundVariants)===null||n===void 0?void 0:n.reduce((u,c)=>{let{class:d,className:f,...m}=c;return Object.entries(m).every(_=>{let[p,y]=_;return Array.isArray(y)?y.includes({...i,...a}[p]):{...i,...a}[p]===y})?[...u,d,f]:u},[]);return fw(t,o,l,r==null?void 0:r.class,r==null?void 0:r.className)},Uq=qq,rP=g.forwardRef(({className:t,...e},r)=>w.jsx(YC,{ref:r,className:pt("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]",t),...e}));rP.displayName=YC.displayName;const Bq=zq("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"}}),nP=g.forwardRef(({className:t,variant:e,...r},n)=>w.jsx(XC,{ref:n,className:pt(Bq({variant:e}),t),...r}));nP.displayName=XC.displayName;const Vq=g.forwardRef(({className:t,...e},r)=>w.jsx(eP,{ref:r,className:pt("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",t),...e}));Vq.displayName=eP.displayName;const sP=g.forwardRef(({className:t,...e},r)=>w.jsx(tP,{ref:r,className:pt("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",t),"aria-label":"Dismiss notification","toast-close":"",...e,children:w.jsx(M2,{className:"h-4 w-4"})}));sP.displayName=tP.displayName;const iP=g.forwardRef(({className:t,...e},r)=>w.jsx(JC,{ref:r,className:pt("text-sm font-semibold",t),...e}));iP.displayName=JC.displayName;const oP=g.forwardRef(({className:t,...e},r)=>w.jsx(ZC,{ref:r,className:pt("text-sm opacity-90",t),...e}));oP.displayName=ZC.displayName;function Hq(){const{toasts:t}=wq();return w.jsxs(Uq,{children:[t.map(function({id:e,title:r,description:n,action:s,...i}){return w.jsxs(nP,{...i,children:[w.jsxs("div",{className:"grid gap-1",children:[r&&w.jsx(iP,{children:r}),n&&w.jsx(oP,{children:n})]}),s,w.jsx(sP,{})]},e)}),w.jsx(rP,{})]})}function Wq(){const{pathname:t,hash:e}=yr();g.useLayoutEffect(()=>{e||window.scrollTo({top:0,left:0,behavior:"instant"})},[t,e])}const aP=kF(),Kq=aP?BA:UA;if(!aP&&typeof window<"u"){const t=window.location.hash;t.startsWith("#/")&&!t.startsWith("#//")&&window.history.replaceState(null,"",t.slice(1))}const Gq=V.lazy(()=>ae(()=>import("./AuthorizePaperEditView-BOFahK60.js"),__vite__mapDeps([0,1,2]))),Qq=V.lazy(()=>ae(()=>import("./FollowingView-Cxa7B_EK.js"),__vite__mapDeps([3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,1,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44]))),Yq=V.lazy(()=>ae(()=>import("./TopicView-THW1BoPW.js"),__vite__mapDeps([45,30,31,32,33,34,29,24,35,36,37,38,39,40,41,18,1,19,13]))),Xq=V.lazy(()=>ae(()=>import("./FeedView-BHFMyhM7.js"),__vite__mapDeps([4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,1,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44]))),Jq=V.lazy(()=>ae(()=>import("./ChatView-C_8EJWxW.js"),__vite__mapDeps([46,47,25,26,48,49,50,15,51,52,53,54,1,11,55,56,57,19,6,58,32,33,59,60,42,43,8,35,61,62]))),Zq=V.lazy(()=>ae(()=>import("./SharedChatView-Dj57MfC5.js"),__vite__mapDeps([63,47,25,26,48,49,50,15,51,52,53,54,1,11,55,56,57,19,6,58,32,33,59,60]))),e3=V.lazy(()=>ae(()=>import("./PapersListView-CseFoJbP.js"),__vite__mapDeps([64,34,29,24,35,30,31,32,33,36,37,38,39,40,41,23,44,65]))),t3=V.lazy(()=>ae(()=>import("./PaperDetailView-ouIH95io.js"),__vite__mapDeps([66,1,35,34,29,24,36,67,68,37,69,61,39,44,2,20,43,55,70,71,72,38,6,73,49,48,74,75,76,77,12,19,78,17,50,22,79,80,52,53,40,81,82,32,33,83]))),r3=V.lazy(()=>ae(()=>import("./PaperReaderView-CHBZiJsP.js"),__vite__mapDeps([84,47,25,26,48,49,50,15,51,52,53,54,1,11,55,56,57,19,6,58,32,33,59,60,85,68,37,46,42,43,8,35,61,62]))),n3=V.lazy(()=>ae(()=>import("./TagsIndexView-Bi7hK8KC.js"),__vite__mapDeps([86,29,24,87,5,6,7,8,9,10,11,12,13,14,15,16,17,44,88,39,89,74,2,71,75,72,38,20,73,1,76,19,90,91]))),s3=V.lazy(()=>ae(()=>import("./TagBrowseView-v9VEerfq.js"),__vite__mapDeps([92,93,18,1,19,34,29,24,30,31,32,33,35,36,37,38,39,40,41,28,94,85,51,52,53,54,48,60,65,67,87,95,96,44,14,50]))),i3=V.lazy(()=>ae(()=>import("./MethodsIndexView-oQRuQvC5.js"),__vite__mapDeps([97,91,87,44,88,39,89,74,2,71,75,72,38,20,6,73,1,76,19,90,9]))),o3=V.lazy(()=>ae(()=>import("./FrameworksIndexView-BudvANNm.js"),__vite__mapDeps([98,35,29,65]))),a3=V.lazy(()=>ae(()=>import("./TrendsView-DLCEhyZN.js"),__vite__mapDeps([99,44,39]))),l3=V.lazy(()=>ae(()=>import("./ConferencesIndexView-Gq6pPaBT.js"),__vite__mapDeps([100,101,44,88,39,89,74,2,71,75,72,38,20,6,73,1,76,19]))),u3=V.lazy(()=>ae(()=>import("./AiDeadlinesView-BwYw1rSE.js"),__vite__mapDeps([102,21,22,39,44,37,20,101]))),c3=V.lazy(()=>ae(()=>import("./ConferenceDetailView-CY8QPPd0.js"),__vite__mapDeps([103,88,39,85,51,52,53,54,48,1,60,91,29,104,101,24,37,96,44,95]))),d3=V.lazy(()=>ae(()=>import("./ConferenceTaskView-Dy6qzWoe.js"),__vite__mapDeps([105,30,31,32,33,34,29,24,35,36,37,38,39,40,41,85,51,52,53,54,48,1,60,104,96,44,95]))),f3=V.lazy(()=>ae(()=>import("./OrganizationsIndexView-Bmjo7Cen.js"),__vite__mapDeps([106,44,107]))),h3=V.lazy(()=>ae(()=>import("./OrganizationDetailView-D7onRyJK.js"),__vite__mapDeps([108,93,18,1,19,85,51,52,53,54,48,60,109,39,30,31,32,33,34,29,24,35,36,37,38,40,41,72,2,20,6,73,82,95,96,44]))),p3=V.lazy(()=>ae(()=>import("./OrganizationDetailView-D7onRyJK.js"),__vite__mapDeps([108,93,18,1,19,85,51,52,53,54,48,60,109,39,30,31,32,33,34,29,24,35,36,37,38,40,41,72,2,20,6,73,82,95,96,44]))),v3=V.lazy(()=>ae(()=>import("./AuthorDetailView-IWnDx7CU.js"),__vite__mapDeps([110,32,33,30,31,34,29,24,35,36,37,38,39,40,41,93,18,1,19,44,95]))),g3=V.lazy(()=>ae(()=>import("./MethodDetailView-B8HdpGV0.js"),__vite__mapDeps([111,93,18,1,19,34,29,24,30,31,32,33,35,36,37,38,39,40,41,85,51,52,53,54,48,60,87,95,96,44]))),m3=V.lazy(()=>ae(()=>import("./BenchmarkDetailView-vHps8p5Q.js"),__vite__mapDeps([112,93,18,1,19,67,36,79,48,37,80,21,22,35,39,94,87,95,96,44,113]))),y3=V.lazy(()=>ae(()=>import("./SavedPapersView-DZOensHN.js"),__vite__mapDeps([114,31,32,33,34,29,24,35,36,37,39,44,81]))),_3=V.lazy(()=>ae(()=>import("./SettingsView-gwFUCq1L.js"),__vite__mapDeps([115,1,18,21,22,28,26,69,62,67,57,10]))),w3=V.lazy(()=>ae(()=>import("./PrivacyView-DH6mkyi8.js"),__vite__mapDeps([116,69]))),x3=V.lazy(()=>ae(()=>import("./ApiDocsView-DyP_0MsP.js"),__vite__mapDeps([117,69,52,118]))),b3=V.lazy(()=>ae(()=>import("./McpView-_zMii-R1.js"),__vite__mapDeps([119,69,50,27,57,55,120]))),S3=V.lazy(()=>ae(()=>import("./SubmitView-BFMgGf_E.js"),__vite__mapDeps([121,1,44,2,71,75,70]))),E3=V.lazy(()=>ae(()=>import("./CronDashboard-B8-bAbmS.js"),__vite__mapDeps([122,1,123,124,78,2,58,12,9,16,15,7,57,125,73,126,41,26]))),k3=V.lazy(()=>ae(()=>import("./AutonomousOperations-Dh-ifubq.js"),__vite__mapDeps([127,1,123,124,78,2,71,16,56]))),C3=V.lazy(()=>ae(()=>import("./SubmissionsDashboard-kVd__SF8.js"),__vite__mapDeps([128,70,1,41,77,37,76,125,73,126,129]))),P3=V.lazy(()=>ae(()=>import("./UserProfileView-C9P7_Rj8.js"),__vite__mapDeps([130,109,39]))),T3=V.lazy(()=>ae(()=>import("./RateLimitsView-BOCycN6-.js"),[])),R3=V.lazy(()=>ae(()=>import("./AstraForRoboticsView-Csl6OWzU.js"),__vite__mapDeps([131,30,31,32,33,34,29,24,35,36,37,38,39,40,41,44,69,132]))),Sh=V.lazy(()=>ae(()=>import("./NotFound-E4uwO9V5.js"),[])),O3=V.lazy(()=>ae(()=>import("./SearchOverlay-DazkXCH_.js"),__vite__mapDeps([133,36,23,29,24]))),I3=V.lazy(()=>ae(()=>import("./StagingAccessRequestView-BhBwFqrG.js"),__vite__mapDeps([134,126]))),lP=()=>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}})]})]}),M3=new _$({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}}),A3=()=>{const{arxivId:t}=jE();return w.jsx(ii,{to:t?`/paper/${t}`:"/papers",replace:!0})},$3=()=>{const{taskSlug:t}=jE();return w.jsx(ii,{to:t?`/tasks/${t}`:"/tasks",replace:!0})},N3=({element:t})=>Go()?w.jsx(ii,{to:"/",replace:!0}):w.jsx(w.Fragment,{children:t}),Iv=({element:t})=>{const{user:e,isLoading:r}=FC(),n=yr();return Go()?w.jsx(ii,{to:"/",replace:!0}):r?w.jsx("div",{className:"page",children:w.jsx("div",{className:"submission-loading",children:w.jsx("span",{children:"Checking admin session..."})})}):e?e.is_admin?w.jsx(w.Fragment,{children:t}):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 @",e.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(F1,{returnTo:`${n.pathname}${n.search}`})]})})},F3=()=>{const t=xF(),e=typeof window<"u"&&new URL(t,window.location.origin).origin!==window.location.origin;return V.useEffect(()=>{e&&window.location.replace(t)},[t,e]),e?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:t,children:"Continue"})]})}):w.jsx(Iv,{element:w.jsx(E3,{})})},hw=({reader:t=!1})=>{const[e,r]=V.useState(!1),{pathname:n}=yr();V.useEffect(()=>{const a=l=>{(l.metaKey||l.ctrlKey)&&l.key==="k"&&(l.preventDefault(),r(!0))};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[]);const s=w.jsx(hq,{onOpenSearch:()=>r(!0)}),i=w.jsx(RE,{resetKey:n,children:w.jsx(V.Suspense,{fallback:w.jsx(lP,{}),children:w.jsx(MA,{})})}),o=e&&w.jsx(V.Suspense,{fallback:null,children:w.jsx(O3,{open:e,onClose:()=>r(!1)})});return t?w.jsxs("div",{className:"reader-route-shell",children:[s,w.jsx("div",{className:"reader-route-content",children:i}),o]}):w.jsxs(w.Fragment,{children:[s,w.jsx("main",{children:i}),w.jsx(pq,{}),o]})},L3=()=>(Wq(),V.useLayoutEffect(()=>{var t;(t=document.getElementById("initial-discovery-footer"))==null||t.remove()},[]),w.jsxs(AA,{children:[w.jsx(ne,{path:"/request-access",element:w.jsx(V.Suspense,{fallback:w.jsx(lP,{}),children:w.jsx(I3,{})})}),w.jsx(ne,{element:w.jsx(hw,{reader:!0}),children:w.jsx(ne,{path:"/pdf/:paperId",element:EF()?w.jsx(r3,{}):w.jsx(Sh,{})})}),w.jsxs(ne,{element:w.jsx(hw,{}),children:[w.jsx(ne,{path:"/",element:w.jsx(Xq,{})}),w.jsx(ne,{path:"/following",element:w.jsx(Qq,{})}),w.jsx(ne,{path:"/topics/:topicParam",element:w.jsx(Yq,{})}),w.jsx(ne,{path:"/x-trending",element:w.jsx(ii,{to:"/",replace:!0})}),w.jsx(ne,{path:"/chat/:sessionId?",element:wl()?w.jsx(Jq,{}):w.jsx(ii,{to:"/",replace:!0})}),w.jsx(ne,{path:"/share/:shareId",element:wl()?w.jsx(Zq,{}):w.jsx(Sh,{})}),w.jsx(ne,{path:"/papers",element:w.jsx(e3,{})}),w.jsx(ne,{path:"/papers/:arxivId",element:w.jsx(A3,{})}),w.jsx(ne,{path:"/paper/:arxivId",element:w.jsx(t3,{})}),w.jsx(ne,{path:"/tasks",element:w.jsx(n3,{})}),w.jsx(ne,{path:"/tasks/:taskSlug",element:w.jsx(s3,{})}),w.jsx(ne,{path:"/task/:taskSlug",element:w.jsx($3,{})}),w.jsx(ne,{path:"/methods",element:w.jsx(i3,{})}),w.jsx(ne,{path:"/methods/:methodSlug",element:w.jsx(g3,{})}),w.jsx(ne,{path:"/frameworks",element:w.jsx(o3,{})}),w.jsx(ne,{path:"/trends",element:w.jsx(a3,{})}),w.jsx(ne,{path:"/conferences",element:w.jsx(l3,{})}),w.jsx(ne,{path:"/ai-deadlines",element:w.jsx(u3,{})}),w.jsx(ne,{path:"/conferences/:confSlug",element:w.jsx(c3,{})}),w.jsx(ne,{path:"/conferences/:confSlug/:taskSlug",element:w.jsx(d3,{})}),w.jsx(ne,{path:"/organizations",element:w.jsx(f3,{})}),w.jsx(ne,{path:"/orgs/:orgSlug",element:w.jsx(h3,{})}),w.jsx(ne,{path:"/orgs/:orgSlug/:taskSlug",element:w.jsx(p3,{})}),w.jsx(ne,{path:"/authors/:authorId",element:w.jsx(v3,{})}),w.jsx(ne,{path:"/benchmark/:datasetSlug",element:w.jsx(m3,{})}),w.jsx(ne,{path:"/authorize-paper-edit/:authorizationId",element:w.jsx(Gq,{})}),w.jsx(ne,{path:"/submit",element:w.jsx(S3,{})}),w.jsx(ne,{path:"/saved",element:w.jsx(N3,{element:w.jsx(y3,{})})}),w.jsx(ne,{path:"/settings",element:w.jsx(_3,{})}),w.jsx(ne,{path:"/privacy",element:w.jsx(w3,{})}),w.jsx(ne,{path:"/docs/api",element:w.jsx(x3,{})}),w.jsx(ne,{path:"/mcp",element:w.jsx(b3,{})}),w.jsx(ne,{path:"/admin-dashboard",element:w.jsx(F3,{})}),w.jsx(ne,{path:"/autonomous-operations",element:w.jsx(Iv,{element:w.jsx(k3,{})})}),w.jsx(ne,{path:"/cron-dashboard",element:w.jsx(ii,{to:"/admin-dashboard",replace:!0})}),w.jsx(ne,{path:"/submissions",element:w.jsx(Iv,{element:w.jsx(C3,{})})}),w.jsx(ne,{path:"/rate-limits",element:w.jsx(T3,{})}),w.jsx(ne,{path:"/astra-for-robotics",element:w.jsx(R3,{})}),w.jsx(ne,{path:"/:username",element:w.jsx(P3,{})}),w.jsx(ne,{path:"*",element:w.jsx(Sh,{})})]})]})),j3=()=>w.jsx(w$,{client:M3,children:w.jsxs(uq,{children:[w.jsx(Kq,{children:w.jsx(L3,{})}),w.jsx(Hq,{}),!1]})});qM();const D3=w.jsx(qR,{attribute:"class",defaultTheme:"system",enableSystem:!0,disableTransitionOnChange:!0,storageKey:"pwc-theme",children:w.jsx(RE,{children:w.jsx(j3,{})})}),q3=Lb(document.getElementById("root"));q3.render(w.jsx(V.StrictMode,{children:D3}));export{tw as $,Bo as A,zn as B,R2 as C,ez as D,me as E,rz as F,nz as G,F1 as H,wq as I,mz as J,pz as K,Pr as L,rw as M,ge as N,oz as O,fz as P,In as Q,Re as R,Nd as S,oq as T,st as U,ee as V,Uj as W,M2 as X,mi as Y,pt as Z,Ez as _,FC as a,ml as a$,az as a0,J3 as a1,sz as a2,ok as a3,uD as a4,cD as a5,Ok as a6,I2 as a7,Vq as a8,dz as a9,zq as aA,lo as aB,hF as aC,vF as aD,gF as aE,mF as aF,ks as aG,_F as aH,yF as aI,Q3 as aJ,ii as aK,Qj as aL,Yj as aM,wk as aN,Ld as aO,Fd as aP,Xj as aQ,Jj as aR,B3 as aS,U3 as aT,sw as aU,yh as aV,H2 as aW,MC as aX,tz as aY,Ll as aZ,iv as a_,V as aa,Zu as ab,$C as ac,lz as ad,EF as ae,X3 as af,A2 as ag,$2 as ah,RC as ai,un as aj,Z3 as ak,Y3 as al,Y2 as am,Ew as an,N1 as ao,K3 as ap,O2 as aq,ae as ar,X1 as as,Nl as at,jl as au,he as av,im as aw,V2 as ax,_z as ay,j1 as az,M$ as b,g$ as b0,dt as b1,jt as b2,GE as b3,js as b4,y1 as b5,tm as b6,u1 as b7,em as b8,f$ as b9,W3 as ba,H3 as bb,I$ as bc,gz as bd,WE as be,x$ as bf,E$ as bg,T$ as bh,k$ as bi,C$ as bj,O$ as bk,S0 as bl,P$ as bm,Sz as bn,nk as bo,sk as bp,ik as bq,xz as br,El as bs,AC as bt,nw as c,Gd as d,kz as e,V3 as f,Un as g,wz as h,g as i,w as j,Go as k,wF as l,U2 as m,Qg as n,n1 as o,bz as p,yr as q,yz as r,cz as s,uz as t,jE as u,hz as v,vz as w,wl as x,SF as y,bF as z}; diff --git a/assets/index-SntObKrh.js b/assets/index-ruElXN5Q.js similarity index 99% rename from assets/index-SntObKrh.js rename to assets/index-ruElXN5Q.js index 82b6fe1c9034a1c9c36f79d7b789e316ac728634..e4134a0ddd6615bacf75ed6937f9a6b551d93f40 100644 --- a/assets/index-SntObKrh.js +++ b/assets/index-ruElXN5Q.js @@ -1,4 +1,4 @@ -import{aT as We,an as Ot,j as Ze}from"./index-C1Xuuz1Y.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{aT as We,an as Ot,j as Ze}from"./index-DMjO_toh.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;++Fs.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}));d.displayName="Input";export{d as I}; +import{i,j as s,Z as n}from"./index-DMjO_toh.js";const d=i.forwardRef(({className:e,type:r,...o},t)=>s.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}));d.displayName="Input";export{d as I}; diff --git a/assets/link-2-D52PZ3mH.js b/assets/link-2-n6VIX0kb.js similarity index 89% rename from assets/link-2-D52PZ3mH.js rename to assets/link-2-n6VIX0kb.js index 85ba797fa4a7bc42520ab6de3d2ee14b102c7055..fea79427a6cba5f99fe29c971d2fb879fa989a76 100644 --- a/assets/link-2-D52PZ3mH.js +++ b/assets/link-2-n6VIX0kb.js @@ -1,4 +1,4 @@ -import{d as e}from"./index-C1Xuuz1Y.js";/** +import{d as e}from"./index-DMjO_toh.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/loader-circle-tzO1dF92.js b/assets/loader-circle-gyMLnt4Y.js similarity index 85% rename from assets/loader-circle-tzO1dF92.js rename to assets/loader-circle-gyMLnt4Y.js index 0489bf0404d7d5bb1c57e5fa9e68ccddd235a8c7..ddd22248a6234906a593fb0d832c40b2a50879dd 100644 --- a/assets/loader-circle-tzO1dF92.js +++ b/assets/loader-circle-gyMLnt4Y.js @@ -1,4 +1,4 @@ -import{d as e}from"./index-C1Xuuz1Y.js";/** +import{d as e}from"./index-DMjO_toh.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/mlIntern-BRf6eT1x.js b/assets/mlIntern-DaNPa3iB.js similarity index 90% rename from assets/mlIntern-BRf6eT1x.js rename to assets/mlIntern-DaNPa3iB.js index 9e2208241760690045671838f13a6fb91294d63c..5781a16e6a1d661d2ddd4d5ed382565c30b04aa6 100644 --- a/assets/mlIntern-BRf6eT1x.js +++ b/assets/mlIntern-DaNPa3iB.js @@ -1 +1 @@ -import{F as a}from"./index-C1Xuuz1Y.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{F as a}from"./index-DMjO_toh.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-DB_mnxXr.js b/assets/moon-CIGKI3Uq.js similarity index 85% rename from assets/moon-DB_mnxXr.js rename to assets/moon-CIGKI3Uq.js index 8b9489f299bbb786374a3a0c9f2e0c7dae1c9cf1..5c7eaa4572dbf6444bff175f68a93d05da80ecd6 100644 --- a/assets/moon-DB_mnxXr.js +++ b/assets/moon-CIGKI3Uq.js @@ -1,4 +1,4 @@ -import{d as o}from"./index-C1Xuuz1Y.js";/** +import{d as o}from"./index-DMjO_toh.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/openrouter-B1BP_cUi.js b/assets/openrouter-bfrcMxtX.js similarity index 82% rename from assets/openrouter-B1BP_cUi.js rename to assets/openrouter-bfrcMxtX.js index 26a7d417301ac3e721a5a1b9bd6d069cef2ccfb9..15a7b47fb2335d3f8ac90d8624d087f271a88f9d 100644 --- a/assets/openrouter-B1BP_cUi.js +++ b/assets/openrouter-bfrcMxtX.js @@ -1 +1 @@ -import{b as r}from"./index-C1Xuuz1Y.js";import{c as n}from"./chat-CiW-DJRi.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-DMjO_toh.js";import{c as n}from"./chat-B4elm0RV.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/plus-VBQCmtt2.js b/assets/plus-B4ZP41Rg.js similarity index 86% rename from assets/plus-VBQCmtt2.js rename to assets/plus-B4ZP41Rg.js index d6efac70bf170d3c6e1271aee75506a04f655dbf..27ef5cc6a7401442b504373238f4ca48381b77bb 100644 --- a/assets/plus-VBQCmtt2.js +++ b/assets/plus-B4ZP41Rg.js @@ -1,4 +1,4 @@ -import{d as e}from"./index-C1Xuuz1Y.js";/** +import{d as e}from"./index-DMjO_toh.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/popover-C1A8cBwB.js b/assets/popover-MF6JD1Yi.js similarity index 98% rename from assets/popover-C1A8cBwB.js rename to assets/popover-MF6JD1Yi.js index 587dc93d6b8f883ad58ec3b3b21f18e894805905..f5a95c88237429a036a90f90f5639174a5c27c9f 100644 --- a/assets/popover-C1A8cBwB.js +++ b/assets/popover-MF6JD1Yi.js @@ -1 +1 @@ -import{i as a,j as l,aG as V,S as L,aL as $,aB as W,U as O,R as A,V as h,aM as E,aN as y,Q as _,aO as H,Y as G,b5 as z,b6 as B,b7 as Z,b8 as K,aP as Q,aQ as U,aR as Y,Z as q}from"./index-C1Xuuz1Y.js";function J(e){const t=X(e),r=a.forwardRef((n,o)=>{const{children:s,...c}=n,i=a.Children.toArray(s),p=i.find(oe);if(p){const u=p.props.children,P=i.map(f=>f===p?a.Children.count(u)>1?a.Children.only(null):a.isValidElement(u)?u.props.children:null:f);return l.jsx(t,{...c,ref:o,children:a.isValidElement(u)?a.cloneElement(u,void 0,P):null})}return l.jsx(t,{...c,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function X(e){const t=a.forwardRef((r,n)=>{const{children:o,...s}=r;if(a.isValidElement(o)){const c=re(o),i=te(s,o.props);return o.type!==a.Fragment&&(i.ref=n?V(n,c):c),a.cloneElement(o,i)}return a.Children.count(o)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ee=Symbol("radix.slottable");function oe(e){return a.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],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...i)=>{const p=s(...i);return o(...i),p}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].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]=G(C,[y]),m=y(),[ne,d]=b(C),j=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:s,modal:c=!1}=e,i=m(t),p=a.useRef(null),[u,P]=a.useState(!1),[f,v]=L({prop:n,defaultProp:o??!1,onChange:s,caller:C});return l.jsx($,{...i,children:l.jsx(ne,{scope:t,contentId:W(),triggerRef:p,open:f,onOpenChange:v,onOpenToggle:a.useCallback(()=>v(x=>!x),[v]),hasCustomAnchor:u,onCustomAnchorAdd:a.useCallback(()=>P(!0),[]),onCustomAnchorRemove:a.useCallback(()=>P(!1),[]),modal:c,children:r})})};j.displayName=C;var w="PopoverAnchor",se=a.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=d(w,r),s=m(r),{onCustomAnchorAdd:c,onCustomAnchorRemove:i}=o;return a.useEffect(()=>(c(),()=>i()),[c,i]),l.jsx(E,{...s,...n,ref:t})});se.displayName=w;var S="PopoverTrigger",N=a.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=d(S,r),s=m(r),c=O(t,o.triggerRef),i=l.jsx(A.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,...s,children:i})});N.displayName=S;var R="PopoverPortal",[ae,ce]=b(R,{forceMount:void 0}),F=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,s=d(R,t);return l.jsx(ae,{scope:t,forceMount:r,children:l.jsx(_,{present:r||s.open,children:l.jsx(H,{asChild:!0,container:o,children:n})})})};F.displayName=R;var g="PopoverContent",D=a.forwardRef((e,t)=>{const r=ce(g,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,s=d(g,e.__scopePopover);return l.jsx(_,{present:n||s.open,children:s.modal?l.jsx(le,{...o,ref:t}):l.jsx(pe,{...o,ref:t})})});D.displayName=g;var ie=J("PopoverContent.RemoveScroll"),le=a.forwardRef((e,t)=>{const r=d(g,e.__scopePopover),n=a.useRef(null),o=O(t,n),s=a.useRef(!1);return a.useEffect(()=>{const c=n.current;if(c)return z(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(),s.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;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:h(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1})})})}),pe=a.forwardRef((e,t)=>{const r=d(g,e.__scopePopover),n=a.useRef(!1),o=a.useRef(!1);return l.jsx(I,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var c,i;(c=e.onCloseAutoFocus)==null||c.call(e,s),s.defaultPrevented||(n.current||(i=r.triggerRef.current)==null||i.focus(),s.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:s=>{var p,u;(p=e.onInteractOutside)==null||p.call(e,s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=s.target;((u=r.triggerRef.current)==null?void 0:u.contains(c))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),I=a.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEscapeKeyDown:i,onPointerDownOutside:p,onFocusOutside:u,onInteractOutside:P,...f}=e,v=d(g,r),x=m(r);return Z(),l.jsx(K,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:s,children:l.jsx(Q,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:P,onEscapeKeyDown:i,onPointerDownOutside:p,onFocusOutside:u,onDismiss:()=>v.onOpenChange(!1),children:l.jsx(U,{"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=a.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=d(T,r);return l.jsx(A.button,{type:"button",...n,ref:t,onClick:h(e.onClick,()=>o.onOpenChange(!1))})});ue.displayName=T;var de="PopoverArrow",fe=a.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=m(r);return l.jsx(Y,{...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=a.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{i as a,j as l,aG as V,S as L,aL as $,aB as W,U as O,R as A,V as h,aM as E,aN as y,Q as _,aO as H,Y as G,b5 as z,b6 as B,b7 as Z,b8 as K,aP as Q,aQ as U,aR as Y,Z as q}from"./index-DMjO_toh.js";function J(e){const t=X(e),r=a.forwardRef((n,o)=>{const{children:s,...c}=n,i=a.Children.toArray(s),p=i.find(oe);if(p){const u=p.props.children,P=i.map(f=>f===p?a.Children.count(u)>1?a.Children.only(null):a.isValidElement(u)?u.props.children:null:f);return l.jsx(t,{...c,ref:o,children:a.isValidElement(u)?a.cloneElement(u,void 0,P):null})}return l.jsx(t,{...c,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function X(e){const t=a.forwardRef((r,n)=>{const{children:o,...s}=r;if(a.isValidElement(o)){const c=re(o),i=te(s,o.props);return o.type!==a.Fragment&&(i.ref=n?V(n,c):c),a.cloneElement(o,i)}return a.Children.count(o)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ee=Symbol("radix.slottable");function oe(e){return a.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],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...i)=>{const p=s(...i);return o(...i),p}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].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]=G(C,[y]),m=y(),[ne,d]=b(C),j=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:s,modal:c=!1}=e,i=m(t),p=a.useRef(null),[u,P]=a.useState(!1),[f,v]=L({prop:n,defaultProp:o??!1,onChange:s,caller:C});return l.jsx($,{...i,children:l.jsx(ne,{scope:t,contentId:W(),triggerRef:p,open:f,onOpenChange:v,onOpenToggle:a.useCallback(()=>v(x=>!x),[v]),hasCustomAnchor:u,onCustomAnchorAdd:a.useCallback(()=>P(!0),[]),onCustomAnchorRemove:a.useCallback(()=>P(!1),[]),modal:c,children:r})})};j.displayName=C;var w="PopoverAnchor",se=a.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=d(w,r),s=m(r),{onCustomAnchorAdd:c,onCustomAnchorRemove:i}=o;return a.useEffect(()=>(c(),()=>i()),[c,i]),l.jsx(E,{...s,...n,ref:t})});se.displayName=w;var S="PopoverTrigger",N=a.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=d(S,r),s=m(r),c=O(t,o.triggerRef),i=l.jsx(A.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,...s,children:i})});N.displayName=S;var R="PopoverPortal",[ae,ce]=b(R,{forceMount:void 0}),F=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,s=d(R,t);return l.jsx(ae,{scope:t,forceMount:r,children:l.jsx(_,{present:r||s.open,children:l.jsx(H,{asChild:!0,container:o,children:n})})})};F.displayName=R;var g="PopoverContent",D=a.forwardRef((e,t)=>{const r=ce(g,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,s=d(g,e.__scopePopover);return l.jsx(_,{present:n||s.open,children:s.modal?l.jsx(le,{...o,ref:t}):l.jsx(pe,{...o,ref:t})})});D.displayName=g;var ie=J("PopoverContent.RemoveScroll"),le=a.forwardRef((e,t)=>{const r=d(g,e.__scopePopover),n=a.useRef(null),o=O(t,n),s=a.useRef(!1);return a.useEffect(()=>{const c=n.current;if(c)return z(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(),s.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;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:h(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1})})})}),pe=a.forwardRef((e,t)=>{const r=d(g,e.__scopePopover),n=a.useRef(!1),o=a.useRef(!1);return l.jsx(I,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var c,i;(c=e.onCloseAutoFocus)==null||c.call(e,s),s.defaultPrevented||(n.current||(i=r.triggerRef.current)==null||i.focus(),s.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:s=>{var p,u;(p=e.onInteractOutside)==null||p.call(e,s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=s.target;((u=r.triggerRef.current)==null?void 0:u.contains(c))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),I=a.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEscapeKeyDown:i,onPointerDownOutside:p,onFocusOutside:u,onInteractOutside:P,...f}=e,v=d(g,r),x=m(r);return Z(),l.jsx(K,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:s,children:l.jsx(Q,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:P,onEscapeKeyDown:i,onPointerDownOutside:p,onFocusOutside:u,onDismiss:()=>v.onOpenChange(!1),children:l.jsx(U,{"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=a.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=d(T,r);return l.jsx(A.button,{type:"button",...n,ref:t,onClick:h(e.onClick,()=>o.onOpenChange(!1))})});ue.displayName=T;var de="PopoverArrow",fe=a.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=m(r);return l.jsx(Y,{...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=a.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-zpJ52tLe.js b/assets/preferences-B1gzdJ4J.js similarity index 81% rename from assets/preferences-zpJ52tLe.js rename to assets/preferences-B1gzdJ4J.js index acbce75b57ae12bf7e8bb9af9279653561e6decb..253be04c5892843d3174a4ca382347552ee3379d 100644 --- a/assets/preferences-zpJ52tLe.js +++ b/assets/preferences-B1gzdJ4J.js @@ -1 +1 @@ -import{a as d,o as p,a9 as c,b as y,ab as f}from"./index-C1Xuuz1Y.js";import{u as _}from"./useMutation-Cb0wrKBq.js";const i={hide_closed_source_evals:!1};function E(){const{user:a}=d(),s=p(),{queryKey:r}=c.preferences(),o=y({...c.preferences(),enabled:!!a}),t=o.data??i,l=_({mutationFn:e=>a?f.updatePreferences(e):Promise.resolve(e),onMutate:async e=>{await s.cancelQueries({queryKey:r});const u=s.getQueryData(r)??i;return s.setQueryData(r,e),{previous:u}},onError:(e,u,n)=>{n&&s.setQueryData(r,n.previous)},onSuccess:e=>s.setQueryData(r,e)});return{preferences:t,canPersist:!!a,isLoading:o.isLoading,setHideClosedSourceEvals:e=>l.mutate({...t,hide_closed_source_evals:e})}}export{E as u}; +import{a as d,o as p,a9 as c,b as y,ab as f}from"./index-DMjO_toh.js";import{u as _}from"./useMutation-Db093XSk.js";const i={hide_closed_source_evals:!1};function E(){const{user:a}=d(),s=p(),{queryKey:r}=c.preferences(),o=y({...c.preferences(),enabled:!!a}),t=o.data??i,l=_({mutationFn:e=>a?f.updatePreferences(e):Promise.resolve(e),onMutate:async e=>{await s.cancelQueries({queryKey:r});const u=s.getQueryData(r)??i;return s.setQueryData(r,e),{previous:u}},onError:(e,u,n)=>{n&&s.setQueryData(r,n.previous)},onSuccess:e=>s.setQueryData(r,e)});return{preferences:t,canPersist:!!a,isLoading:o.isLoading,setHideClosedSourceEvals:e=>l.mutate({...t,hide_closed_source_evals:e})}}export{E as u}; diff --git a/assets/refresh-cw-Cq-FpYrg.js b/assets/refresh-cw-CeolKVxs.js similarity index 94% rename from assets/refresh-cw-Cq-FpYrg.js rename to assets/refresh-cw-CeolKVxs.js index b8b345647f48cb193f85e523e1d21bb119bf3f2d..48afbfa4d3046b841b8c7a9a670c6410d812eb1b 100644 --- a/assets/refresh-cw-Cq-FpYrg.js +++ b/assets/refresh-cw-CeolKVxs.js @@ -1,4 +1,4 @@ -import{d as e}from"./index-C1Xuuz1Y.js";/** +import{d as e}from"./index-DMjO_toh.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/researchTopic-BU8M-7Qo.js b/assets/researchTopic-hhMPs4g3.js similarity index 96% rename from assets/researchTopic-BU8M-7Qo.js rename to assets/researchTopic-hhMPs4g3.js index e0c089150db6322b1c6ede8e748675afc2f3d47b..57573e468d7d5114162e3066c3ebc7c44c2d552a 100644 --- a/assets/researchTopic-BU8M-7Qo.js +++ b/assets/researchTopic-hhMPs4g3.js @@ -1 +1 @@ -import{e as r,b as h,r as f,o as u,g as c,A as F,h as v,w as P}from"./index-C1Xuuz1Y.js";import{u as l}from"./useMutation-Cb0wrKBq.js";function w(e,s,{follows:t}){return Promise.all([t&&e.invalidateQueries({queryKey:f.follows(s).queryKey}),e.invalidateQueries({queryKey:P.following(s)}),e.invalidateQueries({queryKey:f.email(s).queryKey})])}function E(e=!0){var t;const s=(t=r())==null?void 0:t.user;return h({...f.follows(s==null?void 0:s.hf_subject),enabled:e&&!!s})}function L({onChanged:e,awaitRefresh:s=!1}={}){var o;const t=(o=r())==null?void 0:o.user,n=u();return l({mutationFn:({kind:i,entityId:a,follow:d})=>c.setFollow(i,a,d),onSuccess:async(i,a)=>{e==null||e(a);const d=w(n,t==null?void 0:t.hf_subject,{follows:!0});s&&await d}})}function _(e){const s=e.label??e.text;return s.charAt(0).toUpperCase()+s.slice(1)}function D(e){const s=_(e).toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,60);return s?`/topics/${e.id}-${s}`:`/topics/${e.id}`}function A(){var t;const e=(t=r())==null?void 0:t.user,s=u();return l({mutationFn:n=>c.followTopic(n),onSuccess:async()=>{I(),await p(s,e==null?void 0:e.hf_subject)}})}function R(){var n;const e=(n=r())==null?void 0:n.user,s=u(),t=f.topics(e==null?void 0:e.hf_subject).queryKey;return l({mutationFn:o=>c.reorderTopics(o.map(i=>i.id)),onMutate:async o=>{await s.cancelQueries({queryKey:t}),s.setQueryData(t,o)},onSuccess:o=>s.setQueryData(t,o),onError:()=>void s.invalidateQueries({queryKey:t})})}function G(){var t;const e=(t=r())==null?void 0:t.user,s=u();return l({mutationFn:({id:n,isPublic:o})=>c.setTopicPublic(n,o),onSuccess:()=>s.invalidateQueries({queryKey:f.topics(e==null?void 0:e.hf_subject).queryKey})})}const g="pwc:pending-topic-follow";function J(e){sessionStorage.setItem(g,String(e))}function Y(){const e=Number(sessionStorage.getItem(g));return Number.isInteger(e)&&e>0?e:null}function I(){sessionStorage.removeItem(g)}function $(){var t;const e=(t=r())==null?void 0:t.user,s=u();return l({mutationFn:async n=>{const o=await Promise.allSettled(n.map(a=>c.followTopic(a))),i=n.filter((a,d)=>o[d].status==="rejected");if(i.length)throw K(i),o.find(a=>a.status==="rejected").reason;b()},onSettled:()=>void p(s,e==null?void 0:e.hf_subject)})}const m="pwc:following-pending-topic-follows";function K(e){sessionStorage.setItem(m,JSON.stringify(e))}function C(){return JSON.parse(sessionStorage.getItem(m)??"[]")}function b(){sessionStorage.removeItem(m)}const q=e=>e.status==="pending"||e.status==="running";function W(e=!0,s=5e3){var n;const t=(n=r())==null?void 0:n.user;return h({...f.topics(t==null?void 0:t.hf_subject),enabled:e&&!!t,refetchInterval:o=>{var i;return(i=o.state.data)!=null&&i.some(q)?s:!1}})}function p(e,s){return w(e,s,{follows:!1}),e.invalidateQueries({queryKey:v.publicTopics}),e.invalidateQueries({queryKey:f.topics(s).queryKey})}function M(e){var n;const s=(n=r())==null?void 0:n.user,t=u();return l({mutationFn:({id:o,text:i})=>o===void 0?c.addTopic(i):c.updateTopic(o,i),onSuccess:async()=>{T(),await p(t,s==null?void 0:s.hf_subject)},onError:o=>{N(o)&&T()}})}const N=e=>e instanceof F&&e.status===409;function k(){var t;const e=(t=r())==null?void 0:t.user,s=u();return l({mutationFn:async n=>{const i=(await Promise.allSettled(n.map(a=>c.removeTopic(a)))).find(a=>a.status==="rejected");if(i)throw i.reason},onSettled:()=>void p(s,e==null?void 0:e.hf_subject)})}const y="pwc:following-pending-topic";function x(e){sessionStorage.setItem(y,e)}function z(){return sessionStorage.getItem(y)}function T(){sessionStorage.removeItem(y)}function B(){var t;const e=(t=r())==null?void 0:t.user,s=u();return l({mutationFn:async n=>{const i=(await Promise.allSettled(n.map(a=>c.setFollow(a.kind,a.id,a.follow??!0)))).find(a=>a.status==="rejected");if(i)throw i.reason},onSuccess:()=>O(),onSettled:()=>void w(s,e==null?void 0:e.hf_subject,{follows:!0})})}const S="pwc:following-pending-follows";function U(e){sessionStorage.setItem(S,JSON.stringify(e))}function H(){return JSON.parse(sessionStorage.getItem(S)??"[]")}function O(){sessionStorage.removeItem(S)}export{D as a,k as b,$ as c,K as d,W as e,E as f,M as g,B as h,R as i,G as j,N as k,x as l,U as m,q as n,z as o,H as p,C as q,Y as r,J as s,_ as t,A as u,T as v,L as w}; +import{e as r,b as h,r as f,o as u,g as c,A as F,h as v,w as P}from"./index-DMjO_toh.js";import{u as l}from"./useMutation-Db093XSk.js";function w(e,s,{follows:t}){return Promise.all([t&&e.invalidateQueries({queryKey:f.follows(s).queryKey}),e.invalidateQueries({queryKey:P.following(s)}),e.invalidateQueries({queryKey:f.email(s).queryKey})])}function E(e=!0){var t;const s=(t=r())==null?void 0:t.user;return h({...f.follows(s==null?void 0:s.hf_subject),enabled:e&&!!s})}function L({onChanged:e,awaitRefresh:s=!1}={}){var o;const t=(o=r())==null?void 0:o.user,n=u();return l({mutationFn:({kind:i,entityId:a,follow:d})=>c.setFollow(i,a,d),onSuccess:async(i,a)=>{e==null||e(a);const d=w(n,t==null?void 0:t.hf_subject,{follows:!0});s&&await d}})}function _(e){const s=e.label??e.text;return s.charAt(0).toUpperCase()+s.slice(1)}function D(e){const s=_(e).toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,60);return s?`/topics/${e.id}-${s}`:`/topics/${e.id}`}function A(){var t;const e=(t=r())==null?void 0:t.user,s=u();return l({mutationFn:n=>c.followTopic(n),onSuccess:async()=>{I(),await p(s,e==null?void 0:e.hf_subject)}})}function R(){var n;const e=(n=r())==null?void 0:n.user,s=u(),t=f.topics(e==null?void 0:e.hf_subject).queryKey;return l({mutationFn:o=>c.reorderTopics(o.map(i=>i.id)),onMutate:async o=>{await s.cancelQueries({queryKey:t}),s.setQueryData(t,o)},onSuccess:o=>s.setQueryData(t,o),onError:()=>void s.invalidateQueries({queryKey:t})})}function G(){var t;const e=(t=r())==null?void 0:t.user,s=u();return l({mutationFn:({id:n,isPublic:o})=>c.setTopicPublic(n,o),onSuccess:()=>s.invalidateQueries({queryKey:f.topics(e==null?void 0:e.hf_subject).queryKey})})}const g="pwc:pending-topic-follow";function J(e){sessionStorage.setItem(g,String(e))}function Y(){const e=Number(sessionStorage.getItem(g));return Number.isInteger(e)&&e>0?e:null}function I(){sessionStorage.removeItem(g)}function $(){var t;const e=(t=r())==null?void 0:t.user,s=u();return l({mutationFn:async n=>{const o=await Promise.allSettled(n.map(a=>c.followTopic(a))),i=n.filter((a,d)=>o[d].status==="rejected");if(i.length)throw K(i),o.find(a=>a.status==="rejected").reason;b()},onSettled:()=>void p(s,e==null?void 0:e.hf_subject)})}const m="pwc:following-pending-topic-follows";function K(e){sessionStorage.setItem(m,JSON.stringify(e))}function C(){return JSON.parse(sessionStorage.getItem(m)??"[]")}function b(){sessionStorage.removeItem(m)}const q=e=>e.status==="pending"||e.status==="running";function W(e=!0,s=5e3){var n;const t=(n=r())==null?void 0:n.user;return h({...f.topics(t==null?void 0:t.hf_subject),enabled:e&&!!t,refetchInterval:o=>{var i;return(i=o.state.data)!=null&&i.some(q)?s:!1}})}function p(e,s){return w(e,s,{follows:!1}),e.invalidateQueries({queryKey:v.publicTopics}),e.invalidateQueries({queryKey:f.topics(s).queryKey})}function M(e){var n;const s=(n=r())==null?void 0:n.user,t=u();return l({mutationFn:({id:o,text:i})=>o===void 0?c.addTopic(i):c.updateTopic(o,i),onSuccess:async()=>{T(),await p(t,s==null?void 0:s.hf_subject)},onError:o=>{N(o)&&T()}})}const N=e=>e instanceof F&&e.status===409;function k(){var t;const e=(t=r())==null?void 0:t.user,s=u();return l({mutationFn:async n=>{const i=(await Promise.allSettled(n.map(a=>c.removeTopic(a)))).find(a=>a.status==="rejected");if(i)throw i.reason},onSettled:()=>void p(s,e==null?void 0:e.hf_subject)})}const y="pwc:following-pending-topic";function x(e){sessionStorage.setItem(y,e)}function z(){return sessionStorage.getItem(y)}function T(){sessionStorage.removeItem(y)}function B(){var t;const e=(t=r())==null?void 0:t.user,s=u();return l({mutationFn:async n=>{const i=(await Promise.allSettled(n.map(a=>c.setFollow(a.kind,a.id,a.follow??!0)))).find(a=>a.status==="rejected");if(i)throw i.reason},onSuccess:()=>O(),onSettled:()=>void w(s,e==null?void 0:e.hf_subject,{follows:!0})})}const S="pwc:following-pending-follows";function U(e){sessionStorage.setItem(S,JSON.stringify(e))}function H(){return JSON.parse(sessionStorage.getItem(S)??"[]")}function O(){sessionStorage.removeItem(S)}export{D as a,k as b,$ as c,K as d,W as e,E as f,M as g,B as h,R as i,G as j,N as k,x as l,U as m,q as n,z as o,H as p,C as q,Y as r,J as s,_ as t,A as u,T as v,L as w}; diff --git a/assets/savedPapersAuth-qhoxX36l.js b/assets/savedPapersAuth-DWaz2psA.js similarity index 75% rename from assets/savedPapersAuth-qhoxX36l.js rename to assets/savedPapersAuth-DWaz2psA.js index 656828daedb82427faea3e817d09e1323e4c19af..42246109dab9abe48135b337453cda3097bc8592 100644 --- a/assets/savedPapersAuth-qhoxX36l.js +++ b/assets/savedPapersAuth-DWaz2psA.js @@ -1 +1 @@ -import{l as a}from"./index-C1Xuuz1Y.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{l as a}from"./index-DMjO_toh.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-YolWz-tq.js b/assets/search-D6uSAb1U.js similarity index 87% rename from assets/search-YolWz-tq.js rename to assets/search-D6uSAb1U.js index 6a30447498ce4507ca5e379a3a663b9542b0d462..339dc44cdd8b11a0304867346d1772fccbd3227c 100644 --- a/assets/search-YolWz-tq.js +++ b/assets/search-D6uSAb1U.js @@ -1,4 +1,4 @@ -import{d as e}from"./index-C1Xuuz1Y.js";/** +import{d as e}from"./index-DMjO_toh.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/searchable-select-DPAXOMOd.js b/assets/searchable-select-DscHfpAa.js similarity index 98% rename from assets/searchable-select-DPAXOMOd.js rename to assets/searchable-select-DscHfpAa.js index 4fe84faf02d493d2b9826a3425c6aaf0a5ebec4b..ab4987a3e921843469db5ec1e374db0299d85d66 100644 --- a/assets/searchable-select-DPAXOMOd.js +++ b/assets/searchable-select-DscHfpAa.js @@ -1,4 +1,4 @@ -import{d as Ae,i as a,aB as G,R as L,aC as Me,aD as De,aE as $e,aF as Le,aG as H,j as p,Z as D,b as Fe,C as Pe}from"./index-C1Xuuz1Y.js";import{B as Ke}from"./button-DMLWlhJJ.js";import{P as qe,a as Be,b as Ve}from"./popover-C1A8cBwB.js";import"./dialog-CCU_33Ju.js";import{S as Ue}from"./search-YolWz-tq.js";import{L as Ge}from"./loader-circle-tzO1dF92.js";/** +import{d as Ae,i as a,aB as G,R as L,aC as Me,aD as De,aE as $e,aF as Le,aG as H,j as p,Z as D,b as Fe,C as Pe}from"./index-DMjO_toh.js";import{B as Ke}from"./button-BGphIht2.js";import{P as qe,a as Be,b as Ve}from"./popover-MF6JD1Yi.js";import"./dialog-C-drkhvX.js";import{S as Ue}from"./search-D6uSAb1U.js";import{L as Ge}from"./loader-circle-gyMLnt4Y.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/share-2-Zzb236oj.js b/assets/share-2-BO6l1rLC.js similarity index 91% rename from assets/share-2-Zzb236oj.js rename to assets/share-2-BO6l1rLC.js index 9f8ddd69a45131c3daaa49ac76450dc5dd3dde24..6afb9deb471c4d0884cfcd4e6f91d06aa593911a 100644 --- a/assets/share-2-Zzb236oj.js +++ b/assets/share-2-BO6l1rLC.js @@ -1,4 +1,4 @@ -import{d as c}from"./index-C1Xuuz1Y.js";/** +import{d as c}from"./index-DMjO_toh.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/skeleton-D8hFkZOU.js b/assets/skeleton-DiGWALrs.js similarity index 62% rename from assets/skeleton-D8hFkZOU.js rename to assets/skeleton-DiGWALrs.js index 818dadf3f46b92959f364b03c70fa131b2d539ea..97420bc18f37909c4cd560af76e9f738e0aa80e3 100644 --- a/assets/skeleton-D8hFkZOU.js +++ b/assets/skeleton-DiGWALrs.js @@ -1 +1 @@ -import{j as t,Z as n}from"./index-C1Xuuz1Y.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,Z as n}from"./index-DMjO_toh.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/submissions-DcU5ZqyQ.js b/assets/submissions-C02Zu9zt.js similarity index 99% rename from assets/submissions-DcU5ZqyQ.js rename to assets/submissions-C02Zu9zt.js index 727e2fa8a485fa87f608289b8879d0910c1e0733..fb1f425a600da87b9971b1393a5af75c86f74c3e 100644 --- a/assets/submissions-DcU5ZqyQ.js +++ b/assets/submissions-C02Zu9zt.js @@ -1 +1 @@ -import{av as Fe}from"./index-C1Xuuz1Y.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 l=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 l.undefined;case"string":return l.string;case"number":return Number.isNaN(s)?l.nan:l.number;case"boolean":return l.boolean;case"function":return l.function;case"bigint":return l.bigint;case"symbol":return l.symbol;case"object":return Array.isArray(s)?l.array:s===null?l.null:s.then&&typeof s.then=="function"&&s.catch&&typeof s.catch=="function"?l.promise:typeof Map<"u"&&s instanceof Map?l.map:typeof Set<"u"&&s instanceof Set?l.set:typeof Date<"u"&&s instanceof Date?l.date:l.object;default:return l.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===l.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 R.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 j extends y{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==l.string){const n=this._getOrReturnCtx(e);return c(n,{code:d.invalid_type,expected:l.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 j({...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 j({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new j({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new j({...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 j({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)!==l.number){const n=this._getOrReturnCtx(e);return c(n,{code:d.invalid_type,expected:l.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)!==l.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:l.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)!==l.boolean){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:l.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)!==l.date){const n=this._getOrReturnCtx(e);return c(n,{code:d.invalid_type,expected:l.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)!==l.symbol){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:l.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)!==l.undefined){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:l.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)!==l.null){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:l.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:l.never,received:t.parsedType}),m}}P.create=s=>new P({typeName:_.ZodNever,...g(s)});class Ze extends y{_parse(e){if(this._getType(e)!==l.undefined){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:l.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!==l.array)return c(t,{code:d.invalid_type,expected:l.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]=R.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 R?R.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)!==l.object){const p=this._getOrReturnCtx(e);return c(p,{code:d.invalid_type,expected:l.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 k=n[p],W=a.data[p];f.push({key:{status:"valid",value:p},value:k._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 k of o)f.push({key:{status:"valid",value:k},value:{status:"valid",value:a.data[k]}});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 k of o){const W=a.data[k];f.push({key:{status:"valid",value:k},value:p._parse(new E(a,W,a.path,k)),alwaysSet:k in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const p=[];for(const k of f){const W=await k.key,qe=await k.value;p.push({key:W,value:qe,alwaysSet:k.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 R;)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},k=f._parseSync({data:t.data,path:t.path,parent:p});if(k.status==="valid")return k;k.status==="dirty"&&!n&&(n={result:k,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 R?[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!==l.object)return c(t,{code:d.invalid_type,expected:l.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===l.object&&r===l.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===l.array&&r===l.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!==l.array)return c(r,{code:d.invalid_type,expected:l.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!==l.object)return c(r,{code:d.invalid_type,expected:l.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:j.create(),valueType:e,typeName:_.ZodRecord,...g(t)})}}class je 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!==l.map)return c(r,{code:d.invalid_type,expected:l.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,k=await f.value;if(p.status==="aborted"||k.status==="aborted")return m;(p.status==="dirty"||k.status==="dirty")&&t.dirty(),o.set(p.value,k.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const f of i){const p=f.key,k=f.value;if(p.status==="aborted"||k.status==="aborted")return m;(p.status==="dirty"||k.status==="dirty")&&t.dirty(),o.set(p.value,k.value)}return{status:t.value,value:o}}}}je.create=(s,e,t)=>new je({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!==l.set)return c(r,{code:d.invalid_type,expected:l.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 k of f){if(k.status==="aborted")return m;k.status==="dirty"&&t.dirty(),p.add(k.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!==l.string&&r.parsedType!==l.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!==l.promise&&t.common.async===!1)return c(t,{code:d.invalid_type,expected:l.promise,received:t.parsedType}),m;const r=t.parsedType===l.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 R extends y{_parse(e){return this._getType(e)===l.undefined?O(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}R.create=(s,e)=>new R({innerType:s,typeName:_.ZodOptional,...g(e)});class D extends y{_parse(e){return this._getType(e)===l.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===l.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 Re extends y{_parse(e){if(this._getType(e)!==l.nan){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:l.nan,received:r.parsedType}),m}return{status:"valid",value:e.data}}}Re.create=s=>new Re({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 u=j.create,b=q.create,de=he.create,gt=me.create;P.create;const T=N.create,x=w.create,Ve=ee.create,Le=ke.create;te.create;z.create;const De=se.create,Q=re.create,ve=V.create;ae.create;R.create;D.create;const A=De(gt()),we=x({id:b(),name:u(),slug:u().optional()}).passthrough(),ce=x({url:u(),is_official:de()}),xe=x({task_id:b(),dataset_id:b(),model_name:u().nullish(),harness:u().nullish(),methodology:u().nullish(),metrics:De(Ve([u(),b()])),uses_additional_data:de().optional(),is_open:de().optional(),best_rank:b().nullish(),best_metric:u().nullish(),evaluated_on:u().nullish(),external_source_url:u().nullish(),num_parameters:b().nullish(),hf_model_url:u().nullish()}).passthrough(),yt=xe.partial().extend({id:b().optional()}),vt=Le("op",[x({op:Q("create"),data:xe}),x({op:Q("update"),evaluation_id:b(),data:xe}),x({op:Q("delete"),evaluation_id:b()})]),Ie=x({hf_models:T(u()),hf_datasets:T(u()),hf_spaces:T(u())}),Te=x({file_name:u(),mime_type:u(),data_url:u().optional(),url:u().optional()}),F=x({name:u(),description:u().optional()}),xt=F.extend({image:Te.optional(),image_credit:u().optional(),parent_id:b().optional(),area_id:b().optional(),keywords:u().optional()}),kt=F.extend({image:Te.optional(),image_credit:u().optional(),source_paper_id:b().optional(),source_url:u().optional(),source_title:u().optional()}),bt=Ve([x({benchmark:u(),task:u(),description:u()}),F.extend({description:u(),task_ids:T(b()),full_name:u().optional(),url:u().optional(),hf_url:u().optional(),paper_url:u().optional(),license_name:u().optional(),license_url:u().optional()})]),wt=F.extend({description:u(),direction:ve(["higher_is_better","lower_is_better"]),full_name:u().optional(),scale:u().optional(),task_id:b(),dataset_id:b()}),Tt=F.extend({short_name:u().optional(),venue:u().optional(),location:u().optional(),url:u(),year:b(),start_date:u().optional(),end_date:u().optional()}),St=F.extend({hf_slug:u().optional(),website_url:u().optional(),image:Te.optional()}),Ct=x({id:b(),paper_id:b().nullable(),paper:x({title:u(),arxiv_id:u().nullish()}).nullish(),hf_username:u(),hf_subject:u().nullish(),is_author:de(),status:ve(["pending","approved","rejected"]),applied_payload:A.nullish(),conflict_payload:A.nullish(),result_entity_type:u().nullish(),result_entity_id:u().nullish(),admin_note:u().nullish(),user_review_reason:u().nullish(),reviewed_by:u().nullish(),reviewed_by_kind:ve(["human","codex","auto"]).nullish(),catalog_event_id:u().nullish(),review_evidence:A.nullish(),created_at:u(),updated_at:u(),reviewed_at:u().nullish()});function S(s,e,t){return Ct.extend({edit_type:Q(s),proposed_payload:e,current_payload:t.nullish()})}const Ot=S("tasks",x({task_ids:T(b())}),x({tasks:T(we)})),Nt=S("methods",x({method_ids:T(b())}),x({methods:T(we)})),At=S("evaluations",x({operations:T(vt)}),x({evaluations:T(yt)})),Et=S("repositories",x({repositories:T(ce)}),x({repositories:T(ce)})),Zt=S("project_pages",x({project_pages:T(ce)}),x({project_pages:T(ce)})),jt=S("source_url",x({source_url:u()}),x({source_url:u().nullish()})),Rt=S("hf_artifacts",Ie,Ie),It=S("x_threads",x({x_threads:T(u())}),x({x_threads:T(x({url:u()}))})),$t=S("organizations",x({organization_ids:T(b())}),x({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",x({title:u().optional(),source_url:u(),authors:T(u()),date_published:u().optional(),abstract:u().optional()}),A),Ue=Le("edit_type",[Ot,Nt,At,Et,Zt,jt,Rt,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=x({count:b(),results:T(Ue),status_counts:x({pending:b(),approved:b(),rejected:b()})});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{av as Fe}from"./index-DMjO_toh.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 l=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 l.undefined;case"string":return l.string;case"number":return Number.isNaN(s)?l.nan:l.number;case"boolean":return l.boolean;case"function":return l.function;case"bigint":return l.bigint;case"symbol":return l.symbol;case"object":return Array.isArray(s)?l.array:s===null?l.null:s.then&&typeof s.then=="function"&&s.catch&&typeof s.catch=="function"?l.promise:typeof Map<"u"&&s instanceof Map?l.map:typeof Set<"u"&&s instanceof Set?l.set:typeof Date<"u"&&s instanceof Date?l.date:l.object;default:return l.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===l.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 R.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 j extends y{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==l.string){const n=this._getOrReturnCtx(e);return c(n,{code:d.invalid_type,expected:l.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 j({...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 j({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new j({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new j({...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 j({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)!==l.number){const n=this._getOrReturnCtx(e);return c(n,{code:d.invalid_type,expected:l.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)!==l.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:l.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)!==l.boolean){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:l.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)!==l.date){const n=this._getOrReturnCtx(e);return c(n,{code:d.invalid_type,expected:l.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)!==l.symbol){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:l.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)!==l.undefined){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:l.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)!==l.null){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:l.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:l.never,received:t.parsedType}),m}}P.create=s=>new P({typeName:_.ZodNever,...g(s)});class Ze extends y{_parse(e){if(this._getType(e)!==l.undefined){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:l.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!==l.array)return c(t,{code:d.invalid_type,expected:l.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]=R.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 R?R.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)!==l.object){const p=this._getOrReturnCtx(e);return c(p,{code:d.invalid_type,expected:l.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 k=n[p],W=a.data[p];f.push({key:{status:"valid",value:p},value:k._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 k of o)f.push({key:{status:"valid",value:k},value:{status:"valid",value:a.data[k]}});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 k of o){const W=a.data[k];f.push({key:{status:"valid",value:k},value:p._parse(new E(a,W,a.path,k)),alwaysSet:k in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const p=[];for(const k of f){const W=await k.key,qe=await k.value;p.push({key:W,value:qe,alwaysSet:k.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 R;)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},k=f._parseSync({data:t.data,path:t.path,parent:p});if(k.status==="valid")return k;k.status==="dirty"&&!n&&(n={result:k,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 R?[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!==l.object)return c(t,{code:d.invalid_type,expected:l.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===l.object&&r===l.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===l.array&&r===l.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!==l.array)return c(r,{code:d.invalid_type,expected:l.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!==l.object)return c(r,{code:d.invalid_type,expected:l.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:j.create(),valueType:e,typeName:_.ZodRecord,...g(t)})}}class je 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!==l.map)return c(r,{code:d.invalid_type,expected:l.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,k=await f.value;if(p.status==="aborted"||k.status==="aborted")return m;(p.status==="dirty"||k.status==="dirty")&&t.dirty(),o.set(p.value,k.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const f of i){const p=f.key,k=f.value;if(p.status==="aborted"||k.status==="aborted")return m;(p.status==="dirty"||k.status==="dirty")&&t.dirty(),o.set(p.value,k.value)}return{status:t.value,value:o}}}}je.create=(s,e,t)=>new je({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!==l.set)return c(r,{code:d.invalid_type,expected:l.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 k of f){if(k.status==="aborted")return m;k.status==="dirty"&&t.dirty(),p.add(k.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!==l.string&&r.parsedType!==l.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!==l.promise&&t.common.async===!1)return c(t,{code:d.invalid_type,expected:l.promise,received:t.parsedType}),m;const r=t.parsedType===l.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 R extends y{_parse(e){return this._getType(e)===l.undefined?O(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}R.create=(s,e)=>new R({innerType:s,typeName:_.ZodOptional,...g(e)});class D extends y{_parse(e){return this._getType(e)===l.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===l.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 Re extends y{_parse(e){if(this._getType(e)!==l.nan){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:l.nan,received:r.parsedType}),m}return{status:"valid",value:e.data}}}Re.create=s=>new Re({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 u=j.create,b=q.create,de=he.create,gt=me.create;P.create;const T=N.create,x=w.create,Ve=ee.create,Le=ke.create;te.create;z.create;const De=se.create,Q=re.create,ve=V.create;ae.create;R.create;D.create;const A=De(gt()),we=x({id:b(),name:u(),slug:u().optional()}).passthrough(),ce=x({url:u(),is_official:de()}),xe=x({task_id:b(),dataset_id:b(),model_name:u().nullish(),harness:u().nullish(),methodology:u().nullish(),metrics:De(Ve([u(),b()])),uses_additional_data:de().optional(),is_open:de().optional(),best_rank:b().nullish(),best_metric:u().nullish(),evaluated_on:u().nullish(),external_source_url:u().nullish(),num_parameters:b().nullish(),hf_model_url:u().nullish()}).passthrough(),yt=xe.partial().extend({id:b().optional()}),vt=Le("op",[x({op:Q("create"),data:xe}),x({op:Q("update"),evaluation_id:b(),data:xe}),x({op:Q("delete"),evaluation_id:b()})]),Ie=x({hf_models:T(u()),hf_datasets:T(u()),hf_spaces:T(u())}),Te=x({file_name:u(),mime_type:u(),data_url:u().optional(),url:u().optional()}),F=x({name:u(),description:u().optional()}),xt=F.extend({image:Te.optional(),image_credit:u().optional(),parent_id:b().optional(),area_id:b().optional(),keywords:u().optional()}),kt=F.extend({image:Te.optional(),image_credit:u().optional(),source_paper_id:b().optional(),source_url:u().optional(),source_title:u().optional()}),bt=Ve([x({benchmark:u(),task:u(),description:u()}),F.extend({description:u(),task_ids:T(b()),full_name:u().optional(),url:u().optional(),hf_url:u().optional(),paper_url:u().optional(),license_name:u().optional(),license_url:u().optional()})]),wt=F.extend({description:u(),direction:ve(["higher_is_better","lower_is_better"]),full_name:u().optional(),scale:u().optional(),task_id:b(),dataset_id:b()}),Tt=F.extend({short_name:u().optional(),venue:u().optional(),location:u().optional(),url:u(),year:b(),start_date:u().optional(),end_date:u().optional()}),St=F.extend({hf_slug:u().optional(),website_url:u().optional(),image:Te.optional()}),Ct=x({id:b(),paper_id:b().nullable(),paper:x({title:u(),arxiv_id:u().nullish()}).nullish(),hf_username:u(),hf_subject:u().nullish(),is_author:de(),status:ve(["pending","approved","rejected"]),applied_payload:A.nullish(),conflict_payload:A.nullish(),result_entity_type:u().nullish(),result_entity_id:u().nullish(),admin_note:u().nullish(),user_review_reason:u().nullish(),reviewed_by:u().nullish(),reviewed_by_kind:ve(["human","codex","auto"]).nullish(),catalog_event_id:u().nullish(),review_evidence:A.nullish(),created_at:u(),updated_at:u(),reviewed_at:u().nullish()});function S(s,e,t){return Ct.extend({edit_type:Q(s),proposed_payload:e,current_payload:t.nullish()})}const Ot=S("tasks",x({task_ids:T(b())}),x({tasks:T(we)})),Nt=S("methods",x({method_ids:T(b())}),x({methods:T(we)})),At=S("evaluations",x({operations:T(vt)}),x({evaluations:T(yt)})),Et=S("repositories",x({repositories:T(ce)}),x({repositories:T(ce)})),Zt=S("project_pages",x({project_pages:T(ce)}),x({project_pages:T(ce)})),jt=S("source_url",x({source_url:u()}),x({source_url:u().nullish()})),Rt=S("hf_artifacts",Ie,Ie),It=S("x_threads",x({x_threads:T(u())}),x({x_threads:T(x({url:u()}))})),$t=S("organizations",x({organization_ids:T(b())}),x({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",x({title:u().optional(),source_url:u(),authors:T(u()),date_published:u().optional(),abstract:u().optional()}),A),Ue=Le("edit_type",[Ot,Nt,At,Et,Zt,jt,Rt,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=x({count:b(),results:T(Ue),status_counts:x({pending:b(),approved:b(),rejected:b()})});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-BrihALZS.js b/assets/switch-t5rMaesI.js similarity index 94% rename from assets/switch-BrihALZS.js rename to assets/switch-t5rMaesI.js index 4ae0f4e592abe7600ce9f56435045594ffea73e5..83aa65c87095dd416bd98705b45199f1e823c0a1 100644 --- a/assets/switch-BrihALZS.js +++ b/assets/switch-t5rMaesI.js @@ -1 +1 @@ -import{i as s,U as C,S as I,j as a,R as y,V as M,W as H,Y as U,Z as x}from"./index-C1Xuuz1Y.js";import{u as A}from"./index-CNkd3QcT.js";var b="Switch",[q]=U(b),[z,L]=q(b),P=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]=I({prop:r,defaultProp:m??!1,onChange:v,caller:b});return a.jsxs(z,{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(T=>!T),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%)"}})]})});P.displayName=b;var R="SwitchThumb",E=s.forwardRef((t,o)=>{const{__scopeSwitch:e,...n}=t,r=L(R,e);return a.jsx(y.span,{"data-state":j(r.checked),"data-disabled":r.disabled?"":void 0,...n,ref:o})});E.displayName=R;var O="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=O;function j(t){return t?"checked":"unchecked"}var _=P,W=E;const D=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(W,{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")})}));D.displayName=_.displayName;export{D as S}; +import{i as s,U as C,S as I,j as a,R as y,V as M,W as H,Y as U,Z as x}from"./index-DMjO_toh.js";import{u as A}from"./index-BgYoYvBg.js";var b="Switch",[q]=U(b),[z,L]=q(b),P=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]=I({prop:r,defaultProp:m??!1,onChange:v,caller:b});return a.jsxs(z,{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(T=>!T),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%)"}})]})});P.displayName=b;var R="SwitchThumb",E=s.forwardRef((t,o)=>{const{__scopeSwitch:e,...n}=t,r=L(R,e);return a.jsx(y.span,{"data-state":j(r.checked),"data-disabled":r.disabled?"":void 0,...n,ref:o})});E.displayName=R;var O="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=O;function j(t){return t?"checked":"unchecked"}var _=P,W=E;const D=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(W,{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")})}));D.displayName=_.displayName;export{D as S}; diff --git a/assets/taskIcons-DurKAT-u.js b/assets/taskIcons-BeSRODUD.js similarity index 99% rename from assets/taskIcons-DurKAT-u.js rename to assets/taskIcons-BeSRODUD.js index dbb64e3468e262f44f9ce3b66360c434c179a63b..9117ab568ade5a236de4fcca20f4c2619204e74a 100644 --- a/assets/taskIcons-DurKAT-u.js +++ b/assets/taskIcons-BeSRODUD.js @@ -1,4 +1,4 @@ -import{d as e}from"./index-C1Xuuz1Y.js";import{S as h}from"./search-YolWz-tq.js";import{I as c,T as i}from"./triangle-alert-DGQdZ5Fh.js";import{S as k}from"./share-2-Zzb236oj.js";import{T as d}from"./trending-up-Dmgkbga2.js";import{M as n}from"./moon-DB_mnxXr.js";import{T as p}from"./thumbs-up-Ys3ImX4j.js";import{D as o}from"./database-rIkpN7y5.js";import{L as r}from"./link-2-D52PZ3mH.js";import{T as s}from"./trophy-B0LpQA62.js";import{F as l}from"./file-text-BlXclTHj.js";import{A as M}from"./activity-BCn9520W.js";import{G as m}from"./globe-D69lYFoB.js";/** +import{d as e}from"./index-DMjO_toh.js";import{S as h}from"./search-D6uSAb1U.js";import{I as c,T as i}from"./triangle-alert-CcBqLaPP.js";import{S as k}from"./share-2-BO6l1rLC.js";import{T as d}from"./trending-up-DRI2hJAf.js";import{M as n}from"./moon-CIGKI3Uq.js";import{T as p}from"./thumbs-up-CZ7BdM1B.js";import{D as o}from"./database-UPYeEFxO.js";import{L as r}from"./link-2-n6VIX0kb.js";import{T as s}from"./trophy-C75hq_xI.js";import{F as l}from"./file-text-D6OyOvvT.js";import{A as M}from"./activity-CJ9AQ3mn.js";import{G as m}from"./globe-C6Up_LzV.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/textarea--CThIdhF.js b/assets/textarea-nRN8oSDz.js similarity index 86% rename from assets/textarea--CThIdhF.js rename to assets/textarea-nRN8oSDz.js index 7e1fd33ebb2deb04a46182ad5c9d003ce088ea78..fece42d69edbbc0f78844ff0c5b6d51e8b7d99f1 100644 --- a/assets/textarea--CThIdhF.js +++ b/assets/textarea-nRN8oSDz.js @@ -1 +1 @@ -import{i as s,j as a,Z as i}from"./index-C1Xuuz1Y.js";const t=s.forwardRef(({className:e,...r},o)=>a.jsx("textarea",{className:i("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}));t.displayName="Textarea";export{t as T}; +import{i as s,j as a,Z as i}from"./index-DMjO_toh.js";const t=s.forwardRef(({className:e,...r},o)=>a.jsx("textarea",{className:i("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}));t.displayName="Textarea";export{t as T}; diff --git a/assets/thumbs-up-Ys3ImX4j.js b/assets/thumbs-up-CZ7BdM1B.js similarity index 90% rename from assets/thumbs-up-Ys3ImX4j.js rename to assets/thumbs-up-CZ7BdM1B.js index 17f17ed3abdd4e6b0ce389962be5f8a3cebc6288..6dd5e2eb439db420f129b81ec581ec848c6b4c1f 100644 --- a/assets/thumbs-up-Ys3ImX4j.js +++ b/assets/thumbs-up-CZ7BdM1B.js @@ -1,4 +1,4 @@ -import{d as a}from"./index-C1Xuuz1Y.js";/** +import{d as a}from"./index-DMjO_toh.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/transform-btCQtWTl.js b/assets/transform-CXoeFMaW.js similarity index 99% rename from assets/transform-btCQtWTl.js rename to assets/transform-CXoeFMaW.js index 65af7995bdbd986d093fe0ffecdc5d71798adddc..062de4c727a8499c219b4b74234bc5503efd0c3d 100644 --- a/assets/transform-btCQtWTl.js +++ b/assets/transform-CXoeFMaW.js @@ -1 +1 @@ -import{al as _}from"./index-C1Xuuz1Y.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{al as _}from"./index-DMjO_toh.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-Dmgkbga2.js b/assets/trending-up-DRI2hJAf.js similarity index 88% rename from assets/trending-up-Dmgkbga2.js rename to assets/trending-up-DRI2hJAf.js index a8eede1043dee568eca152209a4a342f82373df4..7aaa9972f06b6fd99fa87447c59361302a5df3f2 100644 --- a/assets/trending-up-Dmgkbga2.js +++ b/assets/trending-up-DRI2hJAf.js @@ -1,4 +1,4 @@ -import{d as e}from"./index-C1Xuuz1Y.js";/** +import{d as e}from"./index-DMjO_toh.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/triangle-alert-DGQdZ5Fh.js b/assets/triangle-alert-CcBqLaPP.js similarity index 94% rename from assets/triangle-alert-DGQdZ5Fh.js rename to assets/triangle-alert-CcBqLaPP.js index 2e6ca87044cf293f910beea436ee344a13263202..b332d36f4792eb1eb8307956a487e297958a8cde 100644 --- a/assets/triangle-alert-DGQdZ5Fh.js +++ b/assets/triangle-alert-CcBqLaPP.js @@ -1,4 +1,4 @@ -import{d as e}from"./index-C1Xuuz1Y.js";/** +import{d as e}from"./index-DMjO_toh.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/trophy-B0LpQA62.js b/assets/trophy-C75hq_xI.js similarity index 93% rename from assets/trophy-B0LpQA62.js rename to assets/trophy-C75hq_xI.js index 7c1472a2364f5c5617a83ab1cadb78da21d4afc2..5627d5e844daceb4bd056680143e49079a44df69 100644 --- a/assets/trophy-B0LpQA62.js +++ b/assets/trophy-C75hq_xI.js @@ -1,4 +1,4 @@ -import{d as a}from"./index-C1Xuuz1Y.js";/** +import{d as a}from"./index-DMjO_toh.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/useDebounce-lFex_Aum.js b/assets/useDebounce-_5_VjYb0.js similarity index 66% rename from assets/useDebounce-lFex_Aum.js rename to assets/useDebounce-_5_VjYb0.js index b6a0f405484834dea6214b5ea7256dee0a3ecde1..ab33b2555c8c3f63b5b479f8e31d28fa8c9b598a 100644 --- a/assets/useDebounce-lFex_Aum.js +++ b/assets/useDebounce-_5_VjYb0.js @@ -1 +1 @@ -import{i as o}from"./index-C1Xuuz1Y.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{i as o}from"./index-DMjO_toh.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-DS68IpOJ.js b/assets/useDocumentTitle-DVQ2ceqw.js similarity index 96% rename from assets/useDocumentTitle-DS68IpOJ.js rename to assets/useDocumentTitle-DVQ2ceqw.js index ae0418372d11aa1e94ddf12bebe84c19d6f656a8..d1df375abad17c0cd9ff459efb61f9b4bdbaed32 100644 --- a/assets/useDocumentTitle-DS68IpOJ.js +++ b/assets/useDocumentTitle-DVQ2ceqw.js @@ -1 +1 @@ -import{i as s}from"./index-C1Xuuz1Y.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{i as s}from"./index-DMjO_toh.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-DmDIxpQA.js b/assets/useHashScrollOnReady-C5GDmlDb.js similarity index 90% rename from assets/useHashScrollOnReady-DmDIxpQA.js rename to assets/useHashScrollOnReady-C5GDmlDb.js index 68b52b82e4f7a598be9577b3d3b33106aad0738d..648b6f4c4766d9a93194d9f2ad910fe0718df99d 100644 --- a/assets/useHashScrollOnReady-DmDIxpQA.js +++ b/assets/useHashScrollOnReady-C5GDmlDb.js @@ -1 +1 @@ -import{j as s,L as h,i as x}from"./index-C1Xuuz1Y.js";import{S as p}from"./skeleton-D8hFkZOU.js";import{A as j,a as m}from"./alert-UfpiwFIJ.js";import{T as d}from"./trending-up-Dmgkbga2.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,i as x}from"./index-DMjO_toh.js";import{S as p}from"./skeleton-DiGWALrs.js";import{A as j,a as m}from"./alert-B2i0PAyW.js";import{T as d}from"./trending-up-DRI2hJAf.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-D52ptoDl.js b/assets/useInfiniteQuery-C91fE_fV.js similarity index 94% rename from assets/useInfiniteQuery-D52ptoDl.js rename to assets/useInfiniteQuery-C91fE_fV.js index d0245257973184b4d17d14dcff3b487bb8deb550..1b85330d06d7c994edfc7fca8a164648d00ad96c 100644 --- a/assets/useInfiniteQuery-D52ptoDl.js +++ b/assets/useInfiniteQuery-C91fE_fV.js @@ -1 +1 @@ -import{b9 as b,ba as v,bb as x,bc as p}from"./index-C1Xuuz1Y.js";var l=class extends b{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:x(t,s.data),hasPreviousPage:v(t,s.data),isFetchNextPageError:h,isFetchingNextPage:n,isFetchPreviousPageError:o,isFetchingPreviousPage:u,isRefetchError:d&&!h&&!o,isRefetching:g&&!n&&!u}}};function m(e,t){return p(e,l)}export{m as u}; +import{b9 as b,ba as v,bb as x,bc as p}from"./index-DMjO_toh.js";var l=class extends b{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:x(t,s.data),hasPreviousPage:v(t,s.data),isFetchNextPageError:h,isFetchingNextPage:n,isFetchPreviousPageError:o,isFetchingPreviousPage:u,isRefetchError:d&&!h&&!o,isRefetching:g&&!n&&!u}}};function m(e,t){return p(e,l)}export{m as u}; diff --git a/assets/useIntersectionObserver-CwCTFEhv.js b/assets/useIntersectionObserver-CU-1-_ok.js similarity index 86% rename from assets/useIntersectionObserver-CwCTFEhv.js rename to assets/useIntersectionObserver-CU-1-_ok.js index cfff5bceab7cd47d79a82c3f7539edac67e311a2..6b25c035a4446da29b00cc87a0539d6e663c5a90 100644 --- a/assets/useIntersectionObserver-CwCTFEhv.js +++ b/assets/useIntersectionObserver-CU-1-_ok.js @@ -1 +1 @@ -import{i as r}from"./index-C1Xuuz1Y.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{i as r}from"./index-DMjO_toh.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-Cb0wrKBq.js b/assets/useMutation-Db093XSk.js similarity index 97% rename from assets/useMutation-Cb0wrKBq.js rename to assets/useMutation-Db093XSk.js index 4f38b41e842880480f9e926711d94df9d6d3fca1..b954b3e2ce79a35e90c9f3c8b9fc7a7390c22509 100644 --- a/assets/useMutation-Cb0wrKBq.js +++ b/assets/useMutation-Db093XSk.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)),m=(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{aZ as U,a_ as k,a$ as j,b0 as q,b1 as P,o as L,i as v,b2 as A,b3 as D}from"./index-C1Xuuz1Y.js";var h,c,o,a,n,C,S,w,I=(w=class extends U{constructor(t,s){super();m(this,n);m(this,h);m(this,c);m(this,o);m(this,a);p(this,h,t),this.setOptions(s),this.bindMethods(),y(this,n,C).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,h).defaultMutationOptions(t),k(this.options,s)||e(this,h).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,C).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,C).call(this),y(this,n,S).call(this)}mutate(t,s){var r;return p(this,a,s),(r=e(this,o))==null||r.removeObserver(this),p(this,o,e(this,h).getMutationCache().build(e(this,h),this.options)),e(this,o).addObserver(this),e(this,o).execute(t)}},h=new WeakMap,c=new WeakMap,o=new WeakMap,a=new WeakMap,n=new WeakSet,C=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,a)&&this.hasListeners()){const b=e(this,c).variables,M=e(this,c).context,g={client:e(this,h),meta:this.options.meta,mutationKey:this.options.mutationKey};if((t==null?void 0:t.type)==="success"){try{(r=(s=e(this,a)).onSuccess)==null||r.call(s,t.data,b,M,g)}catch(l){Promise.reject(l)}try{(f=(u=e(this,a)).onSettled)==null||f.call(u,t.data,null,b,M,g)}catch(l){Promise.reject(l)}}else if((t==null?void 0:t.type)==="error"){try{(O=(d=e(this,a)).onError)==null||O.call(d,t.error,b,M,g)}catch(l){Promise.reject(l)}try{(K=(x=e(this,a)).onSettled)==null||K.call(x,void 0,t.error,b,M,g)}catch(l){Promise.reject(l)}}}this.listeners.forEach(b=>{b(e(this,c))})})},w);function Z(i,t){const s=L(),[r]=v.useState(()=>new I(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(A)},[r]);if(u.error&&D(r.options.throwOnError,[u.error]))throw u.error;return{...u,mutate:f,mutateAsync:u.mutate}}export{Z 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)),m=(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{aZ as U,a_ as k,a$ as j,b0 as q,b1 as P,o as L,i as v,b2 as A,b3 as D}from"./index-DMjO_toh.js";var h,c,o,a,n,C,S,w,I=(w=class extends U{constructor(t,s){super();m(this,n);m(this,h);m(this,c);m(this,o);m(this,a);p(this,h,t),this.setOptions(s),this.bindMethods(),y(this,n,C).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,h).defaultMutationOptions(t),k(this.options,s)||e(this,h).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,C).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,C).call(this),y(this,n,S).call(this)}mutate(t,s){var r;return p(this,a,s),(r=e(this,o))==null||r.removeObserver(this),p(this,o,e(this,h).getMutationCache().build(e(this,h),this.options)),e(this,o).addObserver(this),e(this,o).execute(t)}},h=new WeakMap,c=new WeakMap,o=new WeakMap,a=new WeakMap,n=new WeakSet,C=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,a)&&this.hasListeners()){const b=e(this,c).variables,M=e(this,c).context,g={client:e(this,h),meta:this.options.meta,mutationKey:this.options.mutationKey};if((t==null?void 0:t.type)==="success"){try{(r=(s=e(this,a)).onSuccess)==null||r.call(s,t.data,b,M,g)}catch(l){Promise.reject(l)}try{(f=(u=e(this,a)).onSettled)==null||f.call(u,t.data,null,b,M,g)}catch(l){Promise.reject(l)}}else if((t==null?void 0:t.type)==="error"){try{(O=(d=e(this,a)).onError)==null||O.call(d,t.error,b,M,g)}catch(l){Promise.reject(l)}try{(K=(x=e(this,a)).onSettled)==null||K.call(x,void 0,t.error,b,M,g)}catch(l){Promise.reject(l)}}}this.listeners.forEach(b=>{b(e(this,c))})})},w);function Z(i,t){const s=L(),[r]=v.useState(()=>new I(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(A)},[r]);if(u.error&&D(r.options.throwOnError,[u.error]))throw u.error;return{...u,mutate:f,mutateAsync:u.mutate}}export{Z as u}; diff --git a/assets/usePapers-DzSHAOm5.js b/assets/usePapers-DCcqZCMM.js similarity index 96% rename from assets/usePapers-DzSHAOm5.js rename to assets/usePapers-DCcqZCMM.js index f510405e319b9c45a23d1431e5ccfb4cd5caf6b5..0ee9e617bdbbf3db6f34410966cad943c5541dc5 100644 --- a/assets/usePapers-DzSHAOm5.js +++ b/assets/usePapers-DCcqZCMM.js @@ -1 +1 @@ -import{i as u,j as t,f as K,aa as X,b4 as Q}from"./index-C1Xuuz1Y.js";import{P as ee}from"./PaperCard-DjlN6X2v.js";import{P as te,a as ae,b as se}from"./popover-C1A8cBwB.js";import{I as ne}from"./Icon-BADQ_q7j.js";import{S as b}from"./skeleton-D8hFkZOU.js";import{u as re}from"./useIntersectionObserver-CwCTFEhv.js";import{u as oe}from"./useInfiniteQuery-D52ptoDl.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}),ie=(e,a=new Date,s="week")=>{const n=V(e);if(n.startDate||n.endDate||e.get("time")==="all_time")return n;const r=new Date(Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()));return Y(s,r)},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},ce=(e,a)=>{const s=Z(e,a);return!a.startDate&&!a.endDate&&s.set("time","all_time"),s},le=new Intl.DateTimeFormat("en",{month:"long",year:"numeric",timeZone:"UTC"}),H=new Intl.DateTimeFormat("en",{month:"short",timeZone:"UTC"}),I="(max-width: 640px)",de=()=>{const[e,a]=u.useState(()=>typeof window<"u"&&window.matchMedia(I).matches);return u.useEffect(()=>{const s=window.matchMedia(I),n=r=>a(r.matches);return a(s.matches),s.addEventListener("change",n),()=>s.removeEventListener("change",n)},[]),e},W=e=>e.toISOString().slice(0,10),j=e=>new Date(`${e}T00:00:00Z`),he=()=>{const e=new Date;return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()))},$=(e,a)=>new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth()+a,1)),U=e=>new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),1)),pe=(e,a)=>new Date(Date.UTC(a,e.getUTCMonth(),1)),v=(e,a)=>e.startDate===a.startDate&&e.endDate===a.endDate,ge=(e,a)=>{const s=j(e),n=j(a),r=H.format(s),o=H.format(n),p=s.getUTCDate(),l=n.getUTCDate(),i=s.getUTCFullYear(),d=n.getUTCFullYear();return e===a?`${r} ${p}, ${i}`:i===d&&s.getUTCMonth()===n.getUTCMonth()?`${r} ${p}–${l}, ${i}`:i===d?`${r} ${p}–${o} ${l}, ${i}`:`${r} ${p}, ${i}–${o} ${l}, ${d}`},ue=e=>{const a=e.getUTCFullYear(),s=e.getUTCMonth(),n=new Date(Date.UTC(a,s,1)),r=(n.getUTCDay()+6)%7,o=new Date(n);return o.setUTCDate(n.getUTCDate()-r),Array.from({length:42},(p,l)=>{const i=new Date(o);return i.setUTCDate(o.getUTCDate()+l),{iso:W(i),day:i.getUTCDate(),outsideMonth:i.getUTCMonth()!==s}})},O=({month:e,today:a,startDate:s,endDate:n,onSelect:r,yearLabel:o,yearValue:p,onYearChange:l,secondary:i=!1})=>{const d=u.useMemo(()=>ue(e),[e]);return t.jsxs("section",{className:`paper-date-calendar${i?" paper-date-calendar-secondary":""}`,children:[t.jsxs("label",{className:"paper-date-year",children:[t.jsx("span",{children:o}),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:le.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:()=>r(c.iso),children:c.day},c.iso)})})]})},L=({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:"→"})]}),me=({startDate:e,endDate:a,onChange:s,currentDate:n})=>{const r=de(),o=n?j(n):he(),[p,l]=u.useState(!1),[i,d]=u.useState(),[c,g]=u.useState(),[m,f]=u.useState(()=>U(o)),[P,T]=u.useState(()=>$(U(o),1)),[q,N]=u.useState(()=>String(o.getUTCFullYear())),[z,D]=u.useState(()=>String(o.getUTCFullYear())),y={startDate:e,endDate:a},_=Y("week",o),M=Y("month",o),k=W(o),F=!!(e&&a&&!v(y,_)&&!v(y,M)),G=()=>{d(e),g(a);const h=U(e?j(e):o),x=U(a?j(a):$(h,1));f(h),T(x),N(String(h.getUTCFullYear())),D(String(x.getUTCFullYear())),l(!0)},E=(h,x,R)=>{if(x(h),!/^\d{4}$/.test(h))return;const C=Number(h);C>=1900&&C<=o.getUTCFullYear()&&R(w=>pe(w,C))},S=(h,x,R,C)=>{const w=$(h,x);R(w),C(String(w.getUTCFullYear()))},A=h=>{!i||c?(d(h),g(void 0)):h{s({}),l(!1)};return t.jsxs("div",{className:`paper-date-filter${r?" paper-date-filter-single-calendar":""}`,role:"group","aria-label":"Publication date",children:[t.jsx("button",{type:"button",className:`sort-btn sort-btn-time${v(y,_)?" active":""}`,onClick:()=>s(_),children:"Last Week"}),t.jsx("button",{type:"button",className:`sort-btn sort-btn-time${v(y,M)?" active":""}`,onClick:()=>s(M),children:"Last Month"}),t.jsx("button",{type:"button",className:`sort-btn sort-btn-time${!e&&!a?" active":""}`,onClick:()=>s({}),children:"All Time"}),t.jsxs(te,{open:p,onOpenChange:h=>{h?G():l(!1)},children:[t.jsx(ae,{asChild:!0,children:t.jsx("button",{type:"button",className:`sort-btn sort-btn-time${F?" active":""}`,"aria-label":F?"Change date range":"Select a range",children:F&&e&&a?ge(e,a):"Select a range"})}),t.jsxs(se,{align:"end",className:`paper-date-popover${r?" 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(L,{calendar:"start",onPrevious:()=>S(m,-1,f,N),onNext:()=>S(m,1,f,N)}),!r&&t.jsx(L,{calendar:"end",onPrevious:()=>S(P,-1,T,D),onNext:()=>S(P,1,T,D),secondary:!0})]}),t.jsxs("div",{className:"paper-date-calendars",children:[t.jsx(O,{month:m,today:k,startDate:i,endDate:c,onSelect:A,yearLabel:r?"Year":"Start year",yearValue:q,onYearChange:h=>E(h,N,f)}),!r&&t.jsx(O,{month:P,today:k,startDate:i,endDate:c,onSelect:A,yearLabel:"End year",yearValue:z,onYearChange:h=>E(h,D,T),secondary:!0})]}),t.jsxs("div",{className:"paper-date-actions",children:[t.jsx("button",{type:"button",className:"paper-date-clear",onClick:J,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:!i||!c,onClick:()=>{i&&c&&s({startDate:i,endDate:c}),l(!1)},children:"Apply"})]})]})]})]})]})},fe=()=>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:"✓"})]}),xe=({hasCode:e,hasHfArtifacts:a,onHasCodeChange:s,onHasHfArtifactsChange:n,showDivider:r=!0,showHasCode:o=!0})=>t.jsxs("div",{className:"paper-feed-resource-controls",role:"group","aria-label":"Resource filters",children:[r&&t.jsx("span",{className:"paper-feed-resource-divider","aria-hidden":"true"}),t.jsxs("div",{className:"paper-feed-filter-options",children:[o&&t.jsx(B,{checked:e,icon:t.jsx(ne,{name:"github",size:14}),label:"Has code",onChange:s}),t.jsx(B,{checked:a,icon:t.jsx(fe,{}),label:"Has artifacts",onChange:n})]})]});function Ce(e,a="200px"){const{targetRef:s,isIntersecting:n}=re({rootMargin:a}),{data:r,hasNextPage:o,isFetchingNextPage:p,fetchNextPage:l}=e;return u.useEffect(()=>{n&&o&&!p&&l()},[n,o,p,l,r]),s}const be=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]];function Pe({defaultToLastMonth:e=!1}={}){const[a,s]=K(),n=a.get("order_by"),r=n==="date_published"||n==="citation_count"?n:"trending",o=a.get("has_code")==="true",p=a.get("has_hf_artifacts")==="true",l=e?ie(a,void 0,"month"):V(a),i=(d,c)=>{const g=new URLSearchParams(a);c?g.set(d,c):g.delete(d),s(g)};return{searchParams:a,setSearchParams:s,orderBy:r,hasCode:o,hasHfArtifacts:p,dateRange:l,setOrderBy:d=>i("order_by",d==="trending"?null:d),setHasCode:d=>i("has_code",d?"true":null),setHasHfArtifacts:d=>i("has_hf_artifacts",d?"true":null),setDateRange:d=>s((e?ce:Z)(a,d)),filters:{order_by:r,order_dir:"desc",latest_only:!0,include_resources:!0,has_code:o,has_hf_artifacts:p,start_date:l.startDate,end_date:l.endDate}}}const _e=({feed:e,sorts:a=be,activeSort:s=e.orderBy,showDateFilter:n=!0,showHasCode:r,style:o,leading:p,children:l})=>t.jsxs("div",{className:"sort-bar",style:o,children:[p,t.jsxs("div",{className:"paper-feed-toolbar-controls",children:[a&&t.jsx("div",{className:"sort-options",children:a.map(([i,d])=>t.jsx("button",{type:"button",className:`sort-btn ${s===i?"active":""}`,onClick:()=>e.setOrderBy(i),children:d},i))}),t.jsx(xe,{hasCode:e.hasCode,hasHfArtifacts:e.hasHfArtifacts,onHasCodeChange:e.setHasCode,onHasHfArtifactsChange:e.setHasHfArtifacts,showDivider:!!a,showHasCode:r})]}),n&&t.jsx(me,{startDate:e.dateRange.startDate,endDate:e.dateRange.endDate,onChange:e.setDateRange}),l]}),je=()=>t.jsx(b,{className:"h-40 w-full"}),Te=()=>t.jsxs("div",{className:"paper-card",children:[t.jsx("div",{className:"paper-thumb-wrap",children:t.jsx(b,{className:"paper-thumb-skeleton"})}),t.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[t.jsx(b,{className:"h-6 w-3/4"}),t.jsx(b,{className:"h-4 w-1/2"}),t.jsx(b,{className:"h-12 w-full"})]})]}),Me=({query:e,isLoading:a=e.isLoading,cards:s,empty:n,skeleton:r="block",showInstitution:o,highlightQuery:p,cardHeader:l,rootMargin:i,children:d})=>{const c=Ce(e,i);if(a){const g=r==="card"?Te:je;return t.jsx("div",{className:"paper-list",children:Array.from({length:r==="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(X.Fragment,{children:[l==null?void 0:l(m),t.jsx(ee,{paper:g,priority:m<3,showInstitution:o,highlightQuery:p,followReasons:g.followReasons,isNew:g.isNew})]},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]})};function Fe(e,a,{enabled:s=!0,initialPage:n=1}={}){return oe({queryKey:e,queryFn:({pageParam:r})=>a(r),initialPageParam:n,getNextPageParam:r=>r.next_page??void 0,enabled:s,staleTime:Q,placeholderData:(r,o)=>(o==null?void 0:o.queryKey[0])===e[0]?r:void 0})}export{Me as P,me as a,Pe as b,_e as c,be as d,ie as r,Fe as u,ce as w}; +import{i as u,j as t,f as K,aa as X,b4 as Q}from"./index-DMjO_toh.js";import{P as ee}from"./PaperCard-CUJXx9SW.js";import{P as te,a as ae,b as se}from"./popover-MF6JD1Yi.js";import{I as ne}from"./Icon-D5cUFATZ.js";import{S as b}from"./skeleton-DiGWALrs.js";import{u as re}from"./useIntersectionObserver-CU-1-_ok.js";import{u as oe}from"./useInfiniteQuery-C91fE_fV.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}),ie=(e,a=new Date,s="week")=>{const n=V(e);if(n.startDate||n.endDate||e.get("time")==="all_time")return n;const r=new Date(Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()));return Y(s,r)},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},ce=(e,a)=>{const s=Z(e,a);return!a.startDate&&!a.endDate&&s.set("time","all_time"),s},le=new Intl.DateTimeFormat("en",{month:"long",year:"numeric",timeZone:"UTC"}),H=new Intl.DateTimeFormat("en",{month:"short",timeZone:"UTC"}),I="(max-width: 640px)",de=()=>{const[e,a]=u.useState(()=>typeof window<"u"&&window.matchMedia(I).matches);return u.useEffect(()=>{const s=window.matchMedia(I),n=r=>a(r.matches);return a(s.matches),s.addEventListener("change",n),()=>s.removeEventListener("change",n)},[]),e},W=e=>e.toISOString().slice(0,10),j=e=>new Date(`${e}T00:00:00Z`),he=()=>{const e=new Date;return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()))},$=(e,a)=>new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth()+a,1)),U=e=>new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),1)),pe=(e,a)=>new Date(Date.UTC(a,e.getUTCMonth(),1)),v=(e,a)=>e.startDate===a.startDate&&e.endDate===a.endDate,ge=(e,a)=>{const s=j(e),n=j(a),r=H.format(s),o=H.format(n),p=s.getUTCDate(),l=n.getUTCDate(),i=s.getUTCFullYear(),d=n.getUTCFullYear();return e===a?`${r} ${p}, ${i}`:i===d&&s.getUTCMonth()===n.getUTCMonth()?`${r} ${p}–${l}, ${i}`:i===d?`${r} ${p}–${o} ${l}, ${i}`:`${r} ${p}, ${i}–${o} ${l}, ${d}`},ue=e=>{const a=e.getUTCFullYear(),s=e.getUTCMonth(),n=new Date(Date.UTC(a,s,1)),r=(n.getUTCDay()+6)%7,o=new Date(n);return o.setUTCDate(n.getUTCDate()-r),Array.from({length:42},(p,l)=>{const i=new Date(o);return i.setUTCDate(o.getUTCDate()+l),{iso:W(i),day:i.getUTCDate(),outsideMonth:i.getUTCMonth()!==s}})},O=({month:e,today:a,startDate:s,endDate:n,onSelect:r,yearLabel:o,yearValue:p,onYearChange:l,secondary:i=!1})=>{const d=u.useMemo(()=>ue(e),[e]);return t.jsxs("section",{className:`paper-date-calendar${i?" paper-date-calendar-secondary":""}`,children:[t.jsxs("label",{className:"paper-date-year",children:[t.jsx("span",{children:o}),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:le.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:()=>r(c.iso),children:c.day},c.iso)})})]})},L=({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:"→"})]}),me=({startDate:e,endDate:a,onChange:s,currentDate:n})=>{const r=de(),o=n?j(n):he(),[p,l]=u.useState(!1),[i,d]=u.useState(),[c,g]=u.useState(),[m,f]=u.useState(()=>U(o)),[P,T]=u.useState(()=>$(U(o),1)),[q,N]=u.useState(()=>String(o.getUTCFullYear())),[z,D]=u.useState(()=>String(o.getUTCFullYear())),y={startDate:e,endDate:a},_=Y("week",o),M=Y("month",o),k=W(o),F=!!(e&&a&&!v(y,_)&&!v(y,M)),G=()=>{d(e),g(a);const h=U(e?j(e):o),x=U(a?j(a):$(h,1));f(h),T(x),N(String(h.getUTCFullYear())),D(String(x.getUTCFullYear())),l(!0)},E=(h,x,R)=>{if(x(h),!/^\d{4}$/.test(h))return;const C=Number(h);C>=1900&&C<=o.getUTCFullYear()&&R(w=>pe(w,C))},S=(h,x,R,C)=>{const w=$(h,x);R(w),C(String(w.getUTCFullYear()))},A=h=>{!i||c?(d(h),g(void 0)):h{s({}),l(!1)};return t.jsxs("div",{className:`paper-date-filter${r?" paper-date-filter-single-calendar":""}`,role:"group","aria-label":"Publication date",children:[t.jsx("button",{type:"button",className:`sort-btn sort-btn-time${v(y,_)?" active":""}`,onClick:()=>s(_),children:"Last Week"}),t.jsx("button",{type:"button",className:`sort-btn sort-btn-time${v(y,M)?" active":""}`,onClick:()=>s(M),children:"Last Month"}),t.jsx("button",{type:"button",className:`sort-btn sort-btn-time${!e&&!a?" active":""}`,onClick:()=>s({}),children:"All Time"}),t.jsxs(te,{open:p,onOpenChange:h=>{h?G():l(!1)},children:[t.jsx(ae,{asChild:!0,children:t.jsx("button",{type:"button",className:`sort-btn sort-btn-time${F?" active":""}`,"aria-label":F?"Change date range":"Select a range",children:F&&e&&a?ge(e,a):"Select a range"})}),t.jsxs(se,{align:"end",className:`paper-date-popover${r?" 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(L,{calendar:"start",onPrevious:()=>S(m,-1,f,N),onNext:()=>S(m,1,f,N)}),!r&&t.jsx(L,{calendar:"end",onPrevious:()=>S(P,-1,T,D),onNext:()=>S(P,1,T,D),secondary:!0})]}),t.jsxs("div",{className:"paper-date-calendars",children:[t.jsx(O,{month:m,today:k,startDate:i,endDate:c,onSelect:A,yearLabel:r?"Year":"Start year",yearValue:q,onYearChange:h=>E(h,N,f)}),!r&&t.jsx(O,{month:P,today:k,startDate:i,endDate:c,onSelect:A,yearLabel:"End year",yearValue:z,onYearChange:h=>E(h,D,T),secondary:!0})]}),t.jsxs("div",{className:"paper-date-actions",children:[t.jsx("button",{type:"button",className:"paper-date-clear",onClick:J,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:!i||!c,onClick:()=>{i&&c&&s({startDate:i,endDate:c}),l(!1)},children:"Apply"})]})]})]})]})]})},fe=()=>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:"✓"})]}),xe=({hasCode:e,hasHfArtifacts:a,onHasCodeChange:s,onHasHfArtifactsChange:n,showDivider:r=!0,showHasCode:o=!0})=>t.jsxs("div",{className:"paper-feed-resource-controls",role:"group","aria-label":"Resource filters",children:[r&&t.jsx("span",{className:"paper-feed-resource-divider","aria-hidden":"true"}),t.jsxs("div",{className:"paper-feed-filter-options",children:[o&&t.jsx(B,{checked:e,icon:t.jsx(ne,{name:"github",size:14}),label:"Has code",onChange:s}),t.jsx(B,{checked:a,icon:t.jsx(fe,{}),label:"Has artifacts",onChange:n})]})]});function Ce(e,a="200px"){const{targetRef:s,isIntersecting:n}=re({rootMargin:a}),{data:r,hasNextPage:o,isFetchingNextPage:p,fetchNextPage:l}=e;return u.useEffect(()=>{n&&o&&!p&&l()},[n,o,p,l,r]),s}const be=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]];function Pe({defaultToLastMonth:e=!1}={}){const[a,s]=K(),n=a.get("order_by"),r=n==="date_published"||n==="citation_count"?n:"trending",o=a.get("has_code")==="true",p=a.get("has_hf_artifacts")==="true",l=e?ie(a,void 0,"month"):V(a),i=(d,c)=>{const g=new URLSearchParams(a);c?g.set(d,c):g.delete(d),s(g)};return{searchParams:a,setSearchParams:s,orderBy:r,hasCode:o,hasHfArtifacts:p,dateRange:l,setOrderBy:d=>i("order_by",d==="trending"?null:d),setHasCode:d=>i("has_code",d?"true":null),setHasHfArtifacts:d=>i("has_hf_artifacts",d?"true":null),setDateRange:d=>s((e?ce:Z)(a,d)),filters:{order_by:r,order_dir:"desc",latest_only:!0,include_resources:!0,has_code:o,has_hf_artifacts:p,start_date:l.startDate,end_date:l.endDate}}}const _e=({feed:e,sorts:a=be,activeSort:s=e.orderBy,showDateFilter:n=!0,showHasCode:r,style:o,leading:p,children:l})=>t.jsxs("div",{className:"sort-bar",style:o,children:[p,t.jsxs("div",{className:"paper-feed-toolbar-controls",children:[a&&t.jsx("div",{className:"sort-options",children:a.map(([i,d])=>t.jsx("button",{type:"button",className:`sort-btn ${s===i?"active":""}`,onClick:()=>e.setOrderBy(i),children:d},i))}),t.jsx(xe,{hasCode:e.hasCode,hasHfArtifacts:e.hasHfArtifacts,onHasCodeChange:e.setHasCode,onHasHfArtifactsChange:e.setHasHfArtifacts,showDivider:!!a,showHasCode:r})]}),n&&t.jsx(me,{startDate:e.dateRange.startDate,endDate:e.dateRange.endDate,onChange:e.setDateRange}),l]}),je=()=>t.jsx(b,{className:"h-40 w-full"}),Te=()=>t.jsxs("div",{className:"paper-card",children:[t.jsx("div",{className:"paper-thumb-wrap",children:t.jsx(b,{className:"paper-thumb-skeleton"})}),t.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[t.jsx(b,{className:"h-6 w-3/4"}),t.jsx(b,{className:"h-4 w-1/2"}),t.jsx(b,{className:"h-12 w-full"})]})]}),Me=({query:e,isLoading:a=e.isLoading,cards:s,empty:n,skeleton:r="block",showInstitution:o,highlightQuery:p,cardHeader:l,rootMargin:i,children:d})=>{const c=Ce(e,i);if(a){const g=r==="card"?Te:je;return t.jsx("div",{className:"paper-list",children:Array.from({length:r==="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(X.Fragment,{children:[l==null?void 0:l(m),t.jsx(ee,{paper:g,priority:m<3,showInstitution:o,highlightQuery:p,followReasons:g.followReasons,isNew:g.isNew})]},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]})};function Fe(e,a,{enabled:s=!0,initialPage:n=1}={}){return oe({queryKey:e,queryFn:({pageParam:r})=>a(r),initialPageParam:n,getNextPageParam:r=>r.next_page??void 0,enabled:s,staleTime:Q,placeholderData:(r,o)=>(o==null?void 0:o.queryKey[0])===e[0]?r:void 0})}export{Me as P,me as a,Pe as b,_e as c,be as d,ie as r,Fe as u,ce as w}; diff --git a/assets/useQueries-qwvJW35M.js b/assets/useQueries-DpMmxV-N.js similarity index 98% rename from assets/useQueries-qwvJW35M.js rename to assets/useQueries-DpMmxV-N.js index 05b37194c4108b3a59df8f6dd36722f9006db8fb..d92bb492bc02223490e55de4966b7676cf5d8742 100644 --- a/assets/useQueries-qwvJW35M.js +++ b/assets/useQueries-DpMmxV-N.js @@ -1 +1 @@ -var D=u=>{throw TypeError(u)};var B=(u,e,t)=>e.has(u)||D("Cannot "+t);var r=(u,e,t)=>(B(u,e,"read from private field"),t?t.call(u):e.get(u)),p=(u,e,t)=>e.has(u)?D("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(u):e.set(u,t),c=(u,e,t,s)=>(B(u,e,"write to private field"),s?s.call(u,t):e.set(u,t),t),g=(u,e,t)=>(B(u,e,"access private method"),t);import{aZ as N,b1 as A,a_ as V,be as X,b9 as G,o as Y,bf as $,bg as W,i as k,bh as ee,bi as se,bj as te,b2 as re,bk as T,bl as ie,bm as ne}from"./index-C1Xuuz1Y.js";function Z(u,e){const t=new Set(e);return u.filter(s=>!t.has(s))}function oe(u,e,t){const s=u.slice(0);return s[e]=t,s}var Q,b,w,R,d,O,q,x,M,H,h,j,z,J,I,U,_,F,ue=(F=class extends N{constructor(e,t,s){super();p(this,h);p(this,Q);p(this,b);p(this,w);p(this,R);p(this,d);p(this,O);p(this,q);p(this,x);p(this,M);p(this,H,[]);c(this,Q,e),c(this,R,s),c(this,w,[]),c(this,d,[]),c(this,b,[]),this.setQueries(t)}onSubscribe(){this.listeners.size===1&&r(this,d).forEach(e=>{e.subscribe(t=>{g(this,h,U).call(this,e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,r(this,d).forEach(e=>{e.destroy()})}setQueries(e,t){c(this,w,e),c(this,R,t),A.batch(()=>{const s=r(this,d),i=g(this,h,I).call(this,r(this,w));i.forEach(a=>a.observer.setOptions(a.defaultedQueryOptions));const n=i.map(a=>a.observer),o=n.map(a=>a.getCurrentResult()),l=s.length!==n.length,v=n.some((a,E)=>a!==s[E]),C=l||v,P=C?!0:o.some((a,E)=>{const S=r(this,b)[E];return!S||!V(a,S)});!C&&!P||(C&&(c(this,H,i),c(this,d,n)),c(this,b,o),this.hasListeners()&&(C&&(Z(s,n).forEach(a=>{a.destroy()}),Z(n,s).forEach(a=>{a.subscribe(E=>{g(this,h,U).call(this,a,E)})})),g(this,h,_).call(this)))})}getCurrentResult(){return r(this,b)}getQueries(){return r(this,d).map(e=>e.getCurrentQuery())}getObservers(){return r(this,d)}getOptimisticResult(e,t){const s=g(this,h,I).call(this,e),i=s.map(o=>o.observer.getOptimisticResult(o.defaultedQueryOptions)),n=s.map(o=>o.defaultedQueryOptions.queryHash);return[i,o=>g(this,h,z).call(this,o??i,t,n),()=>g(this,h,j).call(this,i,s)]}},Q=new WeakMap,b=new WeakMap,w=new WeakMap,R=new WeakMap,d=new WeakMap,O=new WeakMap,q=new WeakMap,x=new WeakMap,M=new WeakMap,H=new WeakMap,h=new WeakSet,j=function(e,t){return t.map((s,i)=>{const n=e[i];return s.defaultedQueryOptions.notifyOnChangeProps?n:s.observer.trackResult(n,o=>{t.forEach(l=>{l.observer.trackProp(o)})})})},z=function(e,t,s){if(t){const i=r(this,M),n=s!==void 0&&i!==void 0&&(i.length!==s.length||s.some((o,l)=>o!==i[l]));return(!r(this,O)||r(this,b)!==r(this,x)||n||t!==r(this,q))&&(c(this,q,t),c(this,x,r(this,b)),s!==void 0&&c(this,M,s),c(this,O,X(r(this,O),t(e)))),r(this,O)}return e},J=function(){var e;return((e=r(this,R))==null?void 0:e.combine)!==void 0&&r(this,d).some((t,s)=>{var i;return t.options.suspense&&((i=r(this,b)[s])==null?void 0:i.data)===void 0})},I=function(e){const t=new Map;r(this,d).forEach(i=>{const n=i.options.queryHash;if(!n)return;const o=t.get(n);o?o.push(i):t.set(n,[i])});const s=[];return e.forEach(i=>{var v;const n=r(this,Q).defaultQueryOptions(i),l=((v=t.get(n.queryHash))==null?void 0:v.shift())??new G(r(this,Q),n);s.push({defaultedQueryOptions:n,observer:l})}),s},U=function(e,t){const s=r(this,d).indexOf(e);s!==-1&&(c(this,b,oe(r(this,b),s,t)),g(this,h,_).call(this))},_=function(){var e;if(this.hasListeners()){const t=g(this,h,j).call(this,r(this,b),r(this,H)),s=g(this,h,J).call(this),i=r(this,O),n=s?i:g(this,h,z).call(this,t,(e=r(this,R))==null?void 0:e.combine);(s||i!==n)&&A.batch(()=>{this.listeners.forEach(o=>{o(r(this,b))})})}},F);function ce({queries:u,...e},t){const s=Y(),i=$(),n=W(),o=k.useMemo(()=>u.map(f=>{const y=s.defaultQueryOptions(f);return y._optimisticResults=i?"isRestoring":"optimistic",y}),[u,s,i]);o.forEach(f=>{ee(f);const y=s.getQueryCache().get(f.queryHash);se(f,n,y)}),te(n);const[l]=k.useState(()=>new ue(s,o,e)),[v,C,P]=l.getOptimisticResult(o,e.combine),a=!i&&e.subscribed!==!1;k.useSyncExternalStore(k.useCallback(f=>a?l.subscribe(A.batchCalls(f)):re,[l,a]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),k.useEffect(()=>{l.setQueries(o,e)},[o,e,l]);const S=v.some((f,y)=>T(o[y],f))?v.flatMap((f,y)=>{const m=o[y];if(m&&T(m,f)){const K=new G(s,m);return ie(m,K,n)}return[]}):[];if(S.length>0)throw Promise.all(S);const L=v.find((f,y)=>{const m=o[y];return m&&ne({result:f,errorResetBoundary:n,throwOnError:m.throwOnError,query:s.getQueryCache().get(m.queryHash),suspense:m.suspense})});if(L!=null&&L.error)throw L.error;return C(P())}export{ce as u}; +var D=u=>{throw TypeError(u)};var B=(u,e,t)=>e.has(u)||D("Cannot "+t);var r=(u,e,t)=>(B(u,e,"read from private field"),t?t.call(u):e.get(u)),p=(u,e,t)=>e.has(u)?D("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(u):e.set(u,t),c=(u,e,t,s)=>(B(u,e,"write to private field"),s?s.call(u,t):e.set(u,t),t),g=(u,e,t)=>(B(u,e,"access private method"),t);import{aZ as N,b1 as A,a_ as V,be as X,b9 as G,o as Y,bf as $,bg as W,i as k,bh as ee,bi as se,bj as te,b2 as re,bk as T,bl as ie,bm as ne}from"./index-DMjO_toh.js";function Z(u,e){const t=new Set(e);return u.filter(s=>!t.has(s))}function oe(u,e,t){const s=u.slice(0);return s[e]=t,s}var Q,b,w,R,d,O,q,x,M,H,h,j,z,J,I,U,_,F,ue=(F=class extends N{constructor(e,t,s){super();p(this,h);p(this,Q);p(this,b);p(this,w);p(this,R);p(this,d);p(this,O);p(this,q);p(this,x);p(this,M);p(this,H,[]);c(this,Q,e),c(this,R,s),c(this,w,[]),c(this,d,[]),c(this,b,[]),this.setQueries(t)}onSubscribe(){this.listeners.size===1&&r(this,d).forEach(e=>{e.subscribe(t=>{g(this,h,U).call(this,e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,r(this,d).forEach(e=>{e.destroy()})}setQueries(e,t){c(this,w,e),c(this,R,t),A.batch(()=>{const s=r(this,d),i=g(this,h,I).call(this,r(this,w));i.forEach(a=>a.observer.setOptions(a.defaultedQueryOptions));const n=i.map(a=>a.observer),o=n.map(a=>a.getCurrentResult()),l=s.length!==n.length,v=n.some((a,E)=>a!==s[E]),C=l||v,P=C?!0:o.some((a,E)=>{const S=r(this,b)[E];return!S||!V(a,S)});!C&&!P||(C&&(c(this,H,i),c(this,d,n)),c(this,b,o),this.hasListeners()&&(C&&(Z(s,n).forEach(a=>{a.destroy()}),Z(n,s).forEach(a=>{a.subscribe(E=>{g(this,h,U).call(this,a,E)})})),g(this,h,_).call(this)))})}getCurrentResult(){return r(this,b)}getQueries(){return r(this,d).map(e=>e.getCurrentQuery())}getObservers(){return r(this,d)}getOptimisticResult(e,t){const s=g(this,h,I).call(this,e),i=s.map(o=>o.observer.getOptimisticResult(o.defaultedQueryOptions)),n=s.map(o=>o.defaultedQueryOptions.queryHash);return[i,o=>g(this,h,z).call(this,o??i,t,n),()=>g(this,h,j).call(this,i,s)]}},Q=new WeakMap,b=new WeakMap,w=new WeakMap,R=new WeakMap,d=new WeakMap,O=new WeakMap,q=new WeakMap,x=new WeakMap,M=new WeakMap,H=new WeakMap,h=new WeakSet,j=function(e,t){return t.map((s,i)=>{const n=e[i];return s.defaultedQueryOptions.notifyOnChangeProps?n:s.observer.trackResult(n,o=>{t.forEach(l=>{l.observer.trackProp(o)})})})},z=function(e,t,s){if(t){const i=r(this,M),n=s!==void 0&&i!==void 0&&(i.length!==s.length||s.some((o,l)=>o!==i[l]));return(!r(this,O)||r(this,b)!==r(this,x)||n||t!==r(this,q))&&(c(this,q,t),c(this,x,r(this,b)),s!==void 0&&c(this,M,s),c(this,O,X(r(this,O),t(e)))),r(this,O)}return e},J=function(){var e;return((e=r(this,R))==null?void 0:e.combine)!==void 0&&r(this,d).some((t,s)=>{var i;return t.options.suspense&&((i=r(this,b)[s])==null?void 0:i.data)===void 0})},I=function(e){const t=new Map;r(this,d).forEach(i=>{const n=i.options.queryHash;if(!n)return;const o=t.get(n);o?o.push(i):t.set(n,[i])});const s=[];return e.forEach(i=>{var v;const n=r(this,Q).defaultQueryOptions(i),l=((v=t.get(n.queryHash))==null?void 0:v.shift())??new G(r(this,Q),n);s.push({defaultedQueryOptions:n,observer:l})}),s},U=function(e,t){const s=r(this,d).indexOf(e);s!==-1&&(c(this,b,oe(r(this,b),s,t)),g(this,h,_).call(this))},_=function(){var e;if(this.hasListeners()){const t=g(this,h,j).call(this,r(this,b),r(this,H)),s=g(this,h,J).call(this),i=r(this,O),n=s?i:g(this,h,z).call(this,t,(e=r(this,R))==null?void 0:e.combine);(s||i!==n)&&A.batch(()=>{this.listeners.forEach(o=>{o(r(this,b))})})}},F);function ce({queries:u,...e},t){const s=Y(),i=$(),n=W(),o=k.useMemo(()=>u.map(f=>{const y=s.defaultQueryOptions(f);return y._optimisticResults=i?"isRestoring":"optimistic",y}),[u,s,i]);o.forEach(f=>{ee(f);const y=s.getQueryCache().get(f.queryHash);se(f,n,y)}),te(n);const[l]=k.useState(()=>new ue(s,o,e)),[v,C,P]=l.getOptimisticResult(o,e.combine),a=!i&&e.subscribed!==!1;k.useSyncExternalStore(k.useCallback(f=>a?l.subscribe(A.batchCalls(f)):re,[l,a]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),k.useEffect(()=>{l.setQueries(o,e)},[o,e,l]);const S=v.some((f,y)=>T(o[y],f))?v.flatMap((f,y)=>{const m=o[y];if(m&&T(m,f)){const K=new G(s,m);return ie(m,K,n)}return[]}):[];if(S.length>0)throw Promise.all(S);const L=v.find((f,y)=>{const m=o[y];return m&&ne({result:f,errorResetBoundary:n,throwOnError:m.throwOnError,query:s.getQueryCache().get(m.queryHash),suspense:m.suspense})});if(L!=null&&L.error)throw L.error;return C(P())}export{ce as u}; diff --git a/index.html b/index.html index caeffe657262e2bdb751ea91d7f224b872b07cb4..41e34eb75fe75a8220dfeed610b18b548285ff3a 100644 --- a/index.html +++ b/index.html @@ -72,7 +72,7 @@ plausible.init(); })(); - +