nielsr HF Staff commited on
Commit
bb3f876
Β·
verified Β·
1 Parent(s): 0c165ed

Sync paperswithcode.co frontend

Browse files
Files changed (27) hide show
  1. assets/{BenchmarkDetailView-_8E2ZRm_.js β†’ BenchmarkDetailView-VMlJM-5j.js} +1 -1
  2. assets/{CronDashboard-B5Xx5Zr8.js β†’ CronDashboard-mLr5RZh4.js} +1 -1
  3. assets/FeedView-Cf5wgU9c.js +0 -1
  4. assets/FeedView-Dnsgf6iQ.js +1 -0
  5. assets/{LatexTitle-DziDol_D.js β†’ LatexTitle-BYOXQNlq.js} +1 -1
  6. assets/{MethodDetailView-B_WtVDNU.js β†’ MethodDetailView-xBNKBgyD.js} +0 -0
  7. assets/{MethodsIndexView-B2gFKYGg.js β†’ MethodsIndexView-DRzt4_Bz.js} +1 -1
  8. assets/{NotFound-AQv_XkN6.js β†’ NotFound-CLmT-1WG.js} +1 -1
  9. assets/{PaperDetailView-Wm1j7h1p.js β†’ PaperDetailView-hV8jpY0C.js} +1 -1
  10. assets/{PapersListView-DsAlDIHu.js β†’ PapersListView-CT8uylW0.js} +1 -1
  11. assets/{SavedPapersView-BQ7z_KWN.js β†’ SavedPapersView-BhakLwrd.js} +1 -1
  12. assets/{SearchOverlay-BJ3Vra9H.js β†’ SearchOverlay-BKjXfD9I.js} +1 -1
  13. assets/{TagBrowseView-S2puh8kQ.js β†’ TagBrowseView-t6_CM5xZ.js} +1 -1
  14. assets/{TagsIndexView-Cq2OXyNT.js β†’ TagsIndexView-BW55bmnO.js} +1 -1
  15. assets/{adminAuth-BcLoDHjH.js β†’ adminAuth-W6_tdZNU.js} +1 -1
  16. assets/{alert-CHYYTMmo.js β†’ alert-CJMW3r9v.js} +1 -1
  17. assets/{api-BrmxIuWZ.js β†’ api-gdpmQjJd.js} +1 -1
  18. assets/{badge-BYXN-Rwa.js β†’ badge-DxH3OGz4.js} +1 -1
  19. assets/{components-mDG31Y87.js β†’ components-Cg3rKVQ3.js} +1 -1
  20. assets/{index-BBLNzdQ3.js β†’ index-BHu3ckjy.js} +2 -2
  21. assets/{transform-C-0glUhY.js β†’ transform-BxhHCT2R.js} +1 -1
  22. assets/{useDebounce-cTTjH_Sm.js β†’ useDebounce-DslTjWNw.js} +1 -1
  23. assets/{useInfiniteQuery-BYHbC7kX.js β†’ useInfiniteQuery-DPq_eewq.js} +1 -1
  24. assets/{useIntersectionObserver-BzvTehzD.js β†’ useIntersectionObserver-BIld5T_u.js} +1 -1
  25. assets/{usePapers-B6SkGdse.js β†’ usePapers-BJol1iZF.js} +1 -1
  26. assets/{usePeriodFilter-Cqf3tn7X.js β†’ usePeriodFilter-D7A3mTfk.js} +1 -1
  27. index.html +1 -1
assets/{BenchmarkDetailView-_8E2ZRm_.js β†’ BenchmarkDetailView-VMlJM-5j.js} RENAMED
@@ -1 +1 @@
1
- import{G as ie,u as ce,r as w,j as e,L as C,I as H,H as oe}from"./index-BBLNzdQ3.js";import{u as q}from"./adminAuth-BcLoDHjH.js";import{a as z}from"./api-BrmxIuWZ.js";import{S as U,A as de,a as me}from"./alert-CHYYTMmo.js";import{L as O}from"./LatexTitle-DziDol_D.js";const he=({points:c,metric:k})=>{const b=oe(),[g,L]=w.useState(null),j=880,R=320,i=60,m=30,o=24,s=50,v=c.map(a=>a.value),_=Math.min(...v),Q=Math.max(...v)-_||1,A=j-i-m,T=R-o-s,V=A/Math.max(1,c.length-1),y=c.map((a,t)=>{const u=i+t*V,p=(a.value-_)/Q,N=o+T*(1-p);return{x:u,y:N,data:a}});let B=`M${y[0].x},${y[0].y}`;for(let a=1;a<y.length;a++){const t=y[a-1],u=y[a],p=(t.x+u.x)/2;B+=` C${p},${t.y} ${p},${u.y} ${u.x},${u.y}`}const d=5,I=a=>L(t=>t===a?null:t),W=a=>{a&&b(`/paper/${a}`)};return e.jsxs("svg",{width:"100%",viewBox:`0 0 ${j} ${R}`,style:{display:"block"},children:[e.jsx("text",{x:i-38,y:o+T/2,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"middle",transform:`rotate(-90 ${i-38} ${o+T/2})`,children:k}),Array.from({length:d}).map((a,t)=>{const u=t/(d-1),p=o+T*(1-u),N=_+Q*u;return e.jsxs("g",{children:[e.jsx("line",{x1:i,y1:p,x2:j-m,y2:p,stroke:"var(--hairline)",strokeWidth:"1"}),e.jsx("text",{x:i-10,y:p+4,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"end",children:H(N)})]},t)}),y.map((a,t)=>e.jsx("text",{x:a.x,y:R-s+18,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:"middle",children:a.data.dateLabel},t)),e.jsx("path",{d:B,stroke:"var(--accent)",strokeWidth:"2",fill:"none",strokeLinejoin:"round",strokeLinecap:"round"}),y.map((a,t)=>{const u=g===t,N=`${a.data.modelName||a.data.paperTitle||"Unknown model"}: ${H(a.data.value)} on ${a.data.dateLabel}`,x=!!a.data.paperRouteId;return e.jsxs("g",{children:[e.jsx("circle",{cx:a.x,cy:a.y,r:u?6:4.5,fill:u?"var(--accent)":"var(--bg-elevated)",stroke:"var(--accent)",strokeWidth:"2",style:{transition:"r 0.12s ease, fill 0.12s ease"}}),e.jsx("circle",{cx:a.x,cy:a.y,r:"14",fill:"transparent",style:{cursor:x?"pointer":"default",outline:"none"},tabIndex:0,role:x?"link":"img","aria-label":N,onMouseEnter:()=>L(t),onMouseLeave:()=>I(t),onFocus:()=>L(t),onBlur:()=>I(t),onClick:()=>W(a.data.paperRouteId),onKeyDown:f=>{x&&(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),W(a.data.paperRouteId))},children:e.jsx("title",{children:N})})]},t)}),g!==null&&(()=>{const a=y[g],t=a.data.modelName||a.data.paperTitle||"Unknown model",u=t.length>40?t.slice(0,39)+"…":t,p=`${H(a.data.value)} Β· ${a.data.dateLabel}`,x=Math.max(140,Math.min(320,Math.max(u.length,p.length)*6.6+24)),f=46;let $=a.x-x/2;$<i&&($=i),$+x>j-m&&($=j-m-x);const E=a.y-f-14>=o?a.y-f-12:a.y+12;return e.jsxs("g",{pointerEvents:"none",children:[e.jsx("rect",{x:$,y:E,width:x,height:f,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))"}}),e.jsx("text",{x:$+12,y:E+19,fontSize:"12",fontFamily:"var(--sans)",fill:"var(--ink)",fontWeight:500,children:u}),e.jsx("text",{x:$+12,y:E+36,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-soft)",children:p})]})})()]})};function D(c){if(c==null)return null;if(typeof c=="number")return Number.isFinite(c)?c:null;const k=c.includes("Β±")?c.split("Β±")[0].trim():c.trim(),b=parseFloat(k);return Number.isFinite(b)?b:null}function ue(c,k,b){if(c.length===0)return{points:[],sota:0,sotaModel:""};const g=c.map(s=>{var h;const v=D((h=s.metrics)==null?void 0:h[k]),_=s.paper_published_date||"";return{eval:s,value:v,date:_}}).filter(s=>s.value!==null&&!!s.date).sort((s,v)=>s.date.localeCompare(v.date)),L=[];let j=null;for(const s of g)(j==null?!0:b==="↓"?s.value<j:s.value>j)&&(j=s.value,L.push({value:s.value,dateLabel:s.date.slice(0,7),modelName:s.eval.model_name||"",paperTitle:s.eval.paper_title||"",paperRouteId:s.eval.paper_arxiv_id||s.eval.paper_id||null}));const i=c.map(s=>{var v;return{eval:s,value:D((v=s.metrics)==null?void 0:v[k])}}).filter(s=>s.value!==null).sort((s,v)=>b==="↓"?s.value-v.value:v.value-s.value)[0],m=(i==null?void 0:i.value)??0,o=(i==null?void 0:i.eval.model_name)||(i==null?void 0:i.eval.paper_title)||"";return{points:L,sota:m,sotaModel:o}}const be=()=>{var K,E,P,Y,G,J,Z,ee,ae;const{datasetSlug:c}=ie(),[k]=ce(),b=k.get("task")||void 0,g=k.get("eval")||void 0,[L,j]=w.useState(void 0),R=w.useRef(null),i=w.useRef(!1),m=q({queryKey:["dataset",c,"with-paper"],queryFn:()=>z.getDatasetBySlug(c,{include_paper:!0}),enabled:!!c,staleTime:10*60*1e3}),o=q({queryKey:["dataset-evals",(K=m.data)==null?void 0:K.id],queryFn:()=>z.getEvaluationsByDataset(m.data.id),enabled:!!((E=m.data)!=null&&E.id),staleTime:5*60*1e3}),s=q({queryKey:["dataset-tasks",(P=m.data)==null?void 0:P.id],queryFn:()=>z.getDatasetTasks(m.data.id),enabled:!!((Y=m.data)!=null&&Y.id),staleTime:10*60*1e3}),v=q({queryKey:["metric-directions"],queryFn:()=>z.getMetricDirections(),staleTime:60*60*1e3}),_=w.useMemo(()=>{const r=new Set;return(o.data||[]).forEach(n=>{n.best_metric&&r.add(n.best_metric),Object.keys(n.metrics||{}).forEach(l=>r.add(l))}),Array.from(r)},[o.data]),h=L||((J=(G=o.data)==null?void 0:G[0])==null?void 0:J.best_metric)||_[0]||"",A=(((ee=(Z=v.data)==null?void 0:Z.directions)==null?void 0:ee[h])||"higher_is_better")==="lower_is_better"?"↓":"↑",{points:T,sota:V,sotaModel:y}=w.useMemo(()=>ue(o.data||[],h,A),[o.data,h,A]);w.useEffect(()=>{if(i.current||!g||!o.data||o.data.length===0)return;const r=R.current;r&&(i.current=!0,r.scrollIntoView({behavior:"smooth",block:"start"}))},[g,o.data]);const B=w.useMemo(()=>{const r=s.data||[];if(r.length===0)return null;if(b){const n=r.find(l=>l.slug===b);if(n)return n}return r[0]},[s.data,b]);if(m.isLoading)return e.jsxs("div",{className:"page",children:[e.jsx(U,{className:"h-12 w-1/2 mb-6"}),e.jsx(U,{className:"h-64 w-full"})]});if(m.error||!m.data)return e.jsx("div",{className:"page",children:e.jsx(de,{variant:"destructive",children:e.jsx(me,{children:"Benchmark not found."})})});const d=m.data,I=(o.data||[]).slice().sort((r,n)=>{var S,F;const l=D((S=r.metrics)==null?void 0:S[h]),M=D((F=n.metrics)==null?void 0:F[h]);return l!==null&&M!==null?A==="↓"?l-M:M-l:l!==null?-1:M!==null?1:(r.best_rank??9999)-(n.best_rank??9999)}),W=!!d.supports_harness,a=g&&I.find(r=>r.id===g)||null,t=d.introducing_paper??void 0,u=(()=>{if(!d.paper_url)return null;const r=d.paper_url.match(/arxiv\.org\/(?:abs|pdf)\/([\w.-]+)/i);if(r&&r[1])return r[1].replace(/\.pdf$/i,"");const n=d.paper_url.match(/\/(?:paper|abs|pdf)\/([\w.-]+)/i);return n&&n[1]?n[1].replace(/\.pdf$/i,""):null})(),p=(t==null?void 0:t.arxiv_id)||u,N=p,x=(t==null?void 0:t.title)||d.introducing_paper_title||null,f=((ae=t==null?void 0:t.published)==null?void 0:ae.slice(0,4))||d.introduced_year||null,$=!!p||!!d.paper_url||!!x;return e.jsx("div",{className:"page",children:e.jsxs("div",{className:"bm-page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(C,{to:"/tasks",children:"Tasks"}),B&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(C,{to:`/tasks/${B.slug||B.id}`,children:B.name})]}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--accent-text)"},children:d.name})]}),e.jsx("h1",{className:"bm-title",children:d.name}),e.jsxs("div",{className:"bm-subtitle",children:[h&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"metric-tag",children:h}),e.jsx("span",{style:{color:"var(--hairline-strong)",margin:"0 8px"},children:"Β·"})]}),y?e.jsxs("span",{children:["Best: ",e.jsx("span",{className:"best-name",children:H(V)})," by ",e.jsx("span",{className:"best-name",style:{fontStyle:"normal"},children:y})]}):e.jsxs("span",{children:[I.length," evaluations"]})]}),d.description&&e.jsx("p",{style:{fontFamily:"var(--serif)",color:"var(--ink-soft)",maxWidth:760,marginBottom:16},children:d.description}),$&&e.jsxs("div",{className:"method-source",style:{marginTop:0,marginBottom:18},children:[e.jsx("span",{className:"method-source-label",children:"Source"}),N?e.jsxs(C,{to:`/paper/${N}`,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[e.jsx("span",{className:"method-source-title",children:x?e.jsx(O,{title:x}):`arXiv:${N}`}),f&&e.jsx("span",{className:"method-source-meta",children:f})]}):d.paper_url?e.jsxs("a",{href:d.paper_url,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[e.jsx("span",{className:"method-source-title",children:x?e.jsx(O,{title:x}):p?`arXiv:${p}`:d.paper_url}),f&&e.jsx("span",{className:"method-source-meta",children:f})]}):e.jsxs("div",{className:"method-source-link is-static",children:[e.jsx("span",{className:"method-source-title",children:x?e.jsx(O,{title:x}):null}),f&&e.jsx("span",{className:"method-source-meta",children:f})]})]}),_.length>1&&e.jsxs("div",{className:"bm-actions",children:[e.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginRight:8},children:"METRIC"}),_.map(r=>e.jsx("button",{className:`bm-action-btn ${r===h?"is-active":""}`,onClick:()=>j(r),children:r},r))]}),T.length>=2&&e.jsxs("div",{className:"bm-card",children:[e.jsx("div",{className:"bm-card-head",children:e.jsx("div",{className:"bm-card-title",children:"SOTA progression"})}),e.jsx("div",{className:"bm-chart-wrap",children:e.jsx(he,{points:T,metric:h})}),e.jsxs("div",{className:"bm-chart-foot",children:[e.jsx("span",{className:"legend-dot"}),"Best result over time Β· hover a point to see the model Β· click to open the paper"]})]}),a&&(()=>{var S,F;const r=a.paper_arxiv_id||a.paper_id,n=a.paper_title||(a.paper_arxiv_id?`arXiv:${a.paper_arxiv_id}`:null),l=a.best_metric&&((S=a.metrics)==null?void 0:S[a.best_metric])!==void 0?a.best_metric:h,M=(F=a.metrics)==null?void 0:F[l];return e.jsxs("div",{className:"bm-highlight-banner",role:"status",children:[e.jsx("span",{className:"bm-highlight-dot","aria-hidden":"true"}),e.jsxs("div",{className:"bm-highlight-text",children:[e.jsx("span",{className:"bm-highlight-label",children:"Comparing result"}),e.jsxs("span",{className:"bm-highlight-paper",children:[a.model_name||n||"β€”",a.harness?` Β· ${a.harness}`:""]}),e.jsxs("span",{className:"bm-highlight-meta",children:[M!==void 0&&l?e.jsxs(e.Fragment,{children:[l,": ",H(M),n?" Β· ":""]}):null,n&&r?e.jsx(C,{to:`/paper/${r}`,children:n}):n||null]})]})]})})(),e.jsxs("div",{className:"bm-card",children:[e.jsx("div",{className:"bm-card-head",children:e.jsx("div",{className:"bm-card-title",children:"Leaderboard"})}),o.isLoading?e.jsx("div",{style:{padding:16},children:Array.from({length:5}).map((r,n)=>e.jsx(U,{className:"h-10 w-full mb-2"},n))}):I.length===0?e.jsx("div",{className:"no-results",children:"No evaluations submitted yet."}):e.jsxs("table",{className:"bm-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{className:"col-rank",children:"Rank"}),e.jsx("th",{className:"col-model",children:"Model"}),W&&e.jsx("th",{className:"col-harness",children:"Harness"}),e.jsxs("th",{className:"col-value",children:[h," ",A]}),e.jsx("th",{className:"col-paper",children:"Paper"}),e.jsx("th",{className:"col-year",children:"Year"})]})}),e.jsx("tbody",{children:(()=>{let r=null,n=0;return I.map((l,M)=>{var re,le,ne;const S=D((re=l.metrics)==null?void 0:re[h]);let F=null;S!==null&&((r===null||S!==r)&&(n=M+1,r=S),F=n);const te=l.paper_arxiv_id||l.paper_id,se=l.paper_title||(l.paper_arxiv_id?`arXiv:${l.paper_arxiv_id}`:null),X=g===l.id;return e.jsxs("tr",{ref:X?R:void 0,className:X?"is-highlighted":void 0,children:[e.jsx("td",{className:"col-rank",children:F??"β€”"}),e.jsxs("td",{className:"col-model",children:[X&&e.jsx("span",{className:"bm-row-marker","aria-hidden":"true"}),l.model_name||"β€”"]}),W&&e.jsx("td",{className:"col-harness",children:l.harness||"β€”"}),e.jsx("td",{className:`col-value ${F===1?"is-best":""}`,children:H((le=l.metrics)==null?void 0:le[h])}),e.jsx("td",{className:"col-paper",children:te?e.jsx(C,{to:`/paper/${te}`,children:se||"β€”"}):se||"β€”"}),e.jsx("td",{className:"col-year",children:((ne=l.paper_published_date)==null?void 0:ne.slice(0,4))||"β€”"})]},l.id)})})()})]})]})]})})};export{be as default};
 
1
+ import{G as ie,u as ce,r as w,j as e,L as C,I as H,H as oe}from"./index-BHu3ckjy.js";import{u as q}from"./adminAuth-W6_tdZNU.js";import{a as z}from"./api-gdpmQjJd.js";import{S as U,A as de,a as me}from"./alert-CJMW3r9v.js";import{L as O}from"./LatexTitle-BYOXQNlq.js";const he=({points:c,metric:k})=>{const b=oe(),[g,L]=w.useState(null),j=880,R=320,i=60,m=30,o=24,s=50,v=c.map(a=>a.value),_=Math.min(...v),Q=Math.max(...v)-_||1,A=j-i-m,T=R-o-s,V=A/Math.max(1,c.length-1),y=c.map((a,t)=>{const u=i+t*V,p=(a.value-_)/Q,N=o+T*(1-p);return{x:u,y:N,data:a}});let B=`M${y[0].x},${y[0].y}`;for(let a=1;a<y.length;a++){const t=y[a-1],u=y[a],p=(t.x+u.x)/2;B+=` C${p},${t.y} ${p},${u.y} ${u.x},${u.y}`}const d=5,I=a=>L(t=>t===a?null:t),W=a=>{a&&b(`/paper/${a}`)};return e.jsxs("svg",{width:"100%",viewBox:`0 0 ${j} ${R}`,style:{display:"block"},children:[e.jsx("text",{x:i-38,y:o+T/2,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"middle",transform:`rotate(-90 ${i-38} ${o+T/2})`,children:k}),Array.from({length:d}).map((a,t)=>{const u=t/(d-1),p=o+T*(1-u),N=_+Q*u;return e.jsxs("g",{children:[e.jsx("line",{x1:i,y1:p,x2:j-m,y2:p,stroke:"var(--hairline)",strokeWidth:"1"}),e.jsx("text",{x:i-10,y:p+4,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"end",children:H(N)})]},t)}),y.map((a,t)=>e.jsx("text",{x:a.x,y:R-s+18,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:"middle",children:a.data.dateLabel},t)),e.jsx("path",{d:B,stroke:"var(--accent)",strokeWidth:"2",fill:"none",strokeLinejoin:"round",strokeLinecap:"round"}),y.map((a,t)=>{const u=g===t,N=`${a.data.modelName||a.data.paperTitle||"Unknown model"}: ${H(a.data.value)} on ${a.data.dateLabel}`,x=!!a.data.paperRouteId;return e.jsxs("g",{children:[e.jsx("circle",{cx:a.x,cy:a.y,r:u?6:4.5,fill:u?"var(--accent)":"var(--bg-elevated)",stroke:"var(--accent)",strokeWidth:"2",style:{transition:"r 0.12s ease, fill 0.12s ease"}}),e.jsx("circle",{cx:a.x,cy:a.y,r:"14",fill:"transparent",style:{cursor:x?"pointer":"default",outline:"none"},tabIndex:0,role:x?"link":"img","aria-label":N,onMouseEnter:()=>L(t),onMouseLeave:()=>I(t),onFocus:()=>L(t),onBlur:()=>I(t),onClick:()=>W(a.data.paperRouteId),onKeyDown:f=>{x&&(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),W(a.data.paperRouteId))},children:e.jsx("title",{children:N})})]},t)}),g!==null&&(()=>{const a=y[g],t=a.data.modelName||a.data.paperTitle||"Unknown model",u=t.length>40?t.slice(0,39)+"…":t,p=`${H(a.data.value)} Β· ${a.data.dateLabel}`,x=Math.max(140,Math.min(320,Math.max(u.length,p.length)*6.6+24)),f=46;let $=a.x-x/2;$<i&&($=i),$+x>j-m&&($=j-m-x);const E=a.y-f-14>=o?a.y-f-12:a.y+12;return e.jsxs("g",{pointerEvents:"none",children:[e.jsx("rect",{x:$,y:E,width:x,height:f,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))"}}),e.jsx("text",{x:$+12,y:E+19,fontSize:"12",fontFamily:"var(--sans)",fill:"var(--ink)",fontWeight:500,children:u}),e.jsx("text",{x:$+12,y:E+36,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-soft)",children:p})]})})()]})};function D(c){if(c==null)return null;if(typeof c=="number")return Number.isFinite(c)?c:null;const k=c.includes("Β±")?c.split("Β±")[0].trim():c.trim(),b=parseFloat(k);return Number.isFinite(b)?b:null}function ue(c,k,b){if(c.length===0)return{points:[],sota:0,sotaModel:""};const g=c.map(s=>{var h;const v=D((h=s.metrics)==null?void 0:h[k]),_=s.paper_published_date||"";return{eval:s,value:v,date:_}}).filter(s=>s.value!==null&&!!s.date).sort((s,v)=>s.date.localeCompare(v.date)),L=[];let j=null;for(const s of g)(j==null?!0:b==="↓"?s.value<j:s.value>j)&&(j=s.value,L.push({value:s.value,dateLabel:s.date.slice(0,7),modelName:s.eval.model_name||"",paperTitle:s.eval.paper_title||"",paperRouteId:s.eval.paper_arxiv_id||s.eval.paper_id||null}));const i=c.map(s=>{var v;return{eval:s,value:D((v=s.metrics)==null?void 0:v[k])}}).filter(s=>s.value!==null).sort((s,v)=>b==="↓"?s.value-v.value:v.value-s.value)[0],m=(i==null?void 0:i.value)??0,o=(i==null?void 0:i.eval.model_name)||(i==null?void 0:i.eval.paper_title)||"";return{points:L,sota:m,sotaModel:o}}const be=()=>{var K,E,P,Y,G,J,Z,ee,ae;const{datasetSlug:c}=ie(),[k]=ce(),b=k.get("task")||void 0,g=k.get("eval")||void 0,[L,j]=w.useState(void 0),R=w.useRef(null),i=w.useRef(!1),m=q({queryKey:["dataset",c,"with-paper"],queryFn:()=>z.getDatasetBySlug(c,{include_paper:!0}),enabled:!!c,staleTime:10*60*1e3}),o=q({queryKey:["dataset-evals",(K=m.data)==null?void 0:K.id],queryFn:()=>z.getEvaluationsByDataset(m.data.id),enabled:!!((E=m.data)!=null&&E.id),staleTime:5*60*1e3}),s=q({queryKey:["dataset-tasks",(P=m.data)==null?void 0:P.id],queryFn:()=>z.getDatasetTasks(m.data.id),enabled:!!((Y=m.data)!=null&&Y.id),staleTime:10*60*1e3}),v=q({queryKey:["metric-directions"],queryFn:()=>z.getMetricDirections(),staleTime:60*60*1e3}),_=w.useMemo(()=>{const r=new Set;return(o.data||[]).forEach(n=>{n.best_metric&&r.add(n.best_metric),Object.keys(n.metrics||{}).forEach(l=>r.add(l))}),Array.from(r)},[o.data]),h=L||((J=(G=o.data)==null?void 0:G[0])==null?void 0:J.best_metric)||_[0]||"",A=(((ee=(Z=v.data)==null?void 0:Z.directions)==null?void 0:ee[h])||"higher_is_better")==="lower_is_better"?"↓":"↑",{points:T,sota:V,sotaModel:y}=w.useMemo(()=>ue(o.data||[],h,A),[o.data,h,A]);w.useEffect(()=>{if(i.current||!g||!o.data||o.data.length===0)return;const r=R.current;r&&(i.current=!0,r.scrollIntoView({behavior:"smooth",block:"start"}))},[g,o.data]);const B=w.useMemo(()=>{const r=s.data||[];if(r.length===0)return null;if(b){const n=r.find(l=>l.slug===b);if(n)return n}return r[0]},[s.data,b]);if(m.isLoading)return e.jsxs("div",{className:"page",children:[e.jsx(U,{className:"h-12 w-1/2 mb-6"}),e.jsx(U,{className:"h-64 w-full"})]});if(m.error||!m.data)return e.jsx("div",{className:"page",children:e.jsx(de,{variant:"destructive",children:e.jsx(me,{children:"Benchmark not found."})})});const d=m.data,I=(o.data||[]).slice().sort((r,n)=>{var S,F;const l=D((S=r.metrics)==null?void 0:S[h]),M=D((F=n.metrics)==null?void 0:F[h]);return l!==null&&M!==null?A==="↓"?l-M:M-l:l!==null?-1:M!==null?1:(r.best_rank??9999)-(n.best_rank??9999)}),W=!!d.supports_harness,a=g&&I.find(r=>r.id===g)||null,t=d.introducing_paper??void 0,u=(()=>{if(!d.paper_url)return null;const r=d.paper_url.match(/arxiv\.org\/(?:abs|pdf)\/([\w.-]+)/i);if(r&&r[1])return r[1].replace(/\.pdf$/i,"");const n=d.paper_url.match(/\/(?:paper|abs|pdf)\/([\w.-]+)/i);return n&&n[1]?n[1].replace(/\.pdf$/i,""):null})(),p=(t==null?void 0:t.arxiv_id)||u,N=p,x=(t==null?void 0:t.title)||d.introducing_paper_title||null,f=((ae=t==null?void 0:t.published)==null?void 0:ae.slice(0,4))||d.introduced_year||null,$=!!p||!!d.paper_url||!!x;return e.jsx("div",{className:"page",children:e.jsxs("div",{className:"bm-page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(C,{to:"/tasks",children:"Tasks"}),B&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(C,{to:`/tasks/${B.slug||B.id}`,children:B.name})]}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--accent-text)"},children:d.name})]}),e.jsx("h1",{className:"bm-title",children:d.name}),e.jsxs("div",{className:"bm-subtitle",children:[h&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"metric-tag",children:h}),e.jsx("span",{style:{color:"var(--hairline-strong)",margin:"0 8px"},children:"Β·"})]}),y?e.jsxs("span",{children:["Best: ",e.jsx("span",{className:"best-name",children:H(V)})," by ",e.jsx("span",{className:"best-name",style:{fontStyle:"normal"},children:y})]}):e.jsxs("span",{children:[I.length," evaluations"]})]}),d.description&&e.jsx("p",{style:{fontFamily:"var(--serif)",color:"var(--ink-soft)",maxWidth:760,marginBottom:16},children:d.description}),$&&e.jsxs("div",{className:"method-source",style:{marginTop:0,marginBottom:18},children:[e.jsx("span",{className:"method-source-label",children:"Source"}),N?e.jsxs(C,{to:`/paper/${N}`,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[e.jsx("span",{className:"method-source-title",children:x?e.jsx(O,{title:x}):`arXiv:${N}`}),f&&e.jsx("span",{className:"method-source-meta",children:f})]}):d.paper_url?e.jsxs("a",{href:d.paper_url,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[e.jsx("span",{className:"method-source-title",children:x?e.jsx(O,{title:x}):p?`arXiv:${p}`:d.paper_url}),f&&e.jsx("span",{className:"method-source-meta",children:f})]}):e.jsxs("div",{className:"method-source-link is-static",children:[e.jsx("span",{className:"method-source-title",children:x?e.jsx(O,{title:x}):null}),f&&e.jsx("span",{className:"method-source-meta",children:f})]})]}),_.length>1&&e.jsxs("div",{className:"bm-actions",children:[e.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginRight:8},children:"METRIC"}),_.map(r=>e.jsx("button",{className:`bm-action-btn ${r===h?"is-active":""}`,onClick:()=>j(r),children:r},r))]}),T.length>=2&&e.jsxs("div",{className:"bm-card",children:[e.jsx("div",{className:"bm-card-head",children:e.jsx("div",{className:"bm-card-title",children:"SOTA progression"})}),e.jsx("div",{className:"bm-chart-wrap",children:e.jsx(he,{points:T,metric:h})}),e.jsxs("div",{className:"bm-chart-foot",children:[e.jsx("span",{className:"legend-dot"}),"Best result over time Β· hover a point to see the model Β· click to open the paper"]})]}),a&&(()=>{var S,F;const r=a.paper_arxiv_id||a.paper_id,n=a.paper_title||(a.paper_arxiv_id?`arXiv:${a.paper_arxiv_id}`:null),l=a.best_metric&&((S=a.metrics)==null?void 0:S[a.best_metric])!==void 0?a.best_metric:h,M=(F=a.metrics)==null?void 0:F[l];return e.jsxs("div",{className:"bm-highlight-banner",role:"status",children:[e.jsx("span",{className:"bm-highlight-dot","aria-hidden":"true"}),e.jsxs("div",{className:"bm-highlight-text",children:[e.jsx("span",{className:"bm-highlight-label",children:"Comparing result"}),e.jsxs("span",{className:"bm-highlight-paper",children:[a.model_name||n||"β€”",a.harness?` Β· ${a.harness}`:""]}),e.jsxs("span",{className:"bm-highlight-meta",children:[M!==void 0&&l?e.jsxs(e.Fragment,{children:[l,": ",H(M),n?" Β· ":""]}):null,n&&r?e.jsx(C,{to:`/paper/${r}`,children:n}):n||null]})]})]})})(),e.jsxs("div",{className:"bm-card",children:[e.jsx("div",{className:"bm-card-head",children:e.jsx("div",{className:"bm-card-title",children:"Leaderboard"})}),o.isLoading?e.jsx("div",{style:{padding:16},children:Array.from({length:5}).map((r,n)=>e.jsx(U,{className:"h-10 w-full mb-2"},n))}):I.length===0?e.jsx("div",{className:"no-results",children:"No evaluations submitted yet."}):e.jsxs("table",{className:"bm-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{className:"col-rank",children:"Rank"}),e.jsx("th",{className:"col-model",children:"Model"}),W&&e.jsx("th",{className:"col-harness",children:"Harness"}),e.jsxs("th",{className:"col-value",children:[h," ",A]}),e.jsx("th",{className:"col-paper",children:"Paper"}),e.jsx("th",{className:"col-year",children:"Year"})]})}),e.jsx("tbody",{children:(()=>{let r=null,n=0;return I.map((l,M)=>{var re,le,ne;const S=D((re=l.metrics)==null?void 0:re[h]);let F=null;S!==null&&((r===null||S!==r)&&(n=M+1,r=S),F=n);const te=l.paper_arxiv_id||l.paper_id,se=l.paper_title||(l.paper_arxiv_id?`arXiv:${l.paper_arxiv_id}`:null),X=g===l.id;return e.jsxs("tr",{ref:X?R:void 0,className:X?"is-highlighted":void 0,children:[e.jsx("td",{className:"col-rank",children:F??"β€”"}),e.jsxs("td",{className:"col-model",children:[X&&e.jsx("span",{className:"bm-row-marker","aria-hidden":"true"}),l.model_name||"β€”"]}),W&&e.jsx("td",{className:"col-harness",children:l.harness||"β€”"}),e.jsx("td",{className:`col-value ${F===1?"is-best":""}`,children:H((le=l.metrics)==null?void 0:le[h])}),e.jsx("td",{className:"col-paper",children:te?e.jsx(C,{to:`/paper/${te}`,children:se||"β€”"}):se||"β€”"}),e.jsx("td",{className:"col-year",children:((ne=l.paper_published_date)==null?void 0:ne.slice(0,4))||"β€”"})]},l.id)})})()})]})]})]})})};export{be as default};
assets/{CronDashboard-B5Xx5Zr8.js β†’ CronDashboard-mLr5RZh4.js} RENAMED
@@ -1,4 +1,4 @@
1
- import{d as m,r as i,j as e,o as w,z as Y,E as Z}from"./index-BBLNzdQ3.js";import{i as G,u as ee,j as se}from"./adminAuth-BcLoDHjH.js";import{B as b,I as te,L as R,a as N,D as ae}from"./badge-BYXN-Rwa.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
 
1
+ import{d as m,r as i,j as e,o as w,z as Y,E as Z}from"./index-BHu3ckjy.js";import{i as G,u as ee,j as se}from"./adminAuth-W6_tdZNU.js";import{B as b,I as te,L as R,a as N,D as ae}from"./badge-DxH3OGz4.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
assets/FeedView-Cf5wgU9c.js DELETED
@@ -1 +0,0 @@
1
- import{u as I,r as _,j as e,L as m}from"./index-BBLNzdQ3.js";import{P as L}from"./components-mDG31Y87.js";import{a as T}from"./api-BrmxIuWZ.js";import{t as E,a as R,d as b}from"./transform-C-0glUhY.js";import{u as D,a as M}from"./usePapers-B6SkGdse.js";import{u as C}from"./useIntersectionObserver-BzvTehzD.js";import{P as W}from"./usePeriodFilter-Cqf3tn7X.js";import{S as n,A as q,a as $}from"./alert-CHYYTMmo.js";import{u as v}from"./adminAuth-BcLoDHjH.js";import"./LatexTitle-DziDol_D.js";import"./useInfiniteQuery-BYHbC7kX.js";const z=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],B={Today:"today","This Week":"week","This Month":"month","All Time":"all_time"},K={today:"Today",week:"This Week",month:"This Month",all_time:"All Time"},U={today:1,week:7,month:30,all_time:365},X=i=>i==="trending"||i==="date_published"||i==="citation_count"?i:"trending",G=i=>i==="today"||i==="week"||i==="month"||i==="all_time"?i:"all_time",te=()=>{var x,u,j,f,N,y;const[i,h]=I(),r=X(i.get("order_by")),o=G(i.get("time")),P=K[o],w=s=>{const a=new URLSearchParams(i);a.set("order_by",s),h(a)},k=s=>{const a=new URLSearchParams(i);a.set("time",B[s]),h(a)},p=v({queryKey:["top-tasks-sidebar"],queryFn:()=>T.getTasks({ordering:"-paper_count",page_size:8}),staleTime:10*60*1e3}),d=v({queryKey:["trending-tasks-sidebar"],queryFn:()=>T.getTrendingTasks({limit:8}),staleTime:10*60*1e3}),t=D({page_size:30,order_by:r,order_dir:"desc",time:o,include_resources:!0,enabled:r!=="trending"}),l=M({limit:30,max_age_days:U[o],enabled:r==="trending"}),c=_.useMemo(()=>{var a;return r==="trending"?(l.data||[]).map(E):(((a=t.data)==null?void 0:a.pages.flatMap(S=>S.results))||[]).map(R)},[r,t.data,l.data]),{targetRef:F,isIntersecting:g}=C({rootMargin:"400px"});_.useEffect(()=>{r!=="trending"&&g&&t.hasNextPage&&!t.isFetchingNextPage&&t.fetchNextPage()},[r,g,t.hasNextPage,t.isFetchingNextPage]);const A=r==="trending"?l.isLoading:t.isLoading,O=r==="trending"?l.error:t.error;return e.jsxs("div",{className:"page",children:[e.jsxs("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.jsx("div",{style:{display:"flex",gap:16,alignItems:"center",flexWrap:"wrap"},children:e.jsx("div",{className:"period-switch",children:W.map(s=>e.jsx("button",{className:`period-btn ${P===s?"active":""}`,onClick:()=>k(s),children:s},s))})})]}),e.jsxs("div",{className:"layout-with-sidebar",children:[e.jsxs("aside",{className:"sidebar",children:[e.jsxs("div",{className:"sidebar-section",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),p.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,a)=>e.jsx(n,{className:"h-5 w-full"},a))}),(u=(x=p.data)==null?void 0:x.results)==null?void 0:u.map(s=>e.jsxs(m,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[b(s.name,s.slug),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count})]},s.id)),e.jsx(m,{to:"/tasks",className:"sidebar-link",style:{marginTop:8,fontStyle:"italic"},children:"all domains β†’"})]}),e.jsxs("div",{className:"sidebar-section",children:[e.jsx("div",{className:"sidebar-label",children:"Trending Domains"}),d.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,a)=>e.jsx(n,{className:"h-5 w-full"},a))}),((f=(j=d.data)==null?void 0:j.results)==null?void 0:f.length)===0&&!d.isLoading&&e.jsx("div",{style:{fontSize:12,color:"var(--ink-faint)"},children:"No domains gaining momentum right now."}),(y=(N=d.data)==null?void 0:N.results)==null?void 0:y.map(s=>e.jsxs(m,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[b(s.name,s.slug),e.jsxs("span",{className:"count",children:[s.share_lift.toFixed(1),"x"]})]},s.id))]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"sort-bar",children:[e.jsx("div",{className:"sort-options",children:z.map(([s,a])=>e.jsx("button",{className:`sort-btn ${r===s?"active":""}`,onClick:()=>w(s),children:a},s))}),e.jsxs("div",{className:"results-count",children:[c.length," papers"]})]}),O&&e.jsx(q,{variant:"destructive",className:"mb-4",children:e.jsx($,{children:"Failed to load papers. Please try again."})}),A?e.jsx("div",{className:"paper-list",children:Array.from({length:6}).map((s,a)=>e.jsxs("div",{className:"paper-card",children:[e.jsx(n,{className:"h-[220px] w-[160px]"}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(n,{className:"h-6 w-3/4"}),e.jsx(n,{className:"h-4 w-1/2"}),e.jsx(n,{className:"h-12 w-full"})]})]},a))}):c.length===0?e.jsx("div",{className:"no-results",children:"No papers in this window."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:c.map((s,a)=>e.jsx(L,{paper:s,rank:a+1},s.id))}),r!=="trending"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{ref:F,style:{height:1}}),t.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})]})]})]})};export{te as default};
 
 
assets/FeedView-Dnsgf6iQ.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{u as S,r as y,j as e,L as m}from"./index-BHu3ckjy.js";import{P as I}from"./components-Cg3rKVQ3.js";import{a as T}from"./api-gdpmQjJd.js";import{t as L,a as E,d as _}from"./transform-BxhHCT2R.js";import{u as R,a as D}from"./usePapers-BJol1iZF.js";import{u as M}from"./useIntersectionObserver-BIld5T_u.js";import{P as C}from"./usePeriodFilter-D7A3mTfk.js";import{S as n,A as W,a as q}from"./alert-CJMW3r9v.js";import{u as b}from"./adminAuth-W6_tdZNU.js";import"./LatexTitle-BYOXQNlq.js";import"./useInfiniteQuery-DPq_eewq.js";const $=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],B={Today:"today","This Week":"week","This Month":"month","All Time":"all_time"},z={today:"Today",week:"This Week",month:"This Month",all_time:"All Time"},K={today:1,week:7,month:30,all_time:365},U=i=>i==="trending"||i==="date_published"||i==="citation_count"?i:"trending",X=i=>i==="today"||i==="week"||i==="month"||i==="all_time"?i:"all_time",re=()=>{var x,u,j,f,N;const[i,h]=S(),r=U(i.get("order_by")),o=X(i.get("time")),v=z[o],P=s=>{const a=new URLSearchParams(i);a.set("order_by",s),h(a)},w=s=>{const a=new URLSearchParams(i);a.set("time",B[s]),h(a)},p=b({queryKey:["top-tasks-sidebar"],queryFn:()=>T.getTopTasks({limit:8}),staleTime:10*60*1e3}),l=b({queryKey:["trending-tasks-sidebar"],queryFn:()=>T.getTrendingTasks({limit:8}),staleTime:10*60*1e3}),t=R({page_size:30,order_by:r,order_dir:"desc",time:o,include_resources:!0,enabled:r!=="trending"}),d=D({limit:30,max_age_days:K[o],enabled:r==="trending"}),c=y.useMemo(()=>{var a;return r==="trending"?(d.data||[]).map(L):(((a=t.data)==null?void 0:a.pages.flatMap(O=>O.results))||[]).map(E)},[r,t.data,d.data]),{targetRef:k,isIntersecting:g}=M({rootMargin:"400px"});y.useEffect(()=>{r!=="trending"&&g&&t.hasNextPage&&!t.isFetchingNextPage&&t.fetchNextPage()},[r,g,t.hasNextPage,t.isFetchingNextPage]);const F=r==="trending"?d.isLoading:t.isLoading,A=r==="trending"?d.error:t.error;return e.jsxs("div",{className:"page",children:[e.jsxs("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.jsx("div",{style:{display:"flex",gap:16,alignItems:"center",flexWrap:"wrap"},children:e.jsx("div",{className:"period-switch",children:C.map(s=>e.jsx("button",{className:`period-btn ${v===s?"active":""}`,onClick:()=>w(s),children:s},s))})})]}),e.jsxs("div",{className:"layout-with-sidebar",children:[e.jsxs("aside",{className:"sidebar",children:[e.jsxs("div",{className:"sidebar-section",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),p.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,a)=>e.jsx(n,{className:"h-5 w-full"},a))}),(x=p.data)==null?void 0:x.map(s=>e.jsxs(m,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[_(s.name,s.slug),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count})]},s.id)),e.jsx(m,{to:"/tasks",className:"sidebar-link",style:{marginTop:8,fontStyle:"italic"},children:"all domains β†’"})]}),e.jsxs("div",{className:"sidebar-section",children:[e.jsx("div",{className:"sidebar-label",children:"Trending Domains"}),l.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,a)=>e.jsx(n,{className:"h-5 w-full"},a))}),((j=(u=l.data)==null?void 0:u.results)==null?void 0:j.length)===0&&!l.isLoading&&e.jsx("div",{style:{fontSize:12,color:"var(--ink-faint)"},children:"No domains gaining momentum right now."}),(N=(f=l.data)==null?void 0:f.results)==null?void 0:N.map(s=>e.jsxs(m,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[_(s.name,s.slug),e.jsxs("span",{className:"count",children:[s.share_lift.toFixed(1),"x"]})]},s.id))]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"sort-bar",children:[e.jsx("div",{className:"sort-options",children:$.map(([s,a])=>e.jsx("button",{className:`sort-btn ${r===s?"active":""}`,onClick:()=>P(s),children:a},s))}),e.jsxs("div",{className:"results-count",children:[c.length," papers"]})]}),A&&e.jsx(W,{variant:"destructive",className:"mb-4",children:e.jsx(q,{children:"Failed to load papers. Please try again."})}),F?e.jsx("div",{className:"paper-list",children:Array.from({length:6}).map((s,a)=>e.jsxs("div",{className:"paper-card",children:[e.jsx(n,{className:"h-[220px] w-[160px]"}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(n,{className:"h-6 w-3/4"}),e.jsx(n,{className:"h-4 w-1/2"}),e.jsx(n,{className:"h-12 w-full"})]})]},a))}):c.length===0?e.jsx("div",{className:"no-results",children:"No papers in this window."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:c.map((s,a)=>e.jsx(I,{paper:s,rank:a+1},s.id))}),r!=="trending"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{ref:k,style:{height:1}}),t.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})]})]})]})};export{re as default};
assets/{LatexTitle-DziDol_D.js β†’ LatexTitle-BYOXQNlq.js} RENAMED
@@ -1,4 +1,4 @@
1
- import{j as Er,r as Qt}from"./index-BBLNzdQ3.js";class S extends Error{constructor(e,t){var a="KaTeX parse error: "+e,n,l,u=t&&t.loc;if(u&&u.start<=u.end){var h=u.lexer.input;n=u.start,l=u.end,n===h.length?a+=" at end of input: ":a+=" at position "+(n+1)+": ";var c=h.slice(n,l).replace(/[^]/g,"$&Μ²"),p;n>15?p="…"+h.slice(n-15,n):p=h.slice(0,n);var g;l+15<h.length?g=h.slice(l,l+15)+"…":g=h.slice(l),a+=p+c+g}super(a),this.name="ParseError",Object.setPrototypeOf(this,S.prototype),this.position=n,n!=null&&l!=null&&(this.length=l-n),this.rawMessage=e}}var H1=/([A-Z])/g,Tt=r=>r.replace(H1,"-$1").toLowerCase(),F1={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},L1=/[&><"']/g,n0=r=>String(r).replace(L1,e=>F1[e]),De=r=>r.type==="ordgroup"||r.type==="color"?r.body.length===1?De(r.body[0]):r:r.type==="font"?De(r.body):r,P1=new Set(["mathord","textord","atom"]),C0=r=>P1.has(De(r).type),G1=r=>{var e=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(r);return e?e[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e[1])?null:e[1].toLowerCase():"_relative"},dt={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:r=>"#"+r},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(r,e)=>(e.push(r),e)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:r=>Math.max(0,r),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:r=>Math.max(0,r),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:r=>Math.max(0,r),cli:"-e, --max-expand <n>",cliProcessor:r=>r==="Infinity"?1/0:parseInt(r)},globalGroup:{type:"boolean",cli:!1}};function U1(r){if("default"in r)return r.default;var e=r.type,t=Array.isArray(e)?e[0]:e;if(typeof t!="string")return t.enum[0];switch(t){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class Bt{constructor(e){e===void 0&&(e={}),e=e||{};for(var t of Object.keys(dt)){var a=dt[t],n=e[t];this[t]=n!==void 0?a.processor?a.processor(n):n:U1(a)}}reportNonstrict(e,t,a){var n=this.strict;if(typeof n=="function"&&(n=n(e,t,a)),!(!n||n==="ignore")){if(n===!0||n==="error")throw new S("LaTeX-incompatible input and strict mode is set to 'error': "+(t+" ["+e+"]"),a);n==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+n+"': "+t+" ["+e+"]"))}}useStrictBehavior(e,t,a){var n=this.strict;if(typeof n=="function")try{n=n(e,t,a)}catch{n="error"}return!n||n==="ignore"?!1:n===!0||n==="error"?!0:n==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+n+"': "+t+" ["+e+"]")),!1)}isTrusted(e){if("url"in e&&e.url&&!e.protocol){var t=G1(e.url);if(t==null)return!1;e.protocol=t}var a=typeof this.trust=="function"?this.trust(e):this.trust;return!!a}}class O0{constructor(e,t,a){this.id=e,this.size=t,this.cramped=a}sup(){return w0[$1[this.id]]}sub(){return w0[V1[this.id]]}fracNum(){return w0[X1[this.id]]}fracDen(){return w0[Y1[this.id]]}cramp(){return w0[W1[this.id]]}text(){return w0[j1[this.id]]}isTight(){return this.size>=2}}var Dt=0,qe=1,_0=2,B0=3,he=4,g0=5,ee=6,u0=7,w0=[new O0(Dt,0,!1),new O0(qe,0,!0),new O0(_0,1,!1),new O0(B0,1,!0),new O0(he,2,!1),new O0(g0,2,!0),new O0(ee,3,!1),new O0(u0,3,!0)],$1=[he,g0,he,g0,ee,u0,ee,u0],V1=[g0,g0,g0,g0,u0,u0,u0,u0],X1=[_0,B0,he,g0,ee,u0,ee,u0],Y1=[B0,B0,g0,g0,u0,u0,u0,u0],W1=[qe,qe,B0,B0,g0,g0,u0,u0],j1=[Dt,qe,_0,B0,_0,B0,_0,B0],N={DISPLAY:w0[Dt],TEXT:w0[_0],SCRIPT:w0[he],SCRIPTSCRIPT:w0[ee]},ft=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function Z1(r){for(var e=0;e<ft.length;e++)for(var t=ft[e],a=0;a<t.blocks.length;a++){var n=t.blocks[a];if(r>=n[0]&&r<=n[1])return t.name}return null}var Ce=[];ft.forEach(r=>r.blocks.forEach(e=>Ce.push(...e)));function Rr(r){for(var e=0;e<Ce.length;e+=2)if(r>=Ce[e]&&r<=Ce[e+1])return!0;return!1}var r0=r=>r+" "+r,Q0=80,K1=function(e,t){return"M95,"+(622+e+t)+`
2
  c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
3
  c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
4
  c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
 
1
+ import{j as Er,r as Qt}from"./index-BHu3ckjy.js";class S extends Error{constructor(e,t){var a="KaTeX parse error: "+e,n,l,u=t&&t.loc;if(u&&u.start<=u.end){var h=u.lexer.input;n=u.start,l=u.end,n===h.length?a+=" at end of input: ":a+=" at position "+(n+1)+": ";var c=h.slice(n,l).replace(/[^]/g,"$&Μ²"),p;n>15?p="…"+h.slice(n-15,n):p=h.slice(0,n);var g;l+15<h.length?g=h.slice(l,l+15)+"…":g=h.slice(l),a+=p+c+g}super(a),this.name="ParseError",Object.setPrototypeOf(this,S.prototype),this.position=n,n!=null&&l!=null&&(this.length=l-n),this.rawMessage=e}}var H1=/([A-Z])/g,Tt=r=>r.replace(H1,"-$1").toLowerCase(),F1={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},L1=/[&><"']/g,n0=r=>String(r).replace(L1,e=>F1[e]),De=r=>r.type==="ordgroup"||r.type==="color"?r.body.length===1?De(r.body[0]):r:r.type==="font"?De(r.body):r,P1=new Set(["mathord","textord","atom"]),C0=r=>P1.has(De(r).type),G1=r=>{var e=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(r);return e?e[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e[1])?null:e[1].toLowerCase():"_relative"},dt={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:r=>"#"+r},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(r,e)=>(e.push(r),e)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:r=>Math.max(0,r),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:r=>Math.max(0,r),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:r=>Math.max(0,r),cli:"-e, --max-expand <n>",cliProcessor:r=>r==="Infinity"?1/0:parseInt(r)},globalGroup:{type:"boolean",cli:!1}};function U1(r){if("default"in r)return r.default;var e=r.type,t=Array.isArray(e)?e[0]:e;if(typeof t!="string")return t.enum[0];switch(t){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class Bt{constructor(e){e===void 0&&(e={}),e=e||{};for(var t of Object.keys(dt)){var a=dt[t],n=e[t];this[t]=n!==void 0?a.processor?a.processor(n):n:U1(a)}}reportNonstrict(e,t,a){var n=this.strict;if(typeof n=="function"&&(n=n(e,t,a)),!(!n||n==="ignore")){if(n===!0||n==="error")throw new S("LaTeX-incompatible input and strict mode is set to 'error': "+(t+" ["+e+"]"),a);n==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+n+"': "+t+" ["+e+"]"))}}useStrictBehavior(e,t,a){var n=this.strict;if(typeof n=="function")try{n=n(e,t,a)}catch{n="error"}return!n||n==="ignore"?!1:n===!0||n==="error"?!0:n==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+n+"': "+t+" ["+e+"]")),!1)}isTrusted(e){if("url"in e&&e.url&&!e.protocol){var t=G1(e.url);if(t==null)return!1;e.protocol=t}var a=typeof this.trust=="function"?this.trust(e):this.trust;return!!a}}class O0{constructor(e,t,a){this.id=e,this.size=t,this.cramped=a}sup(){return w0[$1[this.id]]}sub(){return w0[V1[this.id]]}fracNum(){return w0[X1[this.id]]}fracDen(){return w0[Y1[this.id]]}cramp(){return w0[W1[this.id]]}text(){return w0[j1[this.id]]}isTight(){return this.size>=2}}var Dt=0,qe=1,_0=2,B0=3,he=4,g0=5,ee=6,u0=7,w0=[new O0(Dt,0,!1),new O0(qe,0,!0),new O0(_0,1,!1),new O0(B0,1,!0),new O0(he,2,!1),new O0(g0,2,!0),new O0(ee,3,!1),new O0(u0,3,!0)],$1=[he,g0,he,g0,ee,u0,ee,u0],V1=[g0,g0,g0,g0,u0,u0,u0,u0],X1=[_0,B0,he,g0,ee,u0,ee,u0],Y1=[B0,B0,g0,g0,u0,u0,u0,u0],W1=[qe,qe,B0,B0,g0,g0,u0,u0],j1=[Dt,qe,_0,B0,_0,B0,_0,B0],N={DISPLAY:w0[Dt],TEXT:w0[_0],SCRIPT:w0[he],SCRIPTSCRIPT:w0[ee]},ft=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function Z1(r){for(var e=0;e<ft.length;e++)for(var t=ft[e],a=0;a<t.blocks.length;a++){var n=t.blocks[a];if(r>=n[0]&&r<=n[1])return t.name}return null}var Ce=[];ft.forEach(r=>r.blocks.forEach(e=>Ce.push(...e)));function Rr(r){for(var e=0;e<Ce.length;e+=2)if(r>=Ce[e]&&r<=Ce[e+1])return!0;return!1}var r0=r=>r+" "+r,Q0=80,K1=function(e,t){return"M95,"+(622+e+t)+`
2
  c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
3
  c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
4
  c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
assets/{MethodDetailView-B_WtVDNU.js β†’ MethodDetailView-xBNKBgyD.js} RENAMED
The diff for this file is too large to render. See raw diff
 
assets/{MethodsIndexView-B2gFKYGg.js β†’ MethodsIndexView-DRzt4_Bz.js} RENAMED
@@ -1 +1 @@
1
- import{r as u,j as e,L as x}from"./index-BBLNzdQ3.js";import{u as c}from"./adminAuth-BcLoDHjH.js";import{a as h}from"./api-BrmxIuWZ.js";import{A as g,a as j,S as m}from"./alert-CHYYTMmo.js";const N=()=>{var o,d;const i=c({queryKey:["areas-all"],queryFn:()=>h.getAreas({page_size:50,ordering:"name"}),staleTime:6e5}),n=c({queryKey:["methods-all"],queryFn:async()=>(await h.getMethods({page:1,page_size:500,ordering:"-paper_count"})).results,staleTime:10*60*1e3}),l=u.useMemo(()=>{if(!n.data||!i.data)return null;const a={};return n.data.forEach(r=>{const t=r.area_id??"_unassigned";(a[t]||(a[t]=[])).push(r)}),Object.values(a).forEach(r=>r.sort((t,s)=>(s.paper_count||0)-(t.paper_count||0))),a},[n.data,i.data]);return i.error||n.error?e.jsx("div",{className:"page",children:e.jsx(g,{variant:"destructive",children:e.jsx(j,{children:"Failed to load methods."})})}):e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Methods ",e.jsx("em",{children:"library"})]}),e.jsx("div",{className:"feed-subtitle",children:"Common techniques used across AI research, with the papers that use them."})]})}),i.isLoading||n.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:4}).map((a,r)=>e.jsxs("div",{children:[e.jsx(m,{className:"h-8 w-1/3 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:8}).map((t,s)=>e.jsx(m,{className:"h-20"},s))})]},r))}):(d=(o=i.data)==null?void 0:o.results)==null?void 0:d.map(a=>{const r=(l==null?void 0:l[a.id])||[];if(r.length===0)return null;const t=r.reduce((s,p)=>s+(p.paper_count||0),0);return e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsx("div",{children:e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:a.name})}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[r.length," methods Β· ",t.toLocaleString()," papers"]})]}),e.jsx("div",{className:"tag-grid",children:r.map(s=>e.jsxs(x,{to:`/methods/${s.slug||s.id}`,className:"tag-cell",children:[e.jsx("div",{className:"name",style:{fontFamily:"var(--mono)",fontSize:15},children:s.name}),e.jsxs("div",{className:"meta",children:[e.jsxs("span",{children:[(s.paper_count??0).toLocaleString()," papers"]}),s.introduced_year!=null&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"Β·"}),e.jsx("span",{children:s.introduced_year})]})]})]},s.id))})]},a.id)})]})};export{N as default};
 
1
+ import{r as u,j as e,L as x}from"./index-BHu3ckjy.js";import{u as c}from"./adminAuth-W6_tdZNU.js";import{a as h}from"./api-gdpmQjJd.js";import{A as g,a as j,S as m}from"./alert-CJMW3r9v.js";const N=()=>{var o,d;const i=c({queryKey:["areas-all"],queryFn:()=>h.getAreas({page_size:50,ordering:"name"}),staleTime:6e5}),n=c({queryKey:["methods-all"],queryFn:async()=>(await h.getMethods({page:1,page_size:500,ordering:"-paper_count"})).results,staleTime:10*60*1e3}),l=u.useMemo(()=>{if(!n.data||!i.data)return null;const a={};return n.data.forEach(r=>{const t=r.area_id??"_unassigned";(a[t]||(a[t]=[])).push(r)}),Object.values(a).forEach(r=>r.sort((t,s)=>(s.paper_count||0)-(t.paper_count||0))),a},[n.data,i.data]);return i.error||n.error?e.jsx("div",{className:"page",children:e.jsx(g,{variant:"destructive",children:e.jsx(j,{children:"Failed to load methods."})})}):e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Methods ",e.jsx("em",{children:"library"})]}),e.jsx("div",{className:"feed-subtitle",children:"Common techniques used across AI research, with the papers that use them."})]})}),i.isLoading||n.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:4}).map((a,r)=>e.jsxs("div",{children:[e.jsx(m,{className:"h-8 w-1/3 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:8}).map((t,s)=>e.jsx(m,{className:"h-20"},s))})]},r))}):(d=(o=i.data)==null?void 0:o.results)==null?void 0:d.map(a=>{const r=(l==null?void 0:l[a.id])||[];if(r.length===0)return null;const t=r.reduce((s,p)=>s+(p.paper_count||0),0);return e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsx("div",{children:e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:a.name})}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[r.length," methods Β· ",t.toLocaleString()," papers"]})]}),e.jsx("div",{className:"tag-grid",children:r.map(s=>e.jsxs(x,{to:`/methods/${s.slug||s.id}`,className:"tag-cell",children:[e.jsx("div",{className:"name",style:{fontFamily:"var(--mono)",fontSize:15},children:s.name}),e.jsxs("div",{className:"meta",children:[e.jsxs("span",{children:[(s.paper_count??0).toLocaleString()," papers"]}),s.introduced_year!=null&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"Β·"}),e.jsx("span",{children:s.introduced_year})]})]})]},s.id))})]},a.id)})]})};export{N as default};
assets/{NotFound-AQv_XkN6.js β†’ NotFound-CLmT-1WG.js} RENAMED
@@ -1 +1 @@
1
- import{W as o,r as s,j as t,L as a}from"./index-BBLNzdQ3.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};
 
1
+ import{W as o,r as s,j as t,L as a}from"./index-BHu3ckjy.js";const r=()=>{const e=o();return s.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),t.jsxs("div",{className:"page",style:{textAlign:"center",paddingTop:96},children:[t.jsx("h1",{className:"detail-title",style:{fontSize:96,marginBottom:8},children:"404"}),t.jsx("p",{style:{fontFamily:"var(--serif)",fontStyle:"italic",color:"var(--ink-soft)",marginBottom:24},children:"That route isn't on the map."}),t.jsx(a,{to:"/",className:"action-btn",children:"Return home"})]})};export{r as default};
assets/{PaperDetailView-Wm1j7h1p.js β†’ PaperDetailView-hV8jpY0C.js} RENAMED
@@ -1,4 +1,4 @@
1
- var Nt=s=>{throw TypeError(s)};var Le=(s,a,r)=>a.has(s)||Nt("Cannot "+r);var M=(s,a,r)=>(Le(s,a,"read from private field"),r?r.call(s):a.get(s)),ne=(s,a,r)=>a.has(s)?Nt("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(s):a.set(s,r),ie=(s,a,r,i)=>(Le(s,a,"write to private field"),i?i.call(s,r):a.set(s,r),r),oe=(s,a,r)=>(Le(s,a,"access private method"),r);import{S as vs,s as bs,h as kt,g as ys,n as Dt,a as ae,r as l,b as Ns,c as ks,d as je,j as e,P as Re,e as J,f as Mt,i as ve,k as ee,l as _s,m as It,C as Y,o as Z,p as ws,q as Oe,t as Cs,v as Es,R as Ss,w as Ps,F as Rs,D as Ds,x as Ms,X as Qe,y as He,z as De,A as Ue,B as Tt,E as At,G as Is,H as Ts,L as xe,I as As}from"./index-BBLNzdQ3.js";import{u as q}from"./adminAuth-BcLoDHjH.js";import{I as z,T as Fs,M as $s}from"./components-mDG31Y87.js";import{L as _t,a as Ls}from"./LatexTitle-DziDol_D.js";import{g as Os,u as qs,b as Ft,c as Bs,d as zs,e as Ks,f as Qs,h as Hs,i as Us,j as Ws,k as wt,a as Ee,l as Gs}from"./api-BrmxIuWZ.js";import{e as Vs}from"./transform-C-0glUhY.js";import{b as Xs}from"./usePapers-B6SkGdse.js";import{S as ge,A as Ys,a as Zs}from"./alert-CHYYTMmo.js";import{I as V,L as te,B as A,a as $t,D as Js}from"./badge-BYXN-Rwa.js";import"./useInfiniteQuery-BYHbC7kX.js";var K,G,$,Q,H,Ce,Ke,Rt,ea=(Rt=class extends vs{constructor(a,r){super();ne(this,H);ne(this,K);ne(this,G);ne(this,$);ne(this,Q);ie(this,K,a),this.setOptions(r),this.bindMethods(),oe(this,H,Ce).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(a){var i;const r=this.options;this.options=M(this,K).defaultMutationOptions(a),bs(this.options,r)||M(this,K).getMutationCache().notify({type:"observerOptionsUpdated",mutation:M(this,$),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&kt(r.mutationKey)!==kt(this.options.mutationKey)?this.reset():((i=M(this,$))==null?void 0:i.state.status)==="pending"&&M(this,$).setOptions(this.options)}onUnsubscribe(){var a;this.hasListeners()||(a=M(this,$))==null||a.removeObserver(this)}onMutationUpdate(a){oe(this,H,Ce).call(this),oe(this,H,Ke).call(this,a)}getCurrentResult(){return M(this,G)}reset(){var a;(a=M(this,$))==null||a.removeObserver(this),ie(this,$,void 0),oe(this,H,Ce).call(this),oe(this,H,Ke).call(this)}mutate(a,r){var i;return ie(this,Q,r),(i=M(this,$))==null||i.removeObserver(this),ie(this,$,M(this,K).getMutationCache().build(M(this,K),this.options)),M(this,$).addObserver(this),M(this,$).execute(a)}},K=new WeakMap,G=new WeakMap,$=new WeakMap,Q=new WeakMap,H=new WeakSet,Ce=function(){var r;const a=((r=M(this,$))==null?void 0:r.state)??ys();ie(this,G,{...a,isPending:a.status==="pending",isSuccess:a.status==="success",isError:a.status==="error",isIdle:a.status==="idle",mutate:this.mutate,reset:this.reset})},Ke=function(a){Dt.batch(()=>{var r,i,n,t,o,u,g,f;if(M(this,Q)&&this.hasListeners()){const N=M(this,G).variables,p=M(this,G).context,S={client:M(this,K),meta:this.options.meta,mutationKey:this.options.mutationKey};if((a==null?void 0:a.type)==="success"){try{(i=(r=M(this,Q)).onSuccess)==null||i.call(r,a.data,N,p,S)}catch(C){Promise.reject(C)}try{(t=(n=M(this,Q)).onSettled)==null||t.call(n,a.data,null,N,p,S)}catch(C){Promise.reject(C)}}else if((a==null?void 0:a.type)==="error"){try{(u=(o=M(this,Q)).onError)==null||u.call(o,a.error,N,p,S)}catch(C){Promise.reject(C)}try{(f=(g=M(this,Q)).onSettled)==null||f.call(g,void 0,a.error,N,p,S)}catch(C){Promise.reject(C)}}}this.listeners.forEach(N=>{N(M(this,G))})})},Rt);function ce(s,a){const r=ae(),[i]=l.useState(()=>new ea(r,s));l.useEffect(()=>{i.setOptions(s)},[i,s]);const n=l.useSyncExternalStore(l.useCallback(o=>i.subscribe(Dt.batchCalls(o)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),t=l.useCallback((o,u)=>{i.mutate(o,u).catch(Ns)},[i]);if(n.error&&ks(i.options.throwOnError,[n.error]))throw n.error;return{...n,mutate:t,mutateAsync:n.mutate}}/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
 
1
+ var Nt=s=>{throw TypeError(s)};var Le=(s,a,r)=>a.has(s)||Nt("Cannot "+r);var M=(s,a,r)=>(Le(s,a,"read from private field"),r?r.call(s):a.get(s)),ne=(s,a,r)=>a.has(s)?Nt("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(s):a.set(s,r),ie=(s,a,r,i)=>(Le(s,a,"write to private field"),i?i.call(s,r):a.set(s,r),r),oe=(s,a,r)=>(Le(s,a,"access private method"),r);import{S as vs,s as bs,h as kt,g as ys,n as Dt,a as ae,r as l,b as Ns,c as ks,d as je,j as e,P as Re,e as J,f as Mt,i as ve,k as ee,l as _s,m as It,C as Y,o as Z,p as ws,q as Oe,t as Cs,v as Es,R as Ss,w as Ps,F as Rs,D as Ds,x as Ms,X as Qe,y as He,z as De,A as Ue,B as Tt,E as At,G as Is,H as Ts,L as xe,I as As}from"./index-BHu3ckjy.js";import{u as q}from"./adminAuth-W6_tdZNU.js";import{I as z,T as Fs,M as $s}from"./components-Cg3rKVQ3.js";import{L as _t,a as Ls}from"./LatexTitle-BYOXQNlq.js";import{g as Os,u as qs,b as Ft,c as Bs,d as zs,e as Ks,f as Qs,h as Hs,i as Us,j as Ws,k as wt,a as Ee,l as Gs}from"./api-gdpmQjJd.js";import{e as Vs}from"./transform-BxhHCT2R.js";import{b as Xs}from"./usePapers-BJol1iZF.js";import{S as ge,A as Ys,a as Zs}from"./alert-CJMW3r9v.js";import{I as V,L as te,B as A,a as $t,D as Js}from"./badge-DxH3OGz4.js";import"./useInfiniteQuery-DPq_eewq.js";var K,G,$,Q,H,Ce,Ke,Rt,ea=(Rt=class extends vs{constructor(a,r){super();ne(this,H);ne(this,K);ne(this,G);ne(this,$);ne(this,Q);ie(this,K,a),this.setOptions(r),this.bindMethods(),oe(this,H,Ce).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(a){var i;const r=this.options;this.options=M(this,K).defaultMutationOptions(a),bs(this.options,r)||M(this,K).getMutationCache().notify({type:"observerOptionsUpdated",mutation:M(this,$),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&kt(r.mutationKey)!==kt(this.options.mutationKey)?this.reset():((i=M(this,$))==null?void 0:i.state.status)==="pending"&&M(this,$).setOptions(this.options)}onUnsubscribe(){var a;this.hasListeners()||(a=M(this,$))==null||a.removeObserver(this)}onMutationUpdate(a){oe(this,H,Ce).call(this),oe(this,H,Ke).call(this,a)}getCurrentResult(){return M(this,G)}reset(){var a;(a=M(this,$))==null||a.removeObserver(this),ie(this,$,void 0),oe(this,H,Ce).call(this),oe(this,H,Ke).call(this)}mutate(a,r){var i;return ie(this,Q,r),(i=M(this,$))==null||i.removeObserver(this),ie(this,$,M(this,K).getMutationCache().build(M(this,K),this.options)),M(this,$).addObserver(this),M(this,$).execute(a)}},K=new WeakMap,G=new WeakMap,$=new WeakMap,Q=new WeakMap,H=new WeakSet,Ce=function(){var r;const a=((r=M(this,$))==null?void 0:r.state)??ys();ie(this,G,{...a,isPending:a.status==="pending",isSuccess:a.status==="success",isError:a.status==="error",isIdle:a.status==="idle",mutate:this.mutate,reset:this.reset})},Ke=function(a){Dt.batch(()=>{var r,i,n,t,o,u,g,f;if(M(this,Q)&&this.hasListeners()){const N=M(this,G).variables,p=M(this,G).context,S={client:M(this,K),meta:this.options.meta,mutationKey:this.options.mutationKey};if((a==null?void 0:a.type)==="success"){try{(i=(r=M(this,Q)).onSuccess)==null||i.call(r,a.data,N,p,S)}catch(C){Promise.reject(C)}try{(t=(n=M(this,Q)).onSettled)==null||t.call(n,a.data,null,N,p,S)}catch(C){Promise.reject(C)}}else if((a==null?void 0:a.type)==="error"){try{(u=(o=M(this,Q)).onError)==null||u.call(o,a.error,N,p,S)}catch(C){Promise.reject(C)}try{(f=(g=M(this,Q)).onSettled)==null||f.call(g,void 0,a.error,N,p,S)}catch(C){Promise.reject(C)}}}this.listeners.forEach(N=>{N(M(this,G))})})},Rt);function ce(s,a){const r=ae(),[i]=l.useState(()=>new ea(r,s));l.useEffect(()=>{i.setOptions(s)},[i,s]);const n=l.useSyncExternalStore(l.useCallback(o=>i.subscribe(Dt.batchCalls(o)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),t=l.useCallback((o,u)=>{i.mutate(o,u).catch(Ns)},[i]);if(n.error&&ks(i.options.throwOnError,[n.error]))throw n.error;return{...n,mutate:t,mutateAsync:n.mutate}}/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
assets/{PapersListView-DsAlDIHu.js β†’ PapersListView-CT8uylW0.js} RENAMED
@@ -1 +1 @@
1
- import{u as I,r as i,j as e,L as F}from"./index-BBLNzdQ3.js";import{I as L,P as T}from"./components-mDG31Y87.js";import{a as C}from"./api-BrmxIuWZ.js";import{a as R,d as k}from"./transform-C-0glUhY.js";import{u as D}from"./usePapers-B6SkGdse.js";import{u as E}from"./useDebounce-cTTjH_Sm.js";import{u as O,P as B}from"./usePeriodFilter-Cqf3tn7X.js";import{u as $}from"./useIntersectionObserver-BzvTehzD.js";import{S as c,A as z,a as M}from"./alert-CHYYTMmo.js";import{u as q}from"./adminAuth-BcLoDHjH.js";import"./LatexTitle-DziDol_D.js";import"./useInfiniteQuery-BYHbC7kX.js";const K=[["trending","trending"],["new","newest"],["cited","most cited"]],re=()=>{var x,g,j,f,N;const[d,v]=I(),o=d.get("search")||"",[p,b]=i.useState(o),t=E(p,300);i.useEffect(()=>{if(t===o)return;const s=new URLSearchParams(d);t?s.set("search",t):s.delete("search"),v(s,{replace:!0})},[t]);const[n,P]=i.useState("new"),{period:y,setPeriod:S,publishedAfter:w}=O("All Time"),a=D({page_size:20,order_by:n==="trending"?"trending":n==="cited"?"citation_count":"date_published",order_dir:"desc",search:t||void 0,published_after:w,include_resources:!0}),m=q({queryKey:["top-tasks-sidebar"],queryFn:()=>C.getTasks({ordering:"-paper_count",page_size:8}),staleTime:10*60*1e3}),l=i.useMemo(()=>{var r;return(((r=a.data)==null?void 0:r.pages.flatMap(A=>A.results))||[]).map(R)},[a.data]),{targetRef:_,isIntersecting:h}=$({rootMargin:"200px"});i.useEffect(()=>{h&&a.hasNextPage&&!a.isFetchingNextPage&&a.fetchNextPage()},[h,a.hasNextPage,a.isFetchingNextPage]);const u=((j=(g=(x=a.data)==null?void 0:x.pages)==null?void 0:g[0])==null?void 0:j.count)??0;return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"feed-header",children:[e.jsxs("div",{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. ",u>0&&`${u.toLocaleString()} papers indexed.`]})]}),e.jsx("div",{className:"period-switch",children:B.map(s=>e.jsx("button",{className:`period-btn ${y===s?"active":""}`,onClick:()=>S(s),children:s},s))})]}),e.jsx("div",{className:"papers-search-row",children:e.jsxs("div",{className:"papers-search-input-wrap",children:[e.jsx(L,{name:"search",size:14}),e.jsx("input",{className:"papers-search-input",placeholder:"Search title or abstract…",value:p,onChange:s=>b(s.target.value)})]})}),e.jsxs("div",{className:"layout-with-sidebar",children:[e.jsx("aside",{className:"sidebar",children:e.jsxs("div",{className:"sidebar-section",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),m.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,r)=>e.jsx(c,{className:"h-5 w-full"},r))}),(N=(f=m.data)==null?void 0:f.results)==null?void 0:N.map(s=>e.jsxs(F,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[k(s.name,s.slug),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count})]},s.id))]})}),e.jsxs("div",{children:[e.jsxs("div",{className:"sort-bar",children:[e.jsx("div",{className:"sort-options",children:K.map(([s,r])=>e.jsx("button",{className:`sort-btn ${n===s?"active":""}`,onClick:()=>P(s),children:r},s))}),e.jsxs("div",{className:"results-count",children:[l.length," loaded"]})]}),a.error&&e.jsx(z,{variant:"destructive",className:"mb-4",children:e.jsx(M,{children:"Failed to load papers. Please try again."})}),a.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:6}).map((s,r)=>e.jsxs("div",{className:"paper-card",children:[e.jsx(c,{className:"h-[220px] w-[160px]"}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(c,{className:"h-6 w-3/4"}),e.jsx(c,{className:"h-4 w-1/2"}),e.jsx(c,{className:"h-12 w-full"})]})]},r))}):l.length===0?e.jsx("div",{className:"no-results",children:"No matching papers."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:l.map((s,r)=>e.jsx(T,{paper:s,rank:r+1},s.id))}),e.jsx("div",{ref:_,style:{height:1}}),a.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})]})]})};export{re as default};
 
1
+ import{u as I,r as i,j as e,L as F}from"./index-BHu3ckjy.js";import{I as L,P as T}from"./components-Cg3rKVQ3.js";import{a as C}from"./api-gdpmQjJd.js";import{a as R,d as k}from"./transform-BxhHCT2R.js";import{u as D}from"./usePapers-BJol1iZF.js";import{u as E}from"./useDebounce-DslTjWNw.js";import{u as O,P as B}from"./usePeriodFilter-D7A3mTfk.js";import{u as $}from"./useIntersectionObserver-BIld5T_u.js";import{S as c,A as z,a as M}from"./alert-CJMW3r9v.js";import{u as q}from"./adminAuth-W6_tdZNU.js";import"./LatexTitle-BYOXQNlq.js";import"./useInfiniteQuery-DPq_eewq.js";const K=[["trending","trending"],["new","newest"],["cited","most cited"]],re=()=>{var x,g,j,f,N;const[d,v]=I(),o=d.get("search")||"",[p,b]=i.useState(o),t=E(p,300);i.useEffect(()=>{if(t===o)return;const s=new URLSearchParams(d);t?s.set("search",t):s.delete("search"),v(s,{replace:!0})},[t]);const[n,P]=i.useState("new"),{period:y,setPeriod:S,publishedAfter:w}=O("All Time"),a=D({page_size:20,order_by:n==="trending"?"trending":n==="cited"?"citation_count":"date_published",order_dir:"desc",search:t||void 0,published_after:w,include_resources:!0}),m=q({queryKey:["top-tasks-sidebar"],queryFn:()=>C.getTasks({ordering:"-paper_count",page_size:8}),staleTime:10*60*1e3}),l=i.useMemo(()=>{var r;return(((r=a.data)==null?void 0:r.pages.flatMap(A=>A.results))||[]).map(R)},[a.data]),{targetRef:_,isIntersecting:h}=$({rootMargin:"200px"});i.useEffect(()=>{h&&a.hasNextPage&&!a.isFetchingNextPage&&a.fetchNextPage()},[h,a.hasNextPage,a.isFetchingNextPage]);const u=((j=(g=(x=a.data)==null?void 0:x.pages)==null?void 0:g[0])==null?void 0:j.count)??0;return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"feed-header",children:[e.jsxs("div",{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. ",u>0&&`${u.toLocaleString()} papers indexed.`]})]}),e.jsx("div",{className:"period-switch",children:B.map(s=>e.jsx("button",{className:`period-btn ${y===s?"active":""}`,onClick:()=>S(s),children:s},s))})]}),e.jsx("div",{className:"papers-search-row",children:e.jsxs("div",{className:"papers-search-input-wrap",children:[e.jsx(L,{name:"search",size:14}),e.jsx("input",{className:"papers-search-input",placeholder:"Search title or abstract…",value:p,onChange:s=>b(s.target.value)})]})}),e.jsxs("div",{className:"layout-with-sidebar",children:[e.jsx("aside",{className:"sidebar",children:e.jsxs("div",{className:"sidebar-section",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),m.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,r)=>e.jsx(c,{className:"h-5 w-full"},r))}),(N=(f=m.data)==null?void 0:f.results)==null?void 0:N.map(s=>e.jsxs(F,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[k(s.name,s.slug),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count})]},s.id))]})}),e.jsxs("div",{children:[e.jsxs("div",{className:"sort-bar",children:[e.jsx("div",{className:"sort-options",children:K.map(([s,r])=>e.jsx("button",{className:`sort-btn ${n===s?"active":""}`,onClick:()=>P(s),children:r},s))}),e.jsxs("div",{className:"results-count",children:[l.length," loaded"]})]}),a.error&&e.jsx(z,{variant:"destructive",className:"mb-4",children:e.jsx(M,{children:"Failed to load papers. Please try again."})}),a.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:6}).map((s,r)=>e.jsxs("div",{className:"paper-card",children:[e.jsx(c,{className:"h-[220px] w-[160px]"}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(c,{className:"h-6 w-3/4"}),e.jsx(c,{className:"h-4 w-1/2"}),e.jsx(c,{className:"h-12 w-full"})]})]},r))}):l.length===0?e.jsx("div",{className:"no-results",children:"No matching papers."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:l.map((s,r)=>e.jsx(T,{paper:s,rank:r+1},s.id))}),e.jsx("div",{ref:_,style:{height:1}}),a.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})]})]})};export{re as default};
assets/{SavedPapersView-BQ7z_KWN.js β†’ SavedPapersView-BhakLwrd.js} RENAMED
@@ -1 +1 @@
1
- import{z as o,j as s,T as m,L as p}from"./index-BBLNzdQ3.js";import{u as h}from"./adminAuth-BcLoDHjH.js";import{T as x,P as u}from"./components-mDG31Y87.js";import{S as r,A as j,a as v}from"./alert-CHYYTMmo.js";import{a as N}from"./api-BrmxIuWZ.js";import{a as g}from"./transform-C-0glUhY.js";import"./LatexTitle-DziDol_D.js";const A=()=>{var l;const{user:d,isLoading:t}=o(),a=h({queryKey:["my-bookmarks"],queryFn:()=>N.getMyBookmarks(),enabled:!!d,staleTime:30*1e3,refetchOnWindowFocus:!1});return t?s.jsxs("div",{className:"page",children:[s.jsx(r,{className:"h-10 w-1/3 mb-4"}),s.jsx(r,{className:"h-6 w-1/2 mb-8"})]}):d?s.jsxs("div",{className:"page",children:[s.jsx("div",{className:"feed-header",children:s.jsxs("div",{children:[s.jsxs("h1",{className:"feed-title",children:["Saved ",s.jsx("em",{children:"Papers"})]}),s.jsx("div",{className:"feed-subtitle",children:(l=a.data)!=null&&l.count?`${a.data.count.toLocaleString()} saved Β· grouped by domain`:"Your bookmarked papers, grouped by domain."})]})}),a.error&&s.jsx(j,{variant:"destructive",className:"mb-4",children:s.jsx(v,{children:"Failed to load your saved papers. Please try again."})}),a.isLoading?s.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((i,e)=>s.jsxs("div",{className:"paper-card",children:[s.jsx(r,{className:"h-[220px] w-[160px]"}),s.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[s.jsx(r,{className:"h-6 w-3/4"}),s.jsx(r,{className:"h-4 w-1/2"}),s.jsx(r,{className:"h-12 w-full"})]})]},e))}):!a.data||a.data.count===0?s.jsxs("div",{className:"no-results",children:["No saved papers yet."," ",s.jsx(p,{to:"/papers",className:"sidebar-link",style:{display:"inline"},children:"Browse papers β†’"})]}):a.data.areas.map(i=>s.jsxs("section",{className:"saved-area-section",children:[s.jsx("h2",{className:"saved-area-heading",children:i.name}),i.tasks.map(e=>{const n=e.papers.length;return s.jsxs("div",{className:"saved-task-block",children:[s.jsxs("div",{className:"saved-task-row",children:[e.slug?s.jsx(x,{slug:e.slug,label:e.name}):s.jsx("span",{className:"tag-chip",style:{background:"var(--surface)"},children:e.name}),s.jsxs("span",{className:"saved-task-count",children:[n," ",n===1?"paper":"papers"]})]}),s.jsx("div",{className:"paper-list",children:e.papers.map(c=>s.jsx(u,{paper:g(c),rank:1},c.id))})]},`task-${i.id??"other"}-${e.id??"untagged"}`)})]},`area-${i.id??"other"}`))]}):s.jsxs("div",{className:"page",children:[s.jsx("div",{className:"feed-header",children:s.jsxs("div",{children:[s.jsxs("h1",{className:"feed-title",children:["Saved ",s.jsx("em",{children:"Papers"})]}),s.jsx("div",{className:"feed-subtitle",children:"Sign in with Hugging Face to save papers and revisit them later."})]})}),s.jsx("div",{className:"saved-signin-panel",children:s.jsx(m,{returnTo:"/saved"})})]})};export{A as default};
 
1
+ import{z as o,j as s,T as m,L as p}from"./index-BHu3ckjy.js";import{u as h}from"./adminAuth-W6_tdZNU.js";import{T as x,P as u}from"./components-Cg3rKVQ3.js";import{S as r,A as j,a as v}from"./alert-CJMW3r9v.js";import{a as N}from"./api-gdpmQjJd.js";import{a as g}from"./transform-BxhHCT2R.js";import"./LatexTitle-BYOXQNlq.js";const A=()=>{var l;const{user:d,isLoading:t}=o(),a=h({queryKey:["my-bookmarks"],queryFn:()=>N.getMyBookmarks(),enabled:!!d,staleTime:30*1e3,refetchOnWindowFocus:!1});return t?s.jsxs("div",{className:"page",children:[s.jsx(r,{className:"h-10 w-1/3 mb-4"}),s.jsx(r,{className:"h-6 w-1/2 mb-8"})]}):d?s.jsxs("div",{className:"page",children:[s.jsx("div",{className:"feed-header",children:s.jsxs("div",{children:[s.jsxs("h1",{className:"feed-title",children:["Saved ",s.jsx("em",{children:"Papers"})]}),s.jsx("div",{className:"feed-subtitle",children:(l=a.data)!=null&&l.count?`${a.data.count.toLocaleString()} saved Β· grouped by domain`:"Your bookmarked papers, grouped by domain."})]})}),a.error&&s.jsx(j,{variant:"destructive",className:"mb-4",children:s.jsx(v,{children:"Failed to load your saved papers. Please try again."})}),a.isLoading?s.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((i,e)=>s.jsxs("div",{className:"paper-card",children:[s.jsx(r,{className:"h-[220px] w-[160px]"}),s.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[s.jsx(r,{className:"h-6 w-3/4"}),s.jsx(r,{className:"h-4 w-1/2"}),s.jsx(r,{className:"h-12 w-full"})]})]},e))}):!a.data||a.data.count===0?s.jsxs("div",{className:"no-results",children:["No saved papers yet."," ",s.jsx(p,{to:"/papers",className:"sidebar-link",style:{display:"inline"},children:"Browse papers β†’"})]}):a.data.areas.map(i=>s.jsxs("section",{className:"saved-area-section",children:[s.jsx("h2",{className:"saved-area-heading",children:i.name}),i.tasks.map(e=>{const n=e.papers.length;return s.jsxs("div",{className:"saved-task-block",children:[s.jsxs("div",{className:"saved-task-row",children:[e.slug?s.jsx(x,{slug:e.slug,label:e.name}):s.jsx("span",{className:"tag-chip",style:{background:"var(--surface)"},children:e.name}),s.jsxs("span",{className:"saved-task-count",children:[n," ",n===1?"paper":"papers"]})]}),s.jsx("div",{className:"paper-list",children:e.papers.map(c=>s.jsx(u,{paper:g(c),rank:1},c.id))})]},`task-${i.id??"other"}-${e.id??"untagged"}`)})]},`area-${i.id??"other"}`))]}):s.jsxs("div",{className:"page",children:[s.jsx("div",{className:"feed-header",children:s.jsxs("div",{children:[s.jsxs("h1",{className:"feed-title",children:["Saved ",s.jsx("em",{children:"Papers"})]}),s.jsx("div",{className:"feed-subtitle",children:"Sign in with Hugging Face to save papers and revisit them later."})]})}),s.jsx("div",{className:"saved-signin-panel",children:s.jsx(m,{returnTo:"/saved"})})]})};export{A as default};
assets/{SearchOverlay-BJ3Vra9H.js β†’ SearchOverlay-BKjXfD9I.js} RENAMED
@@ -1 +1 @@
1
- import{r as y,H as _,A as q,j as s}from"./index-BBLNzdQ3.js";import{u as h}from"./adminAuth-BcLoDHjH.js";import{L as T}from"./LatexTitle-DziDol_D.js";import{a as u}from"./api-BrmxIuWZ.js";import{u as w}from"./useDebounce-cTTjH_Sm.js";import{f as E,h as L,d as Q}from"./transform-C-0glUhY.js";const M=({open:r,onClose:n})=>{var j,v;const m=y.useRef(null),f=_(),[d,N]=q.useState(""),a=w(d,200);y.useEffect(()=>{var t;if(!r)return;(t=m.current)==null||t.focus();const e=b=>{b.key==="Escape"&&n()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[r,n]);const p=h({queryKey:["search-papers",a],queryFn:()=>u.searchPapers(a,6),enabled:r&&a.length>=2,staleTime:6e4}),g=h({queryKey:["search-tasks",a],queryFn:()=>u.getTasks({q:a,page_size:6}),enabled:r&&a.length>=2,staleTime:6e4}),x=h({queryKey:["search-methods",a],queryFn:()=>u.getMethods({q:a,page_size:6}),enabled:r&&a.length>=2,staleTime:6e4});if(!r)return null;const c=((j=g.data)==null?void 0:j.results)||[],l=((v=x.data)==null?void 0:v.results)||[],i=p.data||[],k=p.isFetching||g.isFetching||x.isFetching,F=c.length||i.length||l.length,o=e=>{n(),f(e)};return s.jsx("div",{className:"search-overlay",onClick:n,children:s.jsxs("div",{className:"search-modal",onClick:e=>e.stopPropagation(),children:[s.jsx("input",{ref:m,className:"search-modal-input",placeholder:"Search papers, tasks, or methods…",value:d,onChange:e=>N(e.target.value)}),s.jsxs("div",{className:"search-results",children:[!a&&s.jsx("div",{className:"search-empty",children:"Try β€œdiffusion”, β€œobject detection”, or an arXiv id."}),a&&!k&&!F&&s.jsxs("div",{className:"search-empty",children:['No matches for "',d,'"']}),c.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"search-section-label",children:["Tasks Β· ",c.length]}),c.map(e=>{const t=E(L(e.slug||""));return s.jsxs("div",{className:"search-result-tag",onClick:()=>o(`/tasks/${e.slug}`),children:[s.jsx("span",{className:"dot",style:{width:6,height:6,borderRadius:"50%",background:t.dot}}),s.jsx("span",{className:"name",children:Q(e.name,e.slug)}),e.paper_count!=null&&s.jsxs("span",{className:"count",children:[e.paper_count," papers"]})]},e.id)})]}),l.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"search-section-label",children:["Methods Β· ",l.length]}),l.map(e=>s.jsxs("div",{className:"search-result-tag",onClick:()=>o(`/methods/${e.slug||e.id}`),children:[s.jsx("span",{style:{fontFamily:"var(--mono)",fontWeight:600},children:e.name}),e.paper_count!=null&&s.jsxs("span",{className:"count",children:[e.paper_count," papers"]})]},e.id))]}),i.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"search-section-label",children:["Papers Β· ",i.length]}),i.map(e=>{var t;return s.jsxs("div",{className:"search-result",onClick:()=>o(`/paper/${e.arxiv_id||e.id}`),children:[s.jsx("div",{className:"search-result-title",children:s.jsx(T,{title:e.title})}),s.jsxs("div",{className:"search-result-meta",children:[s.jsx("span",{children:e.arxiv_id?`arXiv:${e.arxiv_id}`:"External resource"}),((t=e.authors)==null?void 0:t[0])&&s.jsxs(s.Fragment,{children:[s.jsx("span",{children:"Β·"}),s.jsxs("span",{children:[e.authors[0],e.authors.length>1?" et al.":""]})]}),e.citation_count!=null&&s.jsxs(s.Fragment,{children:[s.jsx("span",{children:"Β·"}),s.jsxs("span",{children:["↑ ",e.citation_count.toLocaleString()]})]})]})]},e.id)})]})]})]})})};export{M as default};
 
1
+ import{r as y,H as _,A as q,j as s}from"./index-BHu3ckjy.js";import{u as h}from"./adminAuth-W6_tdZNU.js";import{L as T}from"./LatexTitle-BYOXQNlq.js";import{a as u}from"./api-gdpmQjJd.js";import{u as w}from"./useDebounce-DslTjWNw.js";import{f as E,h as L,d as Q}from"./transform-BxhHCT2R.js";const M=({open:r,onClose:n})=>{var j,v;const m=y.useRef(null),f=_(),[d,N]=q.useState(""),a=w(d,200);y.useEffect(()=>{var t;if(!r)return;(t=m.current)==null||t.focus();const e=b=>{b.key==="Escape"&&n()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[r,n]);const p=h({queryKey:["search-papers",a],queryFn:()=>u.searchPapers(a,6),enabled:r&&a.length>=2,staleTime:6e4}),g=h({queryKey:["search-tasks",a],queryFn:()=>u.getTasks({q:a,page_size:6}),enabled:r&&a.length>=2,staleTime:6e4}),x=h({queryKey:["search-methods",a],queryFn:()=>u.getMethods({q:a,page_size:6}),enabled:r&&a.length>=2,staleTime:6e4});if(!r)return null;const c=((j=g.data)==null?void 0:j.results)||[],l=((v=x.data)==null?void 0:v.results)||[],i=p.data||[],k=p.isFetching||g.isFetching||x.isFetching,F=c.length||i.length||l.length,o=e=>{n(),f(e)};return s.jsx("div",{className:"search-overlay",onClick:n,children:s.jsxs("div",{className:"search-modal",onClick:e=>e.stopPropagation(),children:[s.jsx("input",{ref:m,className:"search-modal-input",placeholder:"Search papers, tasks, or methods…",value:d,onChange:e=>N(e.target.value)}),s.jsxs("div",{className:"search-results",children:[!a&&s.jsx("div",{className:"search-empty",children:"Try β€œdiffusion”, β€œobject detection”, or an arXiv id."}),a&&!k&&!F&&s.jsxs("div",{className:"search-empty",children:['No matches for "',d,'"']}),c.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"search-section-label",children:["Tasks Β· ",c.length]}),c.map(e=>{const t=E(L(e.slug||""));return s.jsxs("div",{className:"search-result-tag",onClick:()=>o(`/tasks/${e.slug}`),children:[s.jsx("span",{className:"dot",style:{width:6,height:6,borderRadius:"50%",background:t.dot}}),s.jsx("span",{className:"name",children:Q(e.name,e.slug)}),e.paper_count!=null&&s.jsxs("span",{className:"count",children:[e.paper_count," papers"]})]},e.id)})]}),l.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"search-section-label",children:["Methods Β· ",l.length]}),l.map(e=>s.jsxs("div",{className:"search-result-tag",onClick:()=>o(`/methods/${e.slug||e.id}`),children:[s.jsx("span",{style:{fontFamily:"var(--mono)",fontWeight:600},children:e.name}),e.paper_count!=null&&s.jsxs("span",{className:"count",children:[e.paper_count," papers"]})]},e.id))]}),i.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"search-section-label",children:["Papers Β· ",i.length]}),i.map(e=>{var t;return s.jsxs("div",{className:"search-result",onClick:()=>o(`/paper/${e.arxiv_id||e.id}`),children:[s.jsx("div",{className:"search-result-title",children:s.jsx(T,{title:e.title})}),s.jsxs("div",{className:"search-result-meta",children:[s.jsx("span",{children:e.arxiv_id?`arXiv:${e.arxiv_id}`:"External resource"}),((t=e.authors)==null?void 0:t[0])&&s.jsxs(s.Fragment,{children:[s.jsx("span",{children:"Β·"}),s.jsxs("span",{children:[e.authors[0],e.authors.length>1?" et al.":""]})]}),e.citation_count!=null&&s.jsxs(s.Fragment,{children:[s.jsx("span",{children:"Β·"}),s.jsxs("span",{children:["↑ ",e.citation_count.toLocaleString()]})]})]})]},e.id)})]})]})]})})};export{M as default};
assets/{TagBrowseView-S2puh8kQ.js β†’ TagBrowseView-t6_CM5xZ.js} RENAMED
@@ -1 +1 @@
1
- var ws=n=>{throw TypeError(n)};var Z=(n,t,r)=>t.has(n)||ws("Cannot "+r);var l=(n,t,r)=>(Z(n,t,"read from private field"),r?r.call(n):t.get(n)),y=(n,t,r)=>t.has(n)?ws("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,r),x=(n,t,r,a)=>(Z(n,t,"write to private field"),a?a.call(n,r):t.set(n,r),r),S=(n,t,r)=>(Z(n,t,"access private method"),r);import{S as Ms,n as es,s as Ls,J as As,a as Fs,r as E,b as Ds,G as Hs,H as Is,u as Ks,j as s,L as I,A as $s}from"./index-BBLNzdQ3.js";import{Q as Os,a as zs,b as Us,e as Vs,c as Gs,d as Js,s as Es,f as Ws,g as Xs,u as K}from"./adminAuth-BcLoDHjH.js";import{P as Ys,M as Zs}from"./components-mDG31Y87.js";import{a as L}from"./api-BrmxIuWZ.js";import{a as se,d as G}from"./transform-C-0glUhY.js";import{c as ee}from"./usePapers-B6SkGdse.js";import{u as te}from"./useIntersectionObserver-BzvTehzD.js";import{S as J,A as ae,a as re}from"./alert-CHYYTMmo.js";import"./LatexTitle-DziDol_D.js";import"./useInfiniteQuery-BYHbC7kX.js";function _s(n,t){const r=new Set(t);return n.filter(a=>!r.has(a))}function ne(n,t,r){const a=n.slice(0);return a[t]=r,a}var A,k,F,B,N,P,$,z,U,V,p,ts,as,Rs,rs,ns,is,Cs,ie=(Cs=class extends Ms{constructor(t,r,a){super();y(this,p);y(this,A);y(this,k);y(this,F);y(this,B);y(this,N);y(this,P);y(this,$);y(this,z);y(this,U);y(this,V,[]);x(this,A,t),x(this,B,a),x(this,F,[]),x(this,N,[]),x(this,k,[]),this.setQueries(r)}onSubscribe(){this.listeners.size===1&&l(this,N).forEach(t=>{t.subscribe(r=>{S(this,p,ns).call(this,t,r)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,l(this,N).forEach(t=>{t.destroy()})}setQueries(t,r){x(this,F,t),x(this,B,r),es.batch(()=>{const a=l(this,N),i=S(this,p,rs).call(this,l(this,F));i.forEach(m=>m.observer.setOptions(m.defaultedQueryOptions));const o=i.map(m=>m.observer),c=o.map(m=>m.getCurrentResult()),b=a.length!==o.length,_=o.some((m,R)=>m!==a[R]),O=b||_,h=O?!0:c.some((m,R)=>{const Q=l(this,k)[R];return!Q||!Ls(m,Q)});!O&&!h||(O&&(x(this,V,i),x(this,N,o)),x(this,k,c),this.hasListeners()&&(O&&(_s(a,o).forEach(m=>{m.destroy()}),_s(o,a).forEach(m=>{m.subscribe(R=>{S(this,p,ns).call(this,m,R)})})),S(this,p,is).call(this)))})}getCurrentResult(){return l(this,k)}getQueries(){return l(this,N).map(t=>t.getCurrentQuery())}getObservers(){return l(this,N)}getOptimisticResult(t,r){const a=S(this,p,rs).call(this,t),i=a.map(c=>c.observer.getOptimisticResult(c.defaultedQueryOptions)),o=a.map(c=>c.defaultedQueryOptions.queryHash);return[i,c=>S(this,p,as).call(this,c??i,r,o),()=>S(this,p,ts).call(this,i,a)]}},A=new WeakMap,k=new WeakMap,F=new WeakMap,B=new WeakMap,N=new WeakMap,P=new WeakMap,$=new WeakMap,z=new WeakMap,U=new WeakMap,V=new WeakMap,p=new WeakSet,ts=function(t,r){return r.map((a,i)=>{const o=t[i];return a.defaultedQueryOptions.notifyOnChangeProps?o:a.observer.trackResult(o,c=>{r.forEach(b=>{b.observer.trackProp(c)})})})},as=function(t,r,a){if(r){const i=l(this,U),o=a!==void 0&&i!==void 0&&(i.length!==a.length||a.some((c,b)=>c!==i[b]));return(!l(this,P)||l(this,k)!==l(this,z)||o||r!==l(this,$))&&(x(this,$,r),x(this,z,l(this,k)),a!==void 0&&x(this,U,a),x(this,P,As(l(this,P),r(t)))),l(this,P)}return t},Rs=function(){var t;return((t=l(this,B))==null?void 0:t.combine)!==void 0&&l(this,N).some((r,a)=>{var i;return r.options.suspense&&((i=l(this,k)[a])==null?void 0:i.data)===void 0})},rs=function(t){const r=new Map;l(this,N).forEach(i=>{const o=i.options.queryHash;if(!o)return;const c=r.get(o);c?c.push(i):r.set(o,[i])});const a=[];return t.forEach(i=>{var _;const o=l(this,A).defaultQueryOptions(i),b=((_=r.get(o.queryHash))==null?void 0:_.shift())??new Os(l(this,A),o);a.push({defaultedQueryOptions:o,observer:b})}),a},ns=function(t,r){const a=l(this,N).indexOf(t);a!==-1&&(x(this,k,ne(l(this,k),a,r)),S(this,p,is).call(this))},is=function(){var t;if(this.hasListeners()){const r=S(this,p,ts).call(this,l(this,k),l(this,V)),a=S(this,p,Rs).call(this),i=l(this,P),o=a?i:S(this,p,as).call(this,r,(t=l(this,B))==null?void 0:t.combine);(a||i!==o)&&es.batch(()=>{this.listeners.forEach(c=>{c(l(this,k))})})}},Cs);function ce({queries:n,...t},r){const a=Fs(),i=zs(),o=Us(),c=E.useMemo(()=>n.map(f=>{const v=a.defaultQueryOptions(f);return v._optimisticResults=i?"isRestoring":"optimistic",v}),[n,a,i]);c.forEach(f=>{Vs(f);const v=a.getQueryCache().get(f.queryHash);Gs(f,o,v)}),Js(o);const[b]=E.useState(()=>new ie(a,c,t)),[_,O,h]=b.getOptimisticResult(c,t.combine),m=!i&&t.subscribed!==!1;E.useSyncExternalStore(E.useCallback(f=>m?b.subscribe(es.batchCalls(f)):Ds,[b,m]),()=>b.getCurrentResult(),()=>b.getCurrentResult()),E.useEffect(()=>{b.setQueries(c,t)},[c,t,b]);const Q=_.some((f,v)=>Es(c[v],f))?_.flatMap((f,v)=>{const u=c[v];if(u&&Es(u,f)){const D=new Os(a,u);return Ws(u,D,o)}return[]}):[];if(Q.length>0)throw Promise.all(Q);const C=_.find((f,v)=>{const u=c[v];return u&&Xs({result:f,errorResetBoundary:o,throwOnError:u.throwOnError,query:a.getQueryCache().get(u.queryHash),suspense:u.suspense})});if(C!=null&&C.error)throw C.error;return O(h())}const oe=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],le=n=>n==="trending"||n==="date_published"||n==="citation_count"?n:"trending",de=new Set(["classic-language-modeling","coding","safety-and-grounding"]),ss=3,W=2,Ne=()=>{var hs,us,ms,ps,gs,bs,xs,fs,js,vs,ks,Ns,ys;const{taskSlug:n}=Hs(),t=Is(),[r,a]=Ks(),i=le(r.get("order_by")),o=e=>{const d=new URLSearchParams(r);d.set("order_by",e),a(d)},[c,b]=E.useState(!1),[_,O]=E.useState(()=>new Set),h=K({queryKey:["task",n],queryFn:()=>L.getTask(n),enabled:!!n,staleTime:10*60*1e3}),m=K({queryKey:["task-parents",(hs=h.data)==null?void 0:hs.id],queryFn:()=>L.getTaskParents(h.data.id),enabled:!!((us=h.data)!=null&&us.id),staleTime:10*60*1e3}),R=K({queryKey:["task-sisters",(ms=h.data)==null?void 0:ms.area_id,(ps=h.data)==null?void 0:ps.id],queryFn:()=>L.getTasks({area_id:Number(h.data.area_id),page_size:50}),enabled:!!((gs=h.data)!=null&&gs.area_id),staleTime:10*60*1e3}),Q=K({queryKey:["task-children",(bs=h.data)==null?void 0:bs.id],queryFn:()=>L.getTaskChildren(h.data.id,{page_size:50}),enabled:!!((xs=h.data)!=null&&xs.id),staleTime:10*60*1e3}),C=E.useMemo(()=>{var e;return(((e=Q.data)==null?void 0:e.results)||[]).filter(d=>!de.has(d.slug))},[Q.data]),f=K({queryKey:["task-datasets",(fs=h.data)==null?void 0:fs.id,!1,W],queryFn:()=>L.getDatasets({task_id:Number(h.data.id),page_size:100,ordering:"-paper_count",min_eval_count:W}),enabled:!!((js=h.data)!=null&&js.id),staleTime:10*60*1e3}),v=ce({queries:C.map(e=>({queryKey:["task-datasets",e.id,!1,W],queryFn:()=>L.getDatasets({task_id:Number(e.id),page_size:20,ordering:"-paper_count",min_eval_count:W}),staleTime:10*60*1e3}))}),u=ee({taskId:((vs=h.data)==null?void 0:vs.id)||"",page_size:12,order_by:i,order_dir:"desc",include_resources:!0,enabled:!!((ks=h.data)!=null&&ks.id)}),D=E.useMemo(()=>{var d;return(((d=u.data)==null?void 0:d.pages.flatMap(g=>g.results))||[]).map(se)},[u.data]),X=E.useMemo(()=>{var d;const e={};return(d=u.data)==null||d.pages.forEach(g=>g.results.forEach(j=>(j.methods||[]).forEach(w=>{const H=w.slug||w.id;e[H]||(e[H]={id:w.id,name:w.name,slug:w.slug||"",count:0}),e[H].count++}))),Object.values(e).sort((g,j)=>j.count-g.count).slice(0,8)},[u.data]),{targetRef:Qs,isIntersecting:cs}=te({rootMargin:"200px"});if(E.useEffect(()=>{cs&&u.hasNextPage&&!u.isFetchingNextPage&&u.fetchNextPage()},[cs,u.hasNextPage,u.isFetchingNextPage]),h.isLoading)return s.jsxs("div",{className:"page",children:[s.jsx(J,{className:"h-12 w-1/2 mb-4"}),s.jsx(J,{className:"h-6 w-1/3 mb-8"}),s.jsx(J,{className:"h-64 w-full"})]});if(h.error||!h.data)return s.jsx("div",{className:"page",children:s.jsx(ae,{variant:"destructive",children:s.jsx(re,{children:"Task not found."})})});const T=h.data,os=G(T.name,T.slug),ls=(((Ns=R.data)==null?void 0:Ns.results)||[]).filter(e=>e.id!==T.id),q=((ys=f.data)==null?void 0:ys.results)||[],Ts=C.some((e,d)=>{var j,w;return(((w=(j=v[d])==null?void 0:j.data)==null?void 0:w.results)||[]).length>0}),ds=q.length>0,Ps=(()=>{const e=new Set;return q.forEach(d=>e.add(d.id)),v.forEach(d=>{var g;return(((g=d.data)==null?void 0:g.results)||[]).forEach(j=>e.add(j.id))}),e.size})(),qs=e=>{O(d=>{const g=new Set(d);return g.has(e)?g.delete(e):g.add(e),g})};return s.jsxs("div",{className:"page",children:[s.jsxs("div",{className:"breadcrumb",children:[s.jsx(I,{to:"/",children:"Papers"}),s.jsx("span",{className:"sep",children:"/"}),s.jsx(I,{to:"/tasks",children:"Tasks"}),[...m.data||[]].reverse().map(e=>s.jsxs($s.Fragment,{children:[s.jsx("span",{className:"sep",children:"/"}),s.jsx(I,{to:`/tasks/${e.slug||e.id}`,children:G(e.name,e.slug)})]},e.id)),s.jsx("span",{className:"sep",children:"/"}),s.jsx("span",{style:{color:"var(--accent-text)"},children:T.name.toUpperCase()})]}),s.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:"TASK"}),s.jsx("h1",{className:"domain-mega-title",children:os}),T.description&&s.jsx("p",{className:"task-explainer",children:T.description}),s.jsxs("div",{className:"task-quickstats",children:[s.jsxs("span",{children:[s.jsx("span",{className:"num",children:(T.paper_count??0).toLocaleString()}),"PAPERS"]}),s.jsxs("span",{children:[s.jsx("span",{className:"num",children:Ps}),"BENCHMARKS"]}),s.jsxs("span",{children:[s.jsxs("span",{className:"num",children:[X.length,"+"]}),"METHODS USED"]})]}),s.jsxs("div",{className:"task-page-grid",style:{marginTop:28},children:[s.jsxs("div",{children:[ds&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"task-section-head",children:[s.jsx("div",{className:"task-section-eyebrow",children:"Leaderboards Β· click any"}),s.jsxs("div",{className:"task-section-title",children:["Benchmarks ",s.jsxs("span",{className:"meta",children:["[",q.length,"]"]})]})]}),(c?q:q.slice(0,5)).map((e,d)=>s.jsxs("div",{className:"bench-row",onClick:()=>t(`/benchmark/${e.slug||e.id}`),children:[s.jsx("div",{className:"bench-row-num",children:String(d+1).padStart(2,"0")}),s.jsxs("div",{className:"bench-row-main",children:[s.jsx("div",{className:"bench-row-name",children:e.name}),s.jsx("div",{className:"bench-row-sub",children:e.paper_count!=null&&s.jsxs("span",{children:[s.jsx("strong",{children:e.paper_count})," ENTRIES"]})})]}),s.jsx("div",{className:"bench-row-arrow",children:"β†’"})]},e.id)),q.length>5&&s.jsx("button",{type:"button",className:"bench-show-more",onClick:()=>b(e=>!e),children:c?"βˆ’ show top 5":`+ show ${q.length-5} more benchmarks`})]}),Ts&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"task-section-head",style:ds?{marginTop:36}:void 0,children:[s.jsx("div",{className:"task-section-eyebrow",children:"Benchmarks by capability"}),s.jsxs("div",{className:"task-section-title",children:["Subtasks ",s.jsxs("span",{className:"meta",children:["[",C.length,"]"]})]})]}),s.jsx("div",{className:"subtask-grid",children:C.map((e,d)=>{var Ss;const g=v[d],j=((Ss=g==null?void 0:g.data)==null?void 0:Ss.results)||[];if(j.length===0)return null;const w=_.has(e.id),H=w?j:j.slice(0,ss),Y=j.length-ss;return s.jsxs("div",{className:"subtask-section",children:[s.jsxs("div",{className:"subtask-head",children:[s.jsx(I,{to:`/tasks/${e.slug||e.id}`,className:"subtask-head-name",children:G(e.name,e.slug)}),s.jsxs("span",{className:"subtask-head-meta",children:["[",j.length," benchmark",j.length===1?"":"s","]"]})]}),H.map((M,Bs)=>s.jsxs("div",{className:"bench-row",onClick:()=>t(`/benchmark/${M.slug||M.id}`),children:[s.jsx("div",{className:"bench-row-num",children:String(Bs+1).padStart(2,"0")}),s.jsxs("div",{className:"bench-row-main",children:[s.jsx("div",{className:"bench-row-name",children:M.name}),s.jsx("div",{className:"bench-row-sub",children:M.paper_count!=null&&s.jsxs("span",{children:[s.jsx("strong",{children:M.paper_count})," ENTRIES"]})})]}),s.jsx("div",{className:"bench-row-arrow",children:"β†’"})]},M.id)),Y>0&&s.jsx("button",{type:"button",className:"bench-show-more",onClick:()=>qs(e.id),children:w?`βˆ’ show top ${ss}`:`+ show ${Y} more benchmark${Y===1?"":"s"}`})]},e.id)})})]}),s.jsxs("div",{className:"task-section-head",style:{marginTop:36},children:[s.jsx("div",{className:"task-section-eyebrow",children:"Top trending Β· sort below"}),s.jsxs("div",{className:"task-section-title",children:["Papers ",s.jsxs("span",{className:"meta",children:["[",(T.paper_count??0).toLocaleString(),"]"]})]})]}),s.jsxs("div",{className:"sort-bar",children:[s.jsx("div",{className:"sort-options",children:oe.map(([e,d])=>s.jsx("button",{className:`sort-btn ${i===e?"active":""}`,onClick:()=>o(e),children:d},e))}),s.jsxs("div",{className:"results-count",children:[D.length," loaded in ",s.jsx("span",{children:os})]})]}),u.isLoading?s.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((e,d)=>s.jsx(J,{className:"h-40 w-full"},d))}):D.length===0?s.jsx("div",{className:"no-results",children:"No papers in this task yet."}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"paper-list",children:D.map((e,d)=>s.jsx(Ys,{paper:e,rank:d+1},e.id))}),s.jsx("div",{ref:Qs,style:{height:1}}),u.isFetchingNextPage&&s.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]}),s.jsxs("aside",{className:"task-side",children:[ls.length>0&&s.jsxs("div",{className:"side-block",children:[s.jsx("div",{className:"side-block-num",children:"01/"}),s.jsx("div",{className:"side-block-label",children:"Sister Tasks"}),ls.slice(0,8).map(e=>s.jsxs(I,{to:`/tasks/${e.slug}`,className:"side-link-row",children:[s.jsx("span",{children:G(e.name,e.slug)}),e.paper_count!=null&&s.jsx("span",{className:"count",children:e.paper_count.toLocaleString()})]},e.id))]}),X.length>0&&s.jsxs("div",{className:"side-block",children:[s.jsx("div",{className:"side-block-num",children:"02/"}),s.jsx("div",{className:"side-block-label",children:"Common Methods"}),X.map(e=>s.jsxs("div",{className:"side-method-row",children:[s.jsx(Zs,{method:{slug:e.slug,name:e.name}}),s.jsxs("span",{className:"num",children:["Β·",e.count]})]},e.id))]})]})]})]})};export{Ne as default};
 
1
+ var ws=n=>{throw TypeError(n)};var Z=(n,t,r)=>t.has(n)||ws("Cannot "+r);var l=(n,t,r)=>(Z(n,t,"read from private field"),r?r.call(n):t.get(n)),y=(n,t,r)=>t.has(n)?ws("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,r),x=(n,t,r,a)=>(Z(n,t,"write to private field"),a?a.call(n,r):t.set(n,r),r),S=(n,t,r)=>(Z(n,t,"access private method"),r);import{S as Ms,n as es,s as Ls,J as As,a as Fs,r as E,b as Ds,G as Hs,H as Is,u as Ks,j as s,L as I,A as $s}from"./index-BHu3ckjy.js";import{Q as Os,a as zs,b as Us,e as Vs,c as Gs,d as Js,s as Es,f as Ws,g as Xs,u as K}from"./adminAuth-W6_tdZNU.js";import{P as Ys,M as Zs}from"./components-Cg3rKVQ3.js";import{a as L}from"./api-gdpmQjJd.js";import{a as se,d as G}from"./transform-BxhHCT2R.js";import{c as ee}from"./usePapers-BJol1iZF.js";import{u as te}from"./useIntersectionObserver-BIld5T_u.js";import{S as J,A as ae,a as re}from"./alert-CJMW3r9v.js";import"./LatexTitle-BYOXQNlq.js";import"./useInfiniteQuery-DPq_eewq.js";function _s(n,t){const r=new Set(t);return n.filter(a=>!r.has(a))}function ne(n,t,r){const a=n.slice(0);return a[t]=r,a}var A,k,F,B,N,P,$,z,U,V,p,ts,as,Rs,rs,ns,is,Cs,ie=(Cs=class extends Ms{constructor(t,r,a){super();y(this,p);y(this,A);y(this,k);y(this,F);y(this,B);y(this,N);y(this,P);y(this,$);y(this,z);y(this,U);y(this,V,[]);x(this,A,t),x(this,B,a),x(this,F,[]),x(this,N,[]),x(this,k,[]),this.setQueries(r)}onSubscribe(){this.listeners.size===1&&l(this,N).forEach(t=>{t.subscribe(r=>{S(this,p,ns).call(this,t,r)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,l(this,N).forEach(t=>{t.destroy()})}setQueries(t,r){x(this,F,t),x(this,B,r),es.batch(()=>{const a=l(this,N),i=S(this,p,rs).call(this,l(this,F));i.forEach(m=>m.observer.setOptions(m.defaultedQueryOptions));const o=i.map(m=>m.observer),c=o.map(m=>m.getCurrentResult()),b=a.length!==o.length,_=o.some((m,R)=>m!==a[R]),O=b||_,h=O?!0:c.some((m,R)=>{const Q=l(this,k)[R];return!Q||!Ls(m,Q)});!O&&!h||(O&&(x(this,V,i),x(this,N,o)),x(this,k,c),this.hasListeners()&&(O&&(_s(a,o).forEach(m=>{m.destroy()}),_s(o,a).forEach(m=>{m.subscribe(R=>{S(this,p,ns).call(this,m,R)})})),S(this,p,is).call(this)))})}getCurrentResult(){return l(this,k)}getQueries(){return l(this,N).map(t=>t.getCurrentQuery())}getObservers(){return l(this,N)}getOptimisticResult(t,r){const a=S(this,p,rs).call(this,t),i=a.map(c=>c.observer.getOptimisticResult(c.defaultedQueryOptions)),o=a.map(c=>c.defaultedQueryOptions.queryHash);return[i,c=>S(this,p,as).call(this,c??i,r,o),()=>S(this,p,ts).call(this,i,a)]}},A=new WeakMap,k=new WeakMap,F=new WeakMap,B=new WeakMap,N=new WeakMap,P=new WeakMap,$=new WeakMap,z=new WeakMap,U=new WeakMap,V=new WeakMap,p=new WeakSet,ts=function(t,r){return r.map((a,i)=>{const o=t[i];return a.defaultedQueryOptions.notifyOnChangeProps?o:a.observer.trackResult(o,c=>{r.forEach(b=>{b.observer.trackProp(c)})})})},as=function(t,r,a){if(r){const i=l(this,U),o=a!==void 0&&i!==void 0&&(i.length!==a.length||a.some((c,b)=>c!==i[b]));return(!l(this,P)||l(this,k)!==l(this,z)||o||r!==l(this,$))&&(x(this,$,r),x(this,z,l(this,k)),a!==void 0&&x(this,U,a),x(this,P,As(l(this,P),r(t)))),l(this,P)}return t},Rs=function(){var t;return((t=l(this,B))==null?void 0:t.combine)!==void 0&&l(this,N).some((r,a)=>{var i;return r.options.suspense&&((i=l(this,k)[a])==null?void 0:i.data)===void 0})},rs=function(t){const r=new Map;l(this,N).forEach(i=>{const o=i.options.queryHash;if(!o)return;const c=r.get(o);c?c.push(i):r.set(o,[i])});const a=[];return t.forEach(i=>{var _;const o=l(this,A).defaultQueryOptions(i),b=((_=r.get(o.queryHash))==null?void 0:_.shift())??new Os(l(this,A),o);a.push({defaultedQueryOptions:o,observer:b})}),a},ns=function(t,r){const a=l(this,N).indexOf(t);a!==-1&&(x(this,k,ne(l(this,k),a,r)),S(this,p,is).call(this))},is=function(){var t;if(this.hasListeners()){const r=S(this,p,ts).call(this,l(this,k),l(this,V)),a=S(this,p,Rs).call(this),i=l(this,P),o=a?i:S(this,p,as).call(this,r,(t=l(this,B))==null?void 0:t.combine);(a||i!==o)&&es.batch(()=>{this.listeners.forEach(c=>{c(l(this,k))})})}},Cs);function ce({queries:n,...t},r){const a=Fs(),i=zs(),o=Us(),c=E.useMemo(()=>n.map(f=>{const v=a.defaultQueryOptions(f);return v._optimisticResults=i?"isRestoring":"optimistic",v}),[n,a,i]);c.forEach(f=>{Vs(f);const v=a.getQueryCache().get(f.queryHash);Gs(f,o,v)}),Js(o);const[b]=E.useState(()=>new ie(a,c,t)),[_,O,h]=b.getOptimisticResult(c,t.combine),m=!i&&t.subscribed!==!1;E.useSyncExternalStore(E.useCallback(f=>m?b.subscribe(es.batchCalls(f)):Ds,[b,m]),()=>b.getCurrentResult(),()=>b.getCurrentResult()),E.useEffect(()=>{b.setQueries(c,t)},[c,t,b]);const Q=_.some((f,v)=>Es(c[v],f))?_.flatMap((f,v)=>{const u=c[v];if(u&&Es(u,f)){const D=new Os(a,u);return Ws(u,D,o)}return[]}):[];if(Q.length>0)throw Promise.all(Q);const C=_.find((f,v)=>{const u=c[v];return u&&Xs({result:f,errorResetBoundary:o,throwOnError:u.throwOnError,query:a.getQueryCache().get(u.queryHash),suspense:u.suspense})});if(C!=null&&C.error)throw C.error;return O(h())}const oe=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],le=n=>n==="trending"||n==="date_published"||n==="citation_count"?n:"trending",de=new Set(["classic-language-modeling","coding","safety-and-grounding"]),ss=3,W=2,Ne=()=>{var hs,us,ms,ps,gs,bs,xs,fs,js,vs,ks,Ns,ys;const{taskSlug:n}=Hs(),t=Is(),[r,a]=Ks(),i=le(r.get("order_by")),o=e=>{const d=new URLSearchParams(r);d.set("order_by",e),a(d)},[c,b]=E.useState(!1),[_,O]=E.useState(()=>new Set),h=K({queryKey:["task",n],queryFn:()=>L.getTask(n),enabled:!!n,staleTime:10*60*1e3}),m=K({queryKey:["task-parents",(hs=h.data)==null?void 0:hs.id],queryFn:()=>L.getTaskParents(h.data.id),enabled:!!((us=h.data)!=null&&us.id),staleTime:10*60*1e3}),R=K({queryKey:["task-sisters",(ms=h.data)==null?void 0:ms.area_id,(ps=h.data)==null?void 0:ps.id],queryFn:()=>L.getTasks({area_id:Number(h.data.area_id),page_size:50}),enabled:!!((gs=h.data)!=null&&gs.area_id),staleTime:10*60*1e3}),Q=K({queryKey:["task-children",(bs=h.data)==null?void 0:bs.id],queryFn:()=>L.getTaskChildren(h.data.id,{page_size:50}),enabled:!!((xs=h.data)!=null&&xs.id),staleTime:10*60*1e3}),C=E.useMemo(()=>{var e;return(((e=Q.data)==null?void 0:e.results)||[]).filter(d=>!de.has(d.slug))},[Q.data]),f=K({queryKey:["task-datasets",(fs=h.data)==null?void 0:fs.id,!1,W],queryFn:()=>L.getDatasets({task_id:Number(h.data.id),page_size:100,ordering:"-paper_count",min_eval_count:W}),enabled:!!((js=h.data)!=null&&js.id),staleTime:10*60*1e3}),v=ce({queries:C.map(e=>({queryKey:["task-datasets",e.id,!1,W],queryFn:()=>L.getDatasets({task_id:Number(e.id),page_size:20,ordering:"-paper_count",min_eval_count:W}),staleTime:10*60*1e3}))}),u=ee({taskId:((vs=h.data)==null?void 0:vs.id)||"",page_size:12,order_by:i,order_dir:"desc",include_resources:!0,enabled:!!((ks=h.data)!=null&&ks.id)}),D=E.useMemo(()=>{var d;return(((d=u.data)==null?void 0:d.pages.flatMap(g=>g.results))||[]).map(se)},[u.data]),X=E.useMemo(()=>{var d;const e={};return(d=u.data)==null||d.pages.forEach(g=>g.results.forEach(j=>(j.methods||[]).forEach(w=>{const H=w.slug||w.id;e[H]||(e[H]={id:w.id,name:w.name,slug:w.slug||"",count:0}),e[H].count++}))),Object.values(e).sort((g,j)=>j.count-g.count).slice(0,8)},[u.data]),{targetRef:Qs,isIntersecting:cs}=te({rootMargin:"200px"});if(E.useEffect(()=>{cs&&u.hasNextPage&&!u.isFetchingNextPage&&u.fetchNextPage()},[cs,u.hasNextPage,u.isFetchingNextPage]),h.isLoading)return s.jsxs("div",{className:"page",children:[s.jsx(J,{className:"h-12 w-1/2 mb-4"}),s.jsx(J,{className:"h-6 w-1/3 mb-8"}),s.jsx(J,{className:"h-64 w-full"})]});if(h.error||!h.data)return s.jsx("div",{className:"page",children:s.jsx(ae,{variant:"destructive",children:s.jsx(re,{children:"Task not found."})})});const T=h.data,os=G(T.name,T.slug),ls=(((Ns=R.data)==null?void 0:Ns.results)||[]).filter(e=>e.id!==T.id),q=((ys=f.data)==null?void 0:ys.results)||[],Ts=C.some((e,d)=>{var j,w;return(((w=(j=v[d])==null?void 0:j.data)==null?void 0:w.results)||[]).length>0}),ds=q.length>0,Ps=(()=>{const e=new Set;return q.forEach(d=>e.add(d.id)),v.forEach(d=>{var g;return(((g=d.data)==null?void 0:g.results)||[]).forEach(j=>e.add(j.id))}),e.size})(),qs=e=>{O(d=>{const g=new Set(d);return g.has(e)?g.delete(e):g.add(e),g})};return s.jsxs("div",{className:"page",children:[s.jsxs("div",{className:"breadcrumb",children:[s.jsx(I,{to:"/",children:"Papers"}),s.jsx("span",{className:"sep",children:"/"}),s.jsx(I,{to:"/tasks",children:"Tasks"}),[...m.data||[]].reverse().map(e=>s.jsxs($s.Fragment,{children:[s.jsx("span",{className:"sep",children:"/"}),s.jsx(I,{to:`/tasks/${e.slug||e.id}`,children:G(e.name,e.slug)})]},e.id)),s.jsx("span",{className:"sep",children:"/"}),s.jsx("span",{style:{color:"var(--accent-text)"},children:T.name.toUpperCase()})]}),s.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:"TASK"}),s.jsx("h1",{className:"domain-mega-title",children:os}),T.description&&s.jsx("p",{className:"task-explainer",children:T.description}),s.jsxs("div",{className:"task-quickstats",children:[s.jsxs("span",{children:[s.jsx("span",{className:"num",children:(T.paper_count??0).toLocaleString()}),"PAPERS"]}),s.jsxs("span",{children:[s.jsx("span",{className:"num",children:Ps}),"BENCHMARKS"]}),s.jsxs("span",{children:[s.jsxs("span",{className:"num",children:[X.length,"+"]}),"METHODS USED"]})]}),s.jsxs("div",{className:"task-page-grid",style:{marginTop:28},children:[s.jsxs("div",{children:[ds&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"task-section-head",children:[s.jsx("div",{className:"task-section-eyebrow",children:"Leaderboards Β· click any"}),s.jsxs("div",{className:"task-section-title",children:["Benchmarks ",s.jsxs("span",{className:"meta",children:["[",q.length,"]"]})]})]}),(c?q:q.slice(0,5)).map((e,d)=>s.jsxs("div",{className:"bench-row",onClick:()=>t(`/benchmark/${e.slug||e.id}`),children:[s.jsx("div",{className:"bench-row-num",children:String(d+1).padStart(2,"0")}),s.jsxs("div",{className:"bench-row-main",children:[s.jsx("div",{className:"bench-row-name",children:e.name}),s.jsx("div",{className:"bench-row-sub",children:e.paper_count!=null&&s.jsxs("span",{children:[s.jsx("strong",{children:e.paper_count})," ENTRIES"]})})]}),s.jsx("div",{className:"bench-row-arrow",children:"β†’"})]},e.id)),q.length>5&&s.jsx("button",{type:"button",className:"bench-show-more",onClick:()=>b(e=>!e),children:c?"βˆ’ show top 5":`+ show ${q.length-5} more benchmarks`})]}),Ts&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"task-section-head",style:ds?{marginTop:36}:void 0,children:[s.jsx("div",{className:"task-section-eyebrow",children:"Benchmarks by capability"}),s.jsxs("div",{className:"task-section-title",children:["Subtasks ",s.jsxs("span",{className:"meta",children:["[",C.length,"]"]})]})]}),s.jsx("div",{className:"subtask-grid",children:C.map((e,d)=>{var Ss;const g=v[d],j=((Ss=g==null?void 0:g.data)==null?void 0:Ss.results)||[];if(j.length===0)return null;const w=_.has(e.id),H=w?j:j.slice(0,ss),Y=j.length-ss;return s.jsxs("div",{className:"subtask-section",children:[s.jsxs("div",{className:"subtask-head",children:[s.jsx(I,{to:`/tasks/${e.slug||e.id}`,className:"subtask-head-name",children:G(e.name,e.slug)}),s.jsxs("span",{className:"subtask-head-meta",children:["[",j.length," benchmark",j.length===1?"":"s","]"]})]}),H.map((M,Bs)=>s.jsxs("div",{className:"bench-row",onClick:()=>t(`/benchmark/${M.slug||M.id}`),children:[s.jsx("div",{className:"bench-row-num",children:String(Bs+1).padStart(2,"0")}),s.jsxs("div",{className:"bench-row-main",children:[s.jsx("div",{className:"bench-row-name",children:M.name}),s.jsx("div",{className:"bench-row-sub",children:M.paper_count!=null&&s.jsxs("span",{children:[s.jsx("strong",{children:M.paper_count})," ENTRIES"]})})]}),s.jsx("div",{className:"bench-row-arrow",children:"β†’"})]},M.id)),Y>0&&s.jsx("button",{type:"button",className:"bench-show-more",onClick:()=>qs(e.id),children:w?`βˆ’ show top ${ss}`:`+ show ${Y} more benchmark${Y===1?"":"s"}`})]},e.id)})})]}),s.jsxs("div",{className:"task-section-head",style:{marginTop:36},children:[s.jsx("div",{className:"task-section-eyebrow",children:"Top trending Β· sort below"}),s.jsxs("div",{className:"task-section-title",children:["Papers ",s.jsxs("span",{className:"meta",children:["[",(T.paper_count??0).toLocaleString(),"]"]})]})]}),s.jsxs("div",{className:"sort-bar",children:[s.jsx("div",{className:"sort-options",children:oe.map(([e,d])=>s.jsx("button",{className:`sort-btn ${i===e?"active":""}`,onClick:()=>o(e),children:d},e))}),s.jsxs("div",{className:"results-count",children:[D.length," loaded in ",s.jsx("span",{children:os})]})]}),u.isLoading?s.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((e,d)=>s.jsx(J,{className:"h-40 w-full"},d))}):D.length===0?s.jsx("div",{className:"no-results",children:"No papers in this task yet."}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"paper-list",children:D.map((e,d)=>s.jsx(Ys,{paper:e,rank:d+1},e.id))}),s.jsx("div",{ref:Qs,style:{height:1}}),u.isFetchingNextPage&&s.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]}),s.jsxs("aside",{className:"task-side",children:[ls.length>0&&s.jsxs("div",{className:"side-block",children:[s.jsx("div",{className:"side-block-num",children:"01/"}),s.jsx("div",{className:"side-block-label",children:"Sister Tasks"}),ls.slice(0,8).map(e=>s.jsxs(I,{to:`/tasks/${e.slug}`,className:"side-link-row",children:[s.jsx("span",{children:G(e.name,e.slug)}),e.paper_count!=null&&s.jsx("span",{className:"count",children:e.paper_count.toLocaleString()})]},e.id))]}),X.length>0&&s.jsxs("div",{className:"side-block",children:[s.jsx("div",{className:"side-block-num",children:"02/"}),s.jsx("div",{className:"side-block-label",children:"Common Methods"}),X.map(e=>s.jsxs("div",{className:"side-method-row",children:[s.jsx(Zs,{method:{slug:e.slug,name:e.name}}),s.jsxs("span",{className:"num",children:["Β·",e.count]})]},e.id))]})]})]})]})};export{Ne as default};
assets/{TagsIndexView-Cq2OXyNT.js β†’ TagsIndexView-BW55bmnO.js} RENAMED
@@ -1 +1 @@
1
- import{r as m,j as e,L as g}from"./index-BBLNzdQ3.js";import{u as f}from"./adminAuth-BcLoDHjH.js";import{a as x}from"./api-BrmxIuWZ.js";import{f as u,h as j,d as y}from"./transform-C-0glUhY.js";import{A as v,a as k,S as h}from"./alert-CHYYTMmo.js";const p=new Set(["few-shot-image-classification","object-counting","open-vocabulary-object-detection","other"]),c=a=>(a==null?void 0:a.trim().toLowerCase().replace(/[\s_]+/g,"-"))??"",N=a=>p.has(c(a.name))||p.has(c(a.slug)),T=()=>{const a=f({queryKey:["areas-with-tasks"],queryFn:()=>x.getAreasWithTasks(),staleTime:6e5}),o=m.useMemo(()=>{if(!a.data)return[];const t={general:0,vision:1,video:2,language:3,audio:4,"time-series":5},r=i=>t[c(i)]??999;return a.data.results.map(i=>({...i,tasks:i.tasks.filter(s=>!N(s))})).sort((i,s)=>{const n=r(i.name),l=r(s.name);return n!==l?n-l:i.name.localeCompare(s.name)})},[a.data]),d=m.useMemo(()=>o.reduce((t,r)=>t+r.tasks.length,0),[o]);return a.error?e.jsx("div",{className:"page",children:e.jsx(v,{variant:"destructive",children:e.jsx(k,{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."})]})}),a.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:4}).map((t,r)=>e.jsxs("div",{children:[e.jsx(h,{className:"h-8 w-1/3 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((i,s)=>e.jsx(h,{className:"h-24"},s))})]},r))}):o.map(t=>{const r=t.tasks;if(r.length===0)return null;const i=r.reduce((s,n)=>s+(n.paper_count||0),0);return e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsxs("div",{children:[e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:t.name}),t.description&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:t.description})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[r.length," ",r.length===1?"task":"tasks"," Β· ",i.toLocaleString()," papers"]})]}),e.jsx("div",{className:"tag-grid",children:r.map(s=>{const n=s.slug||"",l=u(j(n));return e.jsxs(g,{to:`/tasks/${n}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:l.dot}}),y(s.name,n)]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(s.paper_count??0).toLocaleString()," papers"]})})]},s.id)})})]},t.id)}),d>0&&e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:24},children:[d," tasks across ",o.filter(t=>t.tasks.length>0).length," areas."]})]})};export{T as default};
 
1
+ import{r as m,j as e,L as g}from"./index-BHu3ckjy.js";import{u as f}from"./adminAuth-W6_tdZNU.js";import{a as x}from"./api-gdpmQjJd.js";import{f as u,h as j,d as y}from"./transform-BxhHCT2R.js";import{A as v,a as k,S as h}from"./alert-CJMW3r9v.js";const p=new Set(["few-shot-image-classification","object-counting","open-vocabulary-object-detection","other"]),c=a=>(a==null?void 0:a.trim().toLowerCase().replace(/[\s_]+/g,"-"))??"",N=a=>p.has(c(a.name))||p.has(c(a.slug)),T=()=>{const a=f({queryKey:["areas-with-tasks"],queryFn:()=>x.getAreasWithTasks(),staleTime:6e5}),o=m.useMemo(()=>{if(!a.data)return[];const t={general:0,vision:1,video:2,language:3,audio:4,"time-series":5},r=i=>t[c(i)]??999;return a.data.results.map(i=>({...i,tasks:i.tasks.filter(s=>!N(s))})).sort((i,s)=>{const n=r(i.name),l=r(s.name);return n!==l?n-l:i.name.localeCompare(s.name)})},[a.data]),d=m.useMemo(()=>o.reduce((t,r)=>t+r.tasks.length,0),[o]);return a.error?e.jsx("div",{className:"page",children:e.jsx(v,{variant:"destructive",children:e.jsx(k,{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."})]})}),a.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:4}).map((t,r)=>e.jsxs("div",{children:[e.jsx(h,{className:"h-8 w-1/3 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((i,s)=>e.jsx(h,{className:"h-24"},s))})]},r))}):o.map(t=>{const r=t.tasks;if(r.length===0)return null;const i=r.reduce((s,n)=>s+(n.paper_count||0),0);return e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsxs("div",{children:[e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:t.name}),t.description&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:t.description})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[r.length," ",r.length===1?"task":"tasks"," Β· ",i.toLocaleString()," papers"]})]}),e.jsx("div",{className:"tag-grid",children:r.map(s=>{const n=s.slug||"",l=u(j(n));return e.jsxs(g,{to:`/tasks/${n}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:l.dot}}),y(s.name,n)]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(s.paper_count??0).toLocaleString()," papers"]})})]},s.id)})})]},t.id)}),d>0&&e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:24},children:[d," tasks across ",o.filter(t=>t.tasks.length>0).length," areas."]})]})};export{T as default};
assets/{adminAuth-BcLoDHjH.js β†’ adminAuth-W6_tdZNU.js} RENAMED
@@ -1 +1 @@
1
- var mt=e=>{throw TypeError(e)};var Z=(e,t,s)=>t.has(e)||mt("Cannot "+s);var i=(e,t,s)=>(Z(e,t,"read from private field"),s?s.call(e):t.get(e)),p=(e,t,s)=>t.has(e)?mt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),u=(e,t,s,r)=>(Z(e,t,"write to private field"),r?r.call(e,s):t.set(e,s),s),l=(e,t,s)=>(Z(e,t,"access private method"),s);import{S as _t,_ as gt,$ as S,s as q,a0 as j,b as tt,a1 as et,a2 as vt,a3 as Mt,a4 as Y,a5 as Qt,a6 as xt,a7 as Rt,n as wt,r as w,c as It,a as Dt}from"./index-BBLNzdQ3.js";var g,n,H,m,Q,U,C,O,W,P,N,x,D,T,k,a,B,st,it,rt,nt,at,ot,ht,Ot,Ct,Ft=(Ct=class extends _t{constructor(t,s){super();p(this,a);p(this,g);p(this,n);p(this,H);p(this,m);p(this,Q);p(this,U);p(this,C);p(this,O);p(this,W);p(this,P);p(this,N);p(this,x);p(this,D);p(this,T);p(this,k,new Set);this.options=s,u(this,g,t),u(this,O,null),u(this,C,gt()),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(i(this,n).addObserver(this),St(i(this,n),this.options)?l(this,a,B).call(this):this.updateResult(),l(this,a,nt).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ct(i(this,n),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ct(i(this,n),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,l(this,a,at).call(this),l(this,a,ot).call(this),i(this,n).removeObserver(this)}setOptions(t){const s=this.options,r=i(this,n);if(this.options=i(this,g).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof S(this.options.enabled,i(this,n))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");l(this,a,ht).call(this),i(this,n).setOptions(this.options),s._defaulted&&!q(this.options,s)&&i(this,g).getQueryCache().notify({type:"observerOptionsUpdated",query:i(this,n),observer:this});const o=this.hasListeners();o&&yt(i(this,n),r,this.options,s)&&l(this,a,B).call(this),this.updateResult(),o&&(i(this,n)!==r||S(this.options.enabled,i(this,n))!==S(s.enabled,i(this,n))||j(this.options.staleTime,i(this,n))!==j(s.staleTime,i(this,n)))&&l(this,a,st).call(this);const h=l(this,a,it).call(this);o&&(i(this,n)!==r||S(this.options.enabled,i(this,n))!==S(s.enabled,i(this,n))||h!==i(this,T))&&l(this,a,rt).call(this,h)}getOptimisticResult(t){const s=i(this,g).getQueryCache().build(i(this,g),t),r=this.createResult(s,t);return Pt(this,r)&&(u(this,m,r),u(this,U,this.options),u(this,Q,i(this,n).state)),r}getCurrentResult(){return i(this,m)}trackResult(t,s){return new Proxy(t,{get:(r,o)=>(this.trackProp(o),s==null||s(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&i(this,C).status==="pending"&&i(this,C).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,o))})}trackProp(t){i(this,k).add(t)}getCurrentQuery(){return i(this,n)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const s=i(this,g).defaultQueryOptions(t),r=i(this,g).getQueryCache().build(i(this,g),s);return r.fetch().then(()=>this.createResult(r,s))}fetch(t){return l(this,a,B).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),i(this,m)))}createResult(t,s){var pt;const r=i(this,n),o=this.options,h=i(this,m),c=i(this,Q),y=i(this,U),b=t!==r?t.state:i(this,H),{state:E}=t;let d={...E},_=!1,f;if(s._optimisticResults){const R=this.hasListeners(),L=!R&&St(t,s),K=R&&yt(t,r,s,o);(L||K)&&(d={...d,...xt(E.data,t.options)}),s._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:M,errorUpdatedAt:A,status:v}=d;f=d.data;let z=!1;if(s.placeholderData!==void 0&&f===void 0&&v==="pending"){let R;h!=null&&h.isPlaceholderData&&s.placeholderData===(y==null?void 0:y.placeholderData)?(R=h.data,z=!0):R=typeof s.placeholderData=="function"?s.placeholderData((pt=i(this,N))==null?void 0:pt.state.data,i(this,N)):s.placeholderData,R!==void 0&&(v="success",f=Rt(h==null?void 0:h.data,R,s),_=!0)}if(s.select&&f!==void 0&&!z)if(h&&f===(c==null?void 0:c.data)&&s.select===i(this,W))f=i(this,P);else try{u(this,W,s.select),f=s.select(f),f=Rt(h==null?void 0:h.data,f,s),u(this,P,f),u(this,O,null)}catch(R){u(this,O,R)}i(this,O)&&(M=i(this,O),f=i(this,P),A=Date.now(),v="error");const $=d.fetchStatus==="fetching",J=v==="pending",X=v==="error",dt=J&&$,ft=f!==void 0,I={status:v,fetchStatus:d.fetchStatus,isPending:J,isSuccess:v==="success",isError:X,isInitialLoading:dt,isLoading:dt,data:f,dataUpdatedAt:d.dataUpdatedAt,error:M,errorUpdatedAt:A,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:d.dataUpdateCount>b.dataUpdateCount||d.errorUpdateCount>b.errorUpdateCount,isFetching:$,isRefetching:$&&!J,isLoadingError:X&&!ft,isPaused:d.fetchStatus==="paused",isPlaceholderData:_,isRefetchError:X&&ft,isStale:lt(t,s),refetch:this.refetch,promise:i(this,C),isEnabled:S(s.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const R=I.data!==void 0,L=I.status==="error"&&!R,K=G=>{L?G.reject(I.error):R&&G.resolve(I.data)},bt=()=>{const G=u(this,C,I.promise=gt());K(G)},V=i(this,C);switch(V.status){case"pending":t.queryHash===r.queryHash&&K(V);break;case"fulfilled":(L||I.data!==V.value)&&bt();break;case"rejected":(!L||I.error!==V.reason)&&bt();break}}return I}updateResult(){const t=i(this,m),s=this.createResult(i(this,n),this.options);if(u(this,Q,i(this,n).state),u(this,U,this.options),i(this,Q).data!==void 0&&u(this,N,i(this,n)),q(s,t))return;u(this,m,s);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,h=typeof o=="function"?o():o;if(h==="all"||!h&&!i(this,k).size)return!0;const c=new Set(h??i(this,k));return this.options.throwOnError&&c.add("error"),Object.keys(i(this,m)).some(y=>{const F=y;return i(this,m)[F]!==t[F]&&c.has(F)})};l(this,a,Ot).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&l(this,a,nt).call(this)}},g=new WeakMap,n=new WeakMap,H=new WeakMap,m=new WeakMap,Q=new WeakMap,U=new WeakMap,C=new WeakMap,O=new WeakMap,W=new WeakMap,P=new WeakMap,N=new WeakMap,x=new WeakMap,D=new WeakMap,T=new WeakMap,k=new WeakMap,a=new WeakSet,B=function(t){l(this,a,ht).call(this);let s=i(this,n).fetch(this.options,t);return t!=null&&t.throwOnError||(s=s.catch(tt)),s},st=function(){l(this,a,at).call(this);const t=j(this.options.staleTime,i(this,n));if(et.isServer()||i(this,m).isStale||!vt(t))return;const r=Mt(i(this,m).dataUpdatedAt,t)+1;u(this,x,Y.setTimeout(()=>{i(this,m).isStale||this.updateResult()},r))},it=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(i(this,n)):this.options.refetchInterval)??!1},rt=function(t){l(this,a,ot).call(this),u(this,T,t),!(et.isServer()||S(this.options.enabled,i(this,n))===!1||!vt(i(this,T))||i(this,T)===0)&&u(this,D,Y.setInterval(()=>{(this.options.refetchIntervalInBackground||Qt.isFocused())&&l(this,a,B).call(this)},i(this,T)))},nt=function(){l(this,a,st).call(this),l(this,a,rt).call(this,l(this,a,it).call(this))},at=function(){i(this,x)!==void 0&&(Y.clearTimeout(i(this,x)),u(this,x,void 0))},ot=function(){i(this,D)!==void 0&&(Y.clearInterval(i(this,D)),u(this,D,void 0))},ht=function(){const t=i(this,g).getQueryCache().build(i(this,g),this.options);if(t===i(this,n))return;const s=i(this,n);u(this,n,t),u(this,H,t.state),this.hasListeners()&&(s==null||s.removeObserver(this),t.addObserver(this))},Ot=function(t){wt.batch(()=>{t.listeners&&this.listeners.forEach(s=>{s(i(this,m))}),i(this,g).getQueryCache().notify({query:i(this,n),type:"observerResultsUpdated"})})},Ct);function Ut(e,t){return S(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&S(t.retryOnMount,e)===!1)}function St(e,t){return Ut(e,t)||e.state.data!==void 0&&ct(e,t,t.refetchOnMount)}function ct(e,t,s){if(S(t.enabled,e)!==!1&&j(t.staleTime,e)!=="static"){const r=typeof s=="function"?s(e):s;return r==="always"||r!==!1&&lt(e,t)}return!1}function yt(e,t,s,r){return(e!==t||S(r.enabled,e)===!1)&&(!s.suspense||e.state.status!=="error")&&lt(e,s)}function lt(e,t){return S(t.enabled,e)!==!1&&e.isStaleByTime(j(t.staleTime,e))}function Pt(e,t){return!q(e.getCurrentResult(),t)}var Tt=w.createContext(!1),Nt=()=>w.useContext(Tt);Tt.Provider;function kt(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var At=w.createContext(kt()),Lt=()=>w.useContext(At),Bt=(e,t,s)=>{const r=s!=null&&s.state.error&&typeof e.throwOnError=="function"?It(e.throwOnError,[s.state.error,s]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},jt=e=>{w.useEffect(()=>{e.clearReset()},[e])},Ht=({result:e,errorResetBoundary:t,throwOnError:s,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||It(s,[e.error,r])),Wt=e=>{if(e.suspense){const s=o=>o==="static"?o:Math.max(o??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...o)=>s(r(...o)):s(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},zt=(e,t)=>e.isLoading&&e.isFetching&&!t,Kt=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Et=(e,t,s)=>t.fetchOptimistic(e).catch(()=>{s.clearReset()});function Vt(e,t,s){var _,f,M,A;const r=Nt(),o=Lt(),h=Dt(),c=h.defaultQueryOptions(e);(f=(_=h.getDefaultOptions().queries)==null?void 0:_._experimental_beforeQuery)==null||f.call(_,c);const y=h.getQueryCache().get(c.queryHash);c._optimisticResults=r?"isRestoring":"optimistic",Wt(c),Bt(c,o,y),jt(o);const F=!h.getQueryCache().get(c.queryHash),[b]=w.useState(()=>new t(h,c)),E=b.getOptimisticResult(c),d=!r&&e.subscribed!==!1;if(w.useSyncExternalStore(w.useCallback(v=>{const z=d?b.subscribe(wt.batchCalls(v)):tt;return b.updateResult(),z},[b,d]),()=>b.getCurrentResult(),()=>b.getCurrentResult()),w.useEffect(()=>{b.setOptions(c)},[c,b]),Kt(c,E))throw Et(c,b,o);if(Ht({result:E,errorResetBoundary:o,throwOnError:c.throwOnError,query:y,suspense:c.suspense}))throw E.error;if((A=(M=h.getDefaultOptions().queries)==null?void 0:M._experimental_afterQuery)==null||A.call(M,c,E),c.experimental_prefetchInRender&&!et.isServer()&&zt(E,r)){const v=F?Et(c,b,o):y==null?void 0:y.promise;v==null||v.catch(tt).finally(()=>{b.updateResult()})}return c.notifyOnChangeProps?E:b.trackResult(E)}function Jt(e,t){return Vt(e,Ft)}const ut="cronAdminToken";function Xt(){var e;return typeof window>"u"?"":((e=window.localStorage.getItem(ut))==null?void 0:e.trim())??""}function Zt(e){if(typeof window>"u")return;const t=e.trim();t?window.localStorage.setItem(ut,t):window.localStorage.removeItem(ut)}export{Ft as Q,Nt as a,Lt as b,Bt as c,jt as d,Wt as e,Et as f,Ht as g,Vt as h,Zt as i,Xt as j,Kt as s,Jt as u};
 
1
+ var mt=e=>{throw TypeError(e)};var Z=(e,t,s)=>t.has(e)||mt("Cannot "+s);var i=(e,t,s)=>(Z(e,t,"read from private field"),s?s.call(e):t.get(e)),p=(e,t,s)=>t.has(e)?mt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),u=(e,t,s,r)=>(Z(e,t,"write to private field"),r?r.call(e,s):t.set(e,s),s),l=(e,t,s)=>(Z(e,t,"access private method"),s);import{S as _t,_ as gt,$ as S,s as q,a0 as j,b as tt,a1 as et,a2 as vt,a3 as Mt,a4 as Y,a5 as Qt,a6 as xt,a7 as Rt,n as wt,r as w,c as It,a as Dt}from"./index-BHu3ckjy.js";var g,n,H,m,Q,U,C,O,W,P,N,x,D,T,k,a,B,st,it,rt,nt,at,ot,ht,Ot,Ct,Ft=(Ct=class extends _t{constructor(t,s){super();p(this,a);p(this,g);p(this,n);p(this,H);p(this,m);p(this,Q);p(this,U);p(this,C);p(this,O);p(this,W);p(this,P);p(this,N);p(this,x);p(this,D);p(this,T);p(this,k,new Set);this.options=s,u(this,g,t),u(this,O,null),u(this,C,gt()),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(i(this,n).addObserver(this),St(i(this,n),this.options)?l(this,a,B).call(this):this.updateResult(),l(this,a,nt).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ct(i(this,n),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ct(i(this,n),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,l(this,a,at).call(this),l(this,a,ot).call(this),i(this,n).removeObserver(this)}setOptions(t){const s=this.options,r=i(this,n);if(this.options=i(this,g).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof S(this.options.enabled,i(this,n))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");l(this,a,ht).call(this),i(this,n).setOptions(this.options),s._defaulted&&!q(this.options,s)&&i(this,g).getQueryCache().notify({type:"observerOptionsUpdated",query:i(this,n),observer:this});const o=this.hasListeners();o&&yt(i(this,n),r,this.options,s)&&l(this,a,B).call(this),this.updateResult(),o&&(i(this,n)!==r||S(this.options.enabled,i(this,n))!==S(s.enabled,i(this,n))||j(this.options.staleTime,i(this,n))!==j(s.staleTime,i(this,n)))&&l(this,a,st).call(this);const h=l(this,a,it).call(this);o&&(i(this,n)!==r||S(this.options.enabled,i(this,n))!==S(s.enabled,i(this,n))||h!==i(this,T))&&l(this,a,rt).call(this,h)}getOptimisticResult(t){const s=i(this,g).getQueryCache().build(i(this,g),t),r=this.createResult(s,t);return Pt(this,r)&&(u(this,m,r),u(this,U,this.options),u(this,Q,i(this,n).state)),r}getCurrentResult(){return i(this,m)}trackResult(t,s){return new Proxy(t,{get:(r,o)=>(this.trackProp(o),s==null||s(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&i(this,C).status==="pending"&&i(this,C).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,o))})}trackProp(t){i(this,k).add(t)}getCurrentQuery(){return i(this,n)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const s=i(this,g).defaultQueryOptions(t),r=i(this,g).getQueryCache().build(i(this,g),s);return r.fetch().then(()=>this.createResult(r,s))}fetch(t){return l(this,a,B).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),i(this,m)))}createResult(t,s){var pt;const r=i(this,n),o=this.options,h=i(this,m),c=i(this,Q),y=i(this,U),b=t!==r?t.state:i(this,H),{state:E}=t;let d={...E},_=!1,f;if(s._optimisticResults){const R=this.hasListeners(),L=!R&&St(t,s),K=R&&yt(t,r,s,o);(L||K)&&(d={...d,...xt(E.data,t.options)}),s._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:M,errorUpdatedAt:A,status:v}=d;f=d.data;let z=!1;if(s.placeholderData!==void 0&&f===void 0&&v==="pending"){let R;h!=null&&h.isPlaceholderData&&s.placeholderData===(y==null?void 0:y.placeholderData)?(R=h.data,z=!0):R=typeof s.placeholderData=="function"?s.placeholderData((pt=i(this,N))==null?void 0:pt.state.data,i(this,N)):s.placeholderData,R!==void 0&&(v="success",f=Rt(h==null?void 0:h.data,R,s),_=!0)}if(s.select&&f!==void 0&&!z)if(h&&f===(c==null?void 0:c.data)&&s.select===i(this,W))f=i(this,P);else try{u(this,W,s.select),f=s.select(f),f=Rt(h==null?void 0:h.data,f,s),u(this,P,f),u(this,O,null)}catch(R){u(this,O,R)}i(this,O)&&(M=i(this,O),f=i(this,P),A=Date.now(),v="error");const $=d.fetchStatus==="fetching",J=v==="pending",X=v==="error",dt=J&&$,ft=f!==void 0,I={status:v,fetchStatus:d.fetchStatus,isPending:J,isSuccess:v==="success",isError:X,isInitialLoading:dt,isLoading:dt,data:f,dataUpdatedAt:d.dataUpdatedAt,error:M,errorUpdatedAt:A,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:d.dataUpdateCount>b.dataUpdateCount||d.errorUpdateCount>b.errorUpdateCount,isFetching:$,isRefetching:$&&!J,isLoadingError:X&&!ft,isPaused:d.fetchStatus==="paused",isPlaceholderData:_,isRefetchError:X&&ft,isStale:lt(t,s),refetch:this.refetch,promise:i(this,C),isEnabled:S(s.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const R=I.data!==void 0,L=I.status==="error"&&!R,K=G=>{L?G.reject(I.error):R&&G.resolve(I.data)},bt=()=>{const G=u(this,C,I.promise=gt());K(G)},V=i(this,C);switch(V.status){case"pending":t.queryHash===r.queryHash&&K(V);break;case"fulfilled":(L||I.data!==V.value)&&bt();break;case"rejected":(!L||I.error!==V.reason)&&bt();break}}return I}updateResult(){const t=i(this,m),s=this.createResult(i(this,n),this.options);if(u(this,Q,i(this,n).state),u(this,U,this.options),i(this,Q).data!==void 0&&u(this,N,i(this,n)),q(s,t))return;u(this,m,s);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,h=typeof o=="function"?o():o;if(h==="all"||!h&&!i(this,k).size)return!0;const c=new Set(h??i(this,k));return this.options.throwOnError&&c.add("error"),Object.keys(i(this,m)).some(y=>{const F=y;return i(this,m)[F]!==t[F]&&c.has(F)})};l(this,a,Ot).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&l(this,a,nt).call(this)}},g=new WeakMap,n=new WeakMap,H=new WeakMap,m=new WeakMap,Q=new WeakMap,U=new WeakMap,C=new WeakMap,O=new WeakMap,W=new WeakMap,P=new WeakMap,N=new WeakMap,x=new WeakMap,D=new WeakMap,T=new WeakMap,k=new WeakMap,a=new WeakSet,B=function(t){l(this,a,ht).call(this);let s=i(this,n).fetch(this.options,t);return t!=null&&t.throwOnError||(s=s.catch(tt)),s},st=function(){l(this,a,at).call(this);const t=j(this.options.staleTime,i(this,n));if(et.isServer()||i(this,m).isStale||!vt(t))return;const r=Mt(i(this,m).dataUpdatedAt,t)+1;u(this,x,Y.setTimeout(()=>{i(this,m).isStale||this.updateResult()},r))},it=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(i(this,n)):this.options.refetchInterval)??!1},rt=function(t){l(this,a,ot).call(this),u(this,T,t),!(et.isServer()||S(this.options.enabled,i(this,n))===!1||!vt(i(this,T))||i(this,T)===0)&&u(this,D,Y.setInterval(()=>{(this.options.refetchIntervalInBackground||Qt.isFocused())&&l(this,a,B).call(this)},i(this,T)))},nt=function(){l(this,a,st).call(this),l(this,a,rt).call(this,l(this,a,it).call(this))},at=function(){i(this,x)!==void 0&&(Y.clearTimeout(i(this,x)),u(this,x,void 0))},ot=function(){i(this,D)!==void 0&&(Y.clearInterval(i(this,D)),u(this,D,void 0))},ht=function(){const t=i(this,g).getQueryCache().build(i(this,g),this.options);if(t===i(this,n))return;const s=i(this,n);u(this,n,t),u(this,H,t.state),this.hasListeners()&&(s==null||s.removeObserver(this),t.addObserver(this))},Ot=function(t){wt.batch(()=>{t.listeners&&this.listeners.forEach(s=>{s(i(this,m))}),i(this,g).getQueryCache().notify({query:i(this,n),type:"observerResultsUpdated"})})},Ct);function Ut(e,t){return S(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&S(t.retryOnMount,e)===!1)}function St(e,t){return Ut(e,t)||e.state.data!==void 0&&ct(e,t,t.refetchOnMount)}function ct(e,t,s){if(S(t.enabled,e)!==!1&&j(t.staleTime,e)!=="static"){const r=typeof s=="function"?s(e):s;return r==="always"||r!==!1&&lt(e,t)}return!1}function yt(e,t,s,r){return(e!==t||S(r.enabled,e)===!1)&&(!s.suspense||e.state.status!=="error")&&lt(e,s)}function lt(e,t){return S(t.enabled,e)!==!1&&e.isStaleByTime(j(t.staleTime,e))}function Pt(e,t){return!q(e.getCurrentResult(),t)}var Tt=w.createContext(!1),Nt=()=>w.useContext(Tt);Tt.Provider;function kt(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var At=w.createContext(kt()),Lt=()=>w.useContext(At),Bt=(e,t,s)=>{const r=s!=null&&s.state.error&&typeof e.throwOnError=="function"?It(e.throwOnError,[s.state.error,s]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},jt=e=>{w.useEffect(()=>{e.clearReset()},[e])},Ht=({result:e,errorResetBoundary:t,throwOnError:s,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||It(s,[e.error,r])),Wt=e=>{if(e.suspense){const s=o=>o==="static"?o:Math.max(o??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...o)=>s(r(...o)):s(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},zt=(e,t)=>e.isLoading&&e.isFetching&&!t,Kt=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Et=(e,t,s)=>t.fetchOptimistic(e).catch(()=>{s.clearReset()});function Vt(e,t,s){var _,f,M,A;const r=Nt(),o=Lt(),h=Dt(),c=h.defaultQueryOptions(e);(f=(_=h.getDefaultOptions().queries)==null?void 0:_._experimental_beforeQuery)==null||f.call(_,c);const y=h.getQueryCache().get(c.queryHash);c._optimisticResults=r?"isRestoring":"optimistic",Wt(c),Bt(c,o,y),jt(o);const F=!h.getQueryCache().get(c.queryHash),[b]=w.useState(()=>new t(h,c)),E=b.getOptimisticResult(c),d=!r&&e.subscribed!==!1;if(w.useSyncExternalStore(w.useCallback(v=>{const z=d?b.subscribe(wt.batchCalls(v)):tt;return b.updateResult(),z},[b,d]),()=>b.getCurrentResult(),()=>b.getCurrentResult()),w.useEffect(()=>{b.setOptions(c)},[c,b]),Kt(c,E))throw Et(c,b,o);if(Ht({result:E,errorResetBoundary:o,throwOnError:c.throwOnError,query:y,suspense:c.suspense}))throw E.error;if((A=(M=h.getDefaultOptions().queries)==null?void 0:M._experimental_afterQuery)==null||A.call(M,c,E),c.experimental_prefetchInRender&&!et.isServer()&&zt(E,r)){const v=F?Et(c,b,o):y==null?void 0:y.promise;v==null||v.catch(tt).finally(()=>{b.updateResult()})}return c.notifyOnChangeProps?E:b.trackResult(E)}function Jt(e,t){return Vt(e,Ft)}const ut="cronAdminToken";function Xt(){var e;return typeof window>"u"?"":((e=window.localStorage.getItem(ut))==null?void 0:e.trim())??""}function Zt(e){if(typeof window>"u")return;const t=e.trim();t?window.localStorage.setItem(ut,t):window.localStorage.removeItem(ut)}export{Ft as Q,Nt as a,Lt as b,Bt as c,jt as d,Wt as e,Et as f,Ht as g,Vt as h,Zt as i,Xt as j,Kt as s,Jt as u};
assets/{alert-CHYYTMmo.js β†’ alert-CJMW3r9v.js} RENAMED
@@ -1 +1 @@
1
- import{j as r,o as s,r as d,U as i}from"./index-BBLNzdQ3.js";function g({className:e,...t}){return r.jsx("div",{className:s("animate-pulse rounded-md bg-muted",e),...t})}const o=i("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),n=d.forwardRef(({className:e,variant:t,...a},l)=>r.jsx("div",{ref:l,role:"alert",className:s(o({variant:t}),e),...a}));n.displayName="Alert";const c=d.forwardRef(({className:e,...t},a)=>r.jsx("h5",{ref:a,className:s("mb-1 font-medium leading-none tracking-tight",e),...t}));c.displayName="AlertTitle";const u=d.forwardRef(({className:e,...t},a)=>r.jsx("div",{ref:a,className:s("text-sm [&_p]:leading-relaxed",e),...t}));u.displayName="AlertDescription";export{n as A,g as S,u as a};
 
1
+ import{j as r,o as s,r as d,U as i}from"./index-BHu3ckjy.js";function g({className:e,...t}){return r.jsx("div",{className:s("animate-pulse rounded-md bg-muted",e),...t})}const o=i("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),n=d.forwardRef(({className:e,variant:t,...a},l)=>r.jsx("div",{ref:l,role:"alert",className:s(o({variant:t}),e),...a}));n.displayName="Alert";const c=d.forwardRef(({className:e,...t},a)=>r.jsx("h5",{ref:a,className:s("mb-1 font-medium leading-none tracking-tight",e),...t}));c.displayName="AlertTitle";const u=d.forwardRef(({className:e,...t},a)=>r.jsx("div",{ref:a,className:s("text-sm [&_p]:leading-relaxed",e),...t}));u.displayName="AlertDescription";export{n as A,g as S,u as a};
assets/{api-BrmxIuWZ.js β†’ api-gdpmQjJd.js} RENAMED
@@ -1 +1 @@
1
- var f=Object.defineProperty;var S=(c,e,t)=>e in c?f(c,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):c[e]=t;var l=(c,e,t)=>S(c,typeof e!="symbol"?e+"":e,t);import{j as y}from"./adminAuth-BcLoDHjH.js";import{E as _,Z as b}from"./index-BBLNzdQ3.js";const P=`${b()}/api/v1`,s=!1;class k{constructor(e=P){l(this,"baseUrl");this.baseUrl=e}async request(e,t){const i=`${this.baseUrl}${e}`;try{const{headers:o,...d}=t??{},u=y(),g=await fetch(i,{...d,cache:d.cache??"no-store",credentials:d.credentials??"include",headers:{"Content-Type":"application/json",...u?{"X-Admin-Token":u}:{},...o}});if(!g.ok){const h=await g.text();console.error("[API] Error response:",h),g.status===401&&typeof window<"u"&&window.dispatchEvent(new CustomEvent("pwc:auth-stale"));const r=new Error(`API request failed: ${g.status} ${g.statusText}`);throw r.status=g.status,r.statusText=g.statusText,r.response=h,r}return g.status===204?void 0:await g.json()}catch(o){throw console.error(`[API] Request to ${i} failed:`,o),o}}async getPapers(e){const t=new URLSearchParams;e!=null&&e.page&&t.append("page",e.page.toString()),e!=null&&e.page_size&&t.append("page_size",e.page_size.toString()),e!=null&&e.search&&t.append("search",e.search),e!=null&&e.order_by&&t.append("order_by",e.order_by),e!=null&&e.order_dir&&t.append("order_dir",e.order_dir),e!=null&&e.time&&t.append("time",e.time),e!=null&&e.published_after&&t.append("published_after",e.published_after),e!=null&&e.published_before&&t.append("published_before",e.published_before),e!=null&&e.conference&&t.append("conference",e.conference),(e==null?void 0:e.latest_only)!==void 0&&t.append("latest_only",e.latest_only.toString()),(e==null?void 0:e.include_resources)!==void 0&&t.append("include_resources",e.include_resources.toString());const i=`/papers/${t.toString()?`?${t.toString()}`:""}`;return this.request(i)}async searchPapers(e,t=10){const i=new URLSearchParams;return i.append("q",e),i.append("limit",t.toString()),this.request(`/papers/search?${i.toString()}`)}async getPaper(e,t=!0){const i=`/papers/${e}${t?"?include_resources=true":""}`;return this.request(i)}async getPaperByArxivId(e,t=!0){const i=`/papers/arxiv/${e}${t?"?include_resources=true":""}`;return this.request(i)}async indexPaperFromArxiv(e){const t=`/papers/index/${e}`;return this.request(t,{method:"POST"})}async updatePaperTasks(e,t){const i=new URLSearchParams;t.forEach(d=>i.append("task_ids",d.toString()));const o=`/papers/${e}/tasks?${i.toString()}`;return this.request(o,{method:"PUT"})}async updatePaperMethods(e,t){const i=new URLSearchParams;t.forEach(d=>i.append("method_ids",d.toString()));const o=`/papers/${e}/methods?${i.toString()}`;return this.request(o,{method:"PUT"})}async updatePaperRepositories(e,t){const i=`/papers/${e}/repositories`;return this.request(i,{method:"PUT",body:JSON.stringify({repositories:t})})}async updatePaperProjectPages(e,t){const i=`/papers/${e}/project-pages`;return this.request(i,{method:"PUT",body:JSON.stringify({project_pages:t})})}async getTrendingPapers(e){const t=new URLSearchParams;e!=null&&e.limit&&t.append("limit",e.limit.toString()),e!=null&&e.max_age_days&&t.append("max_age_days",e.max_age_days.toString()),(e==null?void 0:e.min_velocity)!==void 0&&t.append("min_velocity",e.min_velocity.toString());const i=`/papers/trending${t.toString()?`?${t.toString()}`:""}`;return this.request(i)}async getRepositoriesForPaper(e){return this.request(`/papers/${e}/repositories`)}async getRepositories(e){const t=new URLSearchParams;e!=null&&e.page&&t.append("page",e.page.toString()),e!=null&&e.page_size&&t.append("page_size",e.page_size.toString()),e!=null&&e.owner&&t.append("owner",e.owner),e!=null&&e.official_only&&t.append("official_only",e.official_only.toString()),e!=null&&e.min_stars&&t.append("min_stars",e.min_stars.toString()),e!=null&&e.source&&t.append("source",e.source),e!=null&&e.order_by&&t.append("order_by",e.order_by),e!=null&&e.order_dir&&t.append("order_dir",e.order_dir);const i=`/repositories/${t.toString()?`?${t.toString()}`:""}`;return this.request(i)}async getProjectPagesForPaper(e){return this.request(`/papers/${e}/project-pages`)}async getProjectPages(e){const t=new URLSearchParams;e!=null&&e.page&&t.append("page",e.page.toString()),e!=null&&e.page_size&&t.append("page_size",e.page_size.toString()),e!=null&&e.official_only&&t.append("official_only",e.official_only.toString()),e!=null&&e.source&&t.append("source",e.source),e!=null&&e.order_by&&t.append("order_by",e.order_by),e!=null&&e.order_dir&&t.append("order_dir",e.order_dir);const i=`/project-pages/${t.toString()?`?${t.toString()}`:""}`;return this.request(i)}async getAuthors(e){const t=new URLSearchParams;e!=null&&e.limit&&t.append("limit",e.limit.toString()),e!=null&&e.offset&&t.append("offset",e.offset.toString()),e!=null&&e.search&&t.append("search",e.search),e!=null&&e.sort_by&&t.append("sort_by",e.sort_by),e!=null&&e.sort_order&&t.append("sort_order",e.sort_order);const i=`/authors${t.toString()?`?${t.toString()}`:""}`;return this.request(i)}async getAuthor(e){return this.request(`/authors/${e}`)}async getAreas(e){const t=new URLSearchParams;e!=null&&e.page&&t.append("page",e.page.toString()),e!=null&&e.page_size&&t.append("page_size",e.page_size.toString()),e!=null&&e.q&&t.append("q",e.q),e!=null&&e.name&&t.append("name",e.name),e!=null&&e.ordering&&t.append("ordering",e.ordering);const i=`/areas/${t.toString()?`?${t.toString()}`:""}`;return this.request(i)}async getArea(e){return this.request(`/areas/${e}`)}async getAreasWithTasks(){return this.request("/areas/with-tasks/")}async getAreaTasks(e,t){const i=new URLSearchParams;t!=null&&t.page&&i.append("page",t.page.toString()),t!=null&&t.page_size&&i.append("page_size",t.page_size.toString());const o=`/areas/${e}/tasks${i.toString()?`?${i.toString()}`:""}`;return this.request(o)}async getTasks(e){const t=new URLSearchParams;e!=null&&e.page&&t.append("page",e.page.toString()),e!=null&&e.page_size&&t.append("page_size",e.page_size.toString()),e!=null&&e.q&&t.append("q",e.q),e!=null&&e.name&&t.append("name",e.name),e!=null&&e.area_id&&t.append("area_id",e.area_id.toString()),e!=null&&e.parent_id&&t.append("parent_id",e.parent_id.toString()),(e==null?void 0:e.level)!==void 0&&t.append("level",e.level.toString()),e!=null&&e.ordering&&t.append("ordering",e.ordering);const i=`/tasks/${t.toString()?`?${t.toString()}`:""}`;return this.request(i)}async getTask(e){return this.request(`/tasks/${e}`)}async getTrendingTasks(e){const t=new URLSearchParams;e!=null&&e.limit&&t.append("limit",e.limit.toString()),e!=null&&e.recent_days&&t.append("recent_days",e.recent_days.toString()),e!=null&&e.baseline_days&&t.append("baseline_days",e.baseline_days.toString()),(e==null?void 0:e.level)!==void 0&&t.append("level",e.level.toString()),(e==null?void 0:e.min_recent_papers)!==void 0&&t.append("min_recent_papers",e.min_recent_papers.toString()),(e==null?void 0:e.min_baseline_papers)!==void 0&&t.append("min_baseline_papers",e.min_baseline_papers.toString()),(e==null?void 0:e.min_share_lift)!==void 0&&t.append("min_share_lift",e.min_share_lift.toString());const i=t.toString(),o=i?`/tasks/trending?${i}`:"/tasks/trending";return this.request(o)}async getTaskChildren(e,t){const i=new URLSearchParams;t!=null&&t.page&&i.append("page",t.page.toString()),t!=null&&t.page_size&&i.append("page_size",t.page_size.toString());const o=`/tasks/${e}/children${i.toString()?`?${i.toString()}`:""}`;return this.request(o)}async getTaskParents(e){return this.request(`/tasks/${e}/parents`)}async getTaskPapers(e,t){const i=new URLSearchParams;t!=null&&t.page&&i.append("page",t.page.toString()),t!=null&&t.page_size&&i.append("page_size",t.page_size.toString()),t!=null&&t.order_by&&i.append("order_by",t.order_by),t!=null&&t.order_dir&&i.append("order_dir",t.order_dir),(t==null?void 0:t.latest_only)!==void 0&&i.append("latest_only",t.latest_only.toString()),(t==null?void 0:t.include_resources)!==void 0&&i.append("include_resources",t.include_resources.toString());const o=i.toString(),d=o?`/tasks/${e}/papers?${o}`:`/tasks/${e}/papers`;return this.request(d)}async getMethods(e){const t=new URLSearchParams;e!=null&&e.page&&t.append("page",e.page.toString()),e!=null&&e.page_size&&t.append("page_size",e.page_size.toString()),e!=null&&e.q&&t.append("q",e.q),e!=null&&e.name&&t.append("name",e.name),e!=null&&e.full_name&&t.append("full_name",e.full_name),e!=null&&e.introduced_year&&t.append("introduced_year",e.introduced_year.toString()),e!=null&&e.ordering&&t.append("ordering",e.ordering);const i=`/methods/${t.toString()?`?${t.toString()}`:""}`;return this.request(i)}async getMethod(e){return this.request(`/methods/${encodeURIComponent(e)}`)}async getMethodPapers(e,t){const i=new URLSearchParams;t!=null&&t.page&&i.append("page",t.page.toString()),t!=null&&t.page_size&&i.append("page_size",t.page_size.toString()),t!=null&&t.order_by&&i.append("order_by",t.order_by),t!=null&&t.order_dir&&i.append("order_dir",t.order_dir),(t==null?void 0:t.latest_only)!==void 0&&i.append("latest_only",t.latest_only.toString()),(t==null?void 0:t.include_resources)!==void 0&&i.append("include_resources",t.include_resources.toString());const o=i.toString(),d=o?`/methods/${encodeURIComponent(e)}/papers?${o}`:`/methods/${encodeURIComponent(e)}/papers`;return this.request(d)}async getDatasets(e){const t=new URLSearchParams;e!=null&&e.page&&t.append("page",e.page.toString()),e!=null&&e.page_size&&t.append("page_size",e.page_size.toString()),e!=null&&e.q&&t.append("q",e.q),e!=null&&e.name&&t.append("name",e.name),e!=null&&e.full_name&&t.append("full_name",e.full_name),e!=null&&e.task&&t.append("task",e.task),e!=null&&e.task_id&&t.append("task",e.task_id.toString()),e!=null&&e.include_descendants&&t.append("include_descendants","true"),(e==null?void 0:e.min_eval_count)!==void 0&&t.append("min_eval_count",e.min_eval_count.toString()),e!=null&&e.ordering&&t.append("ordering",e.ordering);const i=`/datasets/${t.toString()?`?${t.toString()}`:""}`;return this.request(i)}async getDataset(e){return this.request(`/datasets/${e}`)}async getDatasetBySlug(e,t){const i=t!=null&&t.include_paper?"?include_paper=true":"";return this.request(`/datasets/${e}${i}`)}async getDatasetTasks(e){return(await this.request(`/datasets/${e}/tasks/`)).results}async getEvaluations(e){const t=new URLSearchParams;e!=null&&e.page&&t.append("page",e.page.toString()),e!=null&&e.page_size&&t.append("page_size",e.page_size.toString()),e!=null&&e.q&&t.append("q",e.q),e!=null&&e.paper_id&&t.append("paper_id",e.paper_id.toString()),e!=null&&e.task_id&&t.append("task_id",e.task_id.toString()),e!=null&&e.include_descendants&&t.append("include_descendants","true"),e!=null&&e.dataset_id&&t.append("dataset_id",e.dataset_id.toString()),e!=null&&e.best_metric&&t.append("best_metric",e.best_metric),e!=null&&e.ordering&&t.append("ordering",e.ordering);const i=`/evaluations/${t.toString()?`?${t.toString()}`:""}`;return this.request(i)}async getEvaluation(e){return this.request(`/evaluations/${e}`)}async getEvaluationsByPaper(e){const i=parseInt(e),o=await this.getEvaluations({paper_id:i,page_size:100,ordering:"-benchmark_popularity"}),d=[...o.results];let u=o.next_page;for(;u;){const g=await this.getEvaluations({paper_id:i,page:u,page_size:100,ordering:"-benchmark_popularity"});d.push(...g.results),u=g.next_page}return d}async getEvaluationsByDataset(e,t){return(await this.getEvaluations({dataset_id:parseInt(e),best_metric:t,page_size:100,ordering:"best_rank"})).results}async createEvaluation(e){return this.request("/evaluations/",{method:"POST",body:JSON.stringify(e)})}async updateEvaluation(e,t){const i=`/evaluations/${e}`;return this.request(i,{method:"PUT",body:JSON.stringify(t)})}async deleteEvaluation(e){const t=`/evaluations/${e}`;return this.request(t,{method:"DELETE"})}async generateThumbnail(e){const t=_(`/api/thumbnails/generate/${e}`),i=await fetch(t,{method:"POST"});if(!i.ok)throw new Error(`Thumbnail generation failed: ${i.status}`);return await i.json()}async getThumbnailStatus(e){const t=_(`/api/thumbnails/status/${e}`),i=await fetch(t);if(!i.ok)throw new Error(`Thumbnail status check failed: ${i.status}`);return await i.json()}async healthCheck(){const e=_("/health"),t=await fetch(e);if(!t.ok)throw new Error(`Health check failed: ${t.status}`);return await t.json()}async getMetrics(e){const t=new URLSearchParams;e!=null&&e.page&&t.append("page",e.page.toString()),e!=null&&e.page_size&&t.append("page_size",e.page_size.toString()),e!=null&&e.q&&t.append("q",e.q),e!=null&&e.direction&&t.append("direction",e.direction),e!=null&&e.ordering&&t.append("ordering",e.ordering);const i=`/metrics/${t.toString()?`?${t.toString()}`:""}`;return this.request(i)}async getMetric(e){return this.request(`/metrics/${e}`)}async getMetricDirections(){return this.request("/metrics/directions")}async getMyBookmarkIds(){return this.request("/me/bookmarks/ids")}async getMyBookmarks(){return this.request("/me/bookmarks")}async addBookmark(e){await this.request(`/me/bookmarks/${e}`,{method:"POST"})}async removeBookmark(e){await this.request(`/me/bookmarks/${e}`,{method:"DELETE"})}}const n=new k;n.getPapers.bind(n);n.getPaper.bind(n);n.getPaperByArxivId.bind(n);const T=n.indexPaperFromArxiv.bind(n),z=n.updatePaperTasks.bind(n),E=n.updatePaperMethods.bind(n),U=n.updatePaperRepositories.bind(n),R=n.updatePaperProjectPages.bind(n);n.getTrendingPapers.bind(n);n.getRepositoriesForPaper.bind(n);n.getRepositories.bind(n);n.getProjectPagesForPaper.bind(n);n.getProjectPages.bind(n);n.getAuthors.bind(n);n.getAuthor.bind(n);n.getAreas.bind(n);n.getArea.bind(n);n.getAreasWithTasks.bind(n);n.getAreaTasks.bind(n);const A=n.getTasks.bind(n);n.getTask.bind(n);n.getTrendingTasks.bind(n);n.getTaskChildren.bind(n);n.getTaskParents.bind(n);n.getTaskPapers.bind(n);const L=n.getMethods.bind(n);n.getMethod.bind(n);n.getMethodPapers.bind(n);const x=n.getDatasets.bind(n);n.getDataset.bind(n);n.getDatasetBySlug.bind(n);n.getDatasetTasks.bind(n);n.getEvaluations.bind(n);n.getEvaluation.bind(n);const M=n.getEvaluationsByPaper.bind(n);n.getEvaluationsByDataset.bind(n);const j=n.createEvaluation.bind(n),B=n.updateEvaluation.bind(n),D=n.deleteEvaluation.bind(n);n.generateThumbnail.bind(n);n.getThumbnailStatus.bind(n);n.getMetrics.bind(n);n.getMetric.bind(n);n.getMetricDirections.bind(n);n.healthCheck.bind(n);n.getMyBookmarkIds.bind(n);n.getMyBookmarks.bind(n);n.addBookmark.bind(n);n.removeBookmark.bind(n);export{n as a,A as b,E as c,L as d,U as e,R as f,M as g,D as h,j as i,B as j,x as k,T as l,z as u};
 
1
+ var f=Object.defineProperty;var S=(c,e,t)=>e in c?f(c,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):c[e]=t;var l=(c,e,t)=>S(c,typeof e!="symbol"?e+"":e,t);import{j as y}from"./adminAuth-W6_tdZNU.js";import{E as _,Z as b}from"./index-BHu3ckjy.js";const P=`${b()}/api/v1`,s=!1;class k{constructor(e=P){l(this,"baseUrl");this.baseUrl=e}async request(e,t){const i=`${this.baseUrl}${e}`;try{const{headers:o,...d}=t??{},u=y(),g=await fetch(i,{...d,cache:d.cache??"no-store",credentials:d.credentials??"include",headers:{"Content-Type":"application/json",...u?{"X-Admin-Token":u}:{},...o}});if(!g.ok){const h=await g.text();console.error("[API] Error response:",h),g.status===401&&typeof window<"u"&&window.dispatchEvent(new CustomEvent("pwc:auth-stale"));const r=new Error(`API request failed: ${g.status} ${g.statusText}`);throw r.status=g.status,r.statusText=g.statusText,r.response=h,r}return g.status===204?void 0:await g.json()}catch(o){throw console.error(`[API] Request to ${i} failed:`,o),o}}async getPapers(e){const t=new URLSearchParams;e!=null&&e.page&&t.append("page",e.page.toString()),e!=null&&e.page_size&&t.append("page_size",e.page_size.toString()),e!=null&&e.search&&t.append("search",e.search),e!=null&&e.order_by&&t.append("order_by",e.order_by),e!=null&&e.order_dir&&t.append("order_dir",e.order_dir),e!=null&&e.time&&t.append("time",e.time),e!=null&&e.published_after&&t.append("published_after",e.published_after),e!=null&&e.published_before&&t.append("published_before",e.published_before),e!=null&&e.conference&&t.append("conference",e.conference),(e==null?void 0:e.latest_only)!==void 0&&t.append("latest_only",e.latest_only.toString()),(e==null?void 0:e.include_resources)!==void 0&&t.append("include_resources",e.include_resources.toString());const i=`/papers/${t.toString()?`?${t.toString()}`:""}`;return this.request(i)}async searchPapers(e,t=10){const i=new URLSearchParams;return i.append("q",e),i.append("limit",t.toString()),this.request(`/papers/search?${i.toString()}`)}async getPaper(e,t=!0){const i=`/papers/${e}${t?"?include_resources=true":""}`;return this.request(i)}async getPaperByArxivId(e,t=!0){const i=`/papers/arxiv/${e}${t?"?include_resources=true":""}`;return this.request(i)}async indexPaperFromArxiv(e){const t=`/papers/index/${e}`;return this.request(t,{method:"POST"})}async updatePaperTasks(e,t){const i=new URLSearchParams;t.forEach(d=>i.append("task_ids",d.toString()));const o=`/papers/${e}/tasks?${i.toString()}`;return this.request(o,{method:"PUT"})}async updatePaperMethods(e,t){const i=new URLSearchParams;t.forEach(d=>i.append("method_ids",d.toString()));const o=`/papers/${e}/methods?${i.toString()}`;return this.request(o,{method:"PUT"})}async updatePaperRepositories(e,t){const i=`/papers/${e}/repositories`;return this.request(i,{method:"PUT",body:JSON.stringify({repositories:t})})}async updatePaperProjectPages(e,t){const i=`/papers/${e}/project-pages`;return this.request(i,{method:"PUT",body:JSON.stringify({project_pages:t})})}async getTrendingPapers(e){const t=new URLSearchParams;e!=null&&e.limit&&t.append("limit",e.limit.toString()),e!=null&&e.max_age_days&&t.append("max_age_days",e.max_age_days.toString()),(e==null?void 0:e.min_velocity)!==void 0&&t.append("min_velocity",e.min_velocity.toString());const i=`/papers/trending${t.toString()?`?${t.toString()}`:""}`;return this.request(i)}async getRepositoriesForPaper(e){return this.request(`/papers/${e}/repositories`)}async getRepositories(e){const t=new URLSearchParams;e!=null&&e.page&&t.append("page",e.page.toString()),e!=null&&e.page_size&&t.append("page_size",e.page_size.toString()),e!=null&&e.owner&&t.append("owner",e.owner),e!=null&&e.official_only&&t.append("official_only",e.official_only.toString()),e!=null&&e.min_stars&&t.append("min_stars",e.min_stars.toString()),e!=null&&e.source&&t.append("source",e.source),e!=null&&e.order_by&&t.append("order_by",e.order_by),e!=null&&e.order_dir&&t.append("order_dir",e.order_dir);const i=`/repositories/${t.toString()?`?${t.toString()}`:""}`;return this.request(i)}async getProjectPagesForPaper(e){return this.request(`/papers/${e}/project-pages`)}async getProjectPages(e){const t=new URLSearchParams;e!=null&&e.page&&t.append("page",e.page.toString()),e!=null&&e.page_size&&t.append("page_size",e.page_size.toString()),e!=null&&e.official_only&&t.append("official_only",e.official_only.toString()),e!=null&&e.source&&t.append("source",e.source),e!=null&&e.order_by&&t.append("order_by",e.order_by),e!=null&&e.order_dir&&t.append("order_dir",e.order_dir);const i=`/project-pages/${t.toString()?`?${t.toString()}`:""}`;return this.request(i)}async getAuthors(e){const t=new URLSearchParams;e!=null&&e.limit&&t.append("limit",e.limit.toString()),e!=null&&e.offset&&t.append("offset",e.offset.toString()),e!=null&&e.search&&t.append("search",e.search),e!=null&&e.sort_by&&t.append("sort_by",e.sort_by),e!=null&&e.sort_order&&t.append("sort_order",e.sort_order);const i=`/authors${t.toString()?`?${t.toString()}`:""}`;return this.request(i)}async getAuthor(e){return this.request(`/authors/${e}`)}async getAreas(e){const t=new URLSearchParams;e!=null&&e.page&&t.append("page",e.page.toString()),e!=null&&e.page_size&&t.append("page_size",e.page_size.toString()),e!=null&&e.q&&t.append("q",e.q),e!=null&&e.name&&t.append("name",e.name),e!=null&&e.ordering&&t.append("ordering",e.ordering);const i=`/areas/${t.toString()?`?${t.toString()}`:""}`;return this.request(i)}async getArea(e){return this.request(`/areas/${e}`)}async getAreasWithTasks(){return this.request("/areas/with-tasks/")}async getAreaTasks(e,t){const i=new URLSearchParams;t!=null&&t.page&&i.append("page",t.page.toString()),t!=null&&t.page_size&&i.append("page_size",t.page_size.toString());const o=`/areas/${e}/tasks${i.toString()?`?${i.toString()}`:""}`;return this.request(o)}async getTasks(e){const t=new URLSearchParams;e!=null&&e.page&&t.append("page",e.page.toString()),e!=null&&e.page_size&&t.append("page_size",e.page_size.toString()),e!=null&&e.q&&t.append("q",e.q),e!=null&&e.name&&t.append("name",e.name),e!=null&&e.area_id&&t.append("area_id",e.area_id.toString()),e!=null&&e.parent_id&&t.append("parent_id",e.parent_id.toString()),(e==null?void 0:e.level)!==void 0&&t.append("level",e.level.toString()),e!=null&&e.ordering&&t.append("ordering",e.ordering);const i=`/tasks/${t.toString()?`?${t.toString()}`:""}`;return this.request(i)}async getTask(e){return this.request(`/tasks/${e}`)}async getTopTasks(e){const t=new URLSearchParams;e!=null&&e.limit&&t.append("limit",e.limit.toString());const i=t.toString(),o=i?`/tasks/top?${i}`:"/tasks/top";return this.request(o)}async getTrendingTasks(e){const t=new URLSearchParams;e!=null&&e.limit&&t.append("limit",e.limit.toString()),e!=null&&e.recent_days&&t.append("recent_days",e.recent_days.toString()),e!=null&&e.baseline_days&&t.append("baseline_days",e.baseline_days.toString()),(e==null?void 0:e.level)!==void 0&&t.append("level",e.level.toString()),(e==null?void 0:e.min_recent_papers)!==void 0&&t.append("min_recent_papers",e.min_recent_papers.toString()),(e==null?void 0:e.min_baseline_papers)!==void 0&&t.append("min_baseline_papers",e.min_baseline_papers.toString()),(e==null?void 0:e.min_share_lift)!==void 0&&t.append("min_share_lift",e.min_share_lift.toString());const i=t.toString(),o=i?`/tasks/trending?${i}`:"/tasks/trending";return this.request(o)}async getTaskChildren(e,t){const i=new URLSearchParams;t!=null&&t.page&&i.append("page",t.page.toString()),t!=null&&t.page_size&&i.append("page_size",t.page_size.toString());const o=`/tasks/${e}/children${i.toString()?`?${i.toString()}`:""}`;return this.request(o)}async getTaskParents(e){return this.request(`/tasks/${e}/parents`)}async getTaskPapers(e,t){const i=new URLSearchParams;t!=null&&t.page&&i.append("page",t.page.toString()),t!=null&&t.page_size&&i.append("page_size",t.page_size.toString()),t!=null&&t.order_by&&i.append("order_by",t.order_by),t!=null&&t.order_dir&&i.append("order_dir",t.order_dir),(t==null?void 0:t.latest_only)!==void 0&&i.append("latest_only",t.latest_only.toString()),(t==null?void 0:t.include_resources)!==void 0&&i.append("include_resources",t.include_resources.toString());const o=i.toString(),d=o?`/tasks/${e}/papers?${o}`:`/tasks/${e}/papers`;return this.request(d)}async getMethods(e){const t=new URLSearchParams;e!=null&&e.page&&t.append("page",e.page.toString()),e!=null&&e.page_size&&t.append("page_size",e.page_size.toString()),e!=null&&e.q&&t.append("q",e.q),e!=null&&e.name&&t.append("name",e.name),e!=null&&e.full_name&&t.append("full_name",e.full_name),e!=null&&e.introduced_year&&t.append("introduced_year",e.introduced_year.toString()),e!=null&&e.ordering&&t.append("ordering",e.ordering);const i=`/methods/${t.toString()?`?${t.toString()}`:""}`;return this.request(i)}async getMethod(e){return this.request(`/methods/${encodeURIComponent(e)}`)}async getMethodPapers(e,t){const i=new URLSearchParams;t!=null&&t.page&&i.append("page",t.page.toString()),t!=null&&t.page_size&&i.append("page_size",t.page_size.toString()),t!=null&&t.order_by&&i.append("order_by",t.order_by),t!=null&&t.order_dir&&i.append("order_dir",t.order_dir),(t==null?void 0:t.latest_only)!==void 0&&i.append("latest_only",t.latest_only.toString()),(t==null?void 0:t.include_resources)!==void 0&&i.append("include_resources",t.include_resources.toString());const o=i.toString(),d=o?`/methods/${encodeURIComponent(e)}/papers?${o}`:`/methods/${encodeURIComponent(e)}/papers`;return this.request(d)}async getDatasets(e){const t=new URLSearchParams;e!=null&&e.page&&t.append("page",e.page.toString()),e!=null&&e.page_size&&t.append("page_size",e.page_size.toString()),e!=null&&e.q&&t.append("q",e.q),e!=null&&e.name&&t.append("name",e.name),e!=null&&e.full_name&&t.append("full_name",e.full_name),e!=null&&e.task&&t.append("task",e.task),e!=null&&e.task_id&&t.append("task",e.task_id.toString()),e!=null&&e.include_descendants&&t.append("include_descendants","true"),(e==null?void 0:e.min_eval_count)!==void 0&&t.append("min_eval_count",e.min_eval_count.toString()),e!=null&&e.ordering&&t.append("ordering",e.ordering);const i=`/datasets/${t.toString()?`?${t.toString()}`:""}`;return this.request(i)}async getDataset(e){return this.request(`/datasets/${e}`)}async getDatasetBySlug(e,t){const i=t!=null&&t.include_paper?"?include_paper=true":"";return this.request(`/datasets/${e}${i}`)}async getDatasetTasks(e){return(await this.request(`/datasets/${e}/tasks/`)).results}async getEvaluations(e){const t=new URLSearchParams;e!=null&&e.page&&t.append("page",e.page.toString()),e!=null&&e.page_size&&t.append("page_size",e.page_size.toString()),e!=null&&e.q&&t.append("q",e.q),e!=null&&e.paper_id&&t.append("paper_id",e.paper_id.toString()),e!=null&&e.task_id&&t.append("task_id",e.task_id.toString()),e!=null&&e.include_descendants&&t.append("include_descendants","true"),e!=null&&e.dataset_id&&t.append("dataset_id",e.dataset_id.toString()),e!=null&&e.best_metric&&t.append("best_metric",e.best_metric),e!=null&&e.ordering&&t.append("ordering",e.ordering);const i=`/evaluations/${t.toString()?`?${t.toString()}`:""}`;return this.request(i)}async getEvaluation(e){return this.request(`/evaluations/${e}`)}async getEvaluationsByPaper(e){const i=parseInt(e),o=await this.getEvaluations({paper_id:i,page_size:100,ordering:"-benchmark_popularity"}),d=[...o.results];let u=o.next_page;for(;u;){const g=await this.getEvaluations({paper_id:i,page:u,page_size:100,ordering:"-benchmark_popularity"});d.push(...g.results),u=g.next_page}return d}async getEvaluationsByDataset(e,t){return(await this.getEvaluations({dataset_id:parseInt(e),best_metric:t,page_size:100,ordering:"best_rank"})).results}async createEvaluation(e){return this.request("/evaluations/",{method:"POST",body:JSON.stringify(e)})}async updateEvaluation(e,t){const i=`/evaluations/${e}`;return this.request(i,{method:"PUT",body:JSON.stringify(t)})}async deleteEvaluation(e){const t=`/evaluations/${e}`;return this.request(t,{method:"DELETE"})}async generateThumbnail(e){const t=_(`/api/thumbnails/generate/${e}`),i=await fetch(t,{method:"POST"});if(!i.ok)throw new Error(`Thumbnail generation failed: ${i.status}`);return await i.json()}async getThumbnailStatus(e){const t=_(`/api/thumbnails/status/${e}`),i=await fetch(t);if(!i.ok)throw new Error(`Thumbnail status check failed: ${i.status}`);return await i.json()}async healthCheck(){const e=_("/health"),t=await fetch(e);if(!t.ok)throw new Error(`Health check failed: ${t.status}`);return await t.json()}async getMetrics(e){const t=new URLSearchParams;e!=null&&e.page&&t.append("page",e.page.toString()),e!=null&&e.page_size&&t.append("page_size",e.page_size.toString()),e!=null&&e.q&&t.append("q",e.q),e!=null&&e.direction&&t.append("direction",e.direction),e!=null&&e.ordering&&t.append("ordering",e.ordering);const i=`/metrics/${t.toString()?`?${t.toString()}`:""}`;return this.request(i)}async getMetric(e){return this.request(`/metrics/${e}`)}async getMetricDirections(){return this.request("/metrics/directions")}async getMyBookmarkIds(){return this.request("/me/bookmarks/ids")}async getMyBookmarks(){return this.request("/me/bookmarks")}async addBookmark(e){await this.request(`/me/bookmarks/${e}`,{method:"POST"})}async removeBookmark(e){await this.request(`/me/bookmarks/${e}`,{method:"DELETE"})}}const n=new k;n.getPapers.bind(n);n.getPaper.bind(n);n.getPaperByArxivId.bind(n);const T=n.indexPaperFromArxiv.bind(n),z=n.updatePaperTasks.bind(n),E=n.updatePaperMethods.bind(n),U=n.updatePaperRepositories.bind(n),R=n.updatePaperProjectPages.bind(n);n.getTrendingPapers.bind(n);n.getRepositoriesForPaper.bind(n);n.getRepositories.bind(n);n.getProjectPagesForPaper.bind(n);n.getProjectPages.bind(n);n.getAuthors.bind(n);n.getAuthor.bind(n);n.getAreas.bind(n);n.getArea.bind(n);n.getAreasWithTasks.bind(n);n.getAreaTasks.bind(n);const A=n.getTasks.bind(n);n.getTask.bind(n);n.getTopTasks.bind(n);n.getTrendingTasks.bind(n);n.getTaskChildren.bind(n);n.getTaskParents.bind(n);n.getTaskPapers.bind(n);const L=n.getMethods.bind(n);n.getMethod.bind(n);n.getMethodPapers.bind(n);const x=n.getDatasets.bind(n);n.getDataset.bind(n);n.getDatasetBySlug.bind(n);n.getDatasetTasks.bind(n);n.getEvaluations.bind(n);n.getEvaluation.bind(n);const M=n.getEvaluationsByPaper.bind(n);n.getEvaluationsByDataset.bind(n);const j=n.createEvaluation.bind(n),B=n.updateEvaluation.bind(n),D=n.deleteEvaluation.bind(n);n.generateThumbnail.bind(n);n.getThumbnailStatus.bind(n);n.getMetrics.bind(n);n.getMetric.bind(n);n.getMetricDirections.bind(n);n.healthCheck.bind(n);n.getMyBookmarkIds.bind(n);n.getMyBookmarks.bind(n);n.addBookmark.bind(n);n.removeBookmark.bind(n);export{n as a,A as b,E as c,L as d,U as e,R as f,M as g,D as h,j as i,B as j,x as k,T as l,z as u};
assets/{badge-BYXN-Rwa.js β†’ badge-DxH3OGz4.js} RENAMED
@@ -1,4 +1,4 @@
1
- import{d as a,r as i,j as n,V as f,o as s,U as d}from"./index-BBLNzdQ3.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
 
1
+ import{d as a,r as i,j as n,V as f,o as s,U as d}from"./index-BHu3ckjy.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
assets/{components-mDG31Y87.js β†’ components-Cg3rKVQ3.js} RENAMED
@@ -1 +1 @@
1
- import{H as C,a as F,A as y,j as t}from"./index-BBLNzdQ3.js";import{L as z}from"./LatexTitle-DziDol_D.js";import{h as S,d as P,g as H,f as R}from"./transform-C-0glUhY.js";import{a as T}from"./api-BrmxIuWZ.js";const A=({slug:e,label:s,onClick:r})=>{const o=C(),u=S(e),n=R(u),i=f=>{if(f.stopPropagation(),r){r(e);return}o(`/tasks/${e}`)};return t.jsxs("span",{className:"tag-chip",style:{background:n.bg,color:n.text},onClick:i,children:[t.jsx("span",{className:"dot",style:{background:n.dot}}),P(s||H(e),e)]})},Q=({method:e,onClick:s})=>{const r=C(),o=e.slug||e.id||"";if(!o)return null;const u=n=>{if(n.stopPropagation(),s){s(o);return}r(`/methods/${o}`)};return t.jsx("span",{className:"method-chip",onClick:u,children:e.name})},E=({name:e,size:s=14})=>{const r={search:t.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:t.jsx("path",{d:"M8 3l5 6H3l5-6z",fill:"currentColor"}),arrowLeft:t.jsx("path",{d:"M9 3l-4 5 4 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),arrowRight:t.jsx("path",{d:"M7 3l4 5-4 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),external:t.jsx("path",{d:"M5 3h-2v8h8v-2M9 3h3v3M7 9l5-5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),github:t.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:t.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:t.jsx("path",{d:"M4 2h8v12l-4-3-4 3V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),chart:t.jsx("path",{d:"M2 13h12M3 11l3-4 3 2 4-5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),chat:t.jsx("path",{d:"M3 3h10v7H7l-3 3v-3H3V3z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),pdf:t.jsx("path",{d:"M5 2h5l3 3v9H5V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),copy:t.jsx("path",{d:"M5 5h7v8H5V5zM3 3h7v2M3 3v8h2",stroke:"currentColor",strokeWidth:"1.2",fill:"none",strokeLinejoin:"round"}),sparkle:t.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:t.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:t.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:t.jsx("path",{d:"M2 4h12M2 8h12M2 12h12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),close:t.jsx("path",{d:"M3 3l10 10M13 3L3 13",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})};return t.jsx("svg",{className:s===11?"icon-sm":"icon",viewBox:"0 0 16 16",width:s,height:s,children:r[e]})},I=e=>{let s=2166136261;for(let r=0;r<e.length;r++)s=Math.imul(s^e.charCodeAt(r),16777619);return()=>(s=Math.imul(s^s>>>15,2246822507),s=Math.imul(s^s>>>13,3266489909),s^=s>>>16,(s>>>0)%1e4/1e4)},B=({paperId:e})=>{const s=I(e),r=160,o=220,u=[.85+s()*.1,.55+s()*.25],n=.45+s()*.3,i=[],f=9+Math.floor(s()*3);for(let d=0;d<f;d++)i.push(.55+s()*.4);const x=s()>.3,c=Math.floor(s()*3),g=[],M=6+Math.floor(s()*3);for(let d=0;d<M;d++)g.push(.5+s()*.45);const v="#9A9588",m="#3A352D",l=5,j=(r-l*2-2)/2,w=l,h=l+j+2;let k=l+2;const N=k;k+=6;const $=k+1;k+=5;const W=k;k+=3;const a=k+1;return t.jsx("div",{style:{width:r,height:o,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:t.jsxs("svg",{width:r,height:o,viewBox:`0 0 ${r} ${o}`,style:{display:"block"},children:[u.map((d,p)=>t.jsx("rect",{x:l+(r-l*2)*(1-d)/2,y:N+p*2.4,width:(r-l*2)*d,height:1.4,fill:m,rx:.3},`t${p}`)),t.jsx("rect",{x:l+(r-l*2)*(1-n)/2,y:$,width:(r-l*2)*n,height:.9,fill:v,opacity:.7,rx:.2}),t.jsx("rect",{x:l,y:W,width:6,height:1,fill:m,opacity:.6}),i.map((d,p)=>{const b=a+p*2.1;return b>o-l-1?null:t.jsx("rect",{x:w,y:b,width:j*d,height:.8,fill:v,opacity:.55,rx:.2},`l${p}`)}),x&&t.jsxs("g",{children:[t.jsx("rect",{x:h,y:a,width:j,height:14,fill:"#F0EBE0",stroke:v,strokeWidth:.3,opacity:.9}),c===0&&t.jsx("g",{stroke:m,strokeWidth:.4,fill:"none",opacity:.6,children:t.jsx("polyline",{points:`${h+2},${a+11} ${h+6},${a+8} ${h+10},${a+9} ${h+14},${a+5} ${h+18},${a+6} ${h+22},${a+3}`})}),c===1&&t.jsxs("g",{opacity:.55,children:[t.jsx("circle",{cx:h+j/2,cy:a+7,r:3.5,fill:m}),t.jsx("rect",{x:h+2,y:a+11,width:j-4,height:1.5,fill:v})]}),c===2&&t.jsxs("g",{opacity:.55,children:[t.jsx("rect",{x:h+3,y:a+5,width:j-6,height:1,fill:m}),t.jsx("rect",{x:h+6,y:a+8,width:j-12,height:.8,fill:m})]})]}),g.map((d,p)=>{const b=a+(x?16:0)+p*2.1;return b>o-l-1?null:t.jsx("rect",{x:h,y:b,width:j*d,height:.8,fill:v,opacity:.55,rx:.2},`r${p}`)})]})})},U=({paperId:e,title:s,thumbnailUrl:r,priority:o=!1})=>{const[u,n]=y.useState(!1),[i,f]=y.useState(o),x=y.useRef(null);return y.useEffect(()=>{if(o||i)return;const c=x.current;if(!c)return;const g=new IntersectionObserver(([M])=>{M.isIntersecting&&(f(!0),g.disconnect())},{rootMargin:"250px"});return g.observe(c),()=>g.disconnect()},[o,i]),r&&!u?t.jsx("div",{ref:x,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:i&&t.jsx("img",{src:r,alt:`Thumbnail for ${s}`,loading:o?"eager":"lazy",decoding:"async",fetchPriority:o?"high":"auto",style:{width:"100%",height:"100%",objectFit:"contain",display:"block"},onError:()=>n(!0)})}):t.jsx(B,{paperId:e})},G=({paper:e,rank:s,onClickTag:r})=>{const o=C(),u=F(),n=()=>o(`/paper/${e.id}`),i=y.useCallback(()=>{u.prefetchQuery({queryKey:["paper-arxiv",e.id],queryFn:()=>T.getPaperByArxivId(e.id,!0),staleTime:10*60*1e3})},[e.id,u]),f=e.authors.slice(0,3).join(", "),x=e.authors.length;return t.jsxs("article",{className:"paper-card",children:[s!=null&&t.jsx("div",{className:"paper-thumb-wrap",onClick:n,onFocus:i,onMouseEnter:i,style:{cursor:"pointer"},children:t.jsx(U,{paperId:e.id,title:e.title,thumbnailUrl:e.thumbnailUrl,priority:s<=3})}),t.jsxs("div",{className:"paper-body",children:[t.jsxs("div",{className:"paper-body-main",children:[t.jsx("h3",{className:"paper-title",onClick:n,onFocus:i,onMouseEnter:i,children:t.jsx(z,{title:e.title})}),t.jsxs("div",{className:"paper-authors",children:[f,x>3&&t.jsxs("span",{children:[", ","+",x-3," authors"]}),e.date&&t.jsxs(t.Fragment,{children:[x>0?" Β· ":"",t.jsx("span",{children:e.date})]}),e.citations>0&&t.jsxs(t.Fragment,{children:[x>0||e.date?" Β· ":"",t.jsxs("span",{children:[e.citations.toLocaleString()," citations"]})]})]}),e.abstract&&t.jsx("p",{className:"paper-abstract",children:e.abstract}),e.tags.length>0&&t.jsx("div",{className:"paper-tags",children:e.tags.map(c=>t.jsx(A,{slug:c,onClick:r},c))})]}),e.github!=null&&(()=>{const c=t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"gh-stat-block",children:[t.jsxs("div",{className:"gh-value-row",children:[t.jsx(E,{name:"github",size:12}),t.jsx("span",{className:"gh-stars",children:L(e.github)})]}),t.jsx("div",{className:"gh-stars-label",children:"stars"})]}),e.velocity24h!=null&&e.velocity24h>0&&t.jsxs("div",{className:"gh-stat-block",children:[t.jsxs("div",{className:"gh-value-row",children:[t.jsx("span",{className:"gh-rate-arrow",children:"↑"}),t.jsx("span",{className:"gh-rate",children:V(e.velocity24h)})]}),t.jsx("div",{className:"gh-stars-label",children:"stars / hr"})]})]});return e.githubUrl?t.jsx("a",{className:"paper-github-stats is-link",href:e.githubUrl,target:"_blank",rel:"noopener noreferrer","aria-label":`Open GitHub repository (${L(e.github)} stars)`,onClick:g=>g.stopPropagation(),children:c}):t.jsx("aside",{className:"paper-github-stats",children:c})})()]})]})};function L(e){return e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function V(e){return e.toFixed(1)}export{E as I,Q as M,G as P,A as T};
 
1
+ import{H as C,a as F,A as y,j as t}from"./index-BHu3ckjy.js";import{L as z}from"./LatexTitle-BYOXQNlq.js";import{h as S,d as P,g as H,f as R}from"./transform-BxhHCT2R.js";import{a as T}from"./api-gdpmQjJd.js";const A=({slug:e,label:s,onClick:r})=>{const o=C(),u=S(e),n=R(u),i=f=>{if(f.stopPropagation(),r){r(e);return}o(`/tasks/${e}`)};return t.jsxs("span",{className:"tag-chip",style:{background:n.bg,color:n.text},onClick:i,children:[t.jsx("span",{className:"dot",style:{background:n.dot}}),P(s||H(e),e)]})},Q=({method:e,onClick:s})=>{const r=C(),o=e.slug||e.id||"";if(!o)return null;const u=n=>{if(n.stopPropagation(),s){s(o);return}r(`/methods/${o}`)};return t.jsx("span",{className:"method-chip",onClick:u,children:e.name})},E=({name:e,size:s=14})=>{const r={search:t.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:t.jsx("path",{d:"M8 3l5 6H3l5-6z",fill:"currentColor"}),arrowLeft:t.jsx("path",{d:"M9 3l-4 5 4 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),arrowRight:t.jsx("path",{d:"M7 3l4 5-4 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),external:t.jsx("path",{d:"M5 3h-2v8h8v-2M9 3h3v3M7 9l5-5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),github:t.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:t.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:t.jsx("path",{d:"M4 2h8v12l-4-3-4 3V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),chart:t.jsx("path",{d:"M2 13h12M3 11l3-4 3 2 4-5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),chat:t.jsx("path",{d:"M3 3h10v7H7l-3 3v-3H3V3z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),pdf:t.jsx("path",{d:"M5 2h5l3 3v9H5V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),copy:t.jsx("path",{d:"M5 5h7v8H5V5zM3 3h7v2M3 3v8h2",stroke:"currentColor",strokeWidth:"1.2",fill:"none",strokeLinejoin:"round"}),sparkle:t.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:t.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:t.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:t.jsx("path",{d:"M2 4h12M2 8h12M2 12h12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),close:t.jsx("path",{d:"M3 3l10 10M13 3L3 13",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})};return t.jsx("svg",{className:s===11?"icon-sm":"icon",viewBox:"0 0 16 16",width:s,height:s,children:r[e]})},I=e=>{let s=2166136261;for(let r=0;r<e.length;r++)s=Math.imul(s^e.charCodeAt(r),16777619);return()=>(s=Math.imul(s^s>>>15,2246822507),s=Math.imul(s^s>>>13,3266489909),s^=s>>>16,(s>>>0)%1e4/1e4)},B=({paperId:e})=>{const s=I(e),r=160,o=220,u=[.85+s()*.1,.55+s()*.25],n=.45+s()*.3,i=[],f=9+Math.floor(s()*3);for(let d=0;d<f;d++)i.push(.55+s()*.4);const x=s()>.3,c=Math.floor(s()*3),g=[],M=6+Math.floor(s()*3);for(let d=0;d<M;d++)g.push(.5+s()*.45);const v="#9A9588",m="#3A352D",l=5,j=(r-l*2-2)/2,w=l,h=l+j+2;let k=l+2;const N=k;k+=6;const $=k+1;k+=5;const W=k;k+=3;const a=k+1;return t.jsx("div",{style:{width:r,height:o,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:t.jsxs("svg",{width:r,height:o,viewBox:`0 0 ${r} ${o}`,style:{display:"block"},children:[u.map((d,p)=>t.jsx("rect",{x:l+(r-l*2)*(1-d)/2,y:N+p*2.4,width:(r-l*2)*d,height:1.4,fill:m,rx:.3},`t${p}`)),t.jsx("rect",{x:l+(r-l*2)*(1-n)/2,y:$,width:(r-l*2)*n,height:.9,fill:v,opacity:.7,rx:.2}),t.jsx("rect",{x:l,y:W,width:6,height:1,fill:m,opacity:.6}),i.map((d,p)=>{const b=a+p*2.1;return b>o-l-1?null:t.jsx("rect",{x:w,y:b,width:j*d,height:.8,fill:v,opacity:.55,rx:.2},`l${p}`)}),x&&t.jsxs("g",{children:[t.jsx("rect",{x:h,y:a,width:j,height:14,fill:"#F0EBE0",stroke:v,strokeWidth:.3,opacity:.9}),c===0&&t.jsx("g",{stroke:m,strokeWidth:.4,fill:"none",opacity:.6,children:t.jsx("polyline",{points:`${h+2},${a+11} ${h+6},${a+8} ${h+10},${a+9} ${h+14},${a+5} ${h+18},${a+6} ${h+22},${a+3}`})}),c===1&&t.jsxs("g",{opacity:.55,children:[t.jsx("circle",{cx:h+j/2,cy:a+7,r:3.5,fill:m}),t.jsx("rect",{x:h+2,y:a+11,width:j-4,height:1.5,fill:v})]}),c===2&&t.jsxs("g",{opacity:.55,children:[t.jsx("rect",{x:h+3,y:a+5,width:j-6,height:1,fill:m}),t.jsx("rect",{x:h+6,y:a+8,width:j-12,height:.8,fill:m})]})]}),g.map((d,p)=>{const b=a+(x?16:0)+p*2.1;return b>o-l-1?null:t.jsx("rect",{x:h,y:b,width:j*d,height:.8,fill:v,opacity:.55,rx:.2},`r${p}`)})]})})},U=({paperId:e,title:s,thumbnailUrl:r,priority:o=!1})=>{const[u,n]=y.useState(!1),[i,f]=y.useState(o),x=y.useRef(null);return y.useEffect(()=>{if(o||i)return;const c=x.current;if(!c)return;const g=new IntersectionObserver(([M])=>{M.isIntersecting&&(f(!0),g.disconnect())},{rootMargin:"250px"});return g.observe(c),()=>g.disconnect()},[o,i]),r&&!u?t.jsx("div",{ref:x,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:i&&t.jsx("img",{src:r,alt:`Thumbnail for ${s}`,loading:o?"eager":"lazy",decoding:"async",fetchPriority:o?"high":"auto",style:{width:"100%",height:"100%",objectFit:"contain",display:"block"},onError:()=>n(!0)})}):t.jsx(B,{paperId:e})},G=({paper:e,rank:s,onClickTag:r})=>{const o=C(),u=F(),n=()=>o(`/paper/${e.id}`),i=y.useCallback(()=>{u.prefetchQuery({queryKey:["paper-arxiv",e.id],queryFn:()=>T.getPaperByArxivId(e.id,!0),staleTime:10*60*1e3})},[e.id,u]),f=e.authors.slice(0,3).join(", "),x=e.authors.length;return t.jsxs("article",{className:"paper-card",children:[s!=null&&t.jsx("div",{className:"paper-thumb-wrap",onClick:n,onFocus:i,onMouseEnter:i,style:{cursor:"pointer"},children:t.jsx(U,{paperId:e.id,title:e.title,thumbnailUrl:e.thumbnailUrl,priority:s<=3})}),t.jsxs("div",{className:"paper-body",children:[t.jsxs("div",{className:"paper-body-main",children:[t.jsx("h3",{className:"paper-title",onClick:n,onFocus:i,onMouseEnter:i,children:t.jsx(z,{title:e.title})}),t.jsxs("div",{className:"paper-authors",children:[f,x>3&&t.jsxs("span",{children:[", ","+",x-3," authors"]}),e.date&&t.jsxs(t.Fragment,{children:[x>0?" Β· ":"",t.jsx("span",{children:e.date})]}),e.citations>0&&t.jsxs(t.Fragment,{children:[x>0||e.date?" Β· ":"",t.jsxs("span",{children:[e.citations.toLocaleString()," citations"]})]})]}),e.abstract&&t.jsx("p",{className:"paper-abstract",children:e.abstract}),e.tags.length>0&&t.jsx("div",{className:"paper-tags",children:e.tags.map(c=>t.jsx(A,{slug:c,onClick:r},c))})]}),e.github!=null&&(()=>{const c=t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"gh-stat-block",children:[t.jsxs("div",{className:"gh-value-row",children:[t.jsx(E,{name:"github",size:12}),t.jsx("span",{className:"gh-stars",children:L(e.github)})]}),t.jsx("div",{className:"gh-stars-label",children:"stars"})]}),e.velocity24h!=null&&e.velocity24h>0&&t.jsxs("div",{className:"gh-stat-block",children:[t.jsxs("div",{className:"gh-value-row",children:[t.jsx("span",{className:"gh-rate-arrow",children:"↑"}),t.jsx("span",{className:"gh-rate",children:V(e.velocity24h)})]}),t.jsx("div",{className:"gh-stars-label",children:"stars / hr"})]})]});return e.githubUrl?t.jsx("a",{className:"paper-github-stats is-link",href:e.githubUrl,target:"_blank",rel:"noopener noreferrer","aria-label":`Open GitHub repository (${L(e.github)} stars)`,onClick:g=>g.stopPropagation(),children:c}):t.jsx("aside",{className:"paper-github-stats",children:c})})()]})]})};function L(e){return e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function V(e){return e.toFixed(1)}export{E as I,Q as M,G as P,A as T};
assets/{index-BBLNzdQ3.js β†’ index-BHu3ckjy.js} RENAMED
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/FeedView-Cf5wgU9c.js","assets/components-mDG31Y87.js","assets/LatexTitle-DziDol_D.js","assets/LatexTitle-wklAmtGL.css","assets/transform-C-0glUhY.js","assets/api-BrmxIuWZ.js","assets/adminAuth-BcLoDHjH.js","assets/usePapers-B6SkGdse.js","assets/useInfiniteQuery-BYHbC7kX.js","assets/useIntersectionObserver-BzvTehzD.js","assets/usePeriodFilter-Cqf3tn7X.js","assets/alert-CHYYTMmo.js","assets/PapersListView-DsAlDIHu.js","assets/useDebounce-cTTjH_Sm.js","assets/PaperDetailView-Wm1j7h1p.js","assets/badge-BYXN-Rwa.js","assets/TagsIndexView-Cq2OXyNT.js","assets/TagBrowseView-S2puh8kQ.js","assets/MethodsIndexView-B2gFKYGg.js","assets/MethodDetailView-B_WtVDNU.js","assets/BenchmarkDetailView-_8E2ZRm_.js","assets/SavedPapersView-BQ7z_KWN.js","assets/CronDashboard-B5Xx5Zr8.js","assets/SearchOverlay-BJ3Vra9H.js"])))=>i.map(i=>d[i]);
2
  var Qd=e=>{throw TypeError(e)};var al=(e,t,n)=>t.has(e)||Qd("Cannot "+n);var T=(e,t,n)=>(al(e,t,"read from private field"),n?n.call(e):t.get(e)),J=(e,t,n)=>t.has(e)?Qd("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),V=(e,t,n,r)=>(al(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Te=(e,t,n)=>(al(e,t,"access private method"),n);var Gi=(e,t,n,r)=>({set _(o){V(e,t,o,n)},get _(){return T(e,t,r)}});function Jw(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var V_=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function hh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var mh={exports:{}},wa={},vh={exports:{}},Z={};/**
3
  * @license React
4
  * react.production.min.js
@@ -154,4 +154,4 @@ Error generating stack: `+i.message+`
154
  * This source code is licensed under the ISC license.
155
  * See the LICENSE file in the root directory of this source tree.
156
  */const OR=Za("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),AR=CR,IR=bR,LR=f.forwardRef(({className:e,inset:t,children:n,...r},o)=>x.jsxs(iw,{ref:o,className:Re("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent focus:bg-accent",t&&"pl-8",e),...r,children:[n,x.jsx(NR,{className:"ml-auto h-4 w-4"})]}));LR.displayName=iw.displayName;const jR=f.forwardRef(({className:e,...t},n)=>x.jsx(sw,{ref:n,className:Re("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));jR.displayName=sw.displayName;const lw=f.forwardRef(({className:e,sideOffset:t=4,...n},r)=>x.jsx(PR,{children:x.jsx(Zy,{ref:r,sideOffset:t,className:Re("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));lw.displayName=Zy.displayName;const ac=f.forwardRef(({className:e,inset:t,...n},r)=>x.jsx(ew,{ref:r,className:Re("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",t&&"pl-8",e),...n}));ac.displayName=ew.displayName;const DR=f.forwardRef(({className:e,children:t,checked:n,...r},o)=>x.jsxs(tw,{ref:o,className:Re("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),checked:n,...r,children:[x.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:x.jsx(rw,{children:x.jsx(_R,{className:"h-4 w-4"})})}),t]}));DR.displayName=tw.displayName;const FR=f.forwardRef(({className:e,children:t,...n},r)=>x.jsxs(nw,{ref:r,className:Re("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...n,children:[x.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:x.jsx(rw,{children:x.jsx(MR,{className:"h-2 w-2 fill-current"})})}),t]}));FR.displayName=nw.displayName;const uw=f.forwardRef(({className:e,inset:t,...n},r)=>x.jsx(Jy,{ref:r,className:Re("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));uw.displayName=Jy.displayName;const lc=f.forwardRef(({className:e,...t},n)=>x.jsx(ow,{ref:n,className:Re("-mx-1 my-1 h-px bg-muted",e),...t}));lc.displayName=ow.displayName;function $R(e){const n=(e.name||e.username||"?").trim().split(/\s+/).filter(Boolean);return n.length===0?"?":n.length===1?n[0][0].toUpperCase():(n[0][0]+n[n.length-1][0]).toUpperCase()}const zR=({user:e,onLogout:t})=>x.jsxs(AR,{children:[x.jsx(IR,{asChild:!0,children:x.jsx("button",{type:"button",className:"user-avatar-btn","aria-label":`Account menu for ${e.username}`,children:x.jsxs(xg,{className:"h-8 w-8",children:[e.avatar_url&&x.jsx(Sg,{src:e.avatar_url,alt:e.username}),x.jsx(Eg,{className:"text-xs",children:$R(e)})]})})}),x.jsxs(lw,{align:"end",className:"w-56",children:[x.jsxs(uw,{className:"flex flex-col gap-0.5 py-2",children:[x.jsx("span",{className:"text-sm font-medium leading-tight",children:e.name||e.username}),x.jsxs("span",{className:"text-xs font-normal text-muted-foreground",children:["@",e.username]}),e.is_admin&&x.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"})]}),x.jsx(lc,{}),x.jsx(ac,{asChild:!0,children:x.jsx("a",{href:`https://huggingface.co/${encodeURIComponent(e.username)}`,target:"_blank",rel:"noopener noreferrer",children:"Hugging Face profile"})}),x.jsx(lc,{}),x.jsx(ac,{onSelect:n=>{n.preventDefault(),t()},children:"Log out"})]})]}),cw=N.createContext(null),Yp="pwc:auth-stale";async function UR(){if(Ua())return null;const e=await fetch(hd("/api/v1/auth/me"),{credentials:"include",cache:"no-store"});return e.status===401||!e.ok?null:await e.json()}const BR=({children:e})=>{const[t,n]=N.useState(null),[r,o]=N.useState(!0),i=N.useCallback(async()=>{o(!0);const l=await UR();n(l),o(!1)},[]),s=N.useCallback(async()=>{await fetch(hd("/api/v1/auth/logout"),{method:"POST",credentials:"include"}),n(null)},[]);N.useEffect(()=>{i()},[i]),N.useEffect(()=>{const l=()=>n(null);return window.addEventListener(Yp,l),()=>window.removeEventListener(Yp,l)},[]);const a=N.useMemo(()=>({user:t,isLoading:r,refresh:i,logout:s}),[t,r,i,s]);return x.jsx(cw.Provider,{value:a,children:e})};function VR(){const e=N.useContext(cw);if(!e)throw new Error("useAuth must be used inside an <AuthProvider>");return e}const Wo=({name:e,size:t=14})=>{const n={search:x.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:x.jsx("path",{d:"M4 2h8v12l-4-3-4 3V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),menu:x.jsx("path",{d:"M2 4h12M2 8h12M2 12h12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),close:x.jsx("path",{d:"M3 3l10 10M13 3L3 13",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})};return x.jsx("svg",{className:t===11?"icon-sm":"icon",viewBox:"0 0 16 16",width:t,height:t,children:n[e]})},WR=({onOpenSearch:e})=>{const[t,n]=N.useState(!1),r=()=>n(!1),{user:o,logout:i}=VR(),s=dn(),a=`${s.pathname}${s.search}`||"/",l=Ua();return x.jsxs(x.Fragment,{children:[x.jsx("header",{className:"app-header",children:x.jsxs("div",{className:"app-header-inner",children:[x.jsxs(It,{to:"/",className:"brand",onClick:r,children:[x.jsx("span",{className:"brand-mark"}),x.jsxs("span",{className:"brand-name",children:["Papers ",x.jsx("em",{children:"With Code"})]})]}),x.jsxs("nav",{className:"nav",children:[x.jsx(It,{to:"/",end:!0,className:({isActive:u})=>`nav-item ${u?"active":""}`,children:"Trending"}),x.jsx(It,{to:"/tasks",className:({isActive:u})=>`nav-item ${u?"active":""}`,children:"Browse state-of-the-art"}),x.jsx(It,{to:"/methods",className:({isActive:u})=>`nav-item ${u?"active":""}`,children:"Methods"})]}),x.jsx("div",{className:"header-spacer"}),x.jsxs("button",{className:"search-trigger",onClick:e,children:[x.jsx(Wo,{name:"search",size:13}),x.jsx("span",{children:"Search papers, authors, domains…"}),x.jsx("kbd",{children:"⌘K"})]}),x.jsx("button",{className:"icon-btn mobile-search-btn","aria-label":"Search",onClick:e,children:x.jsx(Wo,{name:"search",size:14})}),!l&&x.jsx(It,{to:"/saved",className:"icon-btn header-bookmark-btn","aria-label":"Saved papers",title:"Saved papers",children:x.jsx(Wo,{name:"bookmark",size:13})}),l?null:o?x.jsx(zR,{user:o,onLogout:i}):x.jsx(uE,{returnTo:a}),x.jsx("button",{className:"icon-btn mobile-menu-btn","aria-label":"Open menu",onClick:()=>n(u=>!u),children:x.jsx(Wo,{name:t?"close":"menu",size:14})})]})}),t&&x.jsx("div",{className:"mobile-nav-drawer",onClick:r,children:x.jsxs("div",{className:"mobile-nav-panel",onClick:u=>u.stopPropagation(),children:[x.jsxs("button",{type:"button",className:"mobile-nav-link mobile-nav-search",onClick:()=>{r(),e()},children:[x.jsx(Wo,{name:"search",size:14}),x.jsx("span",{children:"Search papers, authors, domains…"})]}),x.jsx(It,{to:"/",end:!0,className:"mobile-nav-link",onClick:r,children:"Trending"}),x.jsx(It,{to:"/tasks",className:"mobile-nav-link",onClick:r,children:"Browse state-of-the-art"}),x.jsx(It,{to:"/methods",className:"mobile-nav-link",onClick:r,children:"Methods"}),!l&&x.jsxs(x.Fragment,{children:[x.jsx(It,{to:"/saved",className:"mobile-nav-link",onClick:r,children:"Saved papers"}),x.jsx(It,{to:"/cron-dashboard",className:"mobile-nav-link",onClick:r,children:"CRON dashboard"})]})]})})]})},HR=1,KR=1e6;let Gl=0;function QR(){return Gl=(Gl+1)%Number.MAX_SAFE_INTEGER,Gl.toString()}const Yl=new Map,Xp=e=>{if(Yl.has(e))return;const t=setTimeout(()=>{Yl.delete(e),ii({type:"REMOVE_TOAST",toastId:e})},KR);Yl.set(e,t)},GR=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,HR)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?Xp(n):e.toasts.forEach(r=>{Xp(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},js=[];let Ds={toasts:[]};function ii(e){Ds=GR(Ds,e),js.forEach(t=>{t(Ds)})}function YR({...e}){const t=QR(),n=o=>ii({type:"UPDATE_TOAST",toast:{...o,id:t}}),r=()=>ii({type:"DISMISS_TOAST",toastId:t});return ii({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||r()}}}),{id:t,dismiss:r,update:n}}function XR(){const[e,t]=f.useState(Ds);return f.useEffect(()=>(js.push(t),()=>{const n=js.indexOf(t);n>-1&&js.splice(n,1)}),[e]),{...e,toast:YR,dismiss:n=>ii({type:"DISMISS_TOAST",toastId:n})}}var qR=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"}),ZR="VisuallyHidden",Ja=f.forwardRef((e,t)=>x.jsx(he.span,{...e,ref:t,style:{...qR,...e.style}}));Ja.displayName=ZR;var JR=Ja,Dd="ToastProvider",[Fd,eT,tT]=xd("Toast"),[dw]=br("Toast",[tT]),[nT,el]=dw(Dd),fw=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:s}=e,[a,l]=f.useState(null),[u,d]=f.useState(0),c=f.useRef(!1),h=f.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Dd}\`. Expected non-empty \`string\`.`),x.jsx(Fd.Provider,{scope:t,children:x.jsx(nT,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:f.useCallback(()=>d(p=>p+1),[]),onToastRemove:f.useCallback(()=>d(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:c,isClosePausedRef:h,children:s})})};fw.displayName=Dd;var pw="ToastViewport",rT=["F8"],uc="toast.viewportPause",cc="toast.viewportResume",hw=f.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=rT,label:o="Notifications ({hotkey})",...i}=e,s=el(pw,n),a=eT(n),l=f.useRef(null),u=f.useRef(null),d=f.useRef(null),c=f.useRef(null),h=ke(t,c,s.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),S=s.toastCount>0;f.useEffect(()=>{const w=v=>{var y;r.length!==0&&r.every(E=>v[E]||v.code===E)&&((y=c.current)==null||y.focus())};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[r]),f.useEffect(()=>{const w=l.current,v=c.current;if(S&&w&&v){const m=()=>{if(!s.isClosePausedRef.current){const b=new CustomEvent(uc);v.dispatchEvent(b),s.isClosePausedRef.current=!0}},y=()=>{if(s.isClosePausedRef.current){const b=new CustomEvent(cc);v.dispatchEvent(b),s.isClosePausedRef.current=!1}},E=b=>{!w.contains(b.relatedTarget)&&y()},C=()=>{w.contains(document.activeElement)||y()};return w.addEventListener("focusin",m),w.addEventListener("focusout",E),w.addEventListener("pointermove",m),w.addEventListener("pointerleave",C),window.addEventListener("blur",m),window.addEventListener("focus",y),()=>{w.removeEventListener("focusin",m),w.removeEventListener("focusout",E),w.removeEventListener("pointermove",m),w.removeEventListener("pointerleave",C),window.removeEventListener("blur",m),window.removeEventListener("focus",y)}}},[S,s.isClosePausedRef]);const g=f.useCallback(({tabbingDirection:w})=>{const m=a().map(y=>{const E=y.ref.current,C=[E,...vT(E)];return w==="forwards"?C:C.reverse()});return(w==="forwards"?m.reverse():m).flat()},[a]);return f.useEffect(()=>{const w=c.current;if(w){const v=m=>{var C,b,P;const y=m.altKey||m.ctrlKey||m.metaKey;if(m.key==="Tab"&&!y){const R=document.activeElement,A=m.shiftKey;if(m.target===w&&A){(C=u.current)==null||C.focus();return}const j=g({tabbingDirection:A?"backwards":"forwards"}),H=j.findIndex(L=>L===R);Xl(j.slice(H+1))?m.preventDefault():A?(b=u.current)==null||b.focus():(P=d.current)==null||P.focus()}};return w.addEventListener("keydown",v),()=>w.removeEventListener("keydown",v)}},[a,g]),x.jsxs(FC,{ref:l,role:"region","aria-label":o.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:S?void 0:"none"},children:[S&&x.jsx(dc,{ref:u,onFocusFromOutsideViewport:()=>{const w=g({tabbingDirection:"forwards"});Xl(w)}}),x.jsx(Fd.Slot,{scope:n,children:x.jsx(he.ol,{tabIndex:-1,...i,ref:h})}),S&&x.jsx(dc,{ref:d,onFocusFromOutsideViewport:()=>{const w=g({tabbingDirection:"backwards"});Xl(w)}})]})});hw.displayName=pw;var mw="ToastFocusProxy",dc=f.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=el(mw,n);return x.jsx(Ja,{tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:s=>{var u;const a=s.relatedTarget;!((u=i.viewport)!=null&&u.contains(a))&&r()}})});dc.displayName=mw;var Wi="Toast",oT="toast.swipeStart",iT="toast.swipeMove",sT="toast.swipeCancel",aT="toast.swipeEnd",vw=f.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...s}=e,[a,l]=yd({prop:r,defaultProp:o??!0,onChange:i,caller:Wi});return x.jsx(Pr,{present:n||a,children:x.jsx(cT,{open:a,...s,ref:t,onClose:()=>l(!1),onPause:Ye(e.onPause),onResume:Ye(e.onResume),onSwipeStart:B(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:B(e.onSwipeMove,u=>{const{x:d,y:c}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${c}px`)}),onSwipeCancel:B(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:B(e.onSwipeEnd,u=>{const{x:d,y:c}=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",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${c}px`),l(!1)})})})});vw.displayName=Wi;var[lT,uT]=dw(Wi,{onClose(){}}),cT=f.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:s,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:d,onSwipeMove:c,onSwipeCancel:h,onSwipeEnd:p,...S}=e,g=el(Wi,n),[w,v]=f.useState(null),m=ke(t,L=>v(L)),y=f.useRef(null),E=f.useRef(null),C=o||g.duration,b=f.useRef(0),P=f.useRef(C),R=f.useRef(0),{onToastAdd:A,onToastRemove:O}=g,$=Ye(()=>{var Y;(w==null?void 0:w.contains(document.activeElement))&&((Y=g.viewport)==null||Y.focus()),s()}),j=f.useCallback(L=>{!L||L===1/0||(window.clearTimeout(R.current),b.current=new Date().getTime(),R.current=window.setTimeout($,L))},[$]);f.useEffect(()=>{const L=g.viewport;if(L){const Y=()=>{j(P.current),u==null||u()},z=()=>{const W=new Date().getTime()-b.current;P.current=P.current-W,window.clearTimeout(R.current),l==null||l()};return L.addEventListener(uc,z),L.addEventListener(cc,Y),()=>{L.removeEventListener(uc,z),L.removeEventListener(cc,Y)}}},[g.viewport,C,l,u,j]),f.useEffect(()=>{i&&!g.isClosePausedRef.current&&j(C)},[i,C,g.isClosePausedRef,j]),f.useEffect(()=>(A(),()=>O()),[A,O]);const H=f.useMemo(()=>w?Cw(w):null,[w]);return g.viewport?x.jsxs(x.Fragment,{children:[H&&x.jsx(dT,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:H}),x.jsx(lT,{scope:n,onClose:$,children:$i.createPortal(x.jsx(Fd.ItemSlot,{scope:n,children:x.jsx(DC,{asChild:!0,onEscapeKeyDown:B(a,()=>{g.isFocusedToastEscapeKeyDownRef.current||$(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:x.jsx(he.li,{tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":g.swipeDirection,...S,ref:m,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:B(e.onKeyDown,L=>{L.key==="Escape"&&(a==null||a(L.nativeEvent),L.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,$()))}),onPointerDown:B(e.onPointerDown,L=>{L.button===0&&(y.current={x:L.clientX,y:L.clientY})}),onPointerMove:B(e.onPointerMove,L=>{if(!y.current)return;const Y=L.clientX-y.current.x,z=L.clientY-y.current.y,W=!!E.current,_=["left","right"].includes(g.swipeDirection),k=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,I=_?k(0,Y):0,U=_?0:k(0,z),F=L.pointerType==="touch"?10:2,Q={x:I,y:U},X={originalEvent:L,delta:Q};W?(E.current=Q,ws(iT,c,X,{discrete:!1})):qp(Q,g.swipeDirection,F)?(E.current=Q,ws(oT,d,X,{discrete:!1}),L.target.setPointerCapture(L.pointerId)):(Math.abs(Y)>F||Math.abs(z)>F)&&(y.current=null)}),onPointerUp:B(e.onPointerUp,L=>{const Y=E.current,z=L.target;if(z.hasPointerCapture(L.pointerId)&&z.releasePointerCapture(L.pointerId),E.current=null,y.current=null,Y){const W=L.currentTarget,_={originalEvent:L,delta:Y};qp(Y,g.swipeDirection,g.swipeThreshold)?ws(aT,p,_,{discrete:!0}):ws(sT,h,_,{discrete:!0}),W.addEventListener("click",k=>k.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),dT=e=>{const{__scopeToast:t,children:n,...r}=e,o=el(Wi,t),[i,s]=f.useState(!1),[a,l]=f.useState(!1);return hT(()=>s(!0)),f.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:x.jsx(_d,{asChild:!0,children:x.jsx(Ja,{...r,children:i&&x.jsxs(x.Fragment,{children:[o.label," ",n]})})})},fT="ToastTitle",gw=f.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return x.jsx(he.div,{...r,ref:t})});gw.displayName=fT;var pT="ToastDescription",yw=f.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return x.jsx(he.div,{...r,ref:t})});yw.displayName=pT;var ww="ToastAction",xw=f.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?x.jsx(Ew,{altText:n,asChild:!0,children:x.jsx($d,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${ww}\`. Expected non-empty \`string\`.`),null)});xw.displayName=ww;var Sw="ToastClose",$d=f.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=uT(Sw,n);return x.jsx(Ew,{asChild:!0,children:x.jsx(he.button,{type:"button",...r,ref:t,onClick:B(e.onClick,o.onClose)})})});$d.displayName=Sw;var Ew=f.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return x.jsx(he.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function Cw(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),mT(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const s=r.dataset.radixToastAnnounceAlt;s&&t.push(s)}else t.push(...Cw(r))}}),t}function ws(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?wd(o,i):o.dispatchEvent(i)}var qp=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n};function hT(e=()=>{}){const t=Ye(e);mt(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function mT(e){return e.nodeType===e.ELEMENT_NODE}function vT(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Xl(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var gT=fw,bw=hw,Pw=vw,kw=gw,Rw=yw,Tw=xw,_w=$d;const Zp=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Jp=hg,yT=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Jp(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(u=>{const d=n==null?void 0:n[u],c=i==null?void 0:i[u];if(d===null)return null;const h=Zp(d)||Zp(c);return o[u][h]}),a=n&&Object.entries(n).reduce((u,d)=>{let[c,h]=d;return h===void 0||(u[c]=h),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:c,className:h,...p}=d;return Object.entries(p).every(S=>{let[g,w]=S;return Array.isArray(w)?w.includes({...i,...a}[g]):{...i,...a}[g]===w})?[...u,c,h]:u},[]);return Jp(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)},wT=gT,Nw=f.forwardRef(({className:e,...t},n)=>x.jsx(bw,{ref:n,className:Re("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));Nw.displayName=bw.displayName;const xT=yT("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 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"}}),Mw=f.forwardRef(({className:e,variant:t,...n},r)=>x.jsx(Pw,{ref:r,className:Re(xT({variant:t}),e),...n}));Mw.displayName=Pw.displayName;const ST=f.forwardRef(({className:e,...t},n)=>x.jsx(Tw,{ref:n,className:Re("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));ST.displayName=Tw.displayName;const Ow=f.forwardRef(({className:e,...t},n)=>x.jsx(_w,{ref:n,className:Re("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:x.jsx(OR,{className:"h-4 w-4"})}));Ow.displayName=_w.displayName;const Aw=f.forwardRef(({className:e,...t},n)=>x.jsx(kw,{ref:n,className:Re("text-sm font-semibold",e),...t}));Aw.displayName=kw.displayName;const Iw=f.forwardRef(({className:e,...t},n)=>x.jsx(Rw,{ref:n,className:Re("text-sm opacity-90",e),...t}));Iw.displayName=Rw.displayName;function ET(){const{toasts:e}=XR();return x.jsxs(wT,{children:[e.map(function({id:t,title:n,description:r,action:o,...i}){return x.jsxs(Mw,{...i,children:[x.jsxs("div",{className:"grid gap-1",children:[n&&x.jsx(Aw,{children:n}),r&&x.jsx(Iw,{children:r})]}),o,x.jsx(Ow,{})]},t)}),x.jsx(Nw,{})]})}var eh=["light","dark"],CT="(prefers-color-scheme: dark)",bT=f.createContext(void 0),PT={setTheme:e=>{},themes:[]},kT=()=>{var e;return(e=f.useContext(bT))!=null?e:PT};f.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:o,defaultTheme:i,value:s,attrs:a,nonce:l})=>{let u=i==="system",d=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(S=>`'${S}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,c=o?eh.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",h=(S,g=!1,w=!0)=>{let v=s?s[S]:S,m=g?S+"|| ''":`'${v}'`,y="";return o&&w&&!g&&eh.includes(S)&&(y+=`d.style.colorScheme = '${S}';`),n==="class"?g||v?y+=`c.add(${m})`:y+="null":v&&(y+=`d[s](n,${m})`),y},p=e?`!function(){${d}${h(e)}}()`:r?`!function(){try{${d}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${CT}',m=window.matchMedia(t);if(m.media!==t||m.matches){${h("dark")}}else{${h("light")}}}else if(e){${s?`var x=${JSON.stringify(s)};`:""}${h(s?"x[e]":"e",!0)}}${u?"":"else{"+h(i,!1,!1)+"}"}${c}}catch(e){}}()`:`!function(){try{${d}var e=localStorage.getItem('${t}');if(e){${s?`var x=${JSON.stringify(s)};`:""}${h(s?"x[e]":"e",!0)}}else{${h(i,!1,!1)};}${c}}catch(t){}}();`;return f.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:p}})});var RT=e=>{switch(e){case"success":return NT;case"info":return OT;case"warning":return MT;case"error":return AT;default:return null}},TT=Array(12).fill(0),_T=({visible:e,className:t})=>N.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},N.createElement("div",{className:"sonner-spinner"},TT.map((n,r)=>N.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),NT=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),MT=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},N.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),OT=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),AT=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),IT=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},N.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),N.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),LT=()=>{let[e,t]=N.useState(document.hidden);return N.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},fc=1,jT=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,o=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:fc++,i=this.toasts.find(a=>a.id===o),s=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),i?this.toasts=this.toasts.map(a=>a.id===o?(this.publish({...a,...e,id:o,title:n}),{...a,...e,id:o,dismissible:s,title:n}):a):this.addToast({title:n,...r,dismissible:s,id:o}),o},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),o=n!==void 0,i,s=r.then(async l=>{if(i=["resolve",l],N.isValidElement(l))o=!1,this.create({id:n,type:"default",message:l});else if(FT(l)&&!l.ok){o=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description;this.create({id:n,type:"error",message:u,description:d})}else if(t.success!==void 0){o=!1;let u=typeof t.success=="function"?await t.success(l):t.success,d=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"success",message:u,description:d})}}).catch(async l=>{if(i=["reject",l],t.error!==void 0){o=!1;let u=typeof t.error=="function"?await t.error(l):t.error,d=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"error",message:u,description:d})}}).finally(()=>{var l;o&&(this.dismiss(n),n=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,u)=>s.then(()=>i[0]==="reject"?u(i[1]):l(i[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||fc++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Ve=new jT,DT=(e,t)=>{let n=(t==null?void 0:t.id)||fc++;return Ve.addToast({title:e,...t,id:n}),n},FT=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",$T=DT,zT=()=>Ve.toasts,UT=()=>Ve.getActiveToasts();Object.assign($T,{success:Ve.success,info:Ve.info,warning:Ve.warning,error:Ve.error,custom:Ve.custom,message:Ve.message,promise:Ve.promise,dismiss:Ve.dismiss,loading:Ve.loading},{getHistory:zT,getToasts:UT});function BT(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}BT(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
157
- `);function xs(e){return e.label!==void 0}var VT=3,WT="32px",HT="16px",th=4e3,KT=356,QT=14,GT=20,YT=200;function St(...e){return e.filter(Boolean).join(" ")}function XT(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var qT=e=>{var t,n,r,o,i,s,a,l,u,d,c;let{invert:h,toast:p,unstyled:S,interacting:g,setHeights:w,visibleToasts:v,heights:m,index:y,toasts:E,expanded:C,removeToast:b,defaultRichColors:P,closeButton:R,style:A,cancelButtonStyle:O,actionButtonStyle:$,className:j="",descriptionClassName:H="",duration:L,position:Y,gap:z,loadingIcon:W,expandByDefault:_,classNames:k,icons:I,closeButtonAriaLabel:U="Close toast",pauseWhenPageIsHidden:F}=e,[Q,X]=N.useState(null),[ue,me]=N.useState(null),[q,Kt]=N.useState(!1),[Ee,Ot]=N.useState(!1),[pn,Tr]=N.useState(!1),[hn,Hi]=N.useState(!1),[rl,Ki]=N.useState(!1),[ol,Oo]=N.useState(0),[_r,Ud]=N.useState(0),Ao=N.useRef(p.duration||L||th),Bd=N.useRef(null),Zn=N.useRef(null),Ww=y===0,Hw=y+1<=v,st=p.type,Nr=p.dismissible!==!1,Kw=p.className||"",Qw=p.descriptionClassName||"",Qi=N.useMemo(()=>m.findIndex(K=>K.toastId===p.id)||0,[m,p.id]),Gw=N.useMemo(()=>{var K;return(K=p.closeButton)!=null?K:R},[p.closeButton,R]),Vd=N.useMemo(()=>p.duration||L||th,[p.duration,L]),il=N.useRef(0),Mr=N.useRef(0),Wd=N.useRef(0),Or=N.useRef(null),[Yw,Xw]=Y.split("-"),Hd=N.useMemo(()=>m.reduce((K,ne,ae)=>ae>=Qi?K:K+ne.height,0),[m,Qi]),Kd=LT(),qw=p.invert||h,sl=st==="loading";Mr.current=N.useMemo(()=>Qi*z+Hd,[Qi,Hd]),N.useEffect(()=>{Ao.current=Vd},[Vd]),N.useEffect(()=>{Kt(!0)},[]),N.useEffect(()=>{let K=Zn.current;if(K){let ne=K.getBoundingClientRect().height;return Ud(ne),w(ae=>[{toastId:p.id,height:ne,position:p.position},...ae]),()=>w(ae=>ae.filter(gt=>gt.toastId!==p.id))}},[w,p.id]),N.useLayoutEffect(()=>{if(!q)return;let K=Zn.current,ne=K.style.height;K.style.height="auto";let ae=K.getBoundingClientRect().height;K.style.height=ne,Ud(ae),w(gt=>gt.find(yt=>yt.toastId===p.id)?gt.map(yt=>yt.toastId===p.id?{...yt,height:ae}:yt):[{toastId:p.id,height:ae,position:p.position},...gt])},[q,p.title,p.description,w,p.id]);let mn=N.useCallback(()=>{Ot(!0),Oo(Mr.current),w(K=>K.filter(ne=>ne.toastId!==p.id)),setTimeout(()=>{b(p)},YT)},[p,b,w,Mr]);N.useEffect(()=>{if(p.promise&&st==="loading"||p.duration===1/0||p.type==="loading")return;let K;return C||g||F&&Kd?(()=>{if(Wd.current<il.current){let ne=new Date().getTime()-il.current;Ao.current=Ao.current-ne}Wd.current=new Date().getTime()})():Ao.current!==1/0&&(il.current=new Date().getTime(),K=setTimeout(()=>{var ne;(ne=p.onAutoClose)==null||ne.call(p,p),mn()},Ao.current)),()=>clearTimeout(K)},[C,g,p,st,F,Kd,mn]),N.useEffect(()=>{p.delete&&mn()},[mn,p.delete]);function Zw(){var K,ne,ae;return I!=null&&I.loading?N.createElement("div",{className:St(k==null?void 0:k.loader,(K=p==null?void 0:p.classNames)==null?void 0:K.loader,"sonner-loader"),"data-visible":st==="loading"},I.loading):W?N.createElement("div",{className:St(k==null?void 0:k.loader,(ne=p==null?void 0:p.classNames)==null?void 0:ne.loader,"sonner-loader"),"data-visible":st==="loading"},W):N.createElement(_T,{className:St(k==null?void 0:k.loader,(ae=p==null?void 0:p.classNames)==null?void 0:ae.loader),visible:st==="loading"})}return N.createElement("li",{tabIndex:0,ref:Zn,className:St(j,Kw,k==null?void 0:k.toast,(t=p==null?void 0:p.classNames)==null?void 0:t.toast,k==null?void 0:k.default,k==null?void 0:k[st],(n=p==null?void 0:p.classNames)==null?void 0:n[st]),"data-sonner-toast":"","data-rich-colors":(r=p.richColors)!=null?r:P,"data-styled":!(p.jsx||p.unstyled||S),"data-mounted":q,"data-promise":!!p.promise,"data-swiped":rl,"data-removed":Ee,"data-visible":Hw,"data-y-position":Yw,"data-x-position":Xw,"data-index":y,"data-front":Ww,"data-swiping":pn,"data-dismissible":Nr,"data-type":st,"data-invert":qw,"data-swipe-out":hn,"data-swipe-direction":ue,"data-expanded":!!(C||_&&q),style:{"--index":y,"--toasts-before":y,"--z-index":E.length-y,"--offset":`${Ee?ol:Mr.current}px`,"--initial-height":_?"auto":`${_r}px`,...A,...p.style},onDragEnd:()=>{Tr(!1),X(null),Or.current=null},onPointerDown:K=>{sl||!Nr||(Bd.current=new Date,Oo(Mr.current),K.target.setPointerCapture(K.pointerId),K.target.tagName!=="BUTTON"&&(Tr(!0),Or.current={x:K.clientX,y:K.clientY}))},onPointerUp:()=>{var K,ne,ae,gt;if(hn||!Nr)return;Or.current=null;let yt=Number(((K=Zn.current)==null?void 0:K.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),vn=Number(((ne=Zn.current)==null?void 0:ne.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Jn=new Date().getTime()-((ae=Bd.current)==null?void 0:ae.getTime()),wt=Q==="x"?yt:vn,gn=Math.abs(wt)/Jn;if(Math.abs(wt)>=GT||gn>.11){Oo(Mr.current),(gt=p.onDismiss)==null||gt.call(p,p),me(Q==="x"?yt>0?"right":"left":vn>0?"down":"up"),mn(),Hi(!0),Ki(!1);return}Tr(!1),X(null)},onPointerMove:K=>{var ne,ae,gt,yt;if(!Or.current||!Nr||((ne=window.getSelection())==null?void 0:ne.toString().length)>0)return;let vn=K.clientY-Or.current.y,Jn=K.clientX-Or.current.x,wt=(ae=e.swipeDirections)!=null?ae:XT(Y);!Q&&(Math.abs(Jn)>1||Math.abs(vn)>1)&&X(Math.abs(Jn)>Math.abs(vn)?"x":"y");let gn={x:0,y:0};Q==="y"?(wt.includes("top")||wt.includes("bottom"))&&(wt.includes("top")&&vn<0||wt.includes("bottom")&&vn>0)&&(gn.y=vn):Q==="x"&&(wt.includes("left")||wt.includes("right"))&&(wt.includes("left")&&Jn<0||wt.includes("right")&&Jn>0)&&(gn.x=Jn),(Math.abs(gn.x)>0||Math.abs(gn.y)>0)&&Ki(!0),(gt=Zn.current)==null||gt.style.setProperty("--swipe-amount-x",`${gn.x}px`),(yt=Zn.current)==null||yt.style.setProperty("--swipe-amount-y",`${gn.y}px`)}},Gw&&!p.jsx?N.createElement("button",{"aria-label":U,"data-disabled":sl,"data-close-button":!0,onClick:sl||!Nr?()=>{}:()=>{var K;mn(),(K=p.onDismiss)==null||K.call(p,p)},className:St(k==null?void 0:k.closeButton,(o=p==null?void 0:p.classNames)==null?void 0:o.closeButton)},(i=I==null?void 0:I.close)!=null?i:IT):null,p.jsx||f.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:N.createElement(N.Fragment,null,st||p.icon||p.promise?N.createElement("div",{"data-icon":"",className:St(k==null?void 0:k.icon,(s=p==null?void 0:p.classNames)==null?void 0:s.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||Zw():null,p.type!=="loading"?p.icon||(I==null?void 0:I[st])||RT(st):null):null,N.createElement("div",{"data-content":"",className:St(k==null?void 0:k.content,(a=p==null?void 0:p.classNames)==null?void 0:a.content)},N.createElement("div",{"data-title":"",className:St(k==null?void 0:k.title,(l=p==null?void 0:p.classNames)==null?void 0:l.title)},typeof p.title=="function"?p.title():p.title),p.description?N.createElement("div",{"data-description":"",className:St(H,Qw,k==null?void 0:k.description,(u=p==null?void 0:p.classNames)==null?void 0:u.description)},typeof p.description=="function"?p.description():p.description):null),f.isValidElement(p.cancel)?p.cancel:p.cancel&&xs(p.cancel)?N.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||O,onClick:K=>{var ne,ae;xs(p.cancel)&&Nr&&((ae=(ne=p.cancel).onClick)==null||ae.call(ne,K),mn())},className:St(k==null?void 0:k.cancelButton,(d=p==null?void 0:p.classNames)==null?void 0:d.cancelButton)},p.cancel.label):null,f.isValidElement(p.action)?p.action:p.action&&xs(p.action)?N.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||$,onClick:K=>{var ne,ae;xs(p.action)&&((ae=(ne=p.action).onClick)==null||ae.call(ne,K),!K.defaultPrevented&&mn())},className:St(k==null?void 0:k.actionButton,(c=p==null?void 0:p.classNames)==null?void 0:c.actionButton)},p.action.label):null))};function nh(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function ZT(e,t){let n={};return[e,t].forEach((r,o)=>{let i=o===1,s=i?"--mobile-offset":"--offset",a=i?HT:WT;function l(u){["top","right","bottom","left"].forEach(d=>{n[`${s}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${s}-${u}`]=a:n[`${s}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(a)}),n}var JT=f.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:o=["altKey","KeyT"],expand:i,closeButton:s,className:a,offset:l,mobileOffset:u,theme:d="light",richColors:c,duration:h,style:p,visibleToasts:S=VT,toastOptions:g,dir:w=nh(),gap:v=QT,loadingIcon:m,icons:y,containerAriaLabel:E="Notifications",pauseWhenPageIsHidden:C}=e,[b,P]=N.useState([]),R=N.useMemo(()=>Array.from(new Set([r].concat(b.filter(F=>F.position).map(F=>F.position)))),[b,r]),[A,O]=N.useState([]),[$,j]=N.useState(!1),[H,L]=N.useState(!1),[Y,z]=N.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),W=N.useRef(null),_=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),k=N.useRef(null),I=N.useRef(!1),U=N.useCallback(F=>{P(Q=>{var X;return(X=Q.find(ue=>ue.id===F.id))!=null&&X.delete||Ve.dismiss(F.id),Q.filter(({id:ue})=>ue!==F.id)})},[]);return N.useEffect(()=>Ve.subscribe(F=>{if(F.dismiss){P(Q=>Q.map(X=>X.id===F.id?{...X,delete:!0}:X));return}setTimeout(()=>{Rv.flushSync(()=>{P(Q=>{let X=Q.findIndex(ue=>ue.id===F.id);return X!==-1?[...Q.slice(0,X),{...Q[X],...F},...Q.slice(X+1)]:[F,...Q]})})})}),[]),N.useEffect(()=>{if(d!=="system"){z(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?z("dark"):z("light")),typeof window>"u")return;let F=window.matchMedia("(prefers-color-scheme: dark)");try{F.addEventListener("change",({matches:Q})=>{z(Q?"dark":"light")})}catch{F.addListener(({matches:X})=>{try{z(X?"dark":"light")}catch(ue){console.error(ue)}})}},[d]),N.useEffect(()=>{b.length<=1&&j(!1)},[b]),N.useEffect(()=>{let F=Q=>{var X,ue;o.every(me=>Q[me]||Q.code===me)&&(j(!0),(X=W.current)==null||X.focus()),Q.code==="Escape"&&(document.activeElement===W.current||(ue=W.current)!=null&&ue.contains(document.activeElement))&&j(!1)};return document.addEventListener("keydown",F),()=>document.removeEventListener("keydown",F)},[o]),N.useEffect(()=>{if(W.current)return()=>{k.current&&(k.current.focus({preventScroll:!0}),k.current=null,I.current=!1)}},[W.current]),N.createElement("section",{ref:t,"aria-label":`${E} ${_}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},R.map((F,Q)=>{var X;let[ue,me]=F.split("-");return b.length?N.createElement("ol",{key:F,dir:w==="auto"?nh():w,tabIndex:-1,ref:W,className:a,"data-sonner-toaster":!0,"data-theme":Y,"data-y-position":ue,"data-lifted":$&&b.length>1&&!i,"data-x-position":me,style:{"--front-toast-height":`${((X=A[0])==null?void 0:X.height)||0}px`,"--width":`${KT}px`,"--gap":`${v}px`,...p,...ZT(l,u)},onBlur:q=>{I.current&&!q.currentTarget.contains(q.relatedTarget)&&(I.current=!1,k.current&&(k.current.focus({preventScroll:!0}),k.current=null))},onFocus:q=>{q.target instanceof HTMLElement&&q.target.dataset.dismissible==="false"||I.current||(I.current=!0,k.current=q.relatedTarget)},onMouseEnter:()=>j(!0),onMouseMove:()=>j(!0),onMouseLeave:()=>{H||j(!1)},onDragEnd:()=>j(!1),onPointerDown:q=>{q.target instanceof HTMLElement&&q.target.dataset.dismissible==="false"||L(!0)},onPointerUp:()=>L(!1)},b.filter(q=>!q.position&&Q===0||q.position===F).map((q,Kt)=>{var Ee,Ot;return N.createElement(qT,{key:q.id,icons:y,index:Kt,toast:q,defaultRichColors:c,duration:(Ee=g==null?void 0:g.duration)!=null?Ee:h,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:n,visibleToasts:S,closeButton:(Ot=g==null?void 0:g.closeButton)!=null?Ot:s,interacting:H,position:F,style:g==null?void 0:g.style,unstyled:g==null?void 0:g.unstyled,classNames:g==null?void 0:g.classNames,cancelButtonStyle:g==null?void 0:g.cancelButtonStyle,actionButtonStyle:g==null?void 0:g.actionButtonStyle,removeToast:U,toasts:b.filter(pn=>pn.position==q.position),heights:A.filter(pn=>pn.position==q.position),setHeights:O,expandByDefault:i,gap:v,loadingIcon:m,expanded:$,pauseWhenPageIsHidden:C,swipeDirections:e.swipeDirections})})):null}))});const e_=({...e})=>{const{theme:t="system"}=kT();return x.jsx(JT,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};var t_=Symbol("radix.slottable");function n_(e){const t=({children:n})=>x.jsx(x.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=t_,t}var[tl]=br("Tooltip",[Qa]),zd=Qa(),Lw="TooltipProvider",r_=700,rh="tooltip.open",[o_,jw]=tl(Lw),Dw=e=>{const{__scopeTooltip:t,delayDuration:n=r_,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,s=f.useRef(!0),a=f.useRef(!1),l=f.useRef(0);return f.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),x.jsx(o_,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:f.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:f.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:f.useCallback(u=>{a.current=u},[]),disableHoverableContent:o,children:i})};Dw.displayName=Lw;var Fw="Tooltip",[nN,nl]=tl(Fw),pc="TooltipTrigger",i_=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=nl(pc,n),i=jw(pc,n),s=zd(n),a=f.useRef(null),l=ke(t,a,o.onTriggerChange),u=f.useRef(!1),d=f.useRef(!1),c=f.useCallback(()=>u.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",c),[c]),x.jsx(Xg,{asChild:!0,...s,children:x.jsx(he.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:B(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:B(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:B(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:B(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:B(e.onBlur,o.onClose),onClick:B(e.onClick,o.onClose)})})});i_.displayName=pc;var s_="TooltipPortal",[rN,a_]=tl(s_,{forceMount:void 0}),bo="TooltipContent",$w=f.forwardRef((e,t)=>{const n=a_(bo,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,s=nl(bo,e.__scopeTooltip);return x.jsx(Pr,{present:r||s.open,children:s.disableHoverableContent?x.jsx(zw,{side:o,...i,ref:t}):x.jsx(l_,{side:o,...i,ref:t})})}),l_=f.forwardRef((e,t)=>{const n=nl(bo,e.__scopeTooltip),r=jw(bo,e.__scopeTooltip),o=f.useRef(null),i=ke(t,o),[s,a]=f.useState(null),{trigger:l,onClose:u}=n,d=o.current,{onPointerInTransitChange:c}=r,h=f.useCallback(()=>{a(null),c(!1)},[c]),p=f.useCallback((S,g)=>{const w=S.currentTarget,v={x:S.clientX,y:S.clientY},m=p_(v,w.getBoundingClientRect()),y=h_(v,m),E=m_(g.getBoundingClientRect()),C=g_([...y,...E]);a(C),c(!0)},[c]);return f.useEffect(()=>()=>h(),[h]),f.useEffect(()=>{if(l&&d){const S=w=>p(w,d),g=w=>p(w,l);return l.addEventListener("pointerleave",S),d.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",S),d.removeEventListener("pointerleave",g)}}},[l,d,p,h]),f.useEffect(()=>{if(s){const S=g=>{const w=g.target,v={x:g.clientX,y:g.clientY},m=(l==null?void 0:l.contains(w))||(d==null?void 0:d.contains(w)),y=!v_(v,s);m?h():y&&(h(),u())};return document.addEventListener("pointermove",S),()=>document.removeEventListener("pointermove",S)}},[l,d,s,u,h]),x.jsx(zw,{...e,ref:i})}),[u_,c_]=tl(Fw,{isInside:!1}),d_=n_("TooltipContent"),zw=f.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:s,...a}=e,l=nl(bo,n),u=zd(n),{onClose:d}=l;return f.useEffect(()=>(document.addEventListener(rh,d),()=>document.removeEventListener(rh,d)),[d]),f.useEffect(()=>{if(l.trigger){const c=h=>{const p=h.target;p!=null&&p.contains(l.trigger)&&d()};return window.addEventListener("scroll",c,{capture:!0}),()=>window.removeEventListener("scroll",c,{capture:!0})}},[l.trigger,d]),x.jsx(Ba,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:c=>c.preventDefault(),onDismiss:d,children:x.jsxs(qg,{"data-state":l.stateAttribute,...u,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[x.jsx(d_,{children:r}),x.jsx(u_,{scope:n,isInside:!0,children:x.jsx(JR,{id:l.contentId,role:"tooltip",children:o||r})})]})})});$w.displayName=bo;var Uw="TooltipArrow",f_=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=zd(n);return c_(Uw,n).isInside?null:x.jsx(Zg,{...o,...r,ref:t})});f_.displayName=Uw;function p_(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function h_(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function m_(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function v_(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const a=t[i],l=t[s],u=a.x,d=a.y,c=l.x,h=l.y;d>r!=h>r&&n<(c-u)*(r-d)/(h-d)+u&&(o=!o)}return o}function g_(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),y_(t)}function y_(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],s=n[n.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var w_=Dw,Bw=$w;const x_=w_,S_=f.forwardRef(({className:e,sideOffset:t=4,...n},r)=>x.jsx(Bw,{ref:r,sideOffset:t,className:Re("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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}));S_.displayName=Bw.displayName;function E_(){const{pathname:e,search:t}=dn();f.useEffect(()=>{window.scrollTo(0,0)},[e,t])}const Vw=aE(),C_=Vw?PS:bS;if(!Vw&&typeof window<"u"){const e=window.location.hash;e.startsWith("#/")&&!e.startsWith("#//")&&window.history.replaceState(null,"",e.slice(1))}const b_=N.lazy(()=>vt(()=>import("./FeedView-Cf5wgU9c.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11]))),P_=N.lazy(()=>vt(()=>import("./PapersListView-DsAlDIHu.js"),__vite__mapDeps([12,1,2,3,4,5,6,7,8,13,10,9,11]))),k_=N.lazy(()=>vt(()=>import("./PaperDetailView-Wm1j7h1p.js"),__vite__mapDeps([14,6,1,2,3,4,5,7,8,11,15]))),R_=N.lazy(()=>vt(()=>import("./TagsIndexView-Cq2OXyNT.js"),__vite__mapDeps([16,6,5,4,11]))),T_=N.lazy(()=>vt(()=>import("./TagBrowseView-S2puh8kQ.js"),__vite__mapDeps([17,6,1,2,3,4,5,7,8,9,11]))),__=N.lazy(()=>vt(()=>import("./MethodsIndexView-B2gFKYGg.js"),__vite__mapDeps([18,6,5,11]))),N_=N.lazy(()=>vt(()=>import("./MethodDetailView-B_WtVDNU.js"),__vite__mapDeps([19,6,8,1,2,3,4,5,9,11]))),M_=N.lazy(()=>vt(()=>import("./BenchmarkDetailView-_8E2ZRm_.js"),__vite__mapDeps([20,6,5,11,2,3]))),O_=N.lazy(()=>vt(()=>import("./SavedPapersView-BQ7z_KWN.js"),__vite__mapDeps([21,6,1,2,3,4,5,11]))),A_=N.lazy(()=>vt(()=>import("./CronDashboard-B5Xx5Zr8.js"),__vite__mapDeps([22,6,15]))),I_=N.lazy(()=>vt(()=>import("./NotFound-AQv_XkN6.js"),[])),L_=N.lazy(()=>vt(()=>import("./SearchOverlay-BJ3Vra9H.js"),__vite__mapDeps([23,6,2,3,5,13,4]))),j_=()=>x.jsx("div",{className:"page","aria-busy":"true"}),D_=new iE({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}}),F_=()=>{const{arxivId:e}=tS();return x.jsx(zv,{to:e?`/paper/${e}`:"/papers",replace:!0})},oh=({element:e})=>Ua()?x.jsx(zv,{to:"/",replace:!0}):x.jsx(x.Fragment,{children:e}),$_=()=>{const[e,t]=N.useState(!1);return E_(),N.useEffect(()=>{const n=r=>{(r.metaKey||r.ctrlKey)&&r.key==="k"&&(r.preventDefault(),t(!0))};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[]),x.jsxs(x.Fragment,{children:[x.jsx(WR,{onOpenSearch:()=>t(!0)}),x.jsx("main",{children:x.jsx(N.Suspense,{fallback:x.jsx(j_,{}),children:x.jsxs(mS,{children:[x.jsx(Xe,{path:"/",element:x.jsx(b_,{})}),x.jsx(Xe,{path:"/papers",element:x.jsx(P_,{})}),x.jsx(Xe,{path:"/papers/:arxivId",element:x.jsx(F_,{})}),x.jsx(Xe,{path:"/paper/:arxivId",element:x.jsx(k_,{})}),x.jsx(Xe,{path:"/tasks",element:x.jsx(R_,{})}),x.jsx(Xe,{path:"/tasks/:taskSlug",element:x.jsx(T_,{})}),x.jsx(Xe,{path:"/methods",element:x.jsx(__,{})}),x.jsx(Xe,{path:"/methods/:methodSlug",element:x.jsx(N_,{})}),x.jsx(Xe,{path:"/benchmark/:datasetSlug",element:x.jsx(M_,{})}),x.jsx(Xe,{path:"/saved",element:x.jsx(oh,{element:x.jsx(O_,{})})}),x.jsx(Xe,{path:"/cron-dashboard",element:x.jsx(oh,{element:x.jsx(A_,{})})}),x.jsx(Xe,{path:"*",element:x.jsx(I_,{})})]})})}),e&&x.jsx(N.Suspense,{fallback:null,children:x.jsx(L_,{open:e,onClose:()=>t(!1)})})]})},z_=()=>x.jsx(sE,{client:D_,children:x.jsx(BR,{children:x.jsxs(x_,{children:[x.jsx(C_,{children:x.jsx($_,{})}),x.jsx(ET,{}),x.jsx(e_,{}),!1]})})}),U_=Tv(document.getElementById("root"));U_.render(x.jsx(N.StrictMode,{children:x.jsx(z_,{})}));export{zS as $,N as A,Ua as B,_R as C,Ba as D,hd as E,Rg as F,tS as G,dd as H,J_ as I,Wv as J,K_ as K,TS as L,V_ as M,hh as N,Y_ as O,Pr as P,G_ as Q,py as R,za as S,uE as T,yT as U,Z_ as V,dn as W,OR as X,q_ as Y,Jv as Z,QS as _,X_ as a,Gu as a0,Kv as a1,FS as a2,$S as a3,Qu as a4,Vv as a5,eE as a6,VS as a7,Ct as b,Q_ as c,Za as d,he as e,yd as f,nE as g,ki as h,ke as i,x as j,B as k,tP as l,br as m,Fe as n,Re as o,Cr as p,ec as q,f as r,H_ as s,_d as t,W_ as u,IP as v,$C as w,eN as x,XR as y,VR as z};
 
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/FeedView-Dnsgf6iQ.js","assets/components-Cg3rKVQ3.js","assets/LatexTitle-BYOXQNlq.js","assets/LatexTitle-wklAmtGL.css","assets/transform-BxhHCT2R.js","assets/api-gdpmQjJd.js","assets/adminAuth-W6_tdZNU.js","assets/usePapers-BJol1iZF.js","assets/useInfiniteQuery-DPq_eewq.js","assets/useIntersectionObserver-BIld5T_u.js","assets/usePeriodFilter-D7A3mTfk.js","assets/alert-CJMW3r9v.js","assets/PapersListView-CT8uylW0.js","assets/useDebounce-DslTjWNw.js","assets/PaperDetailView-hV8jpY0C.js","assets/badge-DxH3OGz4.js","assets/TagsIndexView-BW55bmnO.js","assets/TagBrowseView-t6_CM5xZ.js","assets/MethodsIndexView-DRzt4_Bz.js","assets/MethodDetailView-xBNKBgyD.js","assets/BenchmarkDetailView-VMlJM-5j.js","assets/SavedPapersView-BhakLwrd.js","assets/CronDashboard-mLr5RZh4.js","assets/SearchOverlay-BKjXfD9I.js"])))=>i.map(i=>d[i]);
2
  var Qd=e=>{throw TypeError(e)};var al=(e,t,n)=>t.has(e)||Qd("Cannot "+n);var T=(e,t,n)=>(al(e,t,"read from private field"),n?n.call(e):t.get(e)),J=(e,t,n)=>t.has(e)?Qd("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),V=(e,t,n,r)=>(al(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Te=(e,t,n)=>(al(e,t,"access private method"),n);var Gi=(e,t,n,r)=>({set _(o){V(e,t,o,n)},get _(){return T(e,t,r)}});function Jw(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var V_=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function hh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var mh={exports:{}},wa={},vh={exports:{}},Z={};/**
3
  * @license React
4
  * react.production.min.js
 
154
  * This source code is licensed under the ISC license.
155
  * See the LICENSE file in the root directory of this source tree.
156
  */const OR=Za("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),AR=CR,IR=bR,LR=f.forwardRef(({className:e,inset:t,children:n,...r},o)=>x.jsxs(iw,{ref:o,className:Re("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent focus:bg-accent",t&&"pl-8",e),...r,children:[n,x.jsx(NR,{className:"ml-auto h-4 w-4"})]}));LR.displayName=iw.displayName;const jR=f.forwardRef(({className:e,...t},n)=>x.jsx(sw,{ref:n,className:Re("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));jR.displayName=sw.displayName;const lw=f.forwardRef(({className:e,sideOffset:t=4,...n},r)=>x.jsx(PR,{children:x.jsx(Zy,{ref:r,sideOffset:t,className:Re("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));lw.displayName=Zy.displayName;const ac=f.forwardRef(({className:e,inset:t,...n},r)=>x.jsx(ew,{ref:r,className:Re("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",t&&"pl-8",e),...n}));ac.displayName=ew.displayName;const DR=f.forwardRef(({className:e,children:t,checked:n,...r},o)=>x.jsxs(tw,{ref:o,className:Re("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),checked:n,...r,children:[x.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:x.jsx(rw,{children:x.jsx(_R,{className:"h-4 w-4"})})}),t]}));DR.displayName=tw.displayName;const FR=f.forwardRef(({className:e,children:t,...n},r)=>x.jsxs(nw,{ref:r,className:Re("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...n,children:[x.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:x.jsx(rw,{children:x.jsx(MR,{className:"h-2 w-2 fill-current"})})}),t]}));FR.displayName=nw.displayName;const uw=f.forwardRef(({className:e,inset:t,...n},r)=>x.jsx(Jy,{ref:r,className:Re("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));uw.displayName=Jy.displayName;const lc=f.forwardRef(({className:e,...t},n)=>x.jsx(ow,{ref:n,className:Re("-mx-1 my-1 h-px bg-muted",e),...t}));lc.displayName=ow.displayName;function $R(e){const n=(e.name||e.username||"?").trim().split(/\s+/).filter(Boolean);return n.length===0?"?":n.length===1?n[0][0].toUpperCase():(n[0][0]+n[n.length-1][0]).toUpperCase()}const zR=({user:e,onLogout:t})=>x.jsxs(AR,{children:[x.jsx(IR,{asChild:!0,children:x.jsx("button",{type:"button",className:"user-avatar-btn","aria-label":`Account menu for ${e.username}`,children:x.jsxs(xg,{className:"h-8 w-8",children:[e.avatar_url&&x.jsx(Sg,{src:e.avatar_url,alt:e.username}),x.jsx(Eg,{className:"text-xs",children:$R(e)})]})})}),x.jsxs(lw,{align:"end",className:"w-56",children:[x.jsxs(uw,{className:"flex flex-col gap-0.5 py-2",children:[x.jsx("span",{className:"text-sm font-medium leading-tight",children:e.name||e.username}),x.jsxs("span",{className:"text-xs font-normal text-muted-foreground",children:["@",e.username]}),e.is_admin&&x.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"})]}),x.jsx(lc,{}),x.jsx(ac,{asChild:!0,children:x.jsx("a",{href:`https://huggingface.co/${encodeURIComponent(e.username)}`,target:"_blank",rel:"noopener noreferrer",children:"Hugging Face profile"})}),x.jsx(lc,{}),x.jsx(ac,{onSelect:n=>{n.preventDefault(),t()},children:"Log out"})]})]}),cw=N.createContext(null),Yp="pwc:auth-stale";async function UR(){if(Ua())return null;const e=await fetch(hd("/api/v1/auth/me"),{credentials:"include",cache:"no-store"});return e.status===401||!e.ok?null:await e.json()}const BR=({children:e})=>{const[t,n]=N.useState(null),[r,o]=N.useState(!0),i=N.useCallback(async()=>{o(!0);const l=await UR();n(l),o(!1)},[]),s=N.useCallback(async()=>{await fetch(hd("/api/v1/auth/logout"),{method:"POST",credentials:"include"}),n(null)},[]);N.useEffect(()=>{i()},[i]),N.useEffect(()=>{const l=()=>n(null);return window.addEventListener(Yp,l),()=>window.removeEventListener(Yp,l)},[]);const a=N.useMemo(()=>({user:t,isLoading:r,refresh:i,logout:s}),[t,r,i,s]);return x.jsx(cw.Provider,{value:a,children:e})};function VR(){const e=N.useContext(cw);if(!e)throw new Error("useAuth must be used inside an <AuthProvider>");return e}const Wo=({name:e,size:t=14})=>{const n={search:x.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:x.jsx("path",{d:"M4 2h8v12l-4-3-4 3V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),menu:x.jsx("path",{d:"M2 4h12M2 8h12M2 12h12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),close:x.jsx("path",{d:"M3 3l10 10M13 3L3 13",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})};return x.jsx("svg",{className:t===11?"icon-sm":"icon",viewBox:"0 0 16 16",width:t,height:t,children:n[e]})},WR=({onOpenSearch:e})=>{const[t,n]=N.useState(!1),r=()=>n(!1),{user:o,logout:i}=VR(),s=dn(),a=`${s.pathname}${s.search}`||"/",l=Ua();return x.jsxs(x.Fragment,{children:[x.jsx("header",{className:"app-header",children:x.jsxs("div",{className:"app-header-inner",children:[x.jsxs(It,{to:"/",className:"brand",onClick:r,children:[x.jsx("span",{className:"brand-mark"}),x.jsxs("span",{className:"brand-name",children:["Papers ",x.jsx("em",{children:"With Code"})]})]}),x.jsxs("nav",{className:"nav",children:[x.jsx(It,{to:"/",end:!0,className:({isActive:u})=>`nav-item ${u?"active":""}`,children:"Trending"}),x.jsx(It,{to:"/tasks",className:({isActive:u})=>`nav-item ${u?"active":""}`,children:"Browse state-of-the-art"}),x.jsx(It,{to:"/methods",className:({isActive:u})=>`nav-item ${u?"active":""}`,children:"Methods"})]}),x.jsx("div",{className:"header-spacer"}),x.jsxs("button",{className:"search-trigger",onClick:e,children:[x.jsx(Wo,{name:"search",size:13}),x.jsx("span",{children:"Search papers, authors, domains…"}),x.jsx("kbd",{children:"⌘K"})]}),x.jsx("button",{className:"icon-btn mobile-search-btn","aria-label":"Search",onClick:e,children:x.jsx(Wo,{name:"search",size:14})}),!l&&x.jsx(It,{to:"/saved",className:"icon-btn header-bookmark-btn","aria-label":"Saved papers",title:"Saved papers",children:x.jsx(Wo,{name:"bookmark",size:13})}),l?null:o?x.jsx(zR,{user:o,onLogout:i}):x.jsx(uE,{returnTo:a}),x.jsx("button",{className:"icon-btn mobile-menu-btn","aria-label":"Open menu",onClick:()=>n(u=>!u),children:x.jsx(Wo,{name:t?"close":"menu",size:14})})]})}),t&&x.jsx("div",{className:"mobile-nav-drawer",onClick:r,children:x.jsxs("div",{className:"mobile-nav-panel",onClick:u=>u.stopPropagation(),children:[x.jsxs("button",{type:"button",className:"mobile-nav-link mobile-nav-search",onClick:()=>{r(),e()},children:[x.jsx(Wo,{name:"search",size:14}),x.jsx("span",{children:"Search papers, authors, domains…"})]}),x.jsx(It,{to:"/",end:!0,className:"mobile-nav-link",onClick:r,children:"Trending"}),x.jsx(It,{to:"/tasks",className:"mobile-nav-link",onClick:r,children:"Browse state-of-the-art"}),x.jsx(It,{to:"/methods",className:"mobile-nav-link",onClick:r,children:"Methods"}),!l&&x.jsxs(x.Fragment,{children:[x.jsx(It,{to:"/saved",className:"mobile-nav-link",onClick:r,children:"Saved papers"}),x.jsx(It,{to:"/cron-dashboard",className:"mobile-nav-link",onClick:r,children:"CRON dashboard"})]})]})})]})},HR=1,KR=1e6;let Gl=0;function QR(){return Gl=(Gl+1)%Number.MAX_SAFE_INTEGER,Gl.toString()}const Yl=new Map,Xp=e=>{if(Yl.has(e))return;const t=setTimeout(()=>{Yl.delete(e),ii({type:"REMOVE_TOAST",toastId:e})},KR);Yl.set(e,t)},GR=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,HR)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?Xp(n):e.toasts.forEach(r=>{Xp(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},js=[];let Ds={toasts:[]};function ii(e){Ds=GR(Ds,e),js.forEach(t=>{t(Ds)})}function YR({...e}){const t=QR(),n=o=>ii({type:"UPDATE_TOAST",toast:{...o,id:t}}),r=()=>ii({type:"DISMISS_TOAST",toastId:t});return ii({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||r()}}}),{id:t,dismiss:r,update:n}}function XR(){const[e,t]=f.useState(Ds);return f.useEffect(()=>(js.push(t),()=>{const n=js.indexOf(t);n>-1&&js.splice(n,1)}),[e]),{...e,toast:YR,dismiss:n=>ii({type:"DISMISS_TOAST",toastId:n})}}var qR=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"}),ZR="VisuallyHidden",Ja=f.forwardRef((e,t)=>x.jsx(he.span,{...e,ref:t,style:{...qR,...e.style}}));Ja.displayName=ZR;var JR=Ja,Dd="ToastProvider",[Fd,eT,tT]=xd("Toast"),[dw]=br("Toast",[tT]),[nT,el]=dw(Dd),fw=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:s}=e,[a,l]=f.useState(null),[u,d]=f.useState(0),c=f.useRef(!1),h=f.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Dd}\`. Expected non-empty \`string\`.`),x.jsx(Fd.Provider,{scope:t,children:x.jsx(nT,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:f.useCallback(()=>d(p=>p+1),[]),onToastRemove:f.useCallback(()=>d(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:c,isClosePausedRef:h,children:s})})};fw.displayName=Dd;var pw="ToastViewport",rT=["F8"],uc="toast.viewportPause",cc="toast.viewportResume",hw=f.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=rT,label:o="Notifications ({hotkey})",...i}=e,s=el(pw,n),a=eT(n),l=f.useRef(null),u=f.useRef(null),d=f.useRef(null),c=f.useRef(null),h=ke(t,c,s.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),S=s.toastCount>0;f.useEffect(()=>{const w=v=>{var y;r.length!==0&&r.every(E=>v[E]||v.code===E)&&((y=c.current)==null||y.focus())};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[r]),f.useEffect(()=>{const w=l.current,v=c.current;if(S&&w&&v){const m=()=>{if(!s.isClosePausedRef.current){const b=new CustomEvent(uc);v.dispatchEvent(b),s.isClosePausedRef.current=!0}},y=()=>{if(s.isClosePausedRef.current){const b=new CustomEvent(cc);v.dispatchEvent(b),s.isClosePausedRef.current=!1}},E=b=>{!w.contains(b.relatedTarget)&&y()},C=()=>{w.contains(document.activeElement)||y()};return w.addEventListener("focusin",m),w.addEventListener("focusout",E),w.addEventListener("pointermove",m),w.addEventListener("pointerleave",C),window.addEventListener("blur",m),window.addEventListener("focus",y),()=>{w.removeEventListener("focusin",m),w.removeEventListener("focusout",E),w.removeEventListener("pointermove",m),w.removeEventListener("pointerleave",C),window.removeEventListener("blur",m),window.removeEventListener("focus",y)}}},[S,s.isClosePausedRef]);const g=f.useCallback(({tabbingDirection:w})=>{const m=a().map(y=>{const E=y.ref.current,C=[E,...vT(E)];return w==="forwards"?C:C.reverse()});return(w==="forwards"?m.reverse():m).flat()},[a]);return f.useEffect(()=>{const w=c.current;if(w){const v=m=>{var C,b,P;const y=m.altKey||m.ctrlKey||m.metaKey;if(m.key==="Tab"&&!y){const R=document.activeElement,A=m.shiftKey;if(m.target===w&&A){(C=u.current)==null||C.focus();return}const j=g({tabbingDirection:A?"backwards":"forwards"}),H=j.findIndex(L=>L===R);Xl(j.slice(H+1))?m.preventDefault():A?(b=u.current)==null||b.focus():(P=d.current)==null||P.focus()}};return w.addEventListener("keydown",v),()=>w.removeEventListener("keydown",v)}},[a,g]),x.jsxs(FC,{ref:l,role:"region","aria-label":o.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:S?void 0:"none"},children:[S&&x.jsx(dc,{ref:u,onFocusFromOutsideViewport:()=>{const w=g({tabbingDirection:"forwards"});Xl(w)}}),x.jsx(Fd.Slot,{scope:n,children:x.jsx(he.ol,{tabIndex:-1,...i,ref:h})}),S&&x.jsx(dc,{ref:d,onFocusFromOutsideViewport:()=>{const w=g({tabbingDirection:"backwards"});Xl(w)}})]})});hw.displayName=pw;var mw="ToastFocusProxy",dc=f.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=el(mw,n);return x.jsx(Ja,{tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:s=>{var u;const a=s.relatedTarget;!((u=i.viewport)!=null&&u.contains(a))&&r()}})});dc.displayName=mw;var Wi="Toast",oT="toast.swipeStart",iT="toast.swipeMove",sT="toast.swipeCancel",aT="toast.swipeEnd",vw=f.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...s}=e,[a,l]=yd({prop:r,defaultProp:o??!0,onChange:i,caller:Wi});return x.jsx(Pr,{present:n||a,children:x.jsx(cT,{open:a,...s,ref:t,onClose:()=>l(!1),onPause:Ye(e.onPause),onResume:Ye(e.onResume),onSwipeStart:B(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:B(e.onSwipeMove,u=>{const{x:d,y:c}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${c}px`)}),onSwipeCancel:B(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:B(e.onSwipeEnd,u=>{const{x:d,y:c}=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",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${c}px`),l(!1)})})})});vw.displayName=Wi;var[lT,uT]=dw(Wi,{onClose(){}}),cT=f.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:s,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:d,onSwipeMove:c,onSwipeCancel:h,onSwipeEnd:p,...S}=e,g=el(Wi,n),[w,v]=f.useState(null),m=ke(t,L=>v(L)),y=f.useRef(null),E=f.useRef(null),C=o||g.duration,b=f.useRef(0),P=f.useRef(C),R=f.useRef(0),{onToastAdd:A,onToastRemove:O}=g,$=Ye(()=>{var Y;(w==null?void 0:w.contains(document.activeElement))&&((Y=g.viewport)==null||Y.focus()),s()}),j=f.useCallback(L=>{!L||L===1/0||(window.clearTimeout(R.current),b.current=new Date().getTime(),R.current=window.setTimeout($,L))},[$]);f.useEffect(()=>{const L=g.viewport;if(L){const Y=()=>{j(P.current),u==null||u()},z=()=>{const W=new Date().getTime()-b.current;P.current=P.current-W,window.clearTimeout(R.current),l==null||l()};return L.addEventListener(uc,z),L.addEventListener(cc,Y),()=>{L.removeEventListener(uc,z),L.removeEventListener(cc,Y)}}},[g.viewport,C,l,u,j]),f.useEffect(()=>{i&&!g.isClosePausedRef.current&&j(C)},[i,C,g.isClosePausedRef,j]),f.useEffect(()=>(A(),()=>O()),[A,O]);const H=f.useMemo(()=>w?Cw(w):null,[w]);return g.viewport?x.jsxs(x.Fragment,{children:[H&&x.jsx(dT,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:H}),x.jsx(lT,{scope:n,onClose:$,children:$i.createPortal(x.jsx(Fd.ItemSlot,{scope:n,children:x.jsx(DC,{asChild:!0,onEscapeKeyDown:B(a,()=>{g.isFocusedToastEscapeKeyDownRef.current||$(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:x.jsx(he.li,{tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":g.swipeDirection,...S,ref:m,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:B(e.onKeyDown,L=>{L.key==="Escape"&&(a==null||a(L.nativeEvent),L.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,$()))}),onPointerDown:B(e.onPointerDown,L=>{L.button===0&&(y.current={x:L.clientX,y:L.clientY})}),onPointerMove:B(e.onPointerMove,L=>{if(!y.current)return;const Y=L.clientX-y.current.x,z=L.clientY-y.current.y,W=!!E.current,_=["left","right"].includes(g.swipeDirection),k=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,I=_?k(0,Y):0,U=_?0:k(0,z),F=L.pointerType==="touch"?10:2,Q={x:I,y:U},X={originalEvent:L,delta:Q};W?(E.current=Q,ws(iT,c,X,{discrete:!1})):qp(Q,g.swipeDirection,F)?(E.current=Q,ws(oT,d,X,{discrete:!1}),L.target.setPointerCapture(L.pointerId)):(Math.abs(Y)>F||Math.abs(z)>F)&&(y.current=null)}),onPointerUp:B(e.onPointerUp,L=>{const Y=E.current,z=L.target;if(z.hasPointerCapture(L.pointerId)&&z.releasePointerCapture(L.pointerId),E.current=null,y.current=null,Y){const W=L.currentTarget,_={originalEvent:L,delta:Y};qp(Y,g.swipeDirection,g.swipeThreshold)?ws(aT,p,_,{discrete:!0}):ws(sT,h,_,{discrete:!0}),W.addEventListener("click",k=>k.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),dT=e=>{const{__scopeToast:t,children:n,...r}=e,o=el(Wi,t),[i,s]=f.useState(!1),[a,l]=f.useState(!1);return hT(()=>s(!0)),f.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:x.jsx(_d,{asChild:!0,children:x.jsx(Ja,{...r,children:i&&x.jsxs(x.Fragment,{children:[o.label," ",n]})})})},fT="ToastTitle",gw=f.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return x.jsx(he.div,{...r,ref:t})});gw.displayName=fT;var pT="ToastDescription",yw=f.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return x.jsx(he.div,{...r,ref:t})});yw.displayName=pT;var ww="ToastAction",xw=f.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?x.jsx(Ew,{altText:n,asChild:!0,children:x.jsx($d,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${ww}\`. Expected non-empty \`string\`.`),null)});xw.displayName=ww;var Sw="ToastClose",$d=f.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=uT(Sw,n);return x.jsx(Ew,{asChild:!0,children:x.jsx(he.button,{type:"button",...r,ref:t,onClick:B(e.onClick,o.onClose)})})});$d.displayName=Sw;var Ew=f.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return x.jsx(he.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function Cw(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),mT(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const s=r.dataset.radixToastAnnounceAlt;s&&t.push(s)}else t.push(...Cw(r))}}),t}function ws(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?wd(o,i):o.dispatchEvent(i)}var qp=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n};function hT(e=()=>{}){const t=Ye(e);mt(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function mT(e){return e.nodeType===e.ELEMENT_NODE}function vT(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Xl(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var gT=fw,bw=hw,Pw=vw,kw=gw,Rw=yw,Tw=xw,_w=$d;const Zp=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Jp=hg,yT=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Jp(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(u=>{const d=n==null?void 0:n[u],c=i==null?void 0:i[u];if(d===null)return null;const h=Zp(d)||Zp(c);return o[u][h]}),a=n&&Object.entries(n).reduce((u,d)=>{let[c,h]=d;return h===void 0||(u[c]=h),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:c,className:h,...p}=d;return Object.entries(p).every(S=>{let[g,w]=S;return Array.isArray(w)?w.includes({...i,...a}[g]):{...i,...a}[g]===w})?[...u,c,h]:u},[]);return Jp(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)},wT=gT,Nw=f.forwardRef(({className:e,...t},n)=>x.jsx(bw,{ref:n,className:Re("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));Nw.displayName=bw.displayName;const xT=yT("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 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"}}),Mw=f.forwardRef(({className:e,variant:t,...n},r)=>x.jsx(Pw,{ref:r,className:Re(xT({variant:t}),e),...n}));Mw.displayName=Pw.displayName;const ST=f.forwardRef(({className:e,...t},n)=>x.jsx(Tw,{ref:n,className:Re("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));ST.displayName=Tw.displayName;const Ow=f.forwardRef(({className:e,...t},n)=>x.jsx(_w,{ref:n,className:Re("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:x.jsx(OR,{className:"h-4 w-4"})}));Ow.displayName=_w.displayName;const Aw=f.forwardRef(({className:e,...t},n)=>x.jsx(kw,{ref:n,className:Re("text-sm font-semibold",e),...t}));Aw.displayName=kw.displayName;const Iw=f.forwardRef(({className:e,...t},n)=>x.jsx(Rw,{ref:n,className:Re("text-sm opacity-90",e),...t}));Iw.displayName=Rw.displayName;function ET(){const{toasts:e}=XR();return x.jsxs(wT,{children:[e.map(function({id:t,title:n,description:r,action:o,...i}){return x.jsxs(Mw,{...i,children:[x.jsxs("div",{className:"grid gap-1",children:[n&&x.jsx(Aw,{children:n}),r&&x.jsx(Iw,{children:r})]}),o,x.jsx(Ow,{})]},t)}),x.jsx(Nw,{})]})}var eh=["light","dark"],CT="(prefers-color-scheme: dark)",bT=f.createContext(void 0),PT={setTheme:e=>{},themes:[]},kT=()=>{var e;return(e=f.useContext(bT))!=null?e:PT};f.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:o,defaultTheme:i,value:s,attrs:a,nonce:l})=>{let u=i==="system",d=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(S=>`'${S}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,c=o?eh.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",h=(S,g=!1,w=!0)=>{let v=s?s[S]:S,m=g?S+"|| ''":`'${v}'`,y="";return o&&w&&!g&&eh.includes(S)&&(y+=`d.style.colorScheme = '${S}';`),n==="class"?g||v?y+=`c.add(${m})`:y+="null":v&&(y+=`d[s](n,${m})`),y},p=e?`!function(){${d}${h(e)}}()`:r?`!function(){try{${d}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${CT}',m=window.matchMedia(t);if(m.media!==t||m.matches){${h("dark")}}else{${h("light")}}}else if(e){${s?`var x=${JSON.stringify(s)};`:""}${h(s?"x[e]":"e",!0)}}${u?"":"else{"+h(i,!1,!1)+"}"}${c}}catch(e){}}()`:`!function(){try{${d}var e=localStorage.getItem('${t}');if(e){${s?`var x=${JSON.stringify(s)};`:""}${h(s?"x[e]":"e",!0)}}else{${h(i,!1,!1)};}${c}}catch(t){}}();`;return f.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:p}})});var RT=e=>{switch(e){case"success":return NT;case"info":return OT;case"warning":return MT;case"error":return AT;default:return null}},TT=Array(12).fill(0),_T=({visible:e,className:t})=>N.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},N.createElement("div",{className:"sonner-spinner"},TT.map((n,r)=>N.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),NT=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),MT=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},N.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),OT=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),AT=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),IT=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},N.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),N.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),LT=()=>{let[e,t]=N.useState(document.hidden);return N.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},fc=1,jT=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,o=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:fc++,i=this.toasts.find(a=>a.id===o),s=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),i?this.toasts=this.toasts.map(a=>a.id===o?(this.publish({...a,...e,id:o,title:n}),{...a,...e,id:o,dismissible:s,title:n}):a):this.addToast({title:n,...r,dismissible:s,id:o}),o},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),o=n!==void 0,i,s=r.then(async l=>{if(i=["resolve",l],N.isValidElement(l))o=!1,this.create({id:n,type:"default",message:l});else if(FT(l)&&!l.ok){o=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description;this.create({id:n,type:"error",message:u,description:d})}else if(t.success!==void 0){o=!1;let u=typeof t.success=="function"?await t.success(l):t.success,d=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"success",message:u,description:d})}}).catch(async l=>{if(i=["reject",l],t.error!==void 0){o=!1;let u=typeof t.error=="function"?await t.error(l):t.error,d=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"error",message:u,description:d})}}).finally(()=>{var l;o&&(this.dismiss(n),n=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,u)=>s.then(()=>i[0]==="reject"?u(i[1]):l(i[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||fc++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Ve=new jT,DT=(e,t)=>{let n=(t==null?void 0:t.id)||fc++;return Ve.addToast({title:e,...t,id:n}),n},FT=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",$T=DT,zT=()=>Ve.toasts,UT=()=>Ve.getActiveToasts();Object.assign($T,{success:Ve.success,info:Ve.info,warning:Ve.warning,error:Ve.error,custom:Ve.custom,message:Ve.message,promise:Ve.promise,dismiss:Ve.dismiss,loading:Ve.loading},{getHistory:zT,getToasts:UT});function BT(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}BT(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
157
+ `);function xs(e){return e.label!==void 0}var VT=3,WT="32px",HT="16px",th=4e3,KT=356,QT=14,GT=20,YT=200;function St(...e){return e.filter(Boolean).join(" ")}function XT(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var qT=e=>{var t,n,r,o,i,s,a,l,u,d,c;let{invert:h,toast:p,unstyled:S,interacting:g,setHeights:w,visibleToasts:v,heights:m,index:y,toasts:E,expanded:C,removeToast:b,defaultRichColors:P,closeButton:R,style:A,cancelButtonStyle:O,actionButtonStyle:$,className:j="",descriptionClassName:H="",duration:L,position:Y,gap:z,loadingIcon:W,expandByDefault:_,classNames:k,icons:I,closeButtonAriaLabel:U="Close toast",pauseWhenPageIsHidden:F}=e,[Q,X]=N.useState(null),[ue,me]=N.useState(null),[q,Kt]=N.useState(!1),[Ee,Ot]=N.useState(!1),[pn,Tr]=N.useState(!1),[hn,Hi]=N.useState(!1),[rl,Ki]=N.useState(!1),[ol,Oo]=N.useState(0),[_r,Ud]=N.useState(0),Ao=N.useRef(p.duration||L||th),Bd=N.useRef(null),Zn=N.useRef(null),Ww=y===0,Hw=y+1<=v,st=p.type,Nr=p.dismissible!==!1,Kw=p.className||"",Qw=p.descriptionClassName||"",Qi=N.useMemo(()=>m.findIndex(K=>K.toastId===p.id)||0,[m,p.id]),Gw=N.useMemo(()=>{var K;return(K=p.closeButton)!=null?K:R},[p.closeButton,R]),Vd=N.useMemo(()=>p.duration||L||th,[p.duration,L]),il=N.useRef(0),Mr=N.useRef(0),Wd=N.useRef(0),Or=N.useRef(null),[Yw,Xw]=Y.split("-"),Hd=N.useMemo(()=>m.reduce((K,ne,ae)=>ae>=Qi?K:K+ne.height,0),[m,Qi]),Kd=LT(),qw=p.invert||h,sl=st==="loading";Mr.current=N.useMemo(()=>Qi*z+Hd,[Qi,Hd]),N.useEffect(()=>{Ao.current=Vd},[Vd]),N.useEffect(()=>{Kt(!0)},[]),N.useEffect(()=>{let K=Zn.current;if(K){let ne=K.getBoundingClientRect().height;return Ud(ne),w(ae=>[{toastId:p.id,height:ne,position:p.position},...ae]),()=>w(ae=>ae.filter(gt=>gt.toastId!==p.id))}},[w,p.id]),N.useLayoutEffect(()=>{if(!q)return;let K=Zn.current,ne=K.style.height;K.style.height="auto";let ae=K.getBoundingClientRect().height;K.style.height=ne,Ud(ae),w(gt=>gt.find(yt=>yt.toastId===p.id)?gt.map(yt=>yt.toastId===p.id?{...yt,height:ae}:yt):[{toastId:p.id,height:ae,position:p.position},...gt])},[q,p.title,p.description,w,p.id]);let mn=N.useCallback(()=>{Ot(!0),Oo(Mr.current),w(K=>K.filter(ne=>ne.toastId!==p.id)),setTimeout(()=>{b(p)},YT)},[p,b,w,Mr]);N.useEffect(()=>{if(p.promise&&st==="loading"||p.duration===1/0||p.type==="loading")return;let K;return C||g||F&&Kd?(()=>{if(Wd.current<il.current){let ne=new Date().getTime()-il.current;Ao.current=Ao.current-ne}Wd.current=new Date().getTime()})():Ao.current!==1/0&&(il.current=new Date().getTime(),K=setTimeout(()=>{var ne;(ne=p.onAutoClose)==null||ne.call(p,p),mn()},Ao.current)),()=>clearTimeout(K)},[C,g,p,st,F,Kd,mn]),N.useEffect(()=>{p.delete&&mn()},[mn,p.delete]);function Zw(){var K,ne,ae;return I!=null&&I.loading?N.createElement("div",{className:St(k==null?void 0:k.loader,(K=p==null?void 0:p.classNames)==null?void 0:K.loader,"sonner-loader"),"data-visible":st==="loading"},I.loading):W?N.createElement("div",{className:St(k==null?void 0:k.loader,(ne=p==null?void 0:p.classNames)==null?void 0:ne.loader,"sonner-loader"),"data-visible":st==="loading"},W):N.createElement(_T,{className:St(k==null?void 0:k.loader,(ae=p==null?void 0:p.classNames)==null?void 0:ae.loader),visible:st==="loading"})}return N.createElement("li",{tabIndex:0,ref:Zn,className:St(j,Kw,k==null?void 0:k.toast,(t=p==null?void 0:p.classNames)==null?void 0:t.toast,k==null?void 0:k.default,k==null?void 0:k[st],(n=p==null?void 0:p.classNames)==null?void 0:n[st]),"data-sonner-toast":"","data-rich-colors":(r=p.richColors)!=null?r:P,"data-styled":!(p.jsx||p.unstyled||S),"data-mounted":q,"data-promise":!!p.promise,"data-swiped":rl,"data-removed":Ee,"data-visible":Hw,"data-y-position":Yw,"data-x-position":Xw,"data-index":y,"data-front":Ww,"data-swiping":pn,"data-dismissible":Nr,"data-type":st,"data-invert":qw,"data-swipe-out":hn,"data-swipe-direction":ue,"data-expanded":!!(C||_&&q),style:{"--index":y,"--toasts-before":y,"--z-index":E.length-y,"--offset":`${Ee?ol:Mr.current}px`,"--initial-height":_?"auto":`${_r}px`,...A,...p.style},onDragEnd:()=>{Tr(!1),X(null),Or.current=null},onPointerDown:K=>{sl||!Nr||(Bd.current=new Date,Oo(Mr.current),K.target.setPointerCapture(K.pointerId),K.target.tagName!=="BUTTON"&&(Tr(!0),Or.current={x:K.clientX,y:K.clientY}))},onPointerUp:()=>{var K,ne,ae,gt;if(hn||!Nr)return;Or.current=null;let yt=Number(((K=Zn.current)==null?void 0:K.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),vn=Number(((ne=Zn.current)==null?void 0:ne.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Jn=new Date().getTime()-((ae=Bd.current)==null?void 0:ae.getTime()),wt=Q==="x"?yt:vn,gn=Math.abs(wt)/Jn;if(Math.abs(wt)>=GT||gn>.11){Oo(Mr.current),(gt=p.onDismiss)==null||gt.call(p,p),me(Q==="x"?yt>0?"right":"left":vn>0?"down":"up"),mn(),Hi(!0),Ki(!1);return}Tr(!1),X(null)},onPointerMove:K=>{var ne,ae,gt,yt;if(!Or.current||!Nr||((ne=window.getSelection())==null?void 0:ne.toString().length)>0)return;let vn=K.clientY-Or.current.y,Jn=K.clientX-Or.current.x,wt=(ae=e.swipeDirections)!=null?ae:XT(Y);!Q&&(Math.abs(Jn)>1||Math.abs(vn)>1)&&X(Math.abs(Jn)>Math.abs(vn)?"x":"y");let gn={x:0,y:0};Q==="y"?(wt.includes("top")||wt.includes("bottom"))&&(wt.includes("top")&&vn<0||wt.includes("bottom")&&vn>0)&&(gn.y=vn):Q==="x"&&(wt.includes("left")||wt.includes("right"))&&(wt.includes("left")&&Jn<0||wt.includes("right")&&Jn>0)&&(gn.x=Jn),(Math.abs(gn.x)>0||Math.abs(gn.y)>0)&&Ki(!0),(gt=Zn.current)==null||gt.style.setProperty("--swipe-amount-x",`${gn.x}px`),(yt=Zn.current)==null||yt.style.setProperty("--swipe-amount-y",`${gn.y}px`)}},Gw&&!p.jsx?N.createElement("button",{"aria-label":U,"data-disabled":sl,"data-close-button":!0,onClick:sl||!Nr?()=>{}:()=>{var K;mn(),(K=p.onDismiss)==null||K.call(p,p)},className:St(k==null?void 0:k.closeButton,(o=p==null?void 0:p.classNames)==null?void 0:o.closeButton)},(i=I==null?void 0:I.close)!=null?i:IT):null,p.jsx||f.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:N.createElement(N.Fragment,null,st||p.icon||p.promise?N.createElement("div",{"data-icon":"",className:St(k==null?void 0:k.icon,(s=p==null?void 0:p.classNames)==null?void 0:s.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||Zw():null,p.type!=="loading"?p.icon||(I==null?void 0:I[st])||RT(st):null):null,N.createElement("div",{"data-content":"",className:St(k==null?void 0:k.content,(a=p==null?void 0:p.classNames)==null?void 0:a.content)},N.createElement("div",{"data-title":"",className:St(k==null?void 0:k.title,(l=p==null?void 0:p.classNames)==null?void 0:l.title)},typeof p.title=="function"?p.title():p.title),p.description?N.createElement("div",{"data-description":"",className:St(H,Qw,k==null?void 0:k.description,(u=p==null?void 0:p.classNames)==null?void 0:u.description)},typeof p.description=="function"?p.description():p.description):null),f.isValidElement(p.cancel)?p.cancel:p.cancel&&xs(p.cancel)?N.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||O,onClick:K=>{var ne,ae;xs(p.cancel)&&Nr&&((ae=(ne=p.cancel).onClick)==null||ae.call(ne,K),mn())},className:St(k==null?void 0:k.cancelButton,(d=p==null?void 0:p.classNames)==null?void 0:d.cancelButton)},p.cancel.label):null,f.isValidElement(p.action)?p.action:p.action&&xs(p.action)?N.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||$,onClick:K=>{var ne,ae;xs(p.action)&&((ae=(ne=p.action).onClick)==null||ae.call(ne,K),!K.defaultPrevented&&mn())},className:St(k==null?void 0:k.actionButton,(c=p==null?void 0:p.classNames)==null?void 0:c.actionButton)},p.action.label):null))};function nh(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function ZT(e,t){let n={};return[e,t].forEach((r,o)=>{let i=o===1,s=i?"--mobile-offset":"--offset",a=i?HT:WT;function l(u){["top","right","bottom","left"].forEach(d=>{n[`${s}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${s}-${u}`]=a:n[`${s}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(a)}),n}var JT=f.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:o=["altKey","KeyT"],expand:i,closeButton:s,className:a,offset:l,mobileOffset:u,theme:d="light",richColors:c,duration:h,style:p,visibleToasts:S=VT,toastOptions:g,dir:w=nh(),gap:v=QT,loadingIcon:m,icons:y,containerAriaLabel:E="Notifications",pauseWhenPageIsHidden:C}=e,[b,P]=N.useState([]),R=N.useMemo(()=>Array.from(new Set([r].concat(b.filter(F=>F.position).map(F=>F.position)))),[b,r]),[A,O]=N.useState([]),[$,j]=N.useState(!1),[H,L]=N.useState(!1),[Y,z]=N.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),W=N.useRef(null),_=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),k=N.useRef(null),I=N.useRef(!1),U=N.useCallback(F=>{P(Q=>{var X;return(X=Q.find(ue=>ue.id===F.id))!=null&&X.delete||Ve.dismiss(F.id),Q.filter(({id:ue})=>ue!==F.id)})},[]);return N.useEffect(()=>Ve.subscribe(F=>{if(F.dismiss){P(Q=>Q.map(X=>X.id===F.id?{...X,delete:!0}:X));return}setTimeout(()=>{Rv.flushSync(()=>{P(Q=>{let X=Q.findIndex(ue=>ue.id===F.id);return X!==-1?[...Q.slice(0,X),{...Q[X],...F},...Q.slice(X+1)]:[F,...Q]})})})}),[]),N.useEffect(()=>{if(d!=="system"){z(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?z("dark"):z("light")),typeof window>"u")return;let F=window.matchMedia("(prefers-color-scheme: dark)");try{F.addEventListener("change",({matches:Q})=>{z(Q?"dark":"light")})}catch{F.addListener(({matches:X})=>{try{z(X?"dark":"light")}catch(ue){console.error(ue)}})}},[d]),N.useEffect(()=>{b.length<=1&&j(!1)},[b]),N.useEffect(()=>{let F=Q=>{var X,ue;o.every(me=>Q[me]||Q.code===me)&&(j(!0),(X=W.current)==null||X.focus()),Q.code==="Escape"&&(document.activeElement===W.current||(ue=W.current)!=null&&ue.contains(document.activeElement))&&j(!1)};return document.addEventListener("keydown",F),()=>document.removeEventListener("keydown",F)},[o]),N.useEffect(()=>{if(W.current)return()=>{k.current&&(k.current.focus({preventScroll:!0}),k.current=null,I.current=!1)}},[W.current]),N.createElement("section",{ref:t,"aria-label":`${E} ${_}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},R.map((F,Q)=>{var X;let[ue,me]=F.split("-");return b.length?N.createElement("ol",{key:F,dir:w==="auto"?nh():w,tabIndex:-1,ref:W,className:a,"data-sonner-toaster":!0,"data-theme":Y,"data-y-position":ue,"data-lifted":$&&b.length>1&&!i,"data-x-position":me,style:{"--front-toast-height":`${((X=A[0])==null?void 0:X.height)||0}px`,"--width":`${KT}px`,"--gap":`${v}px`,...p,...ZT(l,u)},onBlur:q=>{I.current&&!q.currentTarget.contains(q.relatedTarget)&&(I.current=!1,k.current&&(k.current.focus({preventScroll:!0}),k.current=null))},onFocus:q=>{q.target instanceof HTMLElement&&q.target.dataset.dismissible==="false"||I.current||(I.current=!0,k.current=q.relatedTarget)},onMouseEnter:()=>j(!0),onMouseMove:()=>j(!0),onMouseLeave:()=>{H||j(!1)},onDragEnd:()=>j(!1),onPointerDown:q=>{q.target instanceof HTMLElement&&q.target.dataset.dismissible==="false"||L(!0)},onPointerUp:()=>L(!1)},b.filter(q=>!q.position&&Q===0||q.position===F).map((q,Kt)=>{var Ee,Ot;return N.createElement(qT,{key:q.id,icons:y,index:Kt,toast:q,defaultRichColors:c,duration:(Ee=g==null?void 0:g.duration)!=null?Ee:h,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:n,visibleToasts:S,closeButton:(Ot=g==null?void 0:g.closeButton)!=null?Ot:s,interacting:H,position:F,style:g==null?void 0:g.style,unstyled:g==null?void 0:g.unstyled,classNames:g==null?void 0:g.classNames,cancelButtonStyle:g==null?void 0:g.cancelButtonStyle,actionButtonStyle:g==null?void 0:g.actionButtonStyle,removeToast:U,toasts:b.filter(pn=>pn.position==q.position),heights:A.filter(pn=>pn.position==q.position),setHeights:O,expandByDefault:i,gap:v,loadingIcon:m,expanded:$,pauseWhenPageIsHidden:C,swipeDirections:e.swipeDirections})})):null}))});const e_=({...e})=>{const{theme:t="system"}=kT();return x.jsx(JT,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};var t_=Symbol("radix.slottable");function n_(e){const t=({children:n})=>x.jsx(x.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=t_,t}var[tl]=br("Tooltip",[Qa]),zd=Qa(),Lw="TooltipProvider",r_=700,rh="tooltip.open",[o_,jw]=tl(Lw),Dw=e=>{const{__scopeTooltip:t,delayDuration:n=r_,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,s=f.useRef(!0),a=f.useRef(!1),l=f.useRef(0);return f.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),x.jsx(o_,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:f.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:f.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:f.useCallback(u=>{a.current=u},[]),disableHoverableContent:o,children:i})};Dw.displayName=Lw;var Fw="Tooltip",[nN,nl]=tl(Fw),pc="TooltipTrigger",i_=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=nl(pc,n),i=jw(pc,n),s=zd(n),a=f.useRef(null),l=ke(t,a,o.onTriggerChange),u=f.useRef(!1),d=f.useRef(!1),c=f.useCallback(()=>u.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",c),[c]),x.jsx(Xg,{asChild:!0,...s,children:x.jsx(he.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:B(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:B(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:B(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:B(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:B(e.onBlur,o.onClose),onClick:B(e.onClick,o.onClose)})})});i_.displayName=pc;var s_="TooltipPortal",[rN,a_]=tl(s_,{forceMount:void 0}),bo="TooltipContent",$w=f.forwardRef((e,t)=>{const n=a_(bo,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,s=nl(bo,e.__scopeTooltip);return x.jsx(Pr,{present:r||s.open,children:s.disableHoverableContent?x.jsx(zw,{side:o,...i,ref:t}):x.jsx(l_,{side:o,...i,ref:t})})}),l_=f.forwardRef((e,t)=>{const n=nl(bo,e.__scopeTooltip),r=jw(bo,e.__scopeTooltip),o=f.useRef(null),i=ke(t,o),[s,a]=f.useState(null),{trigger:l,onClose:u}=n,d=o.current,{onPointerInTransitChange:c}=r,h=f.useCallback(()=>{a(null),c(!1)},[c]),p=f.useCallback((S,g)=>{const w=S.currentTarget,v={x:S.clientX,y:S.clientY},m=p_(v,w.getBoundingClientRect()),y=h_(v,m),E=m_(g.getBoundingClientRect()),C=g_([...y,...E]);a(C),c(!0)},[c]);return f.useEffect(()=>()=>h(),[h]),f.useEffect(()=>{if(l&&d){const S=w=>p(w,d),g=w=>p(w,l);return l.addEventListener("pointerleave",S),d.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",S),d.removeEventListener("pointerleave",g)}}},[l,d,p,h]),f.useEffect(()=>{if(s){const S=g=>{const w=g.target,v={x:g.clientX,y:g.clientY},m=(l==null?void 0:l.contains(w))||(d==null?void 0:d.contains(w)),y=!v_(v,s);m?h():y&&(h(),u())};return document.addEventListener("pointermove",S),()=>document.removeEventListener("pointermove",S)}},[l,d,s,u,h]),x.jsx(zw,{...e,ref:i})}),[u_,c_]=tl(Fw,{isInside:!1}),d_=n_("TooltipContent"),zw=f.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:s,...a}=e,l=nl(bo,n),u=zd(n),{onClose:d}=l;return f.useEffect(()=>(document.addEventListener(rh,d),()=>document.removeEventListener(rh,d)),[d]),f.useEffect(()=>{if(l.trigger){const c=h=>{const p=h.target;p!=null&&p.contains(l.trigger)&&d()};return window.addEventListener("scroll",c,{capture:!0}),()=>window.removeEventListener("scroll",c,{capture:!0})}},[l.trigger,d]),x.jsx(Ba,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:c=>c.preventDefault(),onDismiss:d,children:x.jsxs(qg,{"data-state":l.stateAttribute,...u,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[x.jsx(d_,{children:r}),x.jsx(u_,{scope:n,isInside:!0,children:x.jsx(JR,{id:l.contentId,role:"tooltip",children:o||r})})]})})});$w.displayName=bo;var Uw="TooltipArrow",f_=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=zd(n);return c_(Uw,n).isInside?null:x.jsx(Zg,{...o,...r,ref:t})});f_.displayName=Uw;function p_(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function h_(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function m_(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function v_(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const a=t[i],l=t[s],u=a.x,d=a.y,c=l.x,h=l.y;d>r!=h>r&&n<(c-u)*(r-d)/(h-d)+u&&(o=!o)}return o}function g_(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),y_(t)}function y_(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],s=n[n.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var w_=Dw,Bw=$w;const x_=w_,S_=f.forwardRef(({className:e,sideOffset:t=4,...n},r)=>x.jsx(Bw,{ref:r,sideOffset:t,className:Re("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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}));S_.displayName=Bw.displayName;function E_(){const{pathname:e,search:t}=dn();f.useEffect(()=>{window.scrollTo(0,0)},[e,t])}const Vw=aE(),C_=Vw?PS:bS;if(!Vw&&typeof window<"u"){const e=window.location.hash;e.startsWith("#/")&&!e.startsWith("#//")&&window.history.replaceState(null,"",e.slice(1))}const b_=N.lazy(()=>vt(()=>import("./FeedView-Dnsgf6iQ.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11]))),P_=N.lazy(()=>vt(()=>import("./PapersListView-CT8uylW0.js"),__vite__mapDeps([12,1,2,3,4,5,6,7,8,13,10,9,11]))),k_=N.lazy(()=>vt(()=>import("./PaperDetailView-hV8jpY0C.js"),__vite__mapDeps([14,6,1,2,3,4,5,7,8,11,15]))),R_=N.lazy(()=>vt(()=>import("./TagsIndexView-BW55bmnO.js"),__vite__mapDeps([16,6,5,4,11]))),T_=N.lazy(()=>vt(()=>import("./TagBrowseView-t6_CM5xZ.js"),__vite__mapDeps([17,6,1,2,3,4,5,7,8,9,11]))),__=N.lazy(()=>vt(()=>import("./MethodsIndexView-DRzt4_Bz.js"),__vite__mapDeps([18,6,5,11]))),N_=N.lazy(()=>vt(()=>import("./MethodDetailView-xBNKBgyD.js"),__vite__mapDeps([19,6,8,1,2,3,4,5,9,11]))),M_=N.lazy(()=>vt(()=>import("./BenchmarkDetailView-VMlJM-5j.js"),__vite__mapDeps([20,6,5,11,2,3]))),O_=N.lazy(()=>vt(()=>import("./SavedPapersView-BhakLwrd.js"),__vite__mapDeps([21,6,1,2,3,4,5,11]))),A_=N.lazy(()=>vt(()=>import("./CronDashboard-mLr5RZh4.js"),__vite__mapDeps([22,6,15]))),I_=N.lazy(()=>vt(()=>import("./NotFound-CLmT-1WG.js"),[])),L_=N.lazy(()=>vt(()=>import("./SearchOverlay-BKjXfD9I.js"),__vite__mapDeps([23,6,2,3,5,13,4]))),j_=()=>x.jsx("div",{className:"page","aria-busy":"true"}),D_=new iE({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}}),F_=()=>{const{arxivId:e}=tS();return x.jsx(zv,{to:e?`/paper/${e}`:"/papers",replace:!0})},oh=({element:e})=>Ua()?x.jsx(zv,{to:"/",replace:!0}):x.jsx(x.Fragment,{children:e}),$_=()=>{const[e,t]=N.useState(!1);return E_(),N.useEffect(()=>{const n=r=>{(r.metaKey||r.ctrlKey)&&r.key==="k"&&(r.preventDefault(),t(!0))};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[]),x.jsxs(x.Fragment,{children:[x.jsx(WR,{onOpenSearch:()=>t(!0)}),x.jsx("main",{children:x.jsx(N.Suspense,{fallback:x.jsx(j_,{}),children:x.jsxs(mS,{children:[x.jsx(Xe,{path:"/",element:x.jsx(b_,{})}),x.jsx(Xe,{path:"/papers",element:x.jsx(P_,{})}),x.jsx(Xe,{path:"/papers/:arxivId",element:x.jsx(F_,{})}),x.jsx(Xe,{path:"/paper/:arxivId",element:x.jsx(k_,{})}),x.jsx(Xe,{path:"/tasks",element:x.jsx(R_,{})}),x.jsx(Xe,{path:"/tasks/:taskSlug",element:x.jsx(T_,{})}),x.jsx(Xe,{path:"/methods",element:x.jsx(__,{})}),x.jsx(Xe,{path:"/methods/:methodSlug",element:x.jsx(N_,{})}),x.jsx(Xe,{path:"/benchmark/:datasetSlug",element:x.jsx(M_,{})}),x.jsx(Xe,{path:"/saved",element:x.jsx(oh,{element:x.jsx(O_,{})})}),x.jsx(Xe,{path:"/cron-dashboard",element:x.jsx(oh,{element:x.jsx(A_,{})})}),x.jsx(Xe,{path:"*",element:x.jsx(I_,{})})]})})}),e&&x.jsx(N.Suspense,{fallback:null,children:x.jsx(L_,{open:e,onClose:()=>t(!1)})})]})},z_=()=>x.jsx(sE,{client:D_,children:x.jsx(BR,{children:x.jsxs(x_,{children:[x.jsx(C_,{children:x.jsx($_,{})}),x.jsx(ET,{}),x.jsx(e_,{}),!1]})})}),U_=Tv(document.getElementById("root"));U_.render(x.jsx(N.StrictMode,{children:x.jsx(z_,{})}));export{zS as $,N as A,Ua as B,_R as C,Ba as D,hd as E,Rg as F,tS as G,dd as H,J_ as I,Wv as J,K_ as K,TS as L,V_ as M,hh as N,Y_ as O,Pr as P,G_ as Q,py as R,za as S,uE as T,yT as U,Z_ as V,dn as W,OR as X,q_ as Y,Jv as Z,QS as _,X_ as a,Gu as a0,Kv as a1,FS as a2,$S as a3,Qu as a4,Vv as a5,eE as a6,VS as a7,Ct as b,Q_ as c,Za as d,he as e,yd as f,nE as g,ki as h,ke as i,x as j,B as k,tP as l,br as m,Fe as n,Re as o,Cr as p,ec as q,f as r,H_ as s,_d as t,W_ as u,IP as v,$C as w,eN as x,XR as y,VR as z};
assets/{transform-C-0glUhY.js β†’ transform-BxhHCT2R.js} RENAMED
@@ -1 +1 @@
1
- import{Y as H}from"./index-BBLNzdQ3.js";function Oe(t){let e=2166136261;const n=t||"";for(let r=0;r<n.length;r++)e=Math.imul(e^n.charCodeAt(r),16777619);return Math.abs(e)%360}function Pe(t){return{bg:`oklch(0.94 0.04 ${t})`,text:`oklch(0.35 0.10 ${t})`,dot:`oklch(0.55 0.12 ${t})`}}function m(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 b(t,e){return t instanceof Date?new t.constructor(e):new Date(e)}const I=6048e5,J=864e5,R=6e4,j=36e5;let Z={};function W(){return Z}function k(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=m(t),i=a.getDay(),o=(i<r?7:0)+i-r;return a.setDate(a.getDate()-o),a.setHours(0,0,0,0),a}function T(t){return k(t,{weekStartsOn:1})}function A(t){const e=m(t),n=e.getFullYear(),r=b(t,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const a=T(r),i=b(t,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const o=T(i);return e.getTime()>=a.getTime()?n+1:e.getTime()>=o.getTime()?n:n-1}function F(t){const e=m(t);return e.setHours(0,0,0,0),e}function _(t){const e=m(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 K(t,e){const n=F(t),r=F(e),a=+n-_(n),i=+r-_(r);return Math.round((a-i)/J)}function tt(t){const e=A(t),n=b(t,0);return n.setFullYear(e,0,4),n.setHours(0,0,0,0),T(n)}function et(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function nt(t){if(!et(t)&&typeof t!="number")return!1;const e=m(t);return!isNaN(Number(e))}function rt(t){const e=m(t),n=b(t,0);return n.setFullYear(e.getFullYear(),0,1),n.setHours(0,0,0,0),n}const at={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"}},it=(t,e,n)=>{let r;const a=at[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 Y(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const ot={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},st={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ut={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},ct={date:Y({formats:ot,defaultWidth:"full"}),time:Y({formats:st,defaultWidth:"full"}),dateTime:Y({formats:ut,defaultWidth:"full"})},dt={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},lt=(t,e,n,r)=>dt[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 ft={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},ht={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},mt={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"]},gt={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"]},wt={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"}},yt={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"}},bt=(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"},Dt={ordinalNumber:bt,era:O({values:ft,defaultWidth:"wide"}),quarter:O({values:ht,defaultWidth:"wide",argumentCallback:t=>t-1}),month:O({values:mt,defaultWidth:"wide"}),day:O({values:gt,defaultWidth:"wide"}),dayPeriod:O({values:wt,defaultWidth:"wide",formattingValues:yt,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)?Mt(s,g=>g.test(o)):pt(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 pt(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function Mt(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return n}function Ot(t){return(e,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 Pt=/^(\d+)(th|st|nd|rd)?/i,vt=/\d+/i,kt={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},xt={any:[/^b/i,/^(a|c)/i]},Tt={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Wt={any:[/1/i,/2/i,/3/i,/4/i]},St={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},Yt={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]},Nt={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},Ct={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]},Ft={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},_t={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}},Et={ordinalNumber:Ot({matchPattern:Pt,parsePattern:vt,valueCallback:t=>parseInt(t,10)}),era:P({matchPatterns:kt,defaultMatchWidth:"wide",parsePatterns:xt,defaultParseWidth:"any"}),quarter:P({matchPatterns:Tt,defaultMatchWidth:"wide",parsePatterns:Wt,defaultParseWidth:"any",valueCallback:t=>t+1}),month:P({matchPatterns:St,defaultMatchWidth:"wide",parsePatterns:Yt,defaultParseWidth:"any"}),day:P({matchPatterns:Nt,defaultMatchWidth:"wide",parsePatterns:Ct,defaultParseWidth:"any"}),dayPeriod:P({matchPatterns:Ft,defaultMatchWidth:"any",parsePatterns:_t,defaultParseWidth:"any"})},qt={code:"en-US",formatDistance:it,formatLong:ct,formatRelative:lt,localize:Dt,match:Et,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Lt(t){const e=m(t);return K(e,rt(e))+1}function Ut(t){const e=m(t),n=+T(e)-+tt(e);return Math.round(n/I)+1}function Q(t,e){var f,g,p,M;const n=m(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??((M=(p=a.locale)==null?void 0:p.options)==null?void 0:M.firstWeekContainsDate)??1,o=b(t,0);o.setFullYear(r+1,0,i),o.setHours(0,0,0,0);const s=k(o,e),u=b(t,0);u.setFullYear(r,0,i),u.setHours(0,0,0,0);const d=k(u,e);return n.getTime()>=s.getTime()?r+1:n.getTime()>=d.getTime()?r:r-1}function Ht(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=b(t,0);return i.setFullYear(a,0,r),i.setHours(0,0,0,0),k(i,e)}function It(t,e){const n=m(t),r=+k(n,e)-+Ht(n,e);return Math.round(r/I)+1}function c(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const w={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)}},D={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},E={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 w.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=A(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 w.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=It(t,r);return e==="wo"?n.ordinalNumber(a,{unit:"week"}):c(a,e.length)},I:function(t,e,n){const r=Ut(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"}):w.d(t,e)},D:function(t,e,n){const r=Lt(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=D.noon:r===0?a=D.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=D.evening:r>=12?a=D.afternoon:r>=4?a=D.morning:a=D.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 w.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):w.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"}):w.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):w.s(t,e)},S:function(t,e){return w.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 y(r);case"XXXXX":case"XXX":default:return y(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return L(r);case"xxxx":case"xx":return y(r);case"xxxxx":case"xxx":default:return y(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+q(r,":");case"OOOO":default:return"GMT"+y(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+q(r,":");case"zzzz":default:return"GMT"+y(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 q(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):y(t,e)}function y(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 U=(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"})}},Rt=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return U(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}}",U(r,e)).replace("{{time}}",X(a,e))},jt={p:X,P:Rt},At=/^D+$/,Qt=/^Y+$/,Xt=["D","DD","YY","YYYY"];function Bt(t){return At.test(t)}function Gt(t){return Qt.test(t)}function $t(t,e,n){const r=Vt(t,e,n);if(console.warn(r),Xt.includes(t))throw new RangeError(r)}function Vt(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 zt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Jt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Zt=/^'([^]*?)'?$/,Kt=/''/g,te=/[a-zA-Z]/;function ee(t,e,n){var f,g,p,M;const r=W(),a=r.locale??qt,i=r.firstWeekContainsDate??((g=(f=r.locale)==null?void 0:f.options)==null?void 0:g.firstWeekContainsDate)??1,o=r.weekStartsOn??((M=(p=r.locale)==null?void 0:p.options)==null?void 0:M.weekStartsOn)??0,s=m(t);if(!nt(s))throw new RangeError("Invalid time value");let u=e.match(Jt).map(h=>{const l=h[0];if(l==="p"||l==="P"){const S=jt[l];return S(h,a.formatLong)}return h}).join("").match(zt).map(h=>{if(h==="''")return{isToken:!1,value:"'"};const l=h[0];if(l==="'")return{isToken:!1,value:ne(h)};if(E[l])return{isToken:!0,value:h};if(l.match(te))throw new RangeError("Format string contains an unescaped latin alphabet character `"+l+"`");return{isToken:!1,value:h}});a.localize.preprocessor&&(u=a.localize.preprocessor(s,u));const d={firstWeekContainsDate:i,weekStartsOn:o,locale:a};return u.map(h=>{if(!h.isToken)return h.value;const l=h.value;(Gt(l)||Bt(l))&&$t(l,e,String(t));const S=E[l[0]];return S(s,l,a.localize,d)}).join("")}function ne(t){const e=t.match(Zt);return e?e[1].replace(Kt,"'"):t}function B(t,e){const r=oe(t);let a;if(r.date){const u=se(r.date,2);a=ue(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=ce(r.time),isNaN(o)))return new Date(NaN);if(r.timezone){if(s=de(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+-].*)$/},re=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,ae=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,ie=/^([+-])(\d{2})(?::?(\d{2}))?$/;function oe(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 se(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 ue(t,e){if(e===null)return new Date(NaN);const n=t.match(re);if(!n)return new Date(NaN);const r=!!n[4],a=v(n[1]),i=v(n[2])-1,o=v(n[3]),s=v(n[4]),u=v(n[5])-1;if(r)return ge(e,s,u)?le(e,s,u):new Date(NaN);{const d=new Date(0);return!he(e,i,o)||!me(e,a)?new Date(NaN):(d.setUTCFullYear(e,i,Math.max(a,o)),d)}}function v(t){return t?parseInt(t):1}function ce(t){const e=t.match(ae);if(!e)return NaN;const n=N(e[1]),r=N(e[2]),a=N(e[3]);return we(n,r,a)?n*j+r*R+a*1e3:NaN}function N(t){return t&&parseFloat(t.replace(",","."))||0}function de(t){if(t==="Z")return 0;const e=t.match(ie);if(!e)return 0;const n=e[1]==="+"?-1:1,r=parseInt(e[2]),a=e[3]&&parseInt(e[3])||0;return ye(r,a)?n*(r*j+a*R):NaN}function le(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 fe=[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 he(t,e,n){return e>=0&&e<=11&&n>=1&&n<=(fe[e]||(G(t)?29:28))}function me(t,e){return e>=1&&e<=(G(t)?366:365)}function ge(t,e,n){return e>=1&&e<=53&&n>=0&&n<=6}function we(t,e,n){return t===24?e===0&&n===0:n>=0&&n<60&&e>=0&&e<60&&t>=0&&t<25}function ye(t,e){return e>=0&&e<=59}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 $(t){if(!t)return null;try{const e=typeof t=="string"?B(t):t;return ee(e,"MMM d, yyyy")}catch{return null}}function V(t){if(!t)return null;try{return B(t).getFullYear()}catch{return null}}function ve(t){var i,o;const{github:e,githubUrl:n,velocity24h:r}=be(t.repositories),a=(t.tasks||[]).map(s=>s.slug||"").filter(Boolean);return{id:t.arxiv_id||t.id,dbId:t.id,title:t.title,abstract:t.abstract||"",authors:t.authors||[],tags:a,citations:t.citation_count||0,github:e,githubUrl:n,project:((o=(i=t.project_pages)==null?void 0:i[0])==null?void 0:o.url)||null,date:$(t.published),publishedIso:t.published||null,year:V(t.published),thumbnailUrl:H(t.thumbnail_url)||null,tldr:t.tldr||null,version:t.version||"v1",velocity24h:r}}function ke(t){var e,n,r;return{id:t.arxiv_id||t.paper_id,dbId:t.paper_id,title:t.title,abstract:t.abstract||"",authors:t.authors||[],tags:(t.tasks||[]).map(a=>a.slug).filter(Boolean),citations:0,github:((e=t.repository)==null?void 0:e.num_stars)??null,githubUrl:((n=t.repository)==null?void 0:n.url)??null,project:null,date:$(t.date_published),publishedIso:t.date_published,year:V(t.date_published),thumbnailUrl:H(t.thumbnail_url)||null,tldr:null,version:"v1",velocity24h:((r=t.trending)==null?void 0:r.velocity_24h)??null}}function De(t){const e=z.get(t.toLowerCase());if(e)return e;const n=t.toUpperCase();return C.has(n)?n:t.replace(/[-_]+/g," ").replace(/\b\w/g,r=>r.toUpperCase())}const C=new Set(["OCR"]),z=new Map([["3d-generation","3D generation"],["3d-understanding","3D understanding"]]);function xe(t,e){const n=t||De(e||""),r=z.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&&C.has(a)||C.has(i)?i:n.toLowerCase().replace(/\b\w/g,s=>s.toUpperCase())}function pe(t){return t.trim().toLowerCase().replace(/[\s_]+/g,"-")}export{ve as a,m as b,k as c,xe as d,be as e,Pe as f,De as g,Oe as h,F as s,ke as t};
 
1
+ import{Y as H}from"./index-BHu3ckjy.js";function Oe(t){let e=2166136261;const n=t||"";for(let r=0;r<n.length;r++)e=Math.imul(e^n.charCodeAt(r),16777619);return Math.abs(e)%360}function Pe(t){return{bg:`oklch(0.94 0.04 ${t})`,text:`oklch(0.35 0.10 ${t})`,dot:`oklch(0.55 0.12 ${t})`}}function m(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 b(t,e){return t instanceof Date?new t.constructor(e):new Date(e)}const I=6048e5,J=864e5,R=6e4,j=36e5;let Z={};function W(){return Z}function k(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=m(t),i=a.getDay(),o=(i<r?7:0)+i-r;return a.setDate(a.getDate()-o),a.setHours(0,0,0,0),a}function T(t){return k(t,{weekStartsOn:1})}function A(t){const e=m(t),n=e.getFullYear(),r=b(t,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const a=T(r),i=b(t,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const o=T(i);return e.getTime()>=a.getTime()?n+1:e.getTime()>=o.getTime()?n:n-1}function F(t){const e=m(t);return e.setHours(0,0,0,0),e}function _(t){const e=m(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 K(t,e){const n=F(t),r=F(e),a=+n-_(n),i=+r-_(r);return Math.round((a-i)/J)}function tt(t){const e=A(t),n=b(t,0);return n.setFullYear(e,0,4),n.setHours(0,0,0,0),T(n)}function et(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function nt(t){if(!et(t)&&typeof t!="number")return!1;const e=m(t);return!isNaN(Number(e))}function rt(t){const e=m(t),n=b(t,0);return n.setFullYear(e.getFullYear(),0,1),n.setHours(0,0,0,0),n}const at={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"}},it=(t,e,n)=>{let r;const a=at[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 Y(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const ot={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},st={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ut={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},ct={date:Y({formats:ot,defaultWidth:"full"}),time:Y({formats:st,defaultWidth:"full"}),dateTime:Y({formats:ut,defaultWidth:"full"})},dt={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},lt=(t,e,n,r)=>dt[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 ft={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},ht={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},mt={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"]},gt={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"]},wt={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"}},yt={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"}},bt=(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"},Dt={ordinalNumber:bt,era:O({values:ft,defaultWidth:"wide"}),quarter:O({values:ht,defaultWidth:"wide",argumentCallback:t=>t-1}),month:O({values:mt,defaultWidth:"wide"}),day:O({values:gt,defaultWidth:"wide"}),dayPeriod:O({values:wt,defaultWidth:"wide",formattingValues:yt,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)?Mt(s,g=>g.test(o)):pt(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 pt(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function Mt(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return n}function Ot(t){return(e,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 Pt=/^(\d+)(th|st|nd|rd)?/i,vt=/\d+/i,kt={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},xt={any:[/^b/i,/^(a|c)/i]},Tt={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Wt={any:[/1/i,/2/i,/3/i,/4/i]},St={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},Yt={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]},Nt={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},Ct={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]},Ft={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},_t={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}},Et={ordinalNumber:Ot({matchPattern:Pt,parsePattern:vt,valueCallback:t=>parseInt(t,10)}),era:P({matchPatterns:kt,defaultMatchWidth:"wide",parsePatterns:xt,defaultParseWidth:"any"}),quarter:P({matchPatterns:Tt,defaultMatchWidth:"wide",parsePatterns:Wt,defaultParseWidth:"any",valueCallback:t=>t+1}),month:P({matchPatterns:St,defaultMatchWidth:"wide",parsePatterns:Yt,defaultParseWidth:"any"}),day:P({matchPatterns:Nt,defaultMatchWidth:"wide",parsePatterns:Ct,defaultParseWidth:"any"}),dayPeriod:P({matchPatterns:Ft,defaultMatchWidth:"any",parsePatterns:_t,defaultParseWidth:"any"})},qt={code:"en-US",formatDistance:it,formatLong:ct,formatRelative:lt,localize:Dt,match:Et,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Lt(t){const e=m(t);return K(e,rt(e))+1}function Ut(t){const e=m(t),n=+T(e)-+tt(e);return Math.round(n/I)+1}function Q(t,e){var f,g,p,M;const n=m(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??((M=(p=a.locale)==null?void 0:p.options)==null?void 0:M.firstWeekContainsDate)??1,o=b(t,0);o.setFullYear(r+1,0,i),o.setHours(0,0,0,0);const s=k(o,e),u=b(t,0);u.setFullYear(r,0,i),u.setHours(0,0,0,0);const d=k(u,e);return n.getTime()>=s.getTime()?r+1:n.getTime()>=d.getTime()?r:r-1}function Ht(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=b(t,0);return i.setFullYear(a,0,r),i.setHours(0,0,0,0),k(i,e)}function It(t,e){const n=m(t),r=+k(n,e)-+Ht(n,e);return Math.round(r/I)+1}function c(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const w={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)}},D={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},E={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 w.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=A(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 w.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=It(t,r);return e==="wo"?n.ordinalNumber(a,{unit:"week"}):c(a,e.length)},I:function(t,e,n){const r=Ut(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"}):w.d(t,e)},D:function(t,e,n){const r=Lt(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=D.noon:r===0?a=D.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=D.evening:r>=12?a=D.afternoon:r>=4?a=D.morning:a=D.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 w.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):w.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"}):w.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):w.s(t,e)},S:function(t,e){return w.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 y(r);case"XXXXX":case"XXX":default:return y(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return L(r);case"xxxx":case"xx":return y(r);case"xxxxx":case"xxx":default:return y(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+q(r,":");case"OOOO":default:return"GMT"+y(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+q(r,":");case"zzzz":default:return"GMT"+y(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 q(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):y(t,e)}function y(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 U=(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"})}},Rt=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return U(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}}",U(r,e)).replace("{{time}}",X(a,e))},jt={p:X,P:Rt},At=/^D+$/,Qt=/^Y+$/,Xt=["D","DD","YY","YYYY"];function Bt(t){return At.test(t)}function Gt(t){return Qt.test(t)}function $t(t,e,n){const r=Vt(t,e,n);if(console.warn(r),Xt.includes(t))throw new RangeError(r)}function Vt(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 zt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Jt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Zt=/^'([^]*?)'?$/,Kt=/''/g,te=/[a-zA-Z]/;function ee(t,e,n){var f,g,p,M;const r=W(),a=r.locale??qt,i=r.firstWeekContainsDate??((g=(f=r.locale)==null?void 0:f.options)==null?void 0:g.firstWeekContainsDate)??1,o=r.weekStartsOn??((M=(p=r.locale)==null?void 0:p.options)==null?void 0:M.weekStartsOn)??0,s=m(t);if(!nt(s))throw new RangeError("Invalid time value");let u=e.match(Jt).map(h=>{const l=h[0];if(l==="p"||l==="P"){const S=jt[l];return S(h,a.formatLong)}return h}).join("").match(zt).map(h=>{if(h==="''")return{isToken:!1,value:"'"};const l=h[0];if(l==="'")return{isToken:!1,value:ne(h)};if(E[l])return{isToken:!0,value:h};if(l.match(te))throw new RangeError("Format string contains an unescaped latin alphabet character `"+l+"`");return{isToken:!1,value:h}});a.localize.preprocessor&&(u=a.localize.preprocessor(s,u));const d={firstWeekContainsDate:i,weekStartsOn:o,locale:a};return u.map(h=>{if(!h.isToken)return h.value;const l=h.value;(Gt(l)||Bt(l))&&$t(l,e,String(t));const S=E[l[0]];return S(s,l,a.localize,d)}).join("")}function ne(t){const e=t.match(Zt);return e?e[1].replace(Kt,"'"):t}function B(t,e){const r=oe(t);let a;if(r.date){const u=se(r.date,2);a=ue(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=ce(r.time),isNaN(o)))return new Date(NaN);if(r.timezone){if(s=de(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+-].*)$/},re=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,ae=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,ie=/^([+-])(\d{2})(?::?(\d{2}))?$/;function oe(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 se(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 ue(t,e){if(e===null)return new Date(NaN);const n=t.match(re);if(!n)return new Date(NaN);const r=!!n[4],a=v(n[1]),i=v(n[2])-1,o=v(n[3]),s=v(n[4]),u=v(n[5])-1;if(r)return ge(e,s,u)?le(e,s,u):new Date(NaN);{const d=new Date(0);return!he(e,i,o)||!me(e,a)?new Date(NaN):(d.setUTCFullYear(e,i,Math.max(a,o)),d)}}function v(t){return t?parseInt(t):1}function ce(t){const e=t.match(ae);if(!e)return NaN;const n=N(e[1]),r=N(e[2]),a=N(e[3]);return we(n,r,a)?n*j+r*R+a*1e3:NaN}function N(t){return t&&parseFloat(t.replace(",","."))||0}function de(t){if(t==="Z")return 0;const e=t.match(ie);if(!e)return 0;const n=e[1]==="+"?-1:1,r=parseInt(e[2]),a=e[3]&&parseInt(e[3])||0;return ye(r,a)?n*(r*j+a*R):NaN}function le(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 fe=[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 he(t,e,n){return e>=0&&e<=11&&n>=1&&n<=(fe[e]||(G(t)?29:28))}function me(t,e){return e>=1&&e<=(G(t)?366:365)}function ge(t,e,n){return e>=1&&e<=53&&n>=0&&n<=6}function we(t,e,n){return t===24?e===0&&n===0:n>=0&&n<60&&e>=0&&e<60&&t>=0&&t<25}function ye(t,e){return e>=0&&e<=59}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 $(t){if(!t)return null;try{const e=typeof t=="string"?B(t):t;return ee(e,"MMM d, yyyy")}catch{return null}}function V(t){if(!t)return null;try{return B(t).getFullYear()}catch{return null}}function ve(t){var i,o;const{github:e,githubUrl:n,velocity24h:r}=be(t.repositories),a=(t.tasks||[]).map(s=>s.slug||"").filter(Boolean);return{id:t.arxiv_id||t.id,dbId:t.id,title:t.title,abstract:t.abstract||"",authors:t.authors||[],tags:a,citations:t.citation_count||0,github:e,githubUrl:n,project:((o=(i=t.project_pages)==null?void 0:i[0])==null?void 0:o.url)||null,date:$(t.published),publishedIso:t.published||null,year:V(t.published),thumbnailUrl:H(t.thumbnail_url)||null,tldr:t.tldr||null,version:t.version||"v1",velocity24h:r}}function ke(t){var e,n,r;return{id:t.arxiv_id||t.paper_id,dbId:t.paper_id,title:t.title,abstract:t.abstract||"",authors:t.authors||[],tags:(t.tasks||[]).map(a=>a.slug).filter(Boolean),citations:0,github:((e=t.repository)==null?void 0:e.num_stars)??null,githubUrl:((n=t.repository)==null?void 0:n.url)??null,project:null,date:$(t.date_published),publishedIso:t.date_published,year:V(t.date_published),thumbnailUrl:H(t.thumbnail_url)||null,tldr:null,version:"v1",velocity24h:((r=t.trending)==null?void 0:r.velocity_24h)??null}}function De(t){const e=z.get(t.toLowerCase());if(e)return e;const n=t.toUpperCase();return C.has(n)?n:t.replace(/[-_]+/g," ").replace(/\b\w/g,r=>r.toUpperCase())}const C=new Set(["OCR"]),z=new Map([["3d-generation","3D generation"],["3d-understanding","3D understanding"]]);function xe(t,e){const n=t||De(e||""),r=z.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&&C.has(a)||C.has(i)?i:n.toLowerCase().replace(/\b\w/g,s=>s.toUpperCase())}function pe(t){return t.trim().toLowerCase().replace(/[\s_]+/g,"-")}export{ve as a,m as b,k as c,xe as d,be as e,Pe as f,De as g,Oe as h,F as s,ke as t};
assets/{useDebounce-cTTjH_Sm.js β†’ useDebounce-DslTjWNw.js} RENAMED
@@ -1 +1 @@
1
- import{r as o}from"./index-BBLNzdQ3.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};
 
1
+ import{r as o}from"./index-BHu3ckjy.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};
assets/{useInfiniteQuery-BYHbC7kX.js β†’ useInfiniteQuery-DPq_eewq.js} RENAMED
@@ -1 +1 @@
1
- import{Q as v,h as p}from"./adminAuth-BcLoDHjH.js";import{O as x,Q as b}from"./index-BBLNzdQ3.js";var l=class extends v{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var f,P;const{state:s}=e,i=super.createResult(e,t),{isFetching:a,isRefetching:g,isError:c,isRefetchError:d}=i,r=(P=(f=s.fetchMeta)==null?void 0:f.fetchMore)==null?void 0:P.direction,h=c&&r==="forward",n=a&&r==="forward",o=c&&r==="backward",u=a&&r==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:b(t,s.data),hasPreviousPage:x(t,s.data),isFetchNextPageError:h,isFetchingNextPage:n,isFetchPreviousPageError:o,isFetchingPreviousPage:u,isRefetchError:d&&!h&&!o,isRefetching:g&&!n&&!u}}};function O(e,t){return p(e,l)}export{O as u};
 
1
+ import{Q as v,h as p}from"./adminAuth-W6_tdZNU.js";import{O as x,Q as b}from"./index-BHu3ckjy.js";var l=class extends v{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var f,P;const{state:s}=e,i=super.createResult(e,t),{isFetching:a,isRefetching:g,isError:c,isRefetchError:d}=i,r=(P=(f=s.fetchMeta)==null?void 0:f.fetchMore)==null?void 0:P.direction,h=c&&r==="forward",n=a&&r==="forward",o=c&&r==="backward",u=a&&r==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:b(t,s.data),hasPreviousPage:x(t,s.data),isFetchNextPageError:h,isFetchingNextPage:n,isFetchPreviousPageError:o,isFetchingPreviousPage:u,isRefetchError:d&&!h&&!o,isRefetching:g&&!n&&!u}}};function O(e,t){return p(e,l)}export{O as u};
assets/{useIntersectionObserver-BzvTehzD.js β†’ useIntersectionObserver-BIld5T_u.js} RENAMED
@@ -1 +1 @@
1
- import{r}from"./index-BBLNzdQ3.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};
 
1
+ import{r}from"./index-BHu3ckjy.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};
assets/{usePapers-B6SkGdse.js β†’ usePapers-BJol1iZF.js} RENAMED
@@ -1 +1 @@
1
- import{K as f}from"./index-BBLNzdQ3.js";import{u as g}from"./adminAuth-BcLoDHjH.js";import{u as m}from"./useInfiniteQuery-BYHbC7kX.js";import{a as p}from"./api-BrmxIuWZ.js";function q(a,e=!0){return g({queryKey:["paper",a],queryFn:()=>p.getPaper(a),enabled:e&&!!a,staleTime:10*60*1e3,refetchOnWindowFocus:!1})}function F(a={}){const{page_size:e=20,search:r,order_by:t="date_published",order_dir:n="desc",time:i,published_after:u,published_before:o,conference:s,latest_only:d=!0,include_resources:c=!1,enabled:y=!0}=a;return m({queryKey:["papers-infinite",{page_size:e,search:r,order_by:t,order_dir:n,time:i,published_after:u,published_before:o,conference:s,latest_only:d,include_resources:c}],queryFn:({pageParam:l=1})=>p.getPapers({page:l,page_size:e,search:r,order_by:t,order_dir:n,time:i,published_after:u,published_before:o,conference:s,latest_only:d,include_resources:c}),getNextPageParam:l=>l.next_page,initialPageParam:1,enabled:y,staleTime:5*60*1e3,placeholderData:f,refetchOnWindowFocus:!1})}function T(a){const{taskId:e,page_size:r=20,order_by:t="date_published",order_dir:n="desc",latest_only:i=!0,include_resources:u=!0,enabled:o=!0}=a;return m({queryKey:["task-papers-infinite",e,{page_size:r,order_by:t,order_dir:n,latest_only:i,include_resources:u}],queryFn:({pageParam:s=1})=>p.getTaskPapers(e,{page:s,page_size:r,order_by:t,order_dir:n,latest_only:i,include_resources:u}),getNextPageParam:s=>s.next_page,initialPageParam:1,enabled:o&&!!e,staleTime:5*60*1e3,placeholderData:f,refetchOnWindowFocus:!1})}function x(a={}){const{limit:e=20,max_age_days:r=180,min_velocity:t,enabled:n=!0}=a;return g({queryKey:["trending-papers",{limit:e,max_age_days:r,min_velocity:t}],queryFn:()=>p.getTrendingPapers({limit:e,max_age_days:r,min_velocity:t}),enabled:n,staleTime:2*60*1e3,refetchOnWindowFocus:!1})}export{x as a,q as b,T as c,F as u};
 
1
+ import{K as f}from"./index-BHu3ckjy.js";import{u as g}from"./adminAuth-W6_tdZNU.js";import{u as m}from"./useInfiniteQuery-DPq_eewq.js";import{a as p}from"./api-gdpmQjJd.js";function q(a,e=!0){return g({queryKey:["paper",a],queryFn:()=>p.getPaper(a),enabled:e&&!!a,staleTime:10*60*1e3,refetchOnWindowFocus:!1})}function F(a={}){const{page_size:e=20,search:r,order_by:t="date_published",order_dir:n="desc",time:i,published_after:u,published_before:o,conference:s,latest_only:d=!0,include_resources:c=!1,enabled:y=!0}=a;return m({queryKey:["papers-infinite",{page_size:e,search:r,order_by:t,order_dir:n,time:i,published_after:u,published_before:o,conference:s,latest_only:d,include_resources:c}],queryFn:({pageParam:l=1})=>p.getPapers({page:l,page_size:e,search:r,order_by:t,order_dir:n,time:i,published_after:u,published_before:o,conference:s,latest_only:d,include_resources:c}),getNextPageParam:l=>l.next_page,initialPageParam:1,enabled:y,staleTime:5*60*1e3,placeholderData:f,refetchOnWindowFocus:!1})}function T(a){const{taskId:e,page_size:r=20,order_by:t="date_published",order_dir:n="desc",latest_only:i=!0,include_resources:u=!0,enabled:o=!0}=a;return m({queryKey:["task-papers-infinite",e,{page_size:r,order_by:t,order_dir:n,latest_only:i,include_resources:u}],queryFn:({pageParam:s=1})=>p.getTaskPapers(e,{page:s,page_size:r,order_by:t,order_dir:n,latest_only:i,include_resources:u}),getNextPageParam:s=>s.next_page,initialPageParam:1,enabled:o&&!!e,staleTime:5*60*1e3,placeholderData:f,refetchOnWindowFocus:!1})}function x(a={}){const{limit:e=20,max_age_days:r=180,min_velocity:t,enabled:n=!0}=a;return g({queryKey:["trending-papers",{limit:e,max_age_days:r,min_velocity:t}],queryFn:()=>p.getTrendingPapers({limit:e,max_age_days:r,min_velocity:t}),enabled:n,staleTime:2*60*1e3,refetchOnWindowFocus:!1})}export{x as a,q as b,T as c,F as u};
assets/{usePeriodFilter-Cqf3tn7X.js β†’ usePeriodFilter-D7A3mTfk.js} RENAMED
@@ -1 +1 @@
1
- import{r}from"./index-BBLNzdQ3.js";import{b as a,s as f,c as u}from"./transform-C-0glUhY.js";function l(s){const t=a(s);return t.setDate(1),t.setHours(0,0,0,0),t}const h=["Today","This Week","This Month","All Time"];function T(s="All Time"){const[t,i]=r.useState(s),n=r.useMemo(()=>{const o=new Date;let e=null;return t==="Today"?e=f(o):t==="This Week"?e=u(o,{weekStartsOn:1}):t==="This Month"&&(e=l(o)),e?e.toISOString():void 0},[t]);return{period:t,setPeriod:i,publishedAfter:n}}export{h as P,T as u};
 
1
+ import{r}from"./index-BHu3ckjy.js";import{b as a,s as f,c as u}from"./transform-BxhHCT2R.js";function l(s){const t=a(s);return t.setDate(1),t.setHours(0,0,0,0),t}const h=["Today","This Week","This Month","All Time"];function T(s="All Time"){const[t,i]=r.useState(s),n=r.useMemo(()=>{const o=new Date;let e=null;return t==="Today"?e=f(o):t==="This Week"?e=u(o,{weekStartsOn:1}):t==="This Month"&&(e=l(o)),e?e.toISOString():void 0},[t]);return{period:t,setPeriod:i,publishedAfter:n}}export{h as P,T as u};
index.html CHANGED
@@ -14,7 +14,7 @@
14
 
15
  <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
16
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.css" integrity="sha384-n8MVd4RsNIU0tAv4ct0nTaAbDJwPJzDEaqSD1odI+WdtXRGWt2kTvGFasHpSy3SV" crossorigin="anonymous" />
17
- <script type="module" crossorigin src="/assets/index-BBLNzdQ3.js"></script>
18
  <link rel="stylesheet" crossorigin href="/assets/index-CUKtEwaH.css">
19
  </head>
20
  <body>
 
14
 
15
  <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
16
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.css" integrity="sha384-n8MVd4RsNIU0tAv4ct0nTaAbDJwPJzDEaqSD1odI+WdtXRGWt2kTvGFasHpSy3SV" crossorigin="anonymous" />
17
+ <script type="module" crossorigin src="/assets/index-BHu3ckjy.js"></script>
18
  <link rel="stylesheet" crossorigin href="/assets/index-CUKtEwaH.css">
19
  </head>
20
  <body>